Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
sequencelengths
0
101
negative_scores
sequencelengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
! moment.js locale configuration
function t(e,t,n){var r,o;return"m"===n?t?"хвіліна":"хвіліну":"h"===n?t?"гадзіна":"гадзіну":e+" "+(r=+e,o={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[n].split("_"),r%10==1&&r%100!=11?o[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?o[1]:o[2])}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var o={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?o[n][0]:o[n][1]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var o={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?o[n][0]:o[n][1]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var o={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?o[n][0]:o[n][1]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var o={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?o[n][2]?o[n][2]:o[n][1]:r?o[n][0]:o[n][1]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var o={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return r?o[n][0]:o[n][1]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var o={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return r?o[n][0]:o[n][1]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e){return e%100==11||e%10!=1}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var o={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?o[n][0]:o[n][1]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n){var r=" ";return(e%100>=20||e>=100&&e%100==0)&&(r=" de "),e+r+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"}[n]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n){var r,o;return"m"===n?t?"минута":"минуту":e+" "+(r=+e,o={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),r%10==1&&r%100!=11?o[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?o[1]:o[2])}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var o=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"ss":return o+=1===e?t?"sekundo":"sekundi":2===e?t||r?"sekundi":"sekundah":e<5?t||r?"sekunde":"sekundah":"sekund";case"m":return t?"ena minuta":"eno minuto";case"mm":return o+=1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami";case"h":return t?"ena ura":"eno uro";case"hh":return o+=1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami";case"d":return t||r?"en dan":"enim dnem";case"dd":return o+=1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi";case"M":return t||r?"en mesec":"enim mesecem";case"MM":return o+=1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci";case"y":return t||r?"eno leto":"enim letom";case"yy":return o+=1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti"}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var o={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return r||t?o[n][0]:o[n][1]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! moment.js locale configuration
function t(e,t,n){var r,o;return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(r=+e,o={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),r%10==1&&r%100!=11?o[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?o[1]:o[2])}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n],+e)}", "function Os(e,t,n){return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[n],+e)}", "function At(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?a[1]:a[2]}({ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"}[a],+e)}", "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}else{if(typeof console!=='undefined'&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale '+key+' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "function hd(i,ee,te){return i+\" \"+function kd(i,ee){return 2===ee?function ld(i){var ee={m:\"v\",b:\"v\",d:\"z\"};return void 0===ee[i.charAt(0)]?i:ee[i.charAt(0)]+i.substring(1)}\n//! moment.js locale configuration\n//! locale : bosnian (bs)\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n(i):i}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[te],i)}", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "function localizeMoment(mom) {\n\t\t\tmom._locale = localeData;\n\t\t}", "function Io(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+i[n]}//! moment.js locale configuration", "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\r\n\tglobalLocale=data;}}return globalLocale._abbr;}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\",\n 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:2121\");\n\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else\n {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else\n {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n __f__(\"warn\", 'Locale ' + key + ' not found. Did you forget to load it?', \" at node_modules/moment/moment.js:1880\");\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "static getLocale() {\n return 'en_US';\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}" ]
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.6094649", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60929024", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.60782045", "0.6077035", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029", "0.6073029" ]
0.0
-1
! FullCalendar Interaction Plugin v4.4.2 Docs & License: (c) 2019 Adam Shaw /! Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
function Tl(e,t){function n(){this.constructor=e}El(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderedCallback(){\n // Performs this operation only on first render\n if (this.fullCalendarJsInitialised) {\n return;\n }\n this.fullCalendarJsInitialised = true;\n\n\n Promise.all([\n loadScript(this, FullCalendar + '/jquery.min.js'),\n loadScript(this, FullCalendar + '/jquery-ui.min.js'),\n loadScript(this, FullCalendar + '/moment.min.js'),\n loadScript(this, FullCalendar + '/fullcalendar.min.js'),\n\n loadStyle(this, FullCalendar + '/fullcalendar.min.css'),\n loadStyle(this, FullCalendar + '/custom.css')\n ]).then(() => {\n \n // the modal[c-modal-new-absence] rather than calling the current component \n //we have no problem instanciating a new component from one of them\n let newAbsenceElem = this.template.querySelector('c-modal-new-absence');\n \n \n //get the dom element to contain the Full calendar \n const ele = this.template.querySelector('div.fullcalendarjs');\n\n //spinner to wait for the calendar to load (optional UI element)\n this.spinnerFC = false;\n // check if the Calendar will be reloaded on a preset date\n let presetDate = null\n let tmpPreset = $(ele).fullCalendar('getDate')\n if (tmpPreset._fullCalendar) { presetDate = helper.formatDate(tmpPreset) }\n\n //destroy the old calendar \n $(ele).fullCalendar('destroy')\n\n //configure the dom Full calendar with JSON object \n //some features are commented , we may need them in future use cases\n\n //we can checkout the docs of every word inside this JSON object here https://fullcalendar.io/docs/ \n // for example if we are looking for :\n // plugins \n // https://fullcalendar.io/docs/plugins/plugins \n // \n // eventClick \n // https://fullcalendar.io/docs/plugins/eventClick \n // \n // interaction\n // https://fullcalendar.io/docs/plugins/interaction \n\n\n $(ele).fullCalendar({\n plugins: ['interaction', 'dayGrid', 'list', 'timeGrid'],\n hiddenDays: [],\n header: {\n right: 'prev,next',\n center: 'title',\n left: 'month,basicWeek'//,basicDay,weekendToggle\n },\n // eventLimit: true,\n //display Monday as the first day of the week \n firstDay: 1,\n selectable: true,\n // selectOverlap: false,\n // selectOverlap:function(event) {\n // return event.rendering === 'background';\n // },\n // selectMinDistance:2,\n selectHelper: true,\n // defaultDate: new Date(),\n defaultDate: presetDate == null ? new Date() : presetDate,\n // gotoDate: customDefaultDate,\n navLinks: true,\n editable: true,\n select: function (start, end) {\n console.log('selecting from' + start + 'to' + end);\n let newAbsence = {\n \"StartDate__c\": helper.formatDate(start),\n \"EndDate__c\": helper.addDays(end, (-1)),\n \"Workdays__c\": 0,\n \"Approval__c\": \"\",\n \"Certificate__c\": \"\",\n \"Email__c\": '[email protected]',\n \"DangerToEmployees__c\": \"\",\n \"AbsenceManager__c\": \"\"\n }\n newAbsenceElem.openModal(newAbsence);\n },\n \n // weekends: false,\n //same as weekends: false\n dayRender: function (date, cell) {\n let arrHolidays = helper.listOfHolidays.map(x => x.date__c)\n let currentDate = helper.formatDate(date);\n if (arrHolidays.includes(currentDate) || helper.isWeekend(currentDate)) {\n cell.addClass('my-custom-disabled-event');\n let evList = helper.listOfHolidays.filter(p => p.date__c == currentDate)\n if (evList.length > 0) {\n let eventName = evList[0].holidayName__c\n cell.html(`<h3>${eventName}</h3>`)\n cell.css('text-align', 'center')\n cell.css('vertical-align', 'middle')\n cell.css('color', 'white')\n }\n }\n },\n\n \n \n \n });\n \n })}", "function eventCalendar() {\n return $('#calendar').fullCalendar({ \n header: {\n left: 'prev,next today',\n center: 'title',\n right: 'month, agendaWeek, agendaDay'\n },\n selectable: true,\n selectHelper: true,\n editable: true,\n eventLimit: true,\n events: '/work_orders.json',\n\n select: function(start, end) {\n $.getScript('/work_orders/new', function() {\n $('.start_hidden').val(moment(start).format('YYYY-MM-DD HH:mm'));\n $('.end_hidden').val(moment(end).format('YYYY-MM-DD HH:mm'));\n });\n\n this.calendar.fullCalendar('unselect');\n },\n\n eventDrop: function(work_order, delta, revertFunc) {\n event_data = { \n event: {\n id: work_order.id,\n start: work_order.start_time.format(),\n end: work_order.end_time.format()\n }\n };\n $.ajax({\n url: work_order.update_url,\n data: event_data,\n type: 'PATCH'\n });\n },\n \n eventClick: function(work_order, jsEvent, view) {\n $.getScript(work_order.edit_url, function() {});\n }\n\n });\n}", "function fa(c,d,e){function f(a){wa=a,g(),U?i():// first time rendering?\nh()}function g(){Ha=Na(\"theme\")?\"ui\":\"fc\",Ia=Na(\"isRTL\"),La=Na(\"columnFormat\"),Ja=b.duration(Na(\"minTime\")),Ka=b.duration(Na(\"maxTime\")),qa=b.duration(Na(\"slotDuration\")),sa=Na(\"snapDuration\"),sa=sa?b.duration(sa):qa}/* Build DOM\n\t-----------------------------------------------------------------------*/\nfunction h(){var d,e,f,g,h=Ha+\"-widget-header\",j=Ha+\"-widget-content\",k=qa.asMinutes()%15===0;for(i(),ba=a(\"<div style='position:absolute;z-index:2;left:0;width:100%'/>\").appendTo(c),Na(\"allDaySlot\")?(ca=a(\"<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>\").appendTo(ba),d=\"<table style='width:100%' class='fc-agenda-allday' cellspacing='0'><tr><th class='\"+h+\" fc-agenda-axis'>\"+(Na(\"allDayHTML\")||F(Na(\"allDayText\")))+\"</th><td><div class='fc-day-content'><div style='position:relative'/></div></td><th class='\"+h+\" fc-agenda-gutter'>&nbsp;</th></tr></table>\",da=a(d).appendTo(ba),ea=da.find(\"tr\"),q(ea.find(\"td\")),ba.append(\"<div class='fc-agenda-divider \"+h+\"'><div class='fc-agenda-divider-inner'/></div>\")):ca=a([]),fa=a(\"<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>\").appendTo(ba),ha=a(\"<div style='position:relative;width:100%;overflow:hidden'/>\").appendTo(fa),ia=a(\"<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>\").appendTo(ha),d=\"<table class='fc-agenda-slots' style='width:100%' cellspacing='0'><tbody>\",e=b.duration(+Ja),// i wish there was .clone() for durations\nxa=0;e<Ka;)f=T.start.clone().time(e),// will be in UTC but that's good. to avoid DST issues\ng=f.minutes(),d+=\"<tr class='fc-slot\"+xa+\" \"+(g?\"fc-minor\":\"\")+\"'><th class='fc-agenda-axis \"+h+\"'>\"+(k&&g?\"&nbsp;\":F(Ya(f,Na(\"axisFormat\"))))+\"</th><td class='\"+j+\"'><div style='position:relative'>&nbsp;</div></td></tr>\",e.add(qa),xa++;d+=\"</tbody></table>\",ja=a(d).appendTo(ha),t(ja.find(\"td\"))}/* Build Day Table\n\t-----------------------------------------------------------------------*/\nfunction i(){var b=j();U&&U.remove(),U=a(b).appendTo(c),V=U.find(\"thead\"),W=V.find(\"th\").slice(1,-1),// exclude gutter\nX=U.find(\"tbody\"),Y=X.find(\"td\").slice(0,-1),// exclude gutter\nZ=Y.find(\"> div\"),$=Y.find(\".fc-day-content > div\"),_=Y.eq(0),aa=Z.eq(0),I(V.add(V.find(\"tr\"))),I(X.add(X.find(\"tr\")))}function j(){var a=\"<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>\"+k()+l()+\"</table>\";return a}function k(){var a,b,c,d=Ha+\"-widget-header\",e=\"\";for(e+=\"<thead><tr>\",Na(\"weekNumbers\")?(a=Va(0,0),b=Za(a),Ia?b+=Na(\"weekNumberTitle\"):b=Na(\"weekNumberTitle\")+b,e+=\"<th class='fc-agenda-axis fc-week-number \"+d+\"'>\"+F(b)+\"</th>\"):e+=\"<th class='fc-agenda-axis \"+d+\"'>&nbsp;</th>\",c=0;c<wa;c++)a=Va(0,c),e+=\"<th class='fc-\"+Ma[a.day()]+\" fc-col\"+c+\" \"+d+\"'>\"+F(Ya(a,La))+\"</th>\";return e+=\"<th class='fc-agenda-gutter \"+d+\"'>&nbsp;</th></tr></thead>\"}function l(){var a,b,c,e,f,g=Ha+\"-widget-header\",h=Ha+\"-widget-content\",i=d.getNow().stripTime(),j=\"\";for(j+=\"<tbody><tr><th class='fc-agenda-axis \"+g+\"'>&nbsp;</th>\",c=\"\",b=0;b<wa;b++)a=Va(0,b),f=[\"fc-col\"+b,\"fc-\"+Ma[a.day()],h],a.isSame(i,\"day\")?f.push(Ha+\"-state-highlight\",\"fc-today\"):a<i?f.push(\"fc-past\"):f.push(\"fc-future\"),e=\"<td class='\"+f.join(\" \")+\"'><div><div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></div></td>\",c+=e;return j+=c,j+=\"<td class='fc-agenda-gutter \"+h+\"'>&nbsp;</td></tr></tbody>\"}\n// TODO: data-date on the cells\n/* Dimensions\n\t-----------------------------------------------------------------------*/\nfunction m(a){void 0===a&&(a=ma),ma=a,$a={};var b=X.position().top,c=fa.position().top,d=Math.min(// total body height, including borders\na-b,// when scrollbars\nja.height()+c+1);aa.height(d-x(_)),ba.css(\"top\",b),fa.height(d-c-1);\n// the stylesheet guarantees that the first row has no border.\n// this allows .height() to work well cross-browser.\nvar e=ja.find(\"tr:first\").height()+1,f=ja.find(\"tr:eq(1)\").height();\n// HACK: i forget why we do this, but i think a cross-browser issue\nra=(e+f)/2,ta=qa/sa,va=ra/ta}function n(b){la=b,Fa.clear(),Ga.clear();var c=V.find(\"th:first\");da&&(c=c.add(da.find(\"th:first\"))),c=c.add(ja.find(\"th:first\")),na=0,r(c.width(\"\").each(function(b,c){na=Math.max(na,a(c).outerWidth())}),na);var d=U.find(\".fc-agenda-gutter\");da&&(d=d.add(da.find(\"th.fc-agenda-gutter\")));var e=fa[0].clientWidth;// needs to be done after axisWidth (for IE7)\npa=fa.width()-e,pa?(r(d,pa),d.show().prev().removeClass(\"fc-last\")):d.hide().prev().addClass(\"fc-last\"),oa=Math.floor((e-na)/wa),r(W.slice(0,-1),oa)}/* Scrolling\n\t-----------------------------------------------------------------------*/\nfunction o(){// +1 for the border\nfunction a(){fa.scrollTop(c)}var c=K(b.duration(Na(\"scrollTime\")))+1;a(),setTimeout(a,0)}function p(){// after the view has been freshly rendered and sized\no()}/* Slot/Day clicking and binding\n\t-----------------------------------------------------------------------*/\nfunction q(a){a.click(u).mousedown(Ta)}function t(a){a.click(u).mousedown(P)}function u(a){if(!Na(\"selectable\")){// if selectable, SelectionManager will worry about dayClick\nvar b=Math.min(wa-1,Math.floor((a.pageX-U.offset().left-na)/oa)),c=Va(0,b),e=this.parentNode.className.match(/fc-slot(\\d+)/);// TODO: maybe use data\nif(e){var f=parseInt(e[1],10);c.add(Ja+f*qa),c=d.rezoneDate(c),Oa(\"dayClick\",Y[b],c,a)}else Oa(\"dayClick\",Y[b],c,a)}}/* Semi-transparent Overlay Helpers\n\t-----------------------------------------------------*/\n// TODO: should be consolidated with BasicView's methods\nfunction v(a,b,c){// overlayEnd is exclusive\nc&&ya.build();for(var d=Xa(a,b),e=0;e<d.length;e++){var f=d[e];q(w(f.row,f.leftCol,f.row,f.rightCol))}}function w(a,b,c,d){// only for all-day?\nvar e=ya.rect(a,b,c,d,ba);return Pa(e,ba)}function y(a,b){\n// normalize, because dayStart/dayEnd have stripped time+zone\na=a.clone().stripZone(),b=b.clone().stripZone();for(var c=0;c<wa;c++){// loop through the day columns\nvar d=Va(0,c),e=d.clone().add(1,\"days\"),f=d<a?a:d,g=e<b?e:b;// the min of the two\nif(f<g){var h=ya.rect(0,c,0,c,ha),i=J(f,d),j=J(g,d);h.top=i,h.height=j-i,t(Pa(h,ha))}}}function z(a){return Fa.left(a)}function A(a){return Ga.left(a)}function B(a){return Fa.right(a)}function D(a){return Ga.right(a)}\n// NOTE: the row index of these \"cells\" doesn't correspond to the slot index, but rather the \"snap\" index\nfunction E(a){// TODO: remove because mom.hasTime() from realCellToDate() is better\nreturn Na(\"allDaySlot\")&&!a.row}function G(a){// ugh \"real\" ... but blame it on our abuse of the \"cell\" system\nvar c=Va(0,a.col),e=a.row;return Na(\"allDaySlot\")&&e--,e>=0&&(c.time(b.duration(Ja+e*sa)),c=d.rezoneDate(c)),c}function J(a,c){return K(b.duration(a.clone().stripZone()-c.clone().stripTime()))}function K(a){// time is a duration\nif(a<Ja)return 0;if(a>=Ka)return ja.height();var b=(a-Ja)/qa,c=Math.floor(b),d=b-c,e=$a[c];\n// find the position of the corresponding <tr>\n// need to use this tecnhique because not all rows are rendered at same height sometimes.\nvoid 0===e&&(e=$a[c]=ja.find(\"tr\").eq(c).find(\"td div\")[0].offsetTop);var f=e-1+// because first row doesn't have a top border\nd*ra;// part-way through the row\nreturn f=Math.max(f,0)}/* Selection\n\t---------------------------------------------------------------------------------*/\nfunction L(a){return a.hasTime()?a.clone().add(qa):a.clone().add(1,\"days\")}function M(a,b){a.hasTime()||b.hasTime()?N(a,b):Na(\"allDaySlot\")&&v(a,b,!0)}function N(b,c){var d=Na(\"selectHelper\");if(ya.build(),d){var e=Wa(b).col;if(e>=0&&e<wa){// only works when times are on same day\nvar f=ya.rect(0,e,0,e,ha),g=J(b,b),h=J(c,b);if(h>g){if(// protect against selections that are entirely before or after visible range\nf.top=g,f.height=h-g,f.left+=2,f.width-=5,a.isFunction(d)){var i=d(b,c);i&&(f.position=\"absolute\",ka=a(i).css(f).appendTo(ha))}else f.isStart=!0,// conside rect a \"seg\" now\nf.isEnd=!0,//\nka=a(Ua({title:\"\",start:b,end:c,className:[\"fc-select-helper\"],editable:!1},f)),ka.css(\"opacity\",Na(\"dragOpacity\"));ka&&(t(ka),ha.append(ka),r(ka,f.width,!0),// needs to be after appended\ns(ka,f.height,!0))}}}else y(b,c)}function O(){Qa(),ka&&(ka.remove(),ka=null)}function P(b){if(1==b.which&&Na(\"selectable\")){// ev.which==1 means left mouse button\nSa(b);var c;Da.start(function(a,b){if(O(),a&&a.col==b.col&&!E(a)){var d=G(b),e=G(a);c=[d,d.clone().add(sa),// calculate minutes depending on selection slot minutes\ne,e.clone().add(sa)].sort(C),N(c[0],c[3])}else c=null},b),a(document).one(\"mouseup\",function(a){Da.stop(),c&&(+c[0]==+c[1]&&Q(c[0],a),Ra(c[0],c[3],a))})}}function Q(a,b){Oa(\"dayClick\",Y[Wa(a).col],a,b)}/* External Dragging\n\t--------------------------------------------------------------------------------*/\nfunction R(a,b,c){Da.start(function(a){if(Qa(),a){var b=G(a),c=b.clone();b.hasTime()?(c.add(d.defaultTimedEventDuration),y(b,c)):(c.add(d.defaultAllDayEventDuration),v(b,c))}},b)}function S(a,b,c){var d=Da.stop();Qa(),d&&Oa(\"drop\",a,G(d),b,c)}var T=this;\n// exports\nT.renderAgenda=f,T.setWidth=n,T.setHeight=m,T.afterRender=p,T.computeDateTop=J,T.getIsCellAllDay=E,T.allDayRow=function(){return ea},// badly named\nT.getCoordinateGrid=function(){return ya},// specifically for AgendaEventRenderer\nT.getHoverListener=function(){return Da},T.colLeft=z,T.colRight=B,T.colContentLeft=A,T.colContentRight=D,T.getDaySegmentContainer=function(){return ca},T.getSlotSegmentContainer=function(){return ia},T.getSlotContainer=function(){return ha},T.getRowCnt=function(){return 1},T.getColCnt=function(){return wa},T.getColWidth=function(){return oa},T.getSnapHeight=function(){return va},T.getSnapDuration=function(){return sa},T.getSlotHeight=function(){return ra},T.getSlotDuration=function(){return qa},T.getMinTime=function(){return Ja},T.getMaxTime=function(){return Ka},T.defaultSelectionEnd=L,T.renderDayOverlay=v,T.renderSelection=M,T.clearSelection=O,T.reportDayClick=Q,// selection mousedown hack\nT.dragStart=R,T.dragStop=S,\n// imports\nua.call(T,c,d,e),Aa.call(T),za.call(T),ga.call(T);var U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,va,wa,xa,ya,Da,Fa,Ga,Ha,Ia,Ja,Ka,La,Na=T.opt,Oa=T.trigger,Pa=T.renderOverlay,Qa=T.clearOverlays,Ra=T.reportSelection,Sa=T.unselect,Ta=T.daySelectionMousedown,Ua=T.slotSegHtml,Va=T.cellToDate,Wa=T.dateToCell,Xa=T.rangeToSegments,Ya=d.formatDate,Za=d.calculateWeekNumber,$a={};/* Rendering\n\t-----------------------------------------------------------------------------*/\nH(c.addClass(\"fc-agenda\")),/* Coordinate Utilities\n\t-----------------------------------------------------------------------------*/\nya=new Ba(function(b,c){function d(a){return Math.max(i,Math.min(j,a))}var e,f,g;W.each(function(b,d){e=a(d),f=e.offset().left,b&&(g[1]=f),g=[f],c[b]=g}),g[1]=f+e.outerWidth(),Na(\"allDaySlot\")&&(e=ea,f=e.offset().top,b[0]=[f,f+e.outerHeight()]);for(var h=ha.offset().top,i=fa.offset().top,j=i+fa.outerHeight(),k=0;k<xa*ta;k++)// adapt slot count to increased/decreased selection slot count\nb.push([d(h+va*k),d(h+va*(k+1))])}),Da=new Ca(ya),Fa=new Ea(function(a){return Z.eq(a)}),Ga=new Ea(function(a){return $.eq(a)})}", "function renderCal() {\n $('#cal').empty();\n $('#cal').fullCalendar({\n // options\n header: {\n left: 'prev,next today',\n center: 'title',\n right: 'month,agendaWeek,agendaDay'\n },\n selectable: true,\n selectHelper: true,\n select: function(start, end, allDay) {\n var title = prompt('Event Title:');\n if (title) {\n var tmpEvent = {\n \"title\": title,\n \"start\": start,\n \"end\": end,\n \"allDay\": allDay,\n \"category\": 1 // faked category for now\n };\n eventAction(\"save\", tmpEvent);\n }\n $('#cal').fullCalendar('unselect');\n },\n editable: true,\n defaultView: 'month',\n eventSources: [{\n url: 'ajax.php',\n type: 'POST',\n data: {\n func: 'getevents',\n args: ''\n },\n error: function() {\n showMsg(\"There was an error while fetching events!\", true);\n },\n color: 'green', // a non-ajax option\n textColor: 'white' // a non-ajax option\n }],\n eventDrop: function(event, dayDelta, minuteDelta, allDay, revertFunc, jsEvent, ui, view) {\n if (typeof event.eid != \"undefined\") {\n eventAction(\"update\", event);\n }\n },\n eventClick: function(event, jsEvent, view) {\n // only allow editing of events with an eid property (from our db)\n if (typeof event.eid != \"undefined\") {\n // Was Control key pressed when the event was clicked? If so, this is a delete.\n if (jsEvent.ctrlKey == true) {\n var result = confirm('Delete event \"' + event.title + '\" ?');\n if (result == true) eventAction(\"delete\", event);\n }\n else { // No control key pressed, this is an edit.\n var title = prompt('Event Title:', event.title);\n if (title != \"\" && title != null) { // Capture empty title and cancel button (null)\n event.title = title;\n eventAction(\"update\", event);\n }\n }\n }\n }\n });\n}", "function j(a){var b=\"\",c=y(\"isRTL\"),d=a.event,e=d.url,f=[\"fc-event\",\"fc-event-hori\"];A(d)&&f.push(\"fc-event-draggable\"),a.isStart&&f.push(\"fc-event-start\"),a.isEnd&&f.push(\"fc-event-end\"),\n// use the event's configured classNames\n// guaranteed to be an array via `buildEvent`\nf=f.concat(d.className),d.source&&(\n// use the event's source's classNames, if specified\nf=f.concat(d.source.className||[]));\n// generate a semicolon delimited CSS string for any of the \"skin\" properties\n// of the event object (`backgroundColor`, `borderColor` and such)\nvar g=J(d,y);\n// TODO:\n// When these elements are initially rendered, they will be briefly visibile on the screen,\n// even though their widths/heights are not set.\n// SOLUTION: initially set them as visibility:hidden ?\nreturn b+=e?\"<a href='\"+F(e)+\"'\":\"<div\",b+=\" class='\"+f.join(\" \")+\"' style='position:absolute;left:\"+a.left+\"px;\"+g+\"'><div class='fc-event-inner'>\",!d.allDay&&a.isStart&&(b+=\"<span class='fc-event-time'>\"+F(x.getEventTimeText(d))+\"</span>\"),b+=\"<span class='fc-event-title'>\"+F(d.title||\"\")+\"</span></div>\",d.allDay&&a.isEnd&&B(d)&&(b+=\"<div class='ui-resizable-handle ui-resizable-\"+(c?\"w\":\"e\")+\"'>&nbsp;&nbsp;&nbsp;</div>\"),b+=\"</\"+(e?\"a\":\"div\")+\">\"}", "initializeSakaiCalendar (calendarDiv) {\n // Get the event color from the skin variables.\n const computedStyle = getComputedStyle(document.querySelector(':root'));\n const eventBackgroundColor = computedStyle.getPropertyValue('--infoBanner-bgcolor', '#e9f5fc');\n const eventTextColor = computedStyle.getPropertyValue('--infoBanner-color', '#196390');\n const sakaiOrigin = window.location.origin;\n const siteId = window.top.portal.siteId;\n // We need the updated calendar events, do not cache requests.\n const requestHeaders = new Headers();\n requestHeaders.append('pragma', 'no-cache');\n requestHeaders.append('cache-control', 'no-cache');\n const requestInit = {\n method: 'GET',\n headers: requestHeaders,\n };\n // Initialize fullcalendar and render it in the calendarDiv.\n this.calendar = new FullCalendar.Calendar(calendarDiv, {\n initialView: 'timeGridWeek',\n timeZone: sakaiCalendar.userTimeZone,\n displayEventTime: false,\n allDaySlot: false,\n themeSystem: 'bootstrap5',\n headerToolbar: {\n left: 'prev,next today',\n center: 'title',\n right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'\n },\n buttonIcons: {\n /*Use of bootstrap5 as themeSystem will expect bootstrap icons and prepend bi bi-*/\n prev: 'caret-left',\n next: 'caret-right',\n },\n eventSources: [{\n events: function(event, successCallback, failureCallback) {\n const requestStartDate = moment(event.start).format('YYYY-MM-DD');\n const requestEndDate = moment(event.end).format('YYYY-MM-DD');\n const requestData = {\n merged: true,\n firstDate: requestStartDate,\n lastDate: requestEndDate\n };\n // Fetch the site calendar events from the REST endpoint.\n const calendarRequestUrl = new URL(`${sakaiOrigin}/direct/calendar/site/${siteId}.json`);\n Object.keys(requestData).forEach( (key) => calendarRequestUrl.searchParams.append(key, requestData[key]));\n window.fetch(calendarRequestUrl, requestInit).then( (response) => {\n if (response.ok) {\n return response.json()\n } else throw new Error(\"Network error while fetching calendar data\");\n }).then( (responseData) => {\n const events = [];\n responseData.calendar_collection.forEach( (event) => {\n // Every Sakai Calendar event has to be mapped with a full calendar event.\n // .tz() converts the event to the timezone of the user.\n const startDate = moment(new Date(event.firstTime.time)).tz(sakaiCalendar.userTimeZone).format();\n const endDate = moment(new Date(event.firstTime.time + event.duration)).tz(sakaiCalendar.userTimeZone).format();\n // The calendar event url needs to be a link to view or edit the event.\n const eventReference = event.eventReference;\n const eventLink = new URL(window.location);\n eventLink.searchParams.append(\"eventReference\", eventReference);\n eventLink.searchParams.append(\"sakai_action\", \"doDescription\");\n eventLink.searchParams.append(\"panel\", \"Main\");\n events.push({\n url: eventLink.href,\n title: event.title,\n start: startDate,\n site_name: event.siteName,\n type: event.type,\n icon: event.eventIcon,\n event_id: event.eventId,\n attachments: event.attachments,\n eventReference: event.eventReference,\n end: endDate\n });\n });\n successCallback(events);\n }).catch( (error) => console.error(error));\n }\n }],\n eventSourceSuccess: function(content, xhr) {\n return content.eventArray;\n },\n eventBackgroundColor: eventBackgroundColor,\n eventTextColor: eventTextColor,\n eventContent: function (args) {\n const isListView = sakaiCalendar.calendar.getCurrentData() && sakaiCalendar.calendar.getCurrentData().currentViewType.includes('list');\n // Create the default event structure to benefit from the theme.\n const eventTitle = document.createElement('div');\n eventTitle.classList.add(!isListView ? 'fc-event-title' : 'fc-list-event-title');\n // Build our event HTML including the default icon for the event type.\n const icon = args.event._def.extendedProps.icon;\n const title = args.event._def.title;\n const titleElement = document.createTextNode(title);\n const type = args.event._def.extendedProps.type;\n const eventUrl = args.event._def.url;\n const eventLink = document.createElement('a');\n eventLink.href = eventUrl;\n eventLink.title = title;\n eventLink.appendChild(titleElement);\n const iconSpan = document.createElement('span');\n iconSpan.classList.add('icon');\n iconSpan.classList.add(icon);\n iconSpan.title = type;\n // Append our custom event with icon to the default event structure.\n eventTitle.appendChild(iconSpan);\n eventTitle.appendChild(!isListView ? titleElement : eventLink);\n // Return the modified event including out event structure.\n return {\n html: eventTitle.outerHTML\n };\n }\n });\n\n // Set the user language to the fullcalendar UI.\n sakaiCalendar.userLanguage && this.calendar.setOption('locale', sakaiCalendar.userLanguage);\n this.calendar.render();\n }", "function sa(c,d,e){function f(a){Da=a,g(),X?i():// first time rendering?\nh()}function g(){Ka=Qa(\"theme\")?\"ui\":\"fc\",La=Qa(\"isRTL\"),Pa=Qa(\"columnFormat\"),Na=b.duration(Qa(\"minTime\")),Oa=b.duration(Qa(\"maxTime\")),sa=b.duration(Qa(\"slotDuration\")),wa=Qa(\"snapDuration\"),wa=wa?b.duration(wa):sa}/* Build DOM\n\t-----------------------------------------------------------------------*/\nfunction h(){var d,e,f,g,h=Ka+\"-widget-header\",j=Ka+\"-widget-content\",k=sa.asMinutes()%15===0;for(i(),ea=a(\"<div style='position:absolute;z-index:2;left:0;width:100%'/>\").appendTo(c),Qa(\"allDaySlot\")?(fa=a(\"<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>\").appendTo(ea),d=\"<table style='width:100%' class='fc-agenda-allday' cellspacing='0'><tr><th class='\"+h+\" fc-agenda-axis'>\"+(Qa(\"allDayHTML\")||F(Qa(\"allDayText\")))+\"</th><td><div class='fc-day-content'><div style='position:relative'/></div></td><th class='\"+h+\" fc-agenda-gutter'>&nbsp;</th></tr></table>\",ga=a(d).appendTo(ea),ha=ga.find(\"tr\"),q(ha.find(\"td\")),ea.append(\"<div class='fc-agenda-divider \"+h+\"'><div class='fc-agenda-divider-inner'/></div>\")):fa=a([]),ia=a(\"<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>\").appendTo(ea),ja=a(\"<div style='position:relative;width:100%;overflow:hidden'/>\").appendTo(ia),ka=a(\"<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>\").appendTo(ja),d=\"<table class='fc-agenda-slots' style='width:100%' cellspacing='0'><tbody>\",e=b.duration(+Na),// i wish there was .clone() for durations\nFa=0;e<Oa;)f=W.start.clone().time(e),// will be in UTC but that's good. to avoid DST issues\ng=f.minutes(),d+=\"<tr class='fc-slot\"+Fa+\" \"+(g?\"fc-minor\":\"\")+\"'><th class='fc-agenda-axis \"+h+\"'>\"+(k&&g?\"&nbsp;\":F($a(f,Qa(\"axisFormat\"))))+\"</th><td class='\"+j+\"'><div style='position:relative'>&nbsp;</div></td></tr>\",e.add(sa),Fa++;d+=\"</tbody></table>\",la=a(d).appendTo(ja),t(la.find(\"td\"))}/* Build Day Table\n\t-----------------------------------------------------------------------*/\nfunction i(){var b=j();X&&X.remove(),X=a(b).appendTo(c),Y=X.find(\"thead\"),Z=Y.find(\"th\").slice(1,-1),// exclude gutter\n$=X.find(\"tbody\"),_=$.find(\"td\").slice(0,-1),// exclude gutter\naa=_.find(\"> div\"),ba=_.find(\".fc-day-content > div\"),ca=_.eq(0),da=aa.eq(0),I(Y.add(Y.find(\"tr\"))),I($.add($.find(\"tr\")))}function j(){var a=\"<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>\"+k()+l()+\"</table>\";return a}function k(){var a,b,c,d=Ka+\"-widget-header\",e=\"\";for(e+=\"<thead><tr>\",Qa(\"weekNumbers\")?(a=Xa(0,0),b=_a(a),La?b+=Qa(\"weekNumberTitle\"):b=Qa(\"weekNumberTitle\")+b,e+=\"<th class='fc-agenda-axis fc-week-number \"+d+\"'>\"+F(b)+\"</th>\"):e+=\"<th class='fc-agenda-axis \"+d+\"'>&nbsp;</th>\",c=0;c<Da;c++){var f=cb()[c],g=[// added\n\"fc-col\"+c,f.className,d];e+=\"<th class='\"+g.join(\" \")+\"'>\"+F(f.name)+\"</th>\"}return e+=\"<th class='fc-agenda-gutter \"+d+\"'>&nbsp;</th></tr></thead>\"}function l(){var a,b,c,e,f,g=Ka+\"-widget-header\",h=Ka+\"-widget-content\",i=d.getNow().stripTime(),j=\"\";for(j+=\"<tbody><tr><th class='fc-agenda-axis \"+g+\"'>&nbsp;</th>\",c=\"\",b=0;b<(Da||1);b++){var k=cb()[b];a=W.intervalStart.clone(),f=[\"fc-col\"+b,\"fc-\"+Ma[a.day()],h],k&&k.className&&f.push(k.className),a.isSame(i,\"day\")?f.push(Ka+\"-state-highlight\",\"fc-today\"):a<i?f.push(\"fc-past\"):f.push(\"fc-future\"),e=\"<td class='\"+f.join(\" \")+\"'><div><div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></div></td>\",c+=e}return j+=c,j+=\"<td class='fc-agenda-gutter \"+h+\"'>&nbsp;</td></tr></tbody>\"}\n// TODO: data-date on the cells\n/* Dimensions\n\t-----------------------------------------------------------------------*/\nfunction m(a){void 0===a&&(a=oa),oa=a,bb={};var b=$.position().top,c=ia.position().top,d=Math.min(// total body height, including borders\na-b,// when scrollbars\nla.height()+c+1);da.height(d-x(ca)),ea.css(\"top\",b),ia.height(d-c-1);\n// the stylesheet guarantees that the first row has no border.\n// this allows .height() to work well cross-browser.\nvar e=la.find(\"tr:first\").height()+1,f=la.find(\"tr:eq(1)\").height();\n// HACK: i forget why we do this, but i think a cross-browser issue\nva=(e+f)/2,xa=sa/wa,ya=va/xa}function n(b){na=b,Ia.clear(),Ja.clear();var c=Y.find(\"th:first\");ga&&(c=c.add(ga.find(\"th:first\"))),c=c.add(la.find(\"th:first\")),pa=0,r(c.width(\"\").each(function(b,c){pa=Math.max(pa,a(c).outerWidth())}),pa);var d=X.find(\".fc-agenda-gutter\");ga&&(d=d.add(ga.find(\"th.fc-agenda-gutter\")));var e=ia[0].clientWidth;// needs to be done after axisWidth (for IE7)\nra=ia.width()-e,ra?(r(d,ra),d.show().prev().removeClass(\"fc-last\")):d.hide().prev().addClass(\"fc-last\"),qa=Math.floor((e-pa)/Da),r(Z.slice(0,-1),qa)}/* Scrolling\n\t-----------------------------------------------------------------------*/\nfunction o(){// +1 for the border\nfunction a(){ia.scrollTop(c)}var c=K(b.duration(Qa(\"scrollTime\")))+1;a(),setTimeout(a,0)}function p(){// after the view has been freshly rendered and sized\no()}/* Slot/Day clicking and binding\n\t-----------------------------------------------------------------------*/\nfunction q(a){a.click(u).mousedown(V)}function t(a){a.click(u).mousedown(P)}function u(a){if(!Qa(\"selectable\")){// if selectable, SelectionManager will worry about dayClick\nvar b=Math.min(Da-1,Math.floor((a.pageX-X.offset().left-pa)/qa)),c=Xa(0,0),e=this.parentNode.className.match(/fc-slot(\\d+)/);// added\nif(// TODO: maybe use data\na.data=cb()[b],e){var f=parseInt(e[1],10);c.add(Na+f*sa),c=d.rezoneDate(c),Ra(\"dayClick\",_[b],c,a)}else Ra(\"dayClick\",_[b],c,a)}}/* Semi-transparent Overlay Helpers\n\t-----------------------------------------------------*/\n// TODO: should be consolidated with BasicView's methods\nfunction v(a,b,c,d){// overlayEnd is exclusive\nc&&Ga.build();for(var e=Za(a,b),f=0;f<e.length;f++){var g=e[f];q(w(g.row,d,g.row,d))}}function w(a,b,c,d){// only for all-day?\nvar e=Ga.rect(a,b,c,d,ea);return Sa(e,ea)}function y(a,b,c){\n// normalize, because dayStart/dayEnd have stripped time+zone\na=a.clone().stripZone(),b=b.clone().stripZone();var d=Xa(0,0),e=d.clone().add(1,\"days\"),f=d<a?a:d,g=e<b?e:b;// the min of the two\nif(f<g){var h=Ga.rect(0,c,0,c,ja),i=J(f,d),j=J(g,d);h.top=i,h.height=j-i,t(Sa(h,ja))}}function z(a){return Ia.left(a)}function A(a){return Ja.left(a)}function B(a){return Ia.right(a)}function D(a){return Ja.right(a)}\n// NOTE: the row index of these \"cells\" doesn't correspond to the slot index, but rather the \"snap\" index\nfunction E(a){// TODO: remove because mom.hasTime() from realCellToDate() is better\nreturn Qa(\"allDaySlot\")&&!a.row}function G(a){// ugh \"real\" ... but blame it on our abuse of the \"cell\" system\nvar c=Xa(0,0),e=a.row;return Qa(\"allDaySlot\")&&e--,e>=0&&(c.time(b.duration(Na+e*wa)),c=d.rezoneDate(c)),c}function J(a,c){return K(b.duration(a.clone().stripZone()-c.clone().stripTime()))}function K(a){// time is a duration\nif(a<Na)return 0;if(a>=Oa)return la.height();var b=(a-Na)/sa,c=Math.floor(b),d=b-c,e=bb[c];\n// find the position of the corresponding <tr>\n// need to use this tecnhique because not all rows are rendered at same height sometimes.\nvoid 0===e&&(e=bb[c]=la.find(\"tr\").eq(c).find(\"td div\")[0].offsetTop);var f=e-1+// because first row doesn't have a top border\nd*va;// part-way through the row\nreturn f=Math.max(f,0)}/* Selection\n\t---------------------------------------------------------------------------------*/\nfunction L(a){return a.hasTime()?a.clone().add(sa):a.clone().add(1,\"days\")}function M(a,b,c){a.hasTime()||b.hasTime()?N(a,b):Qa(\"allDaySlot\")&&v(a,b,!0,c)}function N(b,c,d){var e=Qa(\"selectHelper\");if(Ga.build(),e){if(d=d||Ya(b).col,d>=0&&d<Da){// only works when times are on same day\nvar f=Ga.rect(0,d,0,d,ja),g=J(b,b),h=J(c,b);if(h>g){if(// protect against selections that are entirely before or after visible range\nf.top=g,f.height=h-g,f.left+=2,f.width-=5,a.isFunction(e)){var i=e(b,c);i&&(f.position=\"absolute\",ma=a(i).css(f).appendTo(ja))}else f.isStart=!0,// conside rect a \"seg\" now\nf.isEnd=!0,//\nma=a(Wa({title:\"\",start:b,end:c,className:[\"fc-select-helper\"],editable:!1},f)),ma.css(\"opacity\",Qa(\"dragOpacity\"));ma&&(t(ma),ja.append(ma),r(ma,f.width,!0),// needs to be after appended\ns(ma,f.height,!0))}}}else y(b,c,d)}function O(){Ta(),ma&&(ma.remove(),ma=null)}function P(b){if(1==b.which&&Qa(\"selectable\")){// ev.which==1 means left mouse button\nVa(b);var c,d;Ha.start(function(a,b){if(O(),a&&a.col==b.col&&!E(a)){d=a.col;var e=G(b),f=G(a);c=[e,e.clone().add(wa),// calculate minutes depending on selection slot minutes\nf,f.clone().add(wa)].sort(C),N(c[0],c[3],a.col)}else c=null},b),a(document).one(\"mouseup\",function(a){Ha.stop(),c&&(+c[0]==+c[1]&&Q(c[0],a),a.data=cb()[d],// added\nUa(c[0],c[3],a))})}}function Q(a,b){Ra(\"dayClick\",_[Ya(a).col],a,b)}/* Event Modification Reporting\n\t---------------------------------------------------------------------------------*/\nfunction R(a,b,c,e,f,g){var h=d.mutateResourceEvent(b,c,e,null);Ra(\"eventDrop\",a,b,h.dateDelta,function(){h.undo(),ab(b._id)},f,g),ab(b._id)}function S(a,b,c,e,f){var g=d.mutateResourceEvent(b,b.resources,null,c);Ra(\"eventResize\",a,b,g.durationDelta,function(){g.undo(),ab(b._id)},e,f),ab(b._id)}/* External Dragging\n\t--------------------------------------------------------------------------------*/\nfunction T(a,b,c){Ha.start(function(a){if(Ta(),a){var b=G(a),c=b.clone();b.hasTime()?(c.add(d.defaultTimedEventDuration),y(b,c,a.col)):(c.add(d.defaultAllDayEventDuration),v(b,c,!0,a.col))}},b)}function U(a,b,c){var d=Ha.stop();Ta(),d&&(b.data=cb()[d.col],Ra(\"drop\",a,G(d),b,c))}/* OVERRIDES */\nfunction V(b){var c,d=W.getIsCellAllDay,e=W.getHoverListener(),f=W.reportDayClick;if(1==b.which&&Qa(\"selectable\")){// which==1 means left mouse button\nVa(b);var g;e.start(function(a,b){// TODO: maybe put cellToDate/getIsCellAllDay info in cell\nO(),a&&d(a)?(c=a.col,g=[G(b),G(a)].sort(C),M(g[0],g[1],c)):g=null},b),a(document).one(\"mouseup\",function(a){e.stop(),g&&(+g[0]==+g[1]&&f(g[0],!0,a),a.data=cb()[c],Ua(g[0],g[1],a))})}}var W=this;\n// exports\nW.renderResource=f,W.setWidth=n,W.setHeight=m,W.afterRender=p,W.computeDateTop=J,W.getIsCellAllDay=E,W.allDayRow=function(){return ha},// badly named\nW.getCoordinateGrid=function(){return Ga},// specifically for AgendaEventRenderer\nW.getHoverListener=function(){return Ha},W.colLeft=z,W.colRight=B,W.colContentLeft=A,W.colContentRight=D,W.getDaySegmentContainer=function(){return fa},W.getSlotSegmentContainer=function(){return ka},W.getSlotContainer=function(){return ja},W.getRowCnt=function(){return 1},W.getColCnt=function(){return 1},W.getColWidth=function(){return qa},W.getSnapHeight=function(){return ya},W.getSnapDuration=function(){return wa},W.getSlotHeight=function(){return va},W.getSlotDuration=function(){return sa},W.getMinTime=function(){return Na},W.getMaxTime=function(){return Oa},W.defaultSelectionEnd=L,W.renderDayOverlay=v,W.renderSelection=M,W.clearSelection=O,W.reportDayClick=Q,// selection mousedown hack\nW.dragStart=T,W.dragStop=U,W.getResources=d.fetchResources,\n// imports\nua.call(W,c,d,e),W.eventDrop=R,W.eventResize=S,Aa.call(W),za.call(W),ta.call(W);var X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,va,wa,xa,ya,Da,Fa,Ga,Ha,Ia,Ja,Ka,La,Na,Oa,Pa,Qa=W.opt,Ra=W.trigger,Sa=W.renderOverlay,Ta=W.clearOverlays,Ua=W.reportSelection,Va=W.unselect,Wa=W.slotSegHtml,Xa=W.cellToDate,Ya=W.dateToCell,Za=W.rangeToSegments,$a=d.formatDate,_a=d.calculateWeekNumber,ab=d.reportEventChange,bb={},cb=W.getResources;/* Rendering\n\t-----------------------------------------------------------------------------*/\nH(c.addClass(\"fc-agenda\")),/* Coordinate Utilities\n\t-----------------------------------------------------------------------------*/\nGa=new Ba(function(b,c){function d(a){return Math.max(i,Math.min(j,a))}var e,f,g;Z.each(function(b,d){e=a(d),f=e.offset().left,b&&(g[1]=f),g=[f],c[b]=g}),g[1]=f+e.outerWidth(),Qa(\"allDaySlot\")&&(e=ha,f=e.offset().top,b[0]=[f,f+e.outerHeight()]);for(var h=ja.offset().top,i=ia.offset().top,j=i+ia.outerHeight(),k=0;k<Fa*xa;k++)// adapt slot count to increased/decreased selection slot count\nb.push([d(h+ya*k),d(h+ya*(k+1))])}),Ha=new Ca(Ga),Ia=new Ea(function(a){return aa.eq(a)}),Ja=new Ea(function(a){return ba.eq(a)})}", "function CalendarPlugin() {\n}", "function renderCalendar() {\n\n function renderCalendarViewRender(view, element) {\n scheduled.currentViewType = view.type;\n // this event fires once the calendar has completed loading and when the date is changed - thus calling the new events\n var start = moment(view.start).format('DD-MM-YYYY');\n var end = moment(view.end).format('DD-MM-YYYY');\n if(scheduled.currentViewType == 'month') {\n // if the current 'start' date of the selected month is not the same as the actual month then set the scheduled.calendarDate to the first of the proper month\n var currentStartMonth = moment(start, 'DD-MM-YYYY').format('MM-YYYY');\n var currentMonth = moment(view.title, 'MMMM YYYY').format('MM-YYYY');\n if(currentStartMonth != currentMonth) {\n scheduled.calendarDate = moment(view.title, 'MMMM YYYY').startOf('month').format('DD-MM-YYYY');\n }\n else {\n scheduled.calendarDate = start;\n }\n } else {\n scheduled.calendarDate = start;\n }\n updateCalendar(start, end);\n }\n\n\n $('#schedule-calendar').fullCalendar({\n header: {\n left: 'prev,next today',\n center: 'title',\n right: 'month,agendaWeek,agendaDay',\n },\n eventRender: function (event, element) {\n //Show tooltip when hovering over an event title\n var toolTipContent = '<strong>' + event.title + '</strong><br/>' + moment(event.start).format('MMMM D, YYYY') + ' ' + moment(event.start).format('h:mma');\n /*element.qtip({\n content: toolTipContent,\n hide: {fixed: true, delay: 200},\n style: 'qtip-light',\n position: {\n my: 'bottom center',\n at: 'top center',\n target: 'mouse',\n viewport: $('#fullcalendar'),\n adjust: {\n x: 0,\n y: -10,\n mouse: false,\n scroll: false,\n },\n },\n });*/\n },\n\n viewRender: renderCalendarViewRender,\n\n timeFormat: 'h:mma',\n firstDay: 1,\n aspectRatio: 2,\n defaultView: scheduled.currentViewType,\n fixedWeekCount: false,\n editable: false,\n lazyFetch: false,\n defaultDate: moment(scheduled.calendarDate, 'DD-MM-YYYY')\n });\n\n log.info('calendar start date ' + moment(scheduled.calendarDate, 'DD-MM-YYYY').format('DD-MM-YYYY'))\n }", "function loadCalendar(){\n CALENDAR = $('#calendar');\n CALENDAR.fullCalendar({\n header: {\n left: '',\n center: 'title',\n right: 'today prev,next'\n },\n eventRender: function(event,element,view) {\n if (event.icon && event.allDay) {\n var img = document.createElement(\"img\");\n img.src = \"/template/img/\"+event.icon+\".png\";\n var toInsert = element.find('div:first');\n var temp ='<p id=\"forecast-temp\">'+event.temp+'</p>';\n var direction = '<p id=\"forecast-deg\">'+evaluateWindDirection(event.direction)+'</p>';\n var speed = '<p id=\"forecast-speed\">'+(parseFloat(event.speed)*1.94384).toFixed(1).toString()+\" knoten\"+'</p>';\n toInsert.prepend(img,temp,direction,speed);\n }\n },\n defaultView: 'agendaWeek',\n locale: 'de',\n height: 'auto',\n minTime: '08:00:00',\n maxTime: '18:00:00',\n });\n}", "function createCalender() {\n $('#calendar').fullCalendar({\n header: {\n left: 'prev,next today',\n center: 'title',\n right: 'month,basicWeek,basicDay'\n },\n defaultDate: '2018-03-12',\n navLinks: true, // can click day/week names to navigate views\n editable: true,\n eventLimit: true, // allow \"more\" link when too many events\n events: eventList\n });\n }", "function createDemoEvents() {\n // Date for the calendar events (dummy data)\n var date = new Date();\n var d = date.getDate(),\n m = date.getMonth(),\n y = date.getFullYear();\n\n return [\n {\n title: 'All Day Event',\n start: new Date(y, m, 1),\n backgroundColor: '#f56954', //red \n borderColor: '#f56954' //red\n },\n {\n title: 'Long Event',\n start: new Date(y, m, d - 5),\n end: new Date(y, m, d - 2),\n backgroundColor: '#f39c12', //yellow\n borderColor: '#f39c12' //yellow\n },\n {\n title: 'Meeting',\n start: new Date(y, m, d, 10, 30),\n allDay: false,\n backgroundColor: '#0073b7', //Blue\n borderColor: '#0073b7' //Blue\n },\n {\n title: 'Lunch',\n start: new Date(y, m, d, 12, 0),\n end: new Date(y, m, d, 14, 0),\n allDay: false,\n backgroundColor: '#00c0ef', //Info (aqua)\n borderColor: '#00c0ef' //Info (aqua)\n },\n {\n title: 'Birthday Party',\n start: new Date(y, m, d + 1, 19, 0),\n end: new Date(y, m, d + 1, 22, 30),\n allDay: false,\n backgroundColor: '#00a65a', //Success (green)\n borderColor: '#00a65a' //Success (green)\n },\n {\n title: 'Open Google',\n start: new Date(y, m, 28),\n end: new Date(y, m, 29),\n url: '//google.com/',\n backgroundColor: '#3c8dbc', //Primary (light-blue)\n borderColor: '#3c8dbc' //Primary (light-blue)\n }\n ];\n }", "function calendar_helper_populateCalendar(){\n\t// Event listeners for calendar and intiialize calendar\n\t$('#calendar').weekCalendar({\n timeslotsPerHour: TIMESLOTS_PER_HOUR,\n daysToShow: days_to_show,\n date: calendar_start_date,\n startOnFirstDayOfWeek: false,\n buttons: false,\n allowEventCreation: false,\n businessHours: {start: 8, end: 24, limitDisplay: true},\n height: function() {return window.innerHeight - 0.45*window.innerHeight - 105},\n eventRender : function(calEvent, $event) {\n },\n eventAfterRender : function(calEvent, $event) {\n // Update the database\n if (calEvent.id !=null){\n updateEvent(calEvent.db_id,calEvent.start,calEvent.end);\n }\n\n // Set event params\n setIsValid(calEvent); \n calEvent.event_dom_handler = $event;\n\n // Update backgrounds of all events\n calendar_helper_refreshEvents();\n },\n eventNew : function(calEvent, $event) {\n },\n eventDrag : function(calEvent, $event) {\n var next_event = calendar_helper_getNextEvent(calEvent);\n\n if (next_event!=null){\n events_to_be_refreshed.push(next_event);\n }\n },\n eventDrop : function(calEvent, $event) {\n // $event is not the dom handler but the calevent itsself \n // and there are 2 events of the same type on the calendar right now\n // making this a pretty useless event\n\n var next_event = calendar_helper_getNextEvent(calEvent);\n\n if (next_event!=null){\n events_to_be_refreshed.push(next_event);\n }\n\n events_to_be_refreshed.push(calEvent);\n // Update the daily lines on the map\n directions_api_addDailyDirections(calEvent);\n },\n eventResize : function(calEvent, $event) {\n setIsValid(calEvent);\n calendar_helper_refreshEvents();\n updateEvent(calEvent.db_id,calEvent.start,calEvent.end);\n //calendar_events[calEvent.id] = calEvent; //TODO\n },\n eventClick : function(calEvent, $event) {\n destination_selected_from_calendar(calEvent);\n },\n eventMouseover : function(calEvent, $event) {\n },\n eventMouseout : function(calEvent, $event) {\n },\n noEvents : function() {\n },\n data:{events:calendar_events}\n\t});\n\t// Activating tabs\n\t$(\".tabLink\").each(function(){\n\t $(this).click(function(){\n\t\ttabeId = $(this).attr('id');\n\t\t$(\".tabLink\").removeClass(\"activeLink\");\n\t\t$(this).addClass(\"activeLink\");\n\t\t$(\".tabcontent\").addClass(\"hide\");\n\t\t$(\"#\"+tabeId+\"-1\").removeClass(\"hide\") \n\t\treturn false;\t \n\t });\n\t});\n\n}", "function populateCalendar(calEvents) {\n\t$('#calendar').fullCalendar({\n\t\tevents: calEvents, \n\t\theight: 770,\n\t\tdefaultDate: new Date(),\n\t\ttheme: true,\n\t\theader: {\n\t\t\tleft: 'prev',\n\t\t\tcenter: 'title',\n\t\t\tright: 'month,basicWeek, next'\n\t\t},\n\t\tthemeButtonIcons: {\n\t\t\tprev: 'odu_left-chevron',\n\t\t\tnext: 'odu_right-chevron'\n\t\t},\n\t\teventRender: function (event, element) {\n\t\t\telement.attr('href', 'javascript:void(0);');\n\t\t\telement.click(function() {\n\t\t\t\tpopulateEventPopUp(event);\n\t\t\t\t$(\"#calendarPopUp\").dialog({ modal: false, width:600, height: 500});\n\t\t\t});\t\t\t\t\n\t\t}\n\t});\n}", "function initExternalEvents(calElement){\n // Panel with the external events list\n var externalEvents = $('.external-events');\n\n // init the external events in the panel\n new ExternalEvent(externalEvents.children('div'));\n\n // External event color is danger-red by default\n var currColor = '#f6504d';\n // Color selector button\n var eventAddBtn = $('.external-event-add-btn');\n // New external event name input\n var eventNameInput = $('.external-event-name');\n // Color switchers\n var eventColorSelector = $('.external-event-color-selector .circle');\n\n // Trash events Droparea \n $('.external-events-trash').droppable({\n accept: '.fc-event',\n activeClass: 'active',\n hoverClass: 'hovered',\n tolerance: 'touch',\n drop: function(event, ui) {\n \n // You can use this function to send an ajax request\n // to remove the event from the repository\n \n if(draggingEvent) {\n var eid = draggingEvent.id || draggingEvent._id;\n // Remove the event\n calElement.fullCalendar('removeEvents', eid);\n // Remove the dom element\n ui.draggable.remove();\n // clear\n draggingEvent = null;\n }\n }\n });\n\n eventColorSelector.click(function(e) {\n e.preventDefault();\n var $this = $(this);\n\n // Save color\n currColor = $this.css('background-color');\n // De-select all and select the current one\n eventColorSelector.removeClass('selected');\n $this.addClass('selected');\n });\n\n eventAddBtn.click(function(e) {\n e.preventDefault();\n \n // Get event name from input\n var val = eventNameInput.val();\n // Dont allow empty values\n if ($.trim(val) === '') return;\n \n // Create new event element\n var newEvent = $('<div/>').css({\n 'background-color': currColor,\n 'border-color': currColor,\n 'color': '#fff'\n })\n .html(val);\n\n // Prepends to the external events list\n externalEvents.prepend(newEvent);\n // Initialize the new event element\n new ExternalEvent(newEvent);\n // Clear input\n eventNameInput.val('');\n });\n }", "function createDemoEvents() {\n // Date for the calendar events (dummy data)\n var date = new Date();\n var d = date.getDate(),\n m = date.getMonth(),\n y = date.getFullYear();\n\n return [\n {\n title: 'All Day Event',\n start: new Date(y, m, 1),\n backgroundColor: '#f56954', //red\n borderColor: '#f56954' //red\n },\n {\n title: 'Long Event',\n start: new Date(y, m, d - 5),\n end: new Date(y, m, d - 2),\n backgroundColor: '#f39c12', //yellow\n borderColor: '#f39c12' //yellow\n },\n {\n title: 'Meeting',\n start: new Date(y, m, d, 10, 30),\n allDay: false,\n backgroundColor: '#0073b7', //Blue\n borderColor: '#0073b7' //Blue\n },\n {\n title: 'Lunch',\n start: new Date(y, m, d, 12, 0),\n end: new Date(y, m, d, 14, 0),\n allDay: false,\n backgroundColor: '#00c0ef', //Info (aqua)\n borderColor: '#00c0ef' //Info (aqua)\n },\n {\n title: 'Birthday Party',\n start: new Date(y, m, d + 1, 19, 0),\n end: new Date(y, m, d + 1, 22, 30),\n allDay: false,\n backgroundColor: '#00a65a', //Success (green)\n borderColor: '#00a65a' //Success (green)\n },\n {\n title: 'Open Google',\n start: new Date(y, m, 28),\n end: new Date(y, m, 29),\n url: '//google.com/',\n backgroundColor: '#3c8dbc', //Primary (light-blue)\n borderColor: '#3c8dbc' //Primary (light-blue)\n }\n ];\n }", "function listUpcomingEvents() {\n gapi.client.calendar.events.list({\n 'calendarId': 'primary',\n 'timeMin': (new Date()).toISOString(),\n 'showDeleted': false,\n 'singleEvents': true,\n 'orderBy': 'startTime'\n }).then(function(response) {\n var events = response.result.items;\n console.log(events);\n eventos = [];\n if (events.length > 0) {\n events.forEach(obj => {\n colorEvent = \"\";\n for(var color in colores){\n if (colores[color].id == obj.colorId ) {\n colorEvent = colores[color].color;\n textColorEvent = \"#FFFFFF\";\n }\n }\n eventos.push({id: obj.id, title: obj.summary, description:obj.description,location:obj.location, start: obj.start.dateTime, end: obj.end.dateTime, color: colorEvent, textColor: textColorEvent});\n })\n //console.log(eventos);\n $('#calendar').fullCalendar({\n header: {\n language: 'es',\n left: 'prev,next today',\n center: 'title',\n right: 'month,basicWeek,basicDay',\n },\n timeZone: 'UTC',\n timeFormat: 'h:mm a',\n editable: true,\n eventLimit: true, // allow \"more\" link when too many events\n selectable: true,\n selectHelper: true,\n select: function(start, end) {\n document.getElementById(\"start\").value = moment(start).format('YYYY-MM-DD');\n document.getElementById(\"hrastart\").value = moment(start).format('HH:mm:ss');\n document.getElementById(\"end\").value = moment(end).format('YYYY-MM-DD');\n document.getElementById(\"hraend\").value = moment(end).format('HH:mm:ss');\n document.getElementById(\"btnGuardar\").style.display = \"inline-block\";\n document.getElementById(\"btnActualizar\").style.display = \"none\";\n document.getElementById(\"btnEliminar\").style.display = \"none\";\n mostrarModal();\n },\n eventRender: function(event, element) {\n element.bind('click', function() {\n document.getElementById(\"id\").value = event.id;\n document.getElementById(\"title\").value = event.title;\n document.getElementById(\"descripcion\").value = event.description;\n document.getElementById(\"direccion\").value = event.location;\n document.getElementById(\"color\").value = event.color;\n document.getElementById(\"start\").value = moment(event.start).format('YYYY-MM-DD');\n document.getElementById(\"hrastart\").value = moment(event.start).format('HH:mm:ss');\n document.getElementById(\"end\").value = moment(event.end).format('YYYY-MM-DD');\n document.getElementById(\"hraend\").value = moment(event.end).format('HH:mm:ss');\n document.getElementById(\"btnGuardar\").style.display = \"none\";\n document.getElementById(\"btnActualizar\").style.display = \"inline-block\";\n document.getElementById(\"btnEliminar\").style.display = \"inline-block\";\n mostrarModal();\n });\n },\n // eventDrop: function(event, delta, revertFunc) { // si changement de position\n // edit(event);\n // },\n // eventResize: function(event,dayDelta,minuteDelta,revertFunc) { // si changement de longueur\n // edit(event);\n // },\n events:eventos,\n });\n }\n });\n}", "function initializeCalendar(json) {\r\n var eventJson = json;\r\n\r\n $('#external-events div.external-event').each(function () {\r\n // store data so the calendar knows to render an event upon drop\r\n $(this).data('event', {\r\n id: $(this).attr('id'),\r\n title: $.trim($(this).text()), // use the element's text as the event title\r\n // color: '#ff0000', //red for now\r\n stick: true, // maintain when user navigates\r\n overlap: false,\r\n });\r\n\r\n // make the event draggable\r\n $(this).draggable({\r\n zIndex: 1111999,\r\n revert: true, // will cause the event to go back to its\r\n revertDuration: 0 // original position after the drag\r\n });\r\n\r\n });\r\n\r\n\r\n /* initialize the calendar\r\n -----------------------------------------------------------------*/\r\n\r\n var eventsArray = [];\r\n\r\n //add event by event to the calendar\r\n\r\n for (var i = 0; i < eventJson.length; i++) {\r\n\r\n var tempDate = new Date(eventJson[i].date);\r\n var d = tempDate.getDate();\r\n var m = tempDate.getMonth();\r\n var y = tempDate.getFullYear();\r\n\r\n var events = {\r\n \"id\" : eventJson[i].id,\r\n \"title\": eventJson[i].title,\r\n \"start\": new Date(y, m, d, eventJson[i].time_start.substring(0, 2), eventJson[i].time_start.substring(3, 5)),\r\n \"end\": new Date(y, m, d, eventJson[i].time_end.substring(0, 2), eventJson[i].time_end.substring(3, 5)),\r\n \"allDay\": false,\r\n //\"url\" : 'http://localhost:8000/thesispanels/'+eventJson[i].id\r\n };\r\n eventsArray.push(events);\r\n }\r\n\r\n $('#calendar').fullCalendar({\r\n\r\n header: {\r\n left: 'prev,next today',\r\n center: 'title',\r\n right: 'month,agendaWeek,agendaDay'\r\n },\r\n defaultView: 'agendaDay',\r\n\r\n viewDisplay: function (view) {\r\n $('.fc-day').filter(\r\n function (index) {\r\n return moment($(this).data('date')).isBefore(moment(), 'day')\r\n }).addClass('fc-other-month');\r\n },\r\n eventStartEditable: true,\r\n eventDurationEditable: false,\r\n droppable: true, // this allows things to be dropped onto the calendar\r\n\r\n //set the time range to display the events\r\n minTime: \"08:00:00\",\r\n maxTime: \"19:00:00\",\r\n\r\n //set duration of presentation for 45 minutes\r\n defaultTimedEventDuration: '00:45:00',\r\n slotDuration: '00:15:00',\r\n timeZone: false,\r\n\r\n //when a event is dropped to the calendar\r\n drop: function (date, jsEvent, ui) {\r\n var start = date.format('HH:mm');\r\n var startMoment = moment('2013-02-08 ' + start);\r\n var end = startMoment.add(45, 'm').format('HH:mm');\r\n\r\n $(this).remove();\r\n $.ajax({\r\n type: \"POST\",\r\n url: '/thesispanels', \r\n dataType: 'JSON',\r\n data: {\r\n 'projects' : jsEvent.target.id,\r\n 'txtSupervisor' : $('#supervisor option:selected').text(),\r\n 'panelmember1': $('#rpc').val(),\r\n 'panelmember2' : $('#examiner').val(),\r\n 'presentationvenue' : $('#presentationvenue option:selected').text(),\r\n 'date' : $('#scheduledate').val(),\r\n 'startTime': start,\r\n 'endTime' : end\r\n }\r\n\r\n }).done(function (data) {\r\n swal(\r\n \"Schedule successfully added!!\",\r\n 'Panel has been created during the time interval successfully!!',\r\n \"success\"\r\n );\r\n }).fail(function (data) {\r\n console.log('post error');\r\n swal(\r\n \"Schedule not updated!\",\r\n data.responseJSON.message + '. \\n\\n Please refresh the page or move the slot to appropriate time interval. Refer the free slots for assistance',\r\n \"error\"\r\n );\r\n\r\n loadProjects();\r\n $('#calendar').fullCalendar( 'removeEvents',jsEvent.target.id );\r\n\r\n });\r\n\r\n },\r\n\r\n //when moveing an already existing event in calendar\r\n eventDrop: function (event, delta, revertFunc) {\r\n console.log(\"Event Drop Function\");\r\n\r\n var start = event.start.format('HH:mm');\r\n var end = event.end.format('HH:mm');\r\n\r\n $.ajax({\r\n type: \"PUT\",\r\n url: '/updatethesisslot/'+event._id, \r\n dataType: 'JSON',\r\n data: {\r\n 'projects' : event._id,\r\n 'date' : $('#scheduledate').val(),\r\n 'startTime': start,\r\n 'endTime' : end\r\n }\r\n\r\n }).done(function (data) {\r\n swal(\r\n \"Schedule successfully updated!!\",\r\n 'Panel has been shifted to the new schedule!!',\r\n \"success\"\r\n );\r\n }).fail(function (data) {\r\n swal(\r\n \"Schedule not updated!\",\r\n data.responseJSON.message,\r\n \"error\"\r\n );\r\n revertFunc();\r\n });\r\n },\r\n\r\n eventClick: function (calEvent, jsEvent, view) {\r\n\r\n $.ajax({\r\n type: \"GET\",\r\n url: '/getprojectdetail/'+calEvent._id, \r\n dataType: 'JSON',\r\n data: {\r\n 'projectid' : calEvent._id\r\n }\r\n\r\n }).done(function (data) {\r\n var html = \"<div class=\\\"wrapper wrapper-content animated fadeInRight\\\">\" +\r\n \"<div class=\\\"row\\\">\" +\r\n \"<div class=\\\"col-lg-12\\\">\" +\r\n \"<h2>Project : \"+ data.project[0].title + \"</h2>\" +\r\n \"<hr/>\" +\r\n \"<br>\" +\r\n \"<div class=\\\"form-group\\\">\" +\r\n \"<label class=\\\"col-lg-6 control-label\\\">Supervisor :</label>\" +\r\n \"<p class=\\\"col-lg-6\\\">\"+ data.project[0].name + \"</p>\" +\r\n \"</div>\" +\r\n\r\n \"<div class=\\\"form-group\\\">\" +\r\n \"<label class=\\\"col-lg-6 control-label\\\">Panel Member 1 :</label>\" +\r\n \"<p class=\\\"col-lg-6\\\">\"+ data.panelmember1.name + \"</p>\" +\r\n \"</div>\" +\r\n\r\n \"<div class=\\\"form-group\\\">\" +\r\n \"<label class=\\\"col-lg-6 control-label\\\">Panel Member 2 :</label>\" +\r\n \"<p class=\\\"col-lg-6\\\">\"+ data.panelmember2.name + \"</p>\" +\r\n \"</div>\" +\r\n \"<div class=\\\"form-group\\\">\" +\r\n \"<label class=\\\"col-lg-6 control-label\\\">Date :</label>\" +\r\n \"<p class=\\\"col-lg-6\\\">\"+ data.project[0].date + \"</p>\" +\r\n \"</div>\" +\r\n \"<div class=\\\"form-group\\\">\" +\r\n \"<label class=\\\"col-lg-6 control-label\\\">Venue :</label>\" +\r\n \"<p class=\\\"col-lg-6\\\">\"+ data.project[0].venue+ \"</p>\" +\r\n \"</div>\" +\r\n \"<div class=\\\"form-group\\\">\" +\r\n \"<label class=\\\"col-lg-6 control-label\\\">Start Time :</label>\" +\r\n \"<p class=\\\"col-lg-6\\\">\"+ data.project[0].time_start+ \"</p>\" +\r\n \"</div>\" +\r\n \"<div class=\\\"form-group\\\">\" +\r\n \"<label class=\\\"col-lg-6 control-label\\\">End Time :</label>\" +\r\n \"<p class=\\\"col-lg-6\\\">\"+ data.project[0].time_end+ \"</p>\" +\r\n \"</div>\" +\r\n \"\\\"\";\r\n\r\n $('#btnModalUpdate').attr('href', '/thesispanels/'+data.project[0].id+'/edit');\r\n\r\n $('#projectmodelbody').html(html);\r\n $('#projectModal').modal('show');\r\n }).fail(function (data) {\r\n console.log('proj detail error');\r\n });\r\n\r\n\r\n\r\n },\r\n\r\n eventConstraint: {\r\n start: moment(),\r\n end: '2100-01-01' // hard coded goodness unfortunately\r\n },\r\n\r\n events: eventsArray\r\n });\r\n\r\n\r\n }", "function k(a,c,d){function e(){k||(c.width(f).height(\"\").draggable(\"option\",\"grid\",null),k=!0)}var f,g,h,i,j=d.isStart,k=!0,l=A(),m=I(),n=X(),q=N(),r=M(),t=L(),u=K();c.draggable({opacity:o(\"dragOpacity\",\"month\"),// use whatever the month view was using\nrevertDuration:o(\"dragRevertDuration\"),start:function(b,d){p(\"eventDragStart\",c[0],a,b,d),R(a,c),f=c.width(),l.start(function(b,d){if(V(),b){g=!1,i=d.col;var f=G(0,d.col),l=G(0,b.col);h=l.diff(f,\"days\"),b.row?// mouse is over bottom slots\nj?k&&(\n// convert event to temporary slot-event\nc.width(m-10),// don't use entire width\ns(c,Z.defaultTimedEventDuration/q*r),// the default height\nc.draggable(\"option\",\"grid\",[m,1]),k=!1):g=!0:(// on full-days\nU(a.start.clone().add(h,\"days\"),_(a).add(h,\"days\"),!0,1),e()),g=g||k&&!h}else e(),g=!0;c.draggable(\"option\",\"revert\",g)},b,\"drag\")},stop:function(d,f){if(l.stop(),V(),p(\"eventDragStop\",c[0],a,d,f),g)// hasn't moved or is out of bounds (draggable has already reverted)\ne(),c.css(\"filter\",\"\"),// clear IE opacity side-effects\nQ(a,c);else{// changed!\n// calculate column delta\nvar h=Math.round((c.offset().left-O().offset().left)/m),j=a.resources;h!==i&&(j=[aa()[h].id]);var o,q,r=a.start.clone();k||(q=Math.round((c.offset().top-O().offset().top)/u),// why not use ui.offset.top?\no=b.duration(n+q*t),r=Z.rezoneDate(r.clone().time(o))),S(c[0],a,j,r,d,f)}}})}", "function calendar() {\n var monthNames = [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Май\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Октябрь\", \"Ноябрь\", \"Декабрь\"];\n\n var dayNames = [\"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\", \"Вс\"];\n\n var events = [\n {\n date: \"8/3/2013\",\n title: 'Двойной заказ',\n link: '',\n linkTarget: '_blank',\n color: '',\n //content: 'Два заказа, один на выезде, другой в городе ',\n class: 'tripleOutdore',\n displayMonthController: true,\n displayYearController: true,\n nMonths: 6\n }\n ];\n\n $('#calendari_lateral1').bic_calendar({\n //list of events in array\n events: events,\n //enable select\n enableSelect: true,\n //enable multi-select\n multiSelect: false, //set day names\n dayNames: dayNames,\n //set month names\n monthNames: monthNames,\n //show dayNames\n showDays: true,\n //show month controller\n displayMonthController: true,\n //show year controller\n displayYearController: false,\n //set ajax call\n reqAjax: {\n type: 'get',\n url: 'http://fierydream.com/js/someJSON/events.json'\n }\n });\n }", "function j(a,c,d){function e(){j||(c.width(f).height(\"\").draggable(\"option\",\"grid\",null),j=!0)}var f,g,h,i=d.isStart,j=!0,k=z(),l=H(),m=W(),p=M(),q=L(),r=K(),t=I();c.draggable({opacity:n(\"dragOpacity\",\"month\"),// use whatever the month view was using\nrevertDuration:n(\"dragRevertDuration\"),start:function(b,d){o(\"eventDragStart\",c[0],a,b,d),Q(a,c),f=c.width(),k.start(function(b,d){if(U(),b){g=!1;var f=E(0,d.col),k=E(0,b.col);h=k.diff(f,\"days\"),b.row?// mouse is over bottom slots\ni?j&&(\n// convert event to temporary slot-event\nc.width(l-10),// don't use entire width\ns(c,Y.defaultTimedEventDuration/p*q),// the default height\nc.draggable(\"option\",\"grid\",[l,1]),j=!1):g=!0:(// on full-days\nT(a.start.clone().add(h,\"days\"),$(a).add(h,\"days\")),e()),g=g||j&&!h}else e(),g=!0;c.draggable(\"option\",\"revert\",g)},b,\"drag\")},stop:function(d,f){if(k.stop(),U(),o(\"eventDragStop\",c[0],a,d,f),g)// hasn't moved or is out of bounds (draggable has already reverted)\ne(),c.css(\"filter\",\"\"),// clear IE opacity side-effects\nP(a,c);else{// changed!\nvar i,l,n=a.start.clone().add(h,\"days\");j||(l=Math.round((c.offset().top-N().offset().top)/t),// why not use ui.offset.top?\ni=b.duration(m+l*r),n=Y.rezoneDate(n.clone().time(i))),R(c[0],a,n,d,f)}}})}", "function pm_OnLoad() { \n /* Calendar */\n $('#dbCalendar').fullCalendar({\n header: {\n left: 'prev,next today',\n center: 'title',\n right: ''\n },\n titleFormat : 'YYYY MMMM',\n locale: 'ko',\t \n navLinks: false, // can click day/week names to navigate views\t\t\n selectable: false,\n selectHelper: false, \n editable: true,\n eventLimit: true, // allow \"more\" link when too many events\n eventSources : [],\n viewRender: function (view, element) {\n if (view.name == 'month') {\n $('#dbCalendar').fullCalendar('option', 'contentHeight', 530); \n }\n }\n });\n}", "function createEventModal(event)\n{\n // Format the values of the Start and End Date Times. \n var start = $.fullCalendar.formatDate(event.start, \"Y-MM-DD HH:mm:ss\");\n var end = $.fullCalendar.formatDate(event.end, \"Y-MM-DD HH:mm:ss\");\n\n // Populate the Modal values.\n getModalTitle().html(\"Job Details\");\n getEventId().val(event.id);\n getEventStatus().val(event.status);\n getEventTitle().val(event.title);\n getEventStart().val(start);\n getEventEnd().val(end);\n getEventDescription().val(event.description);\n getEventContact().val(event.contact);\n getEventSite().val(event.site);\n getEventTechnician().val(event.technician);\n console.log(\"Action: getModalEventCreate().modal()\");\n getModalEventCreate().modal();\n}", "function buildCalendar(issues) {\n var calendarEl = document.getElementById('calendar');\n var events = issues.map(issue => {\n return {\n id: issue.key,\n groupId: issue.assignee,\n title: issue.key,\n start: issue.duedate,\n color: issue.category,\n assignee: issue.assignee,\n tip: \"By clicking on issue you can see the details and data subject will get notified\"\n }\n })\n console.log(\"Issues within buildCalendar: \" + JSON.stringify(issues));\n\n var calendar = new FullCalendar.Calendar(calendarEl, {\n initialView: 'dayGridMonth',\n initialDate: '2021-01-07',\n headerToolbar: {\n left: 'prev,next today',\n center: 'title',\n right: 'dayGridMonth,timeGridWeek,timeGridDay'\n },\n events: events,\n eventClick: function (info) {\n console.log(\"This is the assignee from event: \" + info.event.groupId + \", key: \" + info.event.id);\n directRequest(info.event.groupId, info.event.id);\n window.open('http://localhost:2990/jira/browse/'+info.event.id,'_blank')\n },\n });\n\n calendar.render();\n\n console.log(\"Calendar has been built\");\n}", "function ac_showCalendarPanel() {\n\tac_switchTool(\"cal\");\n}", "function getEventsAndDialogSettings(receiverFunc) {\n let settings = {};\n let tempTitle = document.getElementById(\"title-field\").value;\n settings.title = (tempTitle || calGetString(\"calendar\", \"Untitled\"));\n settings.layoutCId = document.getElementById(\"layout-field\").value;\n settings.start = null;\n settings.end = null;\n settings.eventList = null;\n\n let theView = getCalendarView();\n switch (document.getElementById(\"view-field\").selectedItem.value) {\n case \"currentview\":\n case \"\": //just in case\n settings.start = theView.startDay;\n settings.end = theView.endDay;\n break;\n case \"selected\":\n settings.eventList = theView.getSelectedItems({});\n break;\n case \"custom\":\n // We return the time from the timepickers using the selected\n // timezone, as not doing so in timezones with a positive offset\n // from UTC may cause the printout to include the wrong days.\n let currentTimezone = calendarDefaultTimezone();\n settings.start = jsDateToDateTime(document.getElementById(\"start-date-picker\").value);\n settings.start = settings.start.getInTimezone(currentTimezone);\n settings.end = jsDateToDateTime(document.getElementById(\"end-date-picker\").value);\n settings.end = settings.end.getInTimezone(currentTimezone);\n break ;\n default:\n Components.utils.reportError(\"Calendar print dialog: No calendar view found!\");\n }\n\n if (settings.eventList) {\n receiverFunc(settings);\n } else {\n // end isn't exclusive, so we need to add one day\n settings.end = settings.end.clone();\n settings.end.day = settings.end.day + 1;\n settings.eventList = [];\n let listener = {\n onOperationComplete:\n function onOperationComplete(aCalendar, aStatus, aOperationType, aId, aDateTime) {\n receiverFunc(settings);\n },\n onGetResult:\n function onGetResult(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {\n settings.eventList = settings.eventList.concat(aItems);\n }\n };\n window.opener.getCompositeCalendar().getItems(\n Components.interfaces.calICalendar.ITEM_FILTER_TYPE_EVENT |\n Components.interfaces.calICalendar.ITEM_FILTER_CLASS_OCCURRENCES,\n 0, settings.start, settings.end, listener);\n }\n}", "function initIndexCal() {\n initCal({\n height: \"75%\",\n initialView: 'dayGridMonth',\n dayMaxEventRows: true,\n moreLinkClick: \"popover\",\n customButtons: {\n customPrevButton: {\n text: '<',\n click: movePrev\n },\n customNextButton: {\n text: '>',\n click: moveNext\n },\n customTodayButton: {\n text: 'Today',\n click: moveToday\n }\n },\n headerToolbar: {\n left: 'customPrevButton,customNextButton customTodayButton',\n center: 'title',\n right: ''\n },\n eventSources: [\n {\n url: '/schedule/api/getSchedule',\n failure: function () {\n alert('there was an error while fetching Regular Duties!');\n },\n extraParams: function () {\n return {\n monthNum: appConfig.calDate.getMonth() + 1,\n year: appConfig.calDate.getFullYear(),\n allColors: 0\n };\n },\n eventDataTransform: displayFlaggedDuties\n },\n {\n url: '/breaks/api/getBreakDuties',\n failure: function () {\n alert('there was an error while fetching Break Duties!');\n },\n extraParams: function () {\n return {\n monthNum: appConfig.calDate.getMonth() + 1,\n year: appConfig.calDate.getFullYear(),\n allColors: 0\n };\n },\n }\n ],\n lazyFetching: true,\n fixedWeekCount: false,\n eventOrder: \"flagged, title\"\n });\n}", "initializeEvents () {\n }", "function calendar() {\n var monthNames = [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Май\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Октябрь\", \"Ноябрь\", \"Декабрь\"];\n\n var dayNames = [\"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\", \"Вс\"];\n\n var events = [\n {\n date: \"8/3/2013\",\n title: 'Двойной заказ',\n link: '',\n linkTarget: '_blank',\n color: '',\n //content: 'Два заказа, один на выезде, другой в городе ',\n class: 'tripleOutdore',\n displayMonthController: true,\n displayYearController: true,\n nMonths: 6\n }\n ];\n\n $('#calendari_lateral1').bic_calendar({\n //list of events in array\n events: events,\n //enable select\n enableSelect: true,\n //enable multi-select\n multiSelect: false,\n //set day names\n dayNames: dayNames,\n //set month names\n monthNames: monthNames,\n //show dayNames\n showDays: true,\n //show month controller\n displayMonthController: true,\n //show year controller\n displayYearController: false,\n //set ajax call\n reqAjax: {\n type: 'get',\n url: './js/someJSON/events.json' // /js/someJSON/events.json //http://bic.cat/bic_calendar/index.php\n }\n });\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "formatForCal() {\n var endDate;\n if(this.allday) { //respect that fullcalendar expects allday events to end at 0:00\n endDate = moment(this.end).add('1', 'day').format('YYYY-MM-DD');\n this.end = endDate + 'T00:00';\n } /* else if(!this.allday && changed) {\n endDate = moment(this.end).subtract('1', 'day').format('YYYY-MM-DD');\n this.end = endDate + 'T23:59';\n } */\n\n\n var calEvent = {\n \"title\": this.title,\n \"allDay\": this.allday,\n \"start\": moment(this.start),\n \"end\": moment(this.end),\n \"_id\": this.id,\n \"location\": this.location,\n \"description\": {\n \"organizer\": this.organizer,\n \"imageurl\": this.imageurl,\n \"status\": this.status,\n \"webpage\": this.webpage,\n \"categories\": this.categories,\n \"changed\": this.changed\n },\n };\n\n console.log(this);\n\n this.categories.forEach(function(objCategory) {\n categories.forEach(function (category) {\n if (objCategory.id === category.id) {\n calEvent[\"backgroundColor\"] = category.color;\n calEvent[\"borderColor\"] = category.color;\n }\n });\n });\n\n //console.log('Formatted for cal: ', calEvent);\n\n return calEvent;\n }", "function initExternalEvents(calElement) {\n // Panel with the external events list\n var externalEvents = $('.external-events');\n\n // init the external events in the panel\n new ExternalEvent(externalEvents.children('div'));\n\n // External event color is danger-red by default\n var currColor = '#f6504d';\n // Color selector button\n var eventAddBtn = $('.external-event-add-btn');\n // New external event name input\n var eventNameInput = $('.external-event-name');\n // Color switchers\n var eventColorSelector = $('.external-event-color-selector .circle');\n\n // Trash events Droparea\n $('.external-events-trash').droppable({\n accept: '.fc-event',\n activeClass: 'active',\n hoverClass: 'hovered',\n tolerance: 'touch',\n drop: function (event, ui) {\n\n // You can use this function to send an ajax request\n // to remove the event from the repository\n\n if (draggingEvent) {\n var eid = draggingEvent.id || draggingEvent._id;\n // Remove the event\n calElement.fullCalendar('removeEvents', eid);\n // Remove the dom element\n ui.draggable.remove();\n // clear\n draggingEvent = null;\n }\n }\n });\n\n eventColorSelector.click(function (e) {\n e.preventDefault();\n var $this = $(this);\n\n // Save color\n currColor = $this.css('background-color');\n // De-select all and select the current one\n eventColorSelector.removeClass('selected');\n $this.addClass('selected');\n });\n\n eventAddBtn.click(function (e) {\n e.preventDefault();\n\n // Get event name from input\n var val = eventNameInput.val();\n // Dont allow empty values\n if ($.trim(val) === '') return;\n\n // Create new event element\n var newEvent = $('<div/>').css({\n 'background-color': currColor,\n 'border-color': currColor,\n 'color': '#fff'\n })\n .html(val);\n\n // Prepends to the external events list\n externalEvents.prepend(newEvent);\n // Initialize the new event element\n new ExternalEvent(newEvent);\n // Clear input\n eventNameInput.val('');\n });\n }", "function myAgendaClickHandler(eventObj) {\n // Get ID of the agenda item from the event object\n var agendaId = eventObj.data.agendaId;\n // pull agenda item from calendar\n var agendaItem = jfcalplugin.getAgendaItemById(\"#mycal\", agendaId);\n clickAgendaItem = agendaItem;\n $(\"#display-event-form\").dialog('open');\n }", "function contruirCalendario(){\n\n\tvar theLanguage = $('html').attr('lang');\n\n\ttheLanguage = \ttheLanguage.toLowerCase();\n \n \n var idUsuarioEventos = $(\"#selectUsuario\").val();\n \n\n $('#calendar').fullCalendar({\n \t\n \tlocale : theLanguage,\n \t\n \teventLimit: true,\n \n buttonText: {\n\t\t\t\t\t listMonth: 'L. M',\n\t\t\t\t\t listWeek: 'L. S',\n\t\t\t\t\t listDay: 'L. D'\n\t\t\t\t\t},\n \n \n customButtons: {\n\t irafecha: {\n\t text: ''\n\t }\n\t },\n\t \n \n header: {\n \tleft: 'today, prevYear, prev,next, nextYear',\n\t\t center: 'title',\n\t\t right: 'month, agendaWeek, agendaDay, listMonth, listWeek, listDay, irafecha'\n\n },\n \n //al hacer click en un dia\n /* dayClick: function(date) {\n \t \n \t \n \t //$('#calendar').fullCalendar( 'changeView', agendaDay );\n\t },*/\n \n \n slotDuration: \"00:20:00\",\n slotLabelFormat : 'HH:mm',\n\t\ttimeFormat: 'HH:mm)', \n //hora de inicio\n // minTime: \"06:00:00\",\n \n weekNumbers: true,\n \n //para que no se monten encima los eventos\n slotEventOverlap: false,\n \n eventLimit: true,//limite de las citas que se muestran en la vista mes\n \n navLinks: true,//para que el numero de dias y de semanas sea clickable\n \n //al dar click en un evento\n\t\t eventClick: function(calEvent) {\n\t\t\t\n\t\t\teditarCitaUsuario(calEvent.id);\n\t\t\t\n\t\n\t },\n \n \n //al dar click en un dia\n\t\tdayClick: function(date) {\n\t\t\t\t\t\t\n\t\t\tvar fechaCitaClick\t= String(date.format(\"YYYY/MM/DD\"));\n\t\t\tvar horaCitaClick\t= String(date.format(\"HH:mm\"));\n\n\t\t\t$(\"#fecha_cita\").val(fechaCitaClick);\n\t\t\t$(\"#hora_cita\").val(horaCitaClick);\n\t\t\t\n\t\t\t//editar cita\n\t\t\t/*$(\"#EditarfechaCIta\").val(fechaCitaClick);\n\t\t\t$(\"#EditarhoraCIta\").val(horaCitaClick);\n\t\t\t$(\"#EditarminutoCIta\").val(minutoCitaClick);*/\n\t\t\t//fin editar cita\n\t\t\t\n\n\t\t\t$(\"#duracion_citaHoras\").val(\"0\");\n\t\t\t$(\"#duracion_citaMinutos\").val(\"20\");\n\t\t\t\n\t\t\t//editar cita\n\t\t\t/*$(\"#EditarduracionCitaHoras\").val(duracionHoraClick);\n\t\t\t$(\"#EditarduracionCitaMinutos\").val(duracionMinutoClick);*/\n\t\t\t//fin editar cita\n\t\t\t\n\t\t\tif( (horaCitaClick == \"00:00\")){\n\t\t\t\t\n\t\t\t\tcambiarVistaDia(date);\n\t\t\t\t\n\t\t\t\t/*if(!$('#EditarformAgendar').is(':visible')){\n\t\t\t\t\tmostrarDivAgendar('funcion');\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t},\n \n /*\teventRender: function(event, element, view) {\n\t\t\t\n\t\t\t//\tvar view = $('#calendar').fullCalendar('getView');\n\t\t\t\tif (view.name == 'agendaWeek' || view.name == 'agendaDay'){\n\t\t\t\t\t\n\t\t\t\t\t$(\".horarioFecha\").parent().children(\".horarioDiaSemana\").remove();\n\t\t\t\t} \t\t\t \n\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t \n\t\t\t}, */\n\n \t\n\t\t\teventAfterRender: function(event, element, view) {\n\t\t\t\n\t\t\t//\tvar view = $('#calendar').fullCalendar('getView');\n\t\t\t\tif (view.name == 'agendaWeek' || view.name == 'agendaDay'){\n\t\t\t\t\t\n\t\t\t\t\t$(\".horarioFecha\").parent().children(\".horarioDiaSemana\").remove();\n\t\t\t\t\t$(\".recesoFecha\").parent().children(\".recesoDiaSemana\").remove();\n\t\t\t\t} \t\t\t \n\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t \n\t\t\t}, \n\n\t\t\n\t eventSources: [ \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 {\n\t\t\t\t\t\t url: 'http://www.nanuvet.com/Controllers/agenda/consultarEventosUsuarioCalendario.php',\n\t\t\t\t\t\t async: false,\n\t\t\t\t\t\t type: 'POST',\n\t\t\t\t\t\t data: {\n\t\t\t\t\t\t idUsuario: idUsuarioEventos\n\t\t\t\t\t\t },\n\t\t\t\t\t\t textColor: 'black' // a non-ajax option\n\t\t\t\t\t\t},\n\t\t\t\t \t\n\t\t\t\t ]\n\t\t\t\t \n\n\n \n \n });\n\n\n\t //para dar el icono al boton de ir a fecha\n\t\t $(\".fc-irafecha-button\").append('<i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>');\n\t\t //para construir el calendario pequeño\n\t\t $('.fc-irafecha-button').datetimepicker({\n\t\t \ttimepicker:false,\n\t\t \tonSelectDate:function(dp,$input){\n\t\t\t\t \n\t\t\t\t var fecha = $input.val();\n\t\t\t\t \n\t\t\t\t var fecha1 = fecha.split(\" \");\n\t\t\t\t \n\t\t\t\t var fecha2 = fecha1[0].split(\"/\");\n\t\t\n\t\t\t\t\tvar mes\t= fecha2[1];\n\t\t\t\t\tvar dia = fecha2[0];\n\t\t\t\t\tvar ano = fecha2[2];\t\t \n\t\t\t\t \n\t\t\t\t \t var fecha3 = \"'\"+mes+\"-\"+dia+\"-\"+ano+\"'\";\n\t\t\t\t \n\t\t\t\t //alert(fecha3);\n\t\t\t\t $('#calendar').fullCalendar( 'gotoDate', fecha);\n\t\t\t\t}\n\t\t });\n\t\t //al hacer click en el boton\n\t\t $('.fc-irafecha-button').on('click', function () {\n\t\t \t$('.fc-irafecha-button').datetimepicker('show');\n\t\t\t});\n\n\n\t\n}", "function myTaphold(elementum, event) {\n\n var longpress = false;\n var startTime, endTime;\n\n elementum.on('mousedown touchstart', function () {\n startTime = new Date().getTime();\n });\n elementum.on('mouseup touchend', function () {\n endTime = new Date().getTime();\n longpress = (endTime - startTime < 450) ? false : true;\n });\n elementum.on('mousemove', function () {\n longpress = false;\n });\n elementum.on('click', function () {\n if (longpress) {\n//console.log(\"longpres\");\n //get day viewed\n var currentViewDate = $('#calendar').fullCalendar('getDate')\n var events = $('#calendar').fullCalendar('clientEvents', function (event) {\n //get list of events for displayed day\n if (moment(event.start).format('YYYY-MM-DD') == currentViewDate.format('YYYY-MM-DD')) {\n return true;\n }\n });\n //search events with the same title as event where is mouse over\n for (var i = 0; events.length > i; i++) {\n\n if (events[i].title == event.title) {\n\n events[i].textColor = 'blue'\n }\n else {\n\n events[i].textColor = ''\n }\n }\n $('#calendar').fullCalendar(\"rerenderEvents\");\n }\n });\n }", "function Popup(props){\n var timeArray = [\"8:00 AM\", \"9:00 AM\", \"10:00 AM\", \"11:00 AM\", \"12:00 PM\", \"1:00 PM\", \"2:00 PM\", \"3:00 PM\", \"4:00 PM\"]\n const months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n\n // const CLIENT_ID = '272509791466-sq3clks02im0dfbhjucqp9hs58osav7a.apps.googleusercontent.com';\n // const API_KEY = 'AIzaSyCGXctsPmIJ8je6OPsPbVGie2qTY9Ma8zc';\n // const DISCOVERY_DOCS = [\"https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest\"];\n // const SCOPES = \"https://www.googleapis.com/auth/calendar\";\n // {\n // \"clientId\":\"272509791466-sq3clks02im0dfbhjucqp9hs58osav7a.apps.googleusercontent.com\",\n // \"apiKey\":\"AIzaSyCGXctsPmIJ8je6OPsPbVGie2qTY9Ma8zc\",\n // \"scope\": \"https://www.googleapis.com/auth/calendar\",\n // \"discoveryDocs\": [\"https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest\"]\n // }\n//Client ID: 272509791466-sq3clks02im0dfbhjucqp9hs58osav7a.apps.googleusercontent.com\n//Client Secret: MNhQhdZE5NquqLpnWjx8BLee\n//API Key: AIzaSyCGXctsPmIJ8je6OPsPbVGie2qTY9Ma8zc\n//Project Number: 272509791466\n\n//google calendar login info\n//Email: [email protected]\n//Password: Zach2017!\n\n// https://console.developers.google.com/apis/credentials/oauthclient/$272509791466-sq3clks02im0dfbhjucqp9hs58osav7a.apps.googleusercontent.com?project=$272509791466\n\n // const service = serviceAccount.map( (account) => {\n // console.log(account);\n // })\n\n const handleClose = () => {\n props.newData(true);\n props.view(false);\n }\n \n const pickTime = (time) => {\n document.getElementById(\"timeDisplay\").value = time;\n }\n\n const confirmTime = async () => {\n //console.log(\"confirming time\")\n var time = document.getElementById(\"timeDisplay\").value;\n var name = document.getElementById(\"nameDisplay\").value;\n var email = document.getElementById(\"emailDisplay\").value;\n var index = time.indexOf(\":\");\n var before = time.substring(0,index);\n var after = time.substring(index+1, index+3);\n var timeString = before + after;\n if(timeString.length < 4){\n timeString = \"0\" + timeString;\n }\n\n var monthyear = \"\";\n var m = props.month + 1;\n if(m < 10){\n monthyear = \"0\";\n }\n monthyear += m;\n monthyear += props.year;\n\n var dayID = \"\";\n if(props.day < 10){\n dayID = \"0\";\n }\n dayID += props.day;\n if(name.length < 1 || timeString.length < 2){\n alert(\"You Must Enter a Time, Name and Valid Email\")\n } else if (!(/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(email))){\n alert(\"You Must Enter a Time, Name and Valid Email\")\n } else {\n getMonthData(monthyear, dayID, time, name, email, timeString);\n }\n }\n\n const getMonthData = (monthYear, dayID, time, name, email, timeString) => {\n var monthData = db.collection(\"months\").doc(monthYear);\n monthData.get().then((monthDoc) => {\n if(monthDoc.exists){\n getDayData(monthYear, dayID, time, name, email, timeString);\n } else {\n monthData.set({\n filler: \"hi\",\n })\n getMonthData(monthYear, dayID, time, name, email, timeString);\n }\n })\n }\n\n const getDayData = (monthYear, dayID, time, name, email, timeString) => {\n var dateString = months[props.month] + \" \" + props.day + \", \" + props.year\n\n var dayData = db.collection(\"months\").doc(monthYear).collection(\"Days\").doc(dayID);\n dayData.get().then((dayDoc) => {\n if(dayDoc.exists){\n var apps = dayDoc.data().Appointments;\n apps.push({\n \"Time\": timeString,\n \"Name\": name,\n \"Email\": email\n })\n dayData.update({\n Appointments: apps,\n })\n } else {\n var apps = [];\n apps.push({\n \"Time\": timeString,\n \"Name\": name,\n \"Email\": email\n })\n dayData.set({\n Appointments: apps,\n })\n \n }\n })\n alert(\"Appointment Scheduled for \" + dateString + \" at \" + time + \". \\n Thank you for booking an appointment! If you need to make a change to your appointment status please contact us at [email protected]\");\n handleClose();\n //startAddingEvent(time, name, email)\n }\n\n useEffect(() => {\n //ApiCalendar.handleAuthClick();\n }, []);\n\n const startAddingEvent = (time, name, email) => {\n if(time.length > 1){\n var year = props.year;\n var month = \"\" + (props.month + 1);\n var day = \"\" + props.day;\n if(month.length === 1){\n month = \"0\" + month;\n }\n if(day.length === 1){\n day = \"0\" + day;\n }\n var timeSpace = time.indexOf(\" \");\n var suffix = time.substring(timeSpace+1);\n var timeIndex = time.indexOf(\":\");\n var timeNum = parseInt(time.substring(0,timeIndex));\n if(suffix === \"PM\" && timeNum !== 12){\n timeNum += 12;\n }\n var endTime = timeNum + 1;\n if(timeNum < 10){\n timeNum = \"0\" + timeNum\n }\n if(endTime < 10){\n endTime = \"0\" + endTime\n }\n var timeStart = year + '-' + month + '-' + day + 'T' + timeNum + \":00:00-05:00\"\n var timeEnd = year + '-' + month + '-' + day + 'T' + endTime + \":00:00-05:00\"\n var summary = \"Meeting with \" + name;\n var description = \"Name: \" + name + \", Email: \" + email;\n addGoogleEvent(timeStart, timeEnd, summary, description);\n //console.log(timeStart, timeEnd)\n\n }\n }\n\n const addGoogleEvent = (timeStart, timeEnd, summary, description) => {\n if(ApiCalendar.sign){ \n var newEvent = {\n 'start': {\n 'dateTime': timeStart,//end,\n },\n 'end': {\n 'dateTime': timeEnd,//start,\n },\n 'summary': summary,\n 'description': description,\n //'location': address\n };\n ApiCalendar.createEvent(newEvent).then((result) => {\n console.log(result)\n }).catch((error) => {\n console.log(error);\n });\n }\n handleClose();\n }\n\n\n\n\n return(\n <Modal className=\"popupSpace\" show={props.visible} onHide={() => handleClose()}id=\"popupBox\">\n <Modal.Header>\n <Modal.Title className=\"modalHeader\">{props.month + \"/\" + props.day + \"/\" + props.year}</Modal.Title>\n </Modal.Header>\n <Modal.Body className=\"modalBody\">\n <div id=\"dropdownSpace\">\n <Dropdown id=\"dropdownPick\">\n <Dropdown.Toggle variant=\"success\" id=\"dropdown-basic\">\n Pick a Time\n </Dropdown.Toggle>\n <Dropdown.Menu>\n {props.availability.map((time, index) => {\n if(time === 1){\n return <Dropdown.Item key={index} onClick={() => pickTime(timeArray[index])}>{timeArray[index]}</Dropdown.Item>\n }\n index++;\n })}\n </Dropdown.Menu>\n </Dropdown>\n <InputGroup id=\"inputTime\">\n <InputGroup.Prepend>\n <InputGroup.Text>Time:</InputGroup.Text>\n </InputGroup.Prepend>\n <FormControl\n placeholder=\"N/A\"\n id=\"timeDisplay\"\n disabled={true}\n />\n </InputGroup>\n </div>\n <div className=\"inputSpace\">\n <InputGroup id=\"inputName\">\n <InputGroup.Prepend>\n <InputGroup.Text>Name:</InputGroup.Text>\n </InputGroup.Prepend>\n <FormControl\n placeholder=\"Name\"\n id=\"nameDisplay\"\n />\n </InputGroup>\n <InputGroup id=\"inputEmail\">\n <InputGroup.Prepend>\n <InputGroup.Text>Email:</InputGroup.Text>\n </InputGroup.Prepend>\n <FormControl\n placeholder=\"Email\"\n id=\"emailDisplay\"\n />\n </InputGroup>\n </div>\n </Modal.Body>\n <Modal.Footer className=\"modalFooter\">\n <Button variant=\"danger\" onClick={() => handleClose()}>\n Cancel\n </Button>\n <Button variant=\"success\" onClick={() => confirmTime()}>\n Confirm\n </Button>\n </Modal.Footer>\n\n {/* <Button id=\"timeConfirm\" onclick={pickTime()}>Confirm</Button> */}\n </Modal>\n )\n}", "function OpenEvent() {}", "function loadCalendarSidebar() {\n var html = HtmlService.createHtmlOutputFromFile('calendarSidebar').setTitle('U3A Tools')\n SpreadsheetApp.getUi().showSidebar(html)\n}", "function drawVisualization() {\n var e = document.getElementById('mytimeline');\n var action = e.getAttribute(\"data-action\");\n var ind = e.getAttribute(\"data-value\");\n timeline_data = [];\n timeline_data_changed = [];\n function turnToDate(date) {\n var lst = date.split(\"-\");\n return new Date(lst[0],lst[1]-1,lst[2]);\n };\n\n var options = {\n \"width\": \"100%\",\n \"height\": \"200px\",\n \"style\": \"dot\", // optional\n //\"scale\": links.Timeline.StepDate.SCALE.YEAR,\n //\"step\": 1,\n \"zoomMax\": 1000 * 60 * 60 * 24 * 31 * 12 * 50,\n \"zoomMin\": 1000 * 60 * 60 * 24 * 31 * 12 * 5\n };\n timeline = new links.Timeline(e);\n\n function onSelectEdit() {\n var sel = timeline.getSelection();\n if (sel.length) {\n if (sel[0].row != undefined) {\n var row = sel[0].row;\n var eventSelected = timeline_data[row];\n if (action == \"edit\") {\n var info = document.getElementById('info');\n info.innerHTML =\n \"<span>Detail : </span> <span onclick='openTimelineDialog()' style='color:green' class='glyphicon glyphicon-plus'></span>\"\n + \"<span onclick='deleteEvent(\" + row + \")' style='color:red' class='glyphicon glyphicon-minus'></span>\"\n + \"<span onclick='openTimelineDialog(\" + row + \")' class='glyphicon glyphicon-pencil'></span>\"\n + \"<br>ID : \" + eventSelected.id\n + \"<br>Start : \" + jsDateConvert(eventSelected.start)\n + \"<br>End : \" + jsDateConvert(eventSelected.end)\n + \"<br>Content : \" + eventSelected.content\n\t + \"<br><a href='/events/\"+eventSelected.slg+\"'>Go to event page</a>\";\n }\n else if (action == \"select\") {\n e.setAttribute(\"data-value\", eventSelected.id);\n var input = document.getElementById(\"timeline_event_input\");\n input.value = eventSelected.id;\n var selected = document.getElementById(\"eventSelected\");\n selected.innerHTML = jsDateConvert(eventSelected.start) + \" \" + eventSelected.content + \"<sup style='color:red' onclick='cancelEventSelected()'> X </sup>\";\n }\n\telse if (action == \"read\") {\n\t var info = document.getElementById('info');\n\t info.innerHTML = event_to_period(eventSelected)\n + \" <a href='/events/\"+eventSelected.slg+\"'>\"+eventSelected.content+\"</a> : \"\n\t + eventSelected.abstract;\n\t}\n }\n }\n };\n links.events.addListener(timeline,'select',onSelectEdit);\n $.ajax({\n type:\"GET\",\n url:\"/timelinedata/\",\n data:{},\n success: function(data) {\n var events = JSON.parse(data['events']);\n var details = JSON.parse(data['details']);\n var row;\n for (var i = 0; i<events.length;i++) {\n var event = {};\n event['id'] = events[i].pk;\n event['start'] = turnToDate(events[i].fields.start);\n if (events[i].fields.end != null) {\n event['end'] = turnToDate(events[i].fields.end);\n }\n event['content'] = details[i].fields.content;\n event['abstract'] = details[i].fields.abstract;\n event['slg'] = events[i].fields.slg;\n if (event.id==ind) {\n event['className'] = 'timeline-event-target';\n row=i;\n\t var info = document.getElementById('info');\n\t info.innerHTML = event_to_period(event)\n + \" <a href='/events/\"+event.slg+\"'>\"+event.content+\"</a> : \"\n\t + event.abstract;\n }\n timeline_data.push(event);\n timeline.draw(timeline_data, options);\n timeline.setSelection([{row:row}]);\n }\n }\n });\n // Instantiate our timeline object.\n // Draw our timeline with the created data and options\n}", "function newsInCal(title, date, uhr, ort, beschr) {\n var edda = date.split(\"-\");\n var eddt = edda[2];\n var eddm = edda[1] - 1;\n var eddy = edda[0];\n var u = uhr.split(\":\");\n var uh = u[0];\n var um = u[1];\n var uh2 = \"22\";\n var endDate = new Date(eddy, eddm, eddt, uh2, um);\n var startDate = new Date(eddy, eddm, eddt, uh, um);\n\n var success = function (message) {\n alert(\"Success: \" + message);\n };\n var error = function (message) {\n alert(\"Error: \" + message);\n };\n\n window.plugins.calendar.createEvent(title, \"\", beschr, startDate, endDate, success, error);\n alert(\"KEIN ERROR\");\n //window.plugins.calendar.createEvent(title,\"\",beschr,uhr,endDate,success,error);\n}", "function LoadFullCalendars() {\n if ($('#availability_calendar_left').length) {\n let cal_date = new Date();\n let month = parseInt(cal_date.getMonth()) + 1;\n let year = cal_date.getFullYear();\n $('#availability_calendar_left, #availability_calendar_right').html(\"\");\n BuildOwnCalendar(month, year, 'availability_calendar_left');\n if (month === 12) {\n year += 1;\n month = 1;\n } else {\n month += 1;\n }\n BuildOwnCalendar(month, year, 'availability_calendar_right');\n }\n}", "function openEventsOrganizer() {\n organizerEventsOpen=false;\n}", "function l(a,b,c){function d(){V(),h&&(j?(c.hide(),b.draggable(\"option\",\"grid\",null),// disable grid snapping\nU(u,v,!1,g.col+l)):(e(),c.css(\"display\",\"\"),// show() was causing display=inline\nb.draggable(\"option\",\"grid\",[y,z])))}function e(){u&&// must of had a state change\nc.text(n.getEventTimeText(u,a.end?v:null))}var f,g,h,i,j,k,l,m,q,r,s,t,u,v,w=n.getCoordinateGrid(),x=H(),y=I(),z=K(),A=L();b.draggable({scroll:!1,grid:[y,z],axis:1==x&&\"y\",opacity:o(\"dragOpacity\"),revertDuration:o(\"dragRevertDuration\"),start:function(c,d){p(\"eventDragStart\",b[0],a,c,d),R(a,b),w.build(),\n// initialize states\nf=b.position(),g=w.cell(c.pageX,c.pageY),h=i=!0,j=k=C(g),l=m=0,q=0,r=0,s=t=0,u=null,v=null},drag:function(c,e){\n// NOTE: this `cell` value is only useful for determining in-bounds and all-day.\n// Bad for anything else due to the discrepancy between the mouse position and the\n// element position while snapping. (problem revealed in PR #55)\n//\n// PS- the problem exists for draggableDayEvent() when dragging an all-day event to a slot event.\n// We should overhaul the dragging system and stop relying on jQuery UI.\nvar g=w.cell(c.pageX,c.pageY);\n// update states\nh=!!g,h&&(j=C(g),\n// calculate column delta\nl=Math.round((e.position.left-f.left)/y),l!=m&&(\n// calculate the day delta based off of the original clicked column and the column delta\nr=l),\n// calculate minute delta (only if over slots)\nj||(s=Math.round((e.position.top-f.top)/z))),\n// any state changes?\nh==i&&j==k&&l==m&&s==t||(\n// compute new dates\nj?(u=a.start.clone().stripTime().add(q,\"days\"),v=u.clone().add(Z.defaultAllDayEventDuration)):(u=a.start.clone().add(s*A).add(q,\"days\"),v=_(a).add(s*A).add(q,\"days\")),d(),\n// update previous states for next time\ni=h,k=j,m=l,t=s),\n// if out-of-bounds, revert when done, and vice versa.\nb.draggable(\"option\",\"revert\",!h)},stop:function(c,e){if(V(),p(\"eventDragStop\",b[0],a,c,e),h&&(j||r||s)){// changed!\nvar i=a.resources.slice(0),k=aa();if(r&&g.col+r<k.length){\n// given we have r1/r3 \n// if we move r3 to r2, then we want to maintain r1/r2.\n// if we move r3 to r1, then we only want to maintain r1 - so we splice the array\nvar m=k[g.col+r].id,n=k[g.col].id,o=a.resources.indexOf(n),t=a.resources.indexOf(m);t>-1?i.splice(o,1):i[o]=m}S(b[0],a,i,u,c,e)}else// either no change or out-of-bounds (draggable has already reverted)\n// reset states for next time, and for updateUI()\nh=!0,j=!1,l=0,q=0,s=0,d(),b.css(\"filter\",\"\"),// clear IE opacity side-effects\n// sometimes fast drags make event revert to wrong position, so reset.\n// also, if we dragged the element out of the area because of snapping,\n// but the *mouse* is still in bounds, we need to reset the position.\nb.css(f),Q(a,b)}})}", "function loadElements() {\n gapi.client.load('calendar', 'v3', loadSidebarEvents);\n\n var dateFrom = $('#date-from').pickadate(),\n dateFromPicker = dateFrom.pickadate('picker');\n var dateTo = $('#date-to').pickadate(),\n dateToPicker = dateTo.pickadate('picker');\n var timeFrom = $('#time-from').pickatime(),\n timeFromPicker = timeFrom.pickatime('picker');\n var timeTo = $('#time-to').pickatime(),\n timeToPicker = timeTo.pickatime('picker');\n\n $('#all-day').change(function () {\n if (this.checked) {\n $('#times').hide();\n } else {\n $('#times').show();\n }\n });\n\n $('.submit').click(function () {\n var dateFromObject = dateFromPicker.get('select'),\n dateToObject = dateToPicker.get('select'),\n timeFromObject = timeFromPicker.get('select'),\n timeToObject = timeToPicker.get('select');\n var from = new Date(dateFromObject.year, dateFromObject.month, dateFromObject.date, timeFromObject.hour, timeFromObject.mins);\n var to = new Date(dateToObject.year, dateToObject.month, dateToObject.date, timeToObject.hour, timeToObject.mins);\n createEvent($('#title').val(), $('#location textarea').val(), from, to);\n\n // TODO: Add flash message to indicate confirmation\n window.location.href = 'index.html';\n });\n}", "function openCalendar(e) {\n vm.calendarOpen = true;\n }", "function loadEvents() {\n prettyPhotoConfiguration();\n setContent();\n}", "function render_ICalReader_for_main_edt_one_day_all_event(collection, zone, timeInfo) {\n timeInfo = typeof timeInfo !== 'undefined' ? timeInfo : 7;\n var logo = '<img src=\"img/logos/calendar.png\"/>';\n zone.loadImage(\"img/logos/calendar.png\");\n var title = collection.name;\n var tableau = collection.events;\n var eventsNum = 0;\n var time = timeInfo;\n\n var eventsByDays = transform_in_days(tableau);\n\n var daysSort = Object.keys(eventsByDays).sort();\n\n for (var idays = 0; idays < daysSort.length; idays++) {\n var days = daysSort[idays];\n var sortObjectStart = function(a, b) {\n return (a.start - b.start);\n };\n\n eventsByDays[days][days].sort(sortObjectStart);\n\n var elementsCollec = eventsByDays[days];\n\n var start = elementsCollec['days'][0];\n var elementsArray = elementsCollec[start];\n\n var listDicoElts = new Array();\n\n var date = get_date_from_timestamp(start);\n eventsNum = 0;\n\n content = \"<div id='ICalReader' class='main_div_zone1'>\";\n\n if (is_same_date(date, get_current_date()))\n content += \"<div class='calendar_dates_multiple_element_hour_top'>Aujourd'hui</div>\";\n else\n content += \"<div class='calendar_dates_multiple_element_hour_top'>\" + date.day + \" \" + date.month + \"</div>\";\n\n content += \"<div class='calendar_one_day_all_event'>\";\n content += \"<table class='calendarTable' border='0'>\";\n\n for (var indice = 0; indice < elementsArray.length; indice++) {\n elements = elementsArray[indice];\n\n if (!pastEvent(elements)) {\n eventsNum++;\n if ((eventsNum) % 3 == 0) {\n var summary = elements.summary;\n if (elements.summary.length >= 100)\n summary = elements.summary.substring(0, 100) + \"...\";\n\n if (inProgress(elements))\n content += \"<tr class='inProgress_synth'>\";\n else\n content += \"<tr >\";\n content += \"<td class='tableDate'>\" + render_date_edt_synth(elements) + \"</td>\";\n if (elements.location) {\n content += \"<td class='tableSum'>\" + summary + \"</td>\";\n content += \"<td class='tableLoc'>\" + elements.location.substring(0, 20) + \"</td>\";\n }\n else {\n content += \"<td class='tableSum' colspan=2>\" + summary + \"</td>\";\n }\n content += \"</tr>\";\n\n content += \"</table>\";\n content += \"</div>\";\n content += \"</div>\";\n content += \"<div class='smooth'> </div>\";\n var dico = {\"content\": content, \"logo\": logo, \"title\": title, \"time\": time};\n zone.pushInfo(dico);\n\n content = \"<div id='ICalReader' class='main_div_zone1'>\";\n\n if (is_same_date(date, get_current_date()))\n content += \"<div class='calendar_dates_multiple_element_hour_top'>Aujourd'hui</div>\";\n else\n content += \"<div class='calendar_dates_multiple_element_hour_top'>\" + date.day + \" \" + date.month + \"</div>\";\n\n content += \"<div class='calendar_one_day_all_event'>\";\n content += \"<table class='calendarTable'>\";\n }\n else {\n var summary = elements.summary;\n if (elements.summary.length >= 100)\n summary = elements.summary.substring(0, 100) + \"...\";\n\n if (inProgress(elements))\n content += \"<tr class='inProgress_synth'>\";\n else\n content += \"<tr >\";\n content += \"<td class='tableDate'>\" + render_date_edt_synth(elements) + \"</td>\";\n if (elements.location) {\n content += \"<td class='tableSum'>\" + summary + \"</td>\";\n content += \"<td class='tableLoc'>\" + elements.location.substring(0, 20) + \"</td>\";\n }\n else {\n content += \"<td class='tableSum' colspan=2>\" + summary + \"</td>\";\n }\n content += \"</tr>\";\n }\n if (indice + 1 == elementsArray.length) {\n if ((eventsNum) % 3 != 0) {\n content += \"</table>\";\n content += \"</div>\";\n content += \"</div>\";\n content += \"<div class='smooth'> </div>\";\n var dico = {\"content\": content, \"logo\": logo, \"title\": title, \"time\": time};\n zone.pushInfo(dico);\n }\n }\n }\n }\n }\n}", "function loadCalendar() {\r\n hideall();\r\n $(\"#sidebar\").show();\r\n $(\"#cal\").show();\r\n deactiveAll();\r\n $(\"#side-calendar\").addClass(\"active\");\r\n $(\"#navbar\").show();\r\n // Additonal calls \r\n clearCalendar();\r\n makeCalander();\r\n\r\n}", "function d(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId=\"ui-datepicker-div\",this._inlineClass=\"ui-datepicker-inline\",this._appendClass=\"ui-datepicker-append\",this._triggerClass=\"ui-datepicker-trigger\",this._dialogClass=\"ui-datepicker-dialog\",this._disableClass=\"ui-datepicker-disabled\",this._unselectableClass=\"ui-datepicker-unselectable\",this._currentClass=\"ui-datepicker-current-day\",this._dayOverClass=\"ui-datepicker-days-cell-over\",this.regional=[],this.regional[\"\"]={closeText:\"Done\",prevText:\"Prev\",nextText:\"Next\",currentText:\"Today\",monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],weekHeader:\"Wk\",dateFormat:\"mm/dd/yy\",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:\"\"},this._defaults={showOn:\"focus\",showAnim:\"fadeIn\",showOptions:{},defaultDate:null,appendText:\"\",buttonText:\"...\",buttonImage:\"\",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:\"c-10:c+10\",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:\"+10\",minDate:null,maxDate:null,duration:\"fast\",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:\"\",altFormat:\"\",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[\"\"]),this.regional.en=e.extend(!0,{},this.regional[\"\"]),this.regional[\"en-US\"]=e.extend(!0,{},this.regional.en),this.dpDiv=p(e(\"<div id='\"+this._mainDivId+\"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"))}", "function k(a,b,c){function d(){U(),h&&(j?(c.hide(),b.draggable(\"option\",\"grid\",null),// disable grid snapping\nT(t,u)):(e(),c.css(\"display\",\"\"),// show() was causing display=inline\nb.draggable(\"option\",\"grid\",[x,y])))}function e(){t&&// must of had a state change\nc.text(m.getEventTimeText(t,a.end?u:null))}var f,g,h,i,j,k,l,p,q,r,s,t,u,v=m.getCoordinateGrid(),w=G(),x=H(),y=I(),z=K();b.draggable({scroll:!1,grid:[x,y],axis:1==w&&\"y\",opacity:n(\"dragOpacity\"),revertDuration:n(\"dragRevertDuration\"),start:function(c,d){o(\"eventDragStart\",b[0],a,c,d),Q(a,b),v.build(),\n// initialize states\nf=b.position(),g=v.cell(c.pageX,c.pageY),h=i=!0,j=k=B(g),l=p=0,q=0,r=s=0,t=null,u=null},drag:function(c,e){\n// NOTE: this `cell` value is only useful for determining in-bounds and all-day.\n// Bad for anything else due to the discrepancy between the mouse position and the\n// element position while snapping. (problem revealed in PR #55)\n//\n// PS- the problem exists for draggableDayEvent() when dragging an all-day event to a slot event.\n// We should overhaul the dragging system and stop relying on jQuery UI.\nvar m=v.cell(c.pageX,c.pageY);if(\n// update states\nh=!!m){if(j=B(m),\n// calculate column delta\nl=Math.round((e.position.left-f.left)/x),l!=p){\n// calculate the day delta based off of the original clicked column and the column delta\nvar n=E(0,g.col),o=g.col+l;o=Math.max(0,o),o=Math.min(w-1,o);var A=E(0,o);q=A.diff(n,\"days\")}\n// calculate minute delta (only if over slots)\nj||(r=Math.round((e.position.top-f.top)/y))}\n// any state changes?\nh==i&&j==k&&l==p&&r==s||(\n// compute new dates\nj?(t=a.start.clone().stripTime().add(q,\"days\"),u=t.clone().add(Y.defaultAllDayEventDuration)):(t=a.start.clone().add(r*z).add(q,\"days\"),u=$(a).add(r*z).add(q,\"days\")),d(),\n// update previous states for next time\ni=h,k=j,p=l,s=r),\n// if out-of-bounds, revert when done, and vice versa.\nb.draggable(\"option\",\"revert\",!h)},stop:function(c,e){U(),o(\"eventDragStop\",b[0],a,c,e),h&&(j||q||r)?// changed!\nR(b[0],a,t,c,e):(// either no change or out-of-bounds (draggable has already reverted)\n// reset states for next time, and for updateUI()\nh=!0,j=!1,l=0,q=0,r=0,d(),b.css(\"filter\",\"\"),// clear IE opacity side-effects\n// sometimes fast drags make event revert to wrong position, so reset.\n// also, if we dragged the element out of the area because of snapping,\n// but the *mouse* is still in bounds, we need to reset the position.\nb.css(f),P(a,b))}})}", "allCustomEvents() {\n // add custom events here\n }", "_onCalendarOverlayOpened() {\n if (this._focusCentralDateOnCalendarOpen) {\n this._calendarElement.focusCentralDate();\n }\n }", "function onOpen() {\n var sheet = SpreadsheetApp.getActiveSpreadsheet();\n var entries = [\n {\n name: \"Check all rows\",\n functionName: \"checkEventsForAllRows\"\n },\n {\n name: \"Configure active row\",\n functionName: \"configureActiveRow\"\n },\n {\n name: \"Check event for active row\",\n functionName: \"checkEventForActiveRow\"\n },\n {\n name: \"Sync event for active row\",\n functionName: \"syncEventForActiveRow\"\n },\n {\n name: \"Delete event for active row\",\n functionName: \"deleteEventForActiveRow\"\n }\n ];\n if (Settings.getOffice365CalendarEnabled()) {\n entries.push({\n name: \"Authorize access to Office 365\",\n functionName: \"authorizeIfRequired\"\n });\n entries.push({\n name: \"Logout from Office 365\",\n functionName: \"logout\"\n });\n }\n sheet.addMenu(\"Calendar\", entries);\n}", "function Events(){}//", "function Events(){}//", "function onOpen() {\n var sheet = SpreadsheetApp.getActiveSpreadsheet();\n var menuEntries = [];\n menuEntries.push({name: \"Sync\", functionName: \"pushToCalendar\"});\n sheet.addMenu(\"Matador Calendar\", menuEntries);\n}", "function Calendar() {\n return (\n <>\n <h5>Calendar</h5>\n <iframe\n title=\"Calendar Title\"\n src=\"https://calendar.google.com/calendar/embed?src=jonpchristie%40gmail.com&ctz=America%2FNew_York\"\n width= \"100%\"\n height= \"100%\"\n frameborder=\"0\"\n scrolling=\"yes\"\n ></iframe>\n </>\n );\n}", "function CalendarPopup(i_tag,cal_url) \r\n{\r\n this.framer = getEl(i_tag); // IFRAME object\r\n if(!this.framer)\r\n {\r\n\t //alert('Can not find IFRAME '+i_tag);\r\n\t return;\r\n\t}\r\n\tthis.framer.style.width = \"160px\";\r\n\tthis.framer.style.height = \"140px\";\r\n\twindow._frmname = this.framer.id;\r\n\tthis.cal = cal_url;\r\n\tthis.offsetX = -120;\r\n\tthis.offsetY = 20;\r\n\t// Calendar-specific properties\r\n\tthis.monthNames = new Array('January','February','March','April','May','June','July','August','September','October','November','December');\r\n\tthis.monthAbbreviations = new Array(\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\");\r\n\tthis.dayHeaders = new Array(\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\");\r\n\tthis.weekStartDay = 0;\r\n\tthis.isShowYearNavigation = false;\r\n\tthis.displayType = \"date\";\r\n\tthis.disabledWeekDays = new Object();\r\n\tthis.yearSelectStartOffset = 2;\r\n\tthis.currentDate = null;\r\n\tthis.todayText=\"Today\";\r\n\twindow.CalendarPopup_targetInput = null;\r\n\twindow.CalendarPopup_dateFormat = \"dd.mm.yyyy\";\r\n\t// Method mappings\r\n \tthis.returnFunction = \"CalendarPopup_tmpReturnFunction\";\r\n \tthis.returnMonthFunction = \"CalendarPopup_tmpReturnMonthFunction\";\r\n \tthis.returnQuarterFunction = \"CalendarPopup_tmpReturnQuarterFunction\";\r\n \tthis.returnYearFunction = \"CalendarPopup_tmpReturnYearFunction\";\r\n this.setReturnFunction = CalendarPopup_setReturnFunction;\r\n\tthis.setReturnMonthFunction = CalendarPopup_setReturnMonthFunction;\r\n\tthis.setReturnQuarterFunction = CalendarPopup_setReturnQuarterFunction;\r\n\tthis.setReturnYearFunction = CalendarPopup_setReturnYearFunction;\r\n\tthis.setMonthNames = CalendarPopup_setMonthNames;\r\n\tthis.setMonthAbbreviations = CalendarPopup_setMonthAbbreviations;\r\n\tthis.setDayHeaders = CalendarPopup_setDayHeaders;\r\n\tthis.setWeekStartDay = CalendarPopup_setWeekStartDay;\r\n\tthis.setDisplayType = CalendarPopup_setDisplayType;\r\n\tthis.setDisabledWeekDays = CalendarPopup_setDisabledWeekDays;\r\n\tthis.setYearSelectStartOffset = CalendarPopup_setYearSelectStartOffset;\r\n\tthis.setTodayText = CalendarPopup_setTodayText;\r\n\tthis.showYearNavigation = CalendarPopup_showYearNavigation;\r\n\tthis.showCalendar = CalendarPopup_showCalendar;\r\n\tthis.hideCalendar = CalendarPopup_hideCalendar;\r\n\tthis.select = CalendarPopup_select;\r\n\t// Return the object\r\n\tattachListener();\r\n\treturn this;\r\n}", "initPickersCalendar(){\n var options = {\n // closeText: 'Fermer',\n // prevText: '&#x3c;Préc',\n // nextText: 'Suiv&#x3e;',\n currentText: 'Aujourd\\'hui',\n monthNames: ['Janvier','Fevrier','Mars','Avril','Mai','Juin',\n 'Juillet','Aout','Septembre','Octobre','Novembre','Decembre'],\n monthNamesShort: ['Jan','Fev','Mar','Avr','Mai','Jun',\n 'Jul','Aou','Sep','Oct','Nov','Dec'],\n dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],\n dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],\n dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],\n weekHeader: 'Sm',\n dateFormat: 'dd/mm/yy',\n firstDay: 1,\n // isRTL: false,\n showMonthAfterYear: false,\n yearSuffix: '',\n // minDate: 0,\n maxDate: '+12M +0D',\n minDate: new Date (2017, 8, 1), \n beforeShowDay: $.proxy(this.CalendarEventDay, this), // pour ne pas perdre le this en tant que mon app\n numberOfMonths: 1,\n showButtonPanel: true\n \n };\n \n this.$datepicker.datepicker(options);\n // this.$datepicker.datepicker( \"options\", \"beforeShowDay\", true);\n\n }", "function showEventResult(jsonres) {\n $(\"#cal\").fullCalendar('removeEvents');\n $(\"#cal\").fullCalendar('refetchEvents');\n}", "function viewEvents(huc12, mode) {\n function pprint(val, mode) {\n if (val == null) return \"0\";\n return val.toFixed(2);\n }\n function pprint2(val, mode) {\n if (mode == 'daily') return \"\";\n return \" (\" + val + \")\";\n }\n var colLabel = (mode == 'daily') ? \"Date\": \"Year\";\n var lbl = ((mode == 'daily') ? 'Daily events' : 'Yearly summary (# daily events)');\n $('#eventsModalLabel').html(lbl + \" for \" + huc12);\n $('#eventsres').html('<p><img src=\"images/wait24trans.gif\" /> Loading...</p>');\n $.ajax({\n method: 'GET',\n url: BACKEND + '/geojson/huc12_events.py',\n data: { huc12: huc12, mode: mode }\n }).done(function (res) {\n var myfunc = ((mode == 'yearly') ? 'setYearInterval(' : 'setDateFromString(');\n var tbl = '<button class=\"btn btn-primary\" ' +\n 'onclick=\"javascript: window.open(\\''+ BACKEND +'/geojson/huc12_events.py?huc12='+huc12+'&amp;mode='+mode+'&amp;format=xlsx\\');\">' +\n '<i class=\"fa fa-download\"></i> Excel Download</button><br />' +\n '<table class=\"table table-striped header-fixed\" id=\"depdt\">' +\n \"<thead><tr><th>\" + colLabel +\"</th><th>Precip [\" + varunits['qc_precip'][appstate.metric] +\n \"]</th><th>Runoff [\" + varunits['qc_precip'][appstate.metric] +\n \"]</th><th>Detach [\" + varunits['avg_loss'][appstate.metric] +\n \"]</th><th>Hillslope Soil Loss [\" + varunits['avg_loss'][appstate.metric] +\n \"]</th></tr></thead>\";\n $.each(res.results, function (idx, result) {\n var dt = ((mode == 'daily') ? result.date : result.date.substring(0, 4));\n tbl += \"<tr><td><a href=\\\"javascript: \" + myfunc + \"'\" + dt + \"');\\\">\" + dt + \"</a></td><td>\" +\n pprint(result.qc_precip * multipliers['qc_precip'][appstate.metric]) + pprint2(result.qc_precip_events, mode) + \"</td><td>\" +\n pprint(result.avg_runoff * multipliers['avg_runoff'][appstate.metric]) + pprint2(result.avg_runoff_events, mode) + \"</td><td>\" +\n pprint(result.avg_loss * multipliers['avg_loss'][appstate.metric]) + pprint2(result.avg_loss_events, mode) + \"</td><td>\" +\n pprint(result.avg_delivery * multipliers['avg_delivery'][appstate.metric]) + pprint2(result.avg_delivery_events, mode) + \"</td></tr>\";\n });\n tbl += \"</table>\";\n if (mode == 'yearly') {\n tbl += \"<h4>Monthly Averages</h4>\";\n tbl += '<p><img src=\"' + BACKEND + '/auto/huc12_bymonth.py?huc12=' + huc12 + '\" class=\"img img-responsive\"></p>';\n }\n\n $('#eventsres').html(tbl);\n $(\"#depdt\").DataTable();\n }).fail(function (res) {\n $('#eventsres').html(\"<p>Something failed, sorry</p>\");\n });\n\n}", "function ShowAlternateCalendarPopup(e_title, e_start){\n\tvar a = JSON.parse(calendarEvent);\n\tfor(var i=0;i<a.items.length;i++){\n\t\tif(a.items[i].summary == e_title && a.items[i].start.dateTime == e_start._i){\n\t\t\t$('#ALeventSummary').val(e_title);\n\t\t\t$('#ALeventStartBirth').val(e_start._i.substring(0,10));\n\t\t\t$('#ALeventStartTime').val(e_start._i.substring(11,13));\n\t\t\t$('#ALeventStartMinute').val(e_start._i.substring(14,16));\n\t\t\t$('#ALeventEndBirth').val(a.items[i].end.dateTime.substring(0,10));\n\t\t\t$('#ALeventEndTime').val(a.items[i].end.dateTime.substring(11,13));\n\t\t\t$('#ALeventEndMinute').val(a.items[i].end.dateTime.substring(14,16));\n\t\t\t$('#ALeventDescription').val(a.items[i].description);\n\t\t\t$('#ALeventLocation').val(a.items[i].location);\n\t\t}\n\t}\n\t$('#popupAlternateCalendarForm').show();\n}", "function AgendaView(element, calendar, viewName) {\n\tvar t = this;\n\t\n\t\n\t// exports\n\tt.renderAgenda = renderAgenda;\n\tt.setWidth = setWidth;\n\tt.setHeight = setHeight;\n\tt.afterRender = afterRender;\n\tt.defaultEventEnd = defaultEventEnd;\n\tt.timePosition = timePosition;\n\tt.getIsCellAllDay = getIsCellAllDay;\n\tt.allDayRow = getAllDayRow;\n\tt.getCoordinateGrid = function() { return coordinateGrid }; // specifically for AgendaEventRenderer\n\tt.getHoverListener = function() { return hoverListener };\n\tt.colLeft = colLeft;\n\tt.colRight = colRight;\n\tt.colContentLeft = colContentLeft;\n\tt.colContentRight = colContentRight;\n\tt.getDaySegmentContainer = function() { return daySegmentContainer };\n\tt.getSlotSegmentContainer = function() { return slotSegmentContainer };\n\tt.getMinMinute = function() { return minMinute };\n\tt.getMaxMinute = function() { return maxMinute };\n\tt.getSlotContainer = function() { return slotContainer };\n\tt.getRowCnt = function() { return 1 };\n\tt.getColCnt = function() { return colCnt };\n\tt.getColWidth = function() { return colWidth };\n\tt.getSnapHeight = function() { return snapHeight };\n\tt.getSnapMinutes = function() { return snapMinutes };\n\tt.defaultSelectionEnd = defaultSelectionEnd;\n\tt.renderDayOverlay = renderDayOverlay;\n\tt.renderSelection = renderSelection;\n\tt.clearSelection = clearSelection;\n\tt.reportDayClick = reportDayClick; // selection mousedown hack\n\tt.dragStart = dragStart;\n\tt.dragStop = dragStop;\n\t\n\t\n\t// imports\n\tView.call(t, element, calendar, viewName);\n\tOverlayManager.call(t);\n\tSelectionManager.call(t);\n\tAgendaEventRenderer.call(t);\n\tvar opt = t.opt;\n\tvar trigger = t.trigger;\n\tvar renderOverlay = t.renderOverlay;\n\tvar clearOverlays = t.clearOverlays;\n\tvar reportSelection = t.reportSelection;\n\tvar unselect = t.unselect;\n\tvar daySelectionMousedown = t.daySelectionMousedown;\n\tvar slotSegHtml = t.slotSegHtml;\n\tvar cellToDate = t.cellToDate;\n\tvar dateToCell = t.dateToCell;\n\tvar rangeToSegments = t.rangeToSegments;\n\tvar formatDate = calendar.formatDate;\n\t\n\t\n\t// locals\n\t\n\tvar dayTable;\n\tvar dayHead;\n\tvar dayHeadCells;\n\tvar dayBody;\n\tvar dayBodyCells;\n\tvar dayBodyCellInners;\n\tvar dayBodyCellContentInners;\n\tvar dayBodyFirstCell;\n\tvar dayBodyFirstCellStretcher;\n\tvar slotLayer;\n\tvar daySegmentContainer;\n\tvar allDayTable;\n\tvar allDayRow;\n\tvar slotScroller;\n\tvar slotContainer;\n\tvar slotSegmentContainer;\n\tvar slotTable;\n\tvar selectionHelper;\n\t\n\tvar viewWidth;\n\tvar viewHeight;\n\tvar axisWidth;\n\tvar colWidth;\n\tvar gutterWidth;\n\tvar slotHeight; // TODO: what if slotHeight changes? (see issue 650)\n\n\tvar snapMinutes;\n\tvar snapRatio; // ratio of number of \"selection\" slots to normal slots. (ex: 1, 2, 4)\n\tvar snapHeight; // holds the pixel hight of a \"selection\" slot\n\t\n\tvar colCnt;\n\tvar slotCnt;\n\tvar coordinateGrid;\n\tvar hoverListener;\n\tvar colPositions;\n\tvar colContentPositions;\n\tvar slotTopCache = {};\n\t\n\tvar tm;\n\tvar rtl;\n\tvar minMinute, maxMinute;\n\tvar colFormat;\n\tvar showWeekNumbers;\n\tvar weekNumberTitle;\n\tvar weekNumberFormat;\n\t\n\n\t\n\t/* Rendering\n\t-----------------------------------------------------------------------------*/\n\t\n\t\n\tdisableTextSelection(element.addClass('fc-agenda'));\n\t\n\t\n\tfunction renderAgenda(c) {\n\t\tcolCnt = c;\n\t\tupdateOptions();\n\n\t\tif (!dayTable) { // first time rendering?\n\t\t\tbuildSkeleton(); // builds day table, slot area, events containers\n\t\t}\n\t\telse {\n\t\t\tbuildDayTable(); // rebuilds day table\n\t\t}\n\t}\n\t\n\t\n\tfunction updateOptions() {\n\n\t\ttm = opt('theme') ? 'ui' : 'fc';\n\t\trtl = opt('isRTL')\n\t\tminMinute = parseTime(opt('minTime'));\n\t\tmaxMinute = parseTime(opt('maxTime'));\n\t\tcolFormat = opt('columnFormat');\n\n\t\t// week # options. (TODO: bad, logic also in other views)\n\t\tshowWeekNumbers = opt('weekNumbers');\n\t\tweekNumberTitle = opt('weekNumberTitle');\n\t\tif (opt('weekNumberCalculation') != 'iso') {\n\t\t\tweekNumberFormat = \"w\";\n\t\t}\n\t\telse {\n\t\t\tweekNumberFormat = \"W\";\n\t\t}\n\n\t\tsnapMinutes = opt('snapMinutes') || opt('slotMinutes');\n\t}\n\n\n\n\t/* Build DOM\n\t-----------------------------------------------------------------------*/\n\n\n\tfunction buildSkeleton() {\n\t\tvar headerClass = tm + \"-widget-header\";\n\t\tvar contentClass = tm + \"-widget-content\";\n\t\tvar s;\n\t\tvar d;\n\t\tvar i;\n\t\tvar maxd;\n\t\tvar minutes;\n\t\tvar slotNormal = opt('slotMinutes') % 15 == 0;\n\t\t\n\t\tbuildDayTable();\n\t\t\n\t\tslotLayer =\n\t\t\t$(\"<div style='position:absolute;z-index:2;left:0;width:100%'/>\")\n\t\t\t\t.appendTo(element);\n\t\t\t\t\n\t\tif (opt('allDaySlot')) {\n\t\t\n\t\t\tdaySegmentContainer =\n\t\t\t\t$(\"<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>\")\n\t\t\t\t\t.appendTo(slotLayer);\n\t\t\n\t\t\ts =\n\t\t\t\t\"<table style='width:100%' class='fc-agenda-allday' cellspacing='0'>\" +\n\t\t\t\t\"<tr>\" +\n\t\t\t\t\"<th class='\" + headerClass + \" fc-agenda-axis'>\" + opt('allDayText') + \"</th>\" +\n\t\t\t\t\"<td>\" +\n\t\t\t\t\"<div class='fc-day-content'><div style='position:relative'/></div>\" +\n\t\t\t\t\"</td>\" +\n\t\t\t\t\"<th class='\" + headerClass + \" fc-agenda-gutter'>&nbsp;</th>\" +\n\t\t\t\t\"</tr>\" +\n\t\t\t\t\"</table>\";\n\t\t\tallDayTable = $(s).appendTo(slotLayer);\n\t\t\tallDayRow = allDayTable.find('tr');\n\t\t\t\n\t\t\tdayBind(allDayRow.find('td'));\n\t\t\t\n\t\t\tslotLayer.append(\n\t\t\t\t\"<div class='fc-agenda-divider \" + headerClass + \"'>\" +\n\t\t\t\t\"<div class='fc-agenda-divider-inner'/>\" +\n\t\t\t\t\"</div>\"\n\t\t\t);\n\t\t\t\n\t\t}else{\n\t\t\n\t\t\tdaySegmentContainer = $([]); // in jQuery 1.4, we can just do $()\n\t\t\n\t\t}\n\t\t\n\t\tslotScroller =\n\t\t\t$(\"<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>\")\n\t\t\t\t.appendTo(slotLayer);\n\t\t\t\t\n\t\tslotContainer =\n\t\t\t$(\"<div style='position:relative;width:100%;overflow:hidden'/>\")\n\t\t\t\t.appendTo(slotScroller);\n\t\t\t\t\n\t\tslotSegmentContainer =\n\t\t\t$(\"<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>\")\n\t\t\t\t.appendTo(slotContainer);\n\t\t\n\t\ts =\n\t\t\t\"<table class='fc-agenda-slots' style='width:100%' cellspacing='0'>\" +\n\t\t\t\"<tbody>\";\n\t\td = zeroDate();\n\t\tmaxd = addMinutes(cloneDate(d), maxMinute);\n\t\taddMinutes(d, minMinute);\n\t\tslotCnt = 0;\n\t\tfor (i=0; d < maxd; i++) {\n\t\t\tminutes = d.getMinutes();\n\t\t\ts +=\n\t\t\t\t\"<tr class='fc-slot\" + i + ' ' + (!minutes ? '' : 'fc-minor') + \"'>\" +\n\t\t\t\t\"<th class='fc-agenda-axis \" + headerClass + \"'>\" +\n\t\t\t\t((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : '&nbsp;') +\n\t\t\t\t\"</th>\" +\n\t\t\t\t\"<td class='\" + contentClass + \"'>\" +\n\t\t\t\t\"<div style='position:relative'>&nbsp;</div>\" +\n\t\t\t\t\"</td>\" +\n\t\t\t\t\"</tr>\";\n\t\t\taddMinutes(d, opt('slotMinutes'));\n\t\t\tslotCnt++;\n\t\t}\n\t\ts +=\n\t\t\t\"</tbody>\" +\n\t\t\t\"</table>\";\n\t\tslotTable = $(s).appendTo(slotContainer);\n\t\t\n\t\tslotBind(slotTable.find('td'));\n\t}\n\n\n\n\t/* Build Day Table\n\t-----------------------------------------------------------------------*/\n\n\n\tfunction buildDayTable() {\n\t\tvar html = buildDayTableHTML();\n\n\t\tif (dayTable) {\n\t\t\tdayTable.remove();\n\t\t}\n\t\tdayTable = $(html).appendTo(element);\n\n\t\tdayHead = dayTable.find('thead');\n\t\tdayHeadCells = dayHead.find('th').slice(1, -1); // exclude gutter\n\t\tdayBody = dayTable.find('tbody');\n\t\tdayBodyCells = dayBody.find('td').slice(0, -1); // exclude gutter\n\t\tdayBodyCellInners = dayBodyCells.find('> div');\n\t\tdayBodyCellContentInners = dayBodyCells.find('.fc-day-content > div');\n\n\t\tdayBodyFirstCell = dayBodyCells.eq(0);\n\t\tdayBodyFirstCellStretcher = dayBodyCellInners.eq(0);\n\t\t\n\t\tmarkFirstLast(dayHead.add(dayHead.find('tr')));\n\t\tmarkFirstLast(dayBody.add(dayBody.find('tr')));\n\n\t\t// TODO: now that we rebuild the cells every time, we should call dayRender\n\t}\n\n\n\tfunction buildDayTableHTML() {\n\t\tvar html =\n\t\t\t\"<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>\" +\n\t\t\tbuildDayTableHeadHTML() +\n\t\t\tbuildDayTableBodyHTML() +\n\t\t\t\"</table>\";\n\n\t\treturn html;\n\t}\n\n\n\tfunction buildDayTableHeadHTML() {\n\t\tvar headerClass = tm + \"-widget-header\";\n\t\tvar date;\n\t\tvar html = '';\n\t\tvar weekText;\n\t\tvar col;\n\n\t\thtml +=\n\t\t\t\"<thead>\" +\n\t\t\t\"<tr>\";\n\n\t\tif (showWeekNumbers) {\n\t\t\tdate = cellToDate(0, 0);\n\t\t\tweekText = formatDate(date, weekNumberFormat);\n\t\t\tif (rtl) {\n\t\t\t\tweekText += weekNumberTitle;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tweekText = weekNumberTitle + weekText;\n\t\t\t}\n\t\t\thtml +=\n\t\t\t\t\"<th class='fc-agenda-axis fc-week-number \" + headerClass + \"'>\" +\n\t\t\t\thtmlEscape(weekText) +\n\t\t\t\t\"</th>\";\n\t\t}\n\t\telse {\n\t\t\thtml += \"<th class='fc-agenda-axis \" + headerClass + \"'>&nbsp;</th>\";\n\t\t}\n\n\t\tfor (col=0; col<colCnt; col++) {\n\t\t\tdate = cellToDate(0, col);\n\t\t\thtml +=\n\t\t\t\t\"<th class='fc-\" + dayIDs[date.getDay()] + \" fc-col\" + col + ' ' + headerClass + \"'>\" +\n\t\t\t\thtmlEscape(formatDate(date, colFormat)) +\n\t\t\t\t\"</th>\";\n\t\t}\n\n\t\thtml +=\n\t\t\t\"<th class='fc-agenda-gutter \" + headerClass + \"'>&nbsp;</th>\" +\n\t\t\t\"</tr>\" +\n\t\t\t\"</thead>\";\n\n\t\treturn html;\n\t}\n\n\n\tfunction buildDayTableBodyHTML() {\n\t\tvar headerClass = tm + \"-widget-header\"; // TODO: make these when updateOptions() called\n\t\tvar contentClass = tm + \"-widget-content\";\n\t\tvar date;\n\t\tvar today = clearTime(new Date());\n\t\tvar col;\n\t\tvar cellsHTML;\n\t\tvar cellHTML;\n\t\tvar classNames;\n\t\tvar html = '';\n\n\t\thtml +=\n\t\t\t\"<tbody>\" +\n\t\t\t\"<tr>\" +\n\t\t\t\"<th class='fc-agenda-axis \" + headerClass + \"'>&nbsp;</th>\";\n\n\t\tcellsHTML = '';\n\n\t\tfor (col=0; col<colCnt; col++) {\n\n\t\t\tdate = cellToDate(0, col);\n\n\t\t\tclassNames = [\n\t\t\t\t'fc-col' + col,\n\t\t\t\t'fc-' + dayIDs[date.getDay()],\n\t\t\t\tcontentClass\n\t\t\t];\n\t\t\tif (+date == +today) {\n\t\t\t\tclassNames.push(\n\t\t\t\t\ttm + '-state-highlight',\n\t\t\t\t\t'fc-today'\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if (date < today) {\n\t\t\t\tclassNames.push('fc-past');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tclassNames.push('fc-future');\n\t\t\t}\n\n\t\t\tcellHTML =\n\t\t\t\t\"<td class='\" + classNames.join(' ') + \"'>\" +\n\t\t\t\t\"<div>\" +\n\t\t\t\t\"<div class='fc-day-content'>\" +\n\t\t\t\t\"<div style='position:relative'>&nbsp;</div>\" +\n\t\t\t\t\"</div>\" +\n\t\t\t\t\"</div>\" +\n\t\t\t\t\"</td>\";\n\n\t\t\tcellsHTML += cellHTML;\n\t\t}\n\n\t\thtml += cellsHTML;\n\t\thtml +=\n\t\t\t\"<td class='fc-agenda-gutter \" + contentClass + \"'>&nbsp;</td>\" +\n\t\t\t\"</tr>\" +\n\t\t\t\"</tbody>\";\n\n\t\treturn html;\n\t}\n\n\n\t// TODO: data-date on the cells\n\n\t\n\t\n\t/* Dimensions\n\t-----------------------------------------------------------------------*/\n\n\t\n\tfunction setHeight(height) {\n\t\tif (height === undefined) {\n\t\t\theight = viewHeight;\n\t\t}\n\t\tviewHeight = height;\n\t\tslotTopCache = {};\n\t\n\t\tvar headHeight = dayBody.position().top;\n\t\tvar allDayHeight = slotScroller.position().top; // including divider\n\t\tvar bodyHeight = Math.min( // total body height, including borders\n\t\t\theight - headHeight, // when scrollbars\n\t\t\tslotTable.height() + allDayHeight + 1 // when no scrollbars. +1 for bottom border\n\t\t);\n\n\t\tdayBodyFirstCellStretcher\n\t\t\t.height(bodyHeight - vsides(dayBodyFirstCell));\n\t\t\n\t\tslotLayer.css('top', headHeight);\n\t\t\n\t\tslotScroller.height(bodyHeight - allDayHeight - 1);\n\t\t\n\t\t// the stylesheet guarantees that the first row has no border.\n\t\t// this allows .height() to work well cross-browser.\n\t\tslotHeight = slotTable.find('tr:first').height() + 1; // +1 for bottom border\n\n\t\tsnapRatio = opt('slotMinutes') / snapMinutes;\n\t\tsnapHeight = slotHeight / snapRatio;\n\t}\n\t\n\t\n\tfunction setWidth(width) {\n\t\tviewWidth = width;\n\t\tcolPositions.clear();\n\t\tcolContentPositions.clear();\n\n\t\tvar axisFirstCells = dayHead.find('th:first');\n\t\tif (allDayTable) {\n\t\t\taxisFirstCells = axisFirstCells.add(allDayTable.find('th:first'));\n\t\t}\n\t\taxisFirstCells = axisFirstCells.add(slotTable.find('th:first'));\n\t\t\n\t\taxisWidth = 0;\n\t\tsetOuterWidth(\n\t\t\taxisFirstCells\n\t\t\t\t.width('')\n\t\t\t\t.each(function(i, _cell) {\n\t\t\t\t\taxisWidth = Math.max(axisWidth, $(_cell).outerWidth());\n\t\t\t\t}),\n\t\t\taxisWidth\n\t\t);\n\t\t\n\t\tvar gutterCells = dayTable.find('.fc-agenda-gutter');\n\t\tif (allDayTable) {\n\t\t\tgutterCells = gutterCells.add(allDayTable.find('th.fc-agenda-gutter'));\n\t\t}\n\n\t\tvar slotTableWidth = slotScroller[0].clientWidth; // needs to be done after axisWidth (for IE7)\n\t\t\n\t\tgutterWidth = slotScroller.width() - slotTableWidth;\n\t\tif (gutterWidth) {\n\t\t\tsetOuterWidth(gutterCells, gutterWidth);\n\t\t\tgutterCells\n\t\t\t\t.show()\n\t\t\t\t.prev()\n\t\t\t\t.removeClass('fc-last');\n\t\t}else{\n\t\t\tgutterCells\n\t\t\t\t.hide()\n\t\t\t\t.prev()\n\t\t\t\t.addClass('fc-last');\n\t\t}\n\t\t\n\t\tcolWidth = Math.floor((slotTableWidth - axisWidth) / colCnt);\n\t\tsetOuterWidth(dayHeadCells.slice(0, -1), colWidth);\n\t}\n\t\n\n\n\t/* Scrolling\n\t-----------------------------------------------------------------------*/\n\n\n\tfunction resetScroll() {\n\t\tvar d0 = zeroDate();\n\t\tvar scrollDate = cloneDate(d0);\n\t\tscrollDate.setHours(opt('firstHour'));\n\t\tvar top = timePosition(d0, scrollDate) + 1; // +1 for the border\n\t\tfunction scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}\n\t\tscroll();\n\t\tsetTimeout(scroll, 0); // overrides any previous scroll state made by the browser\n\t}\n\n\n\tfunction afterRender() { // after the view has been freshly rendered and sized\n\t\tresetScroll();\n\t}\n\t\n\t\n\t\n\t/* Slot/Day clicking and binding\n\t-----------------------------------------------------------------------*/\n\t\n\n\tfunction dayBind(cells) {\n\t\tcells.click(slotClick)\n\t\t\t.mousedown(daySelectionMousedown);\n\t}\n\n\n\tfunction slotBind(cells) {\n\t\tcells.click(slotClick)\n\t\t\t.mousedown(slotSelectionMousedown);\n\t}\n\t\n\t\n\tfunction slotClick(ev) {\n\t\tif (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick\n\t\t\tvar col = Math.min(colCnt-1, Math.floor((ev.pageX - dayTable.offset().left - axisWidth) / colWidth));\n\t\t\tvar date = cellToDate(0, col);\n\t\t\tvar rowMatch = this.parentNode.className.match(/fc-slot(\\d+)/); // TODO: maybe use data\n\t\t\tif (rowMatch) {\n\t\t\t\tvar mins = parseInt(rowMatch[1]) * opt('slotMinutes');\n\t\t\t\tvar hours = Math.floor(mins/60);\n\t\t\t\tdate.setHours(hours);\n\t\t\t\tdate.setMinutes(mins%60 + minMinute);\n\t\t\t\ttrigger('dayClick', dayBodyCells[col], date, false, ev);\n\t\t\t}else{\n\t\t\t\ttrigger('dayClick', dayBodyCells[col], date, true, ev);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t\n\t/* Semi-transparent Overlay Helpers\n\t-----------------------------------------------------*/\n\t// TODO: should be consolidated with BasicView's methods\n\n\n\tfunction renderDayOverlay(overlayStart, overlayEnd, refreshCoordinateGrid) { // overlayEnd is exclusive\n\n\t\tif (refreshCoordinateGrid) {\n\t\t\tcoordinateGrid.build();\n\t\t}\n\n\t\tvar segments = rangeToSegments(overlayStart, overlayEnd);\n\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\t\t\tdayBind(\n\t\t\t\trenderCellOverlay(\n\t\t\t\t\tsegment.row,\n\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\tsegment.row,\n\t\t\t\t\tsegment.rightCol\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n\t\n\t\n\tfunction renderCellOverlay(row0, col0, row1, col1) { // only for all-day?\n\t\tvar rect = coordinateGrid.rect(row0, col0, row1, col1, slotLayer);\n\t\treturn renderOverlay(rect, slotLayer);\n\t}\n\t\n\n\tfunction renderSlotOverlay(overlayStart, overlayEnd) {\n\t\tfor (var i=0; i<colCnt; i++) {\n\t\t\tvar dayStart = cellToDate(0, i);\n\t\t\tvar dayEnd = addDays(cloneDate(dayStart), 1);\n\t\t\tvar stretchStart = new Date(Math.max(dayStart, overlayStart));\n\t\t\tvar stretchEnd = new Date(Math.min(dayEnd, overlayEnd));\n\t\t\tif (stretchStart < stretchEnd) {\n\t\t\t\tvar rect = coordinateGrid.rect(0, i, 0, i, slotContainer); // only use it for horizontal coords\n\t\t\t\tvar top = timePosition(dayStart, stretchStart);\n\t\t\t\tvar bottom = timePosition(dayStart, stretchEnd);\n\t\t\t\trect.top = top;\n\t\t\t\trect.height = bottom - top;\n\t\t\t\tslotBind(\n\t\t\t\t\trenderOverlay(rect, slotContainer)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t\n\t/* Coordinate Utilities\n\t-----------------------------------------------------------------------------*/\n\t\n\t\n\tcoordinateGrid = new CoordinateGrid(function(rows, cols) {\n\t\tvar e, n, p;\n\t\tdayHeadCells.each(function(i, _e) {\n\t\t\te = $(_e);\n\t\t\tn = e.offset().left;\n\t\t\tif (i) {\n\t\t\t\tp[1] = n;\n\t\t\t}\n\t\t\tp = [n];\n\t\t\tcols[i] = p;\n\t\t});\n\t\tp[1] = n + e.outerWidth();\n\t\tif (opt('allDaySlot')) {\n\t\t\te = allDayRow;\n\t\t\tn = e.offset().top;\n\t\t\trows[0] = [n, n+e.outerHeight()];\n\t\t}\n\t\tvar slotTableTop = slotContainer.offset().top;\n\t\tvar slotScrollerTop = slotScroller.offset().top;\n\t\tvar slotScrollerBottom = slotScrollerTop + slotScroller.outerHeight();\n\t\tfunction constrain(n) {\n\t\t\treturn Math.max(slotScrollerTop, Math.min(slotScrollerBottom, n));\n\t\t}\n\t\tfor (var i=0; i<slotCnt*snapRatio; i++) { // adapt slot count to increased/decreased selection slot count\n\t\t\trows.push([\n\t\t\t\tconstrain(slotTableTop + snapHeight*i),\n\t\t\t\tconstrain(slotTableTop + snapHeight*(i+1))\n\t\t\t]);\n\t\t}\n\t});\n\t\n\t\n\thoverListener = new HoverListener(coordinateGrid);\n\t\n\tcolPositions = new HorizontalPositionCache(function(col) {\n\t\treturn dayBodyCellInners.eq(col);\n\t});\n\t\n\tcolContentPositions = new HorizontalPositionCache(function(col) {\n\t\treturn dayBodyCellContentInners.eq(col);\n\t});\n\t\n\t\n\tfunction colLeft(col) {\n\t\treturn colPositions.left(col);\n\t}\n\n\n\tfunction colContentLeft(col) {\n\t\treturn colContentPositions.left(col);\n\t}\n\n\n\tfunction colRight(col) {\n\t\treturn colPositions.right(col);\n\t}\n\t\n\t\n\tfunction colContentRight(col) {\n\t\treturn colContentPositions.right(col);\n\t}\n\n\n\tfunction getIsCellAllDay(cell) {\n\t\treturn opt('allDaySlot') && !cell.row;\n\t}\n\n\n\tfunction realCellToDate(cell) { // ugh \"real\" ... but blame it on our abuse of the \"cell\" system\n\t\tvar d = cellToDate(0, cell.col);\n\t\tvar slotIndex = cell.row;\n\t\tif (opt('allDaySlot')) {\n\t\t\tslotIndex--;\n\t\t}\n\t\tif (slotIndex >= 0) {\n\t\t\taddMinutes(d, minMinute + slotIndex * snapMinutes);\n\t\t}\n\t\treturn d;\n\t}\n\t\n\t\n\t// get the Y coordinate of the given time on the given day (both Date objects)\n\tfunction timePosition(day, time) { // both date objects. day holds 00:00 of current day\n\t\tday = cloneDate(day, true);\n\t\tif (time < addMinutes(cloneDate(day), minMinute)) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (time >= addMinutes(cloneDate(day), maxMinute)) {\n\t\t\treturn slotTable.height();\n\t\t}\n\t\tvar slotMinutes = opt('slotMinutes'),\n\t\t\tminutes = time.getHours()*60 + time.getMinutes() - minMinute,\n\t\t\tslotI = Math.floor(minutes / slotMinutes),\n\t\t\tslotTop = slotTopCache[slotI];\n\t\tif (slotTop === undefined) {\n\t\t\tslotTop = slotTopCache[slotI] =\n\t\t\t\tslotTable.find('tr').eq(slotI).find('td div')[0].offsetTop;\n\t\t\t\t// .eq() is faster than \":eq()\" selector\n\t\t\t\t// [0].offsetTop is faster than .position().top (do we really need this optimization?)\n\t\t\t\t// a better optimization would be to cache all these divs\n\t\t}\n\t\treturn Math.max(0, Math.round(\n\t\t\tslotTop - 1 + slotHeight * ((minutes % slotMinutes) / slotMinutes)\n\t\t));\n\t}\n\t\n\t\n\tfunction getAllDayRow(index) {\n\t\treturn allDayRow;\n\t}\n\t\n\t\n\tfunction defaultEventEnd(event) {\n\t\tvar start = cloneDate(event.start);\n\t\tif (event.allDay) {\n\t\t\treturn start;\n\t\t}\n\t\treturn addMinutes(start, opt('defaultEventMinutes'));\n\t}\n\t\n\t\n\t\n\t/* Selection\n\t---------------------------------------------------------------------------------*/\n\t\n\t\n\tfunction defaultSelectionEnd(startDate, allDay) {\n\t\tif (allDay) {\n\t\t\treturn cloneDate(startDate);\n\t\t}\n\t\treturn addMinutes(cloneDate(startDate), opt('slotMinutes'));\n\t}\n\t\n\t\n\tfunction renderSelection(startDate, endDate, allDay) { // only for all-day\n\t\tif (allDay) {\n\t\t\tif (opt('allDaySlot')) {\n\t\t\t\trenderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true);\n\t\t\t}\n\t\t}else{\n\t\t\trenderSlotSelection(startDate, endDate);\n\t\t}\n\t}\n\t\n\t\n\tfunction renderSlotSelection(startDate, endDate) {\n\t\tvar helperOption = opt('selectHelper');\n\t\tcoordinateGrid.build();\n\t\tif (helperOption) {\n\t\t\tvar col = dateToCell(startDate).col;\n\t\t\tif (col >= 0 && col < colCnt) { // only works when times are on same day\n\t\t\t\tvar rect = coordinateGrid.rect(0, col, 0, col, slotContainer); // only for horizontal coords\n\t\t\t\tvar top = timePosition(startDate, startDate);\n\t\t\t\tvar bottom = timePosition(startDate, endDate);\n\t\t\t\tif (bottom > top) { // protect against selections that are entirely before or after visible range\n\t\t\t\t\trect.top = top;\n\t\t\t\t\trect.height = bottom - top;\n\t\t\t\t\trect.left += 2;\n\t\t\t\t\trect.width -= 5;\n\t\t\t\t\tif ($.isFunction(helperOption)) {\n\t\t\t\t\t\tvar helperRes = helperOption(startDate, endDate);\n\t\t\t\t\t\tif (helperRes) {\n\t\t\t\t\t\t\trect.position = 'absolute';\n\t\t\t\t\t\t\tselectionHelper = $(helperRes)\n\t\t\t\t\t\t\t\t.css(rect)\n\t\t\t\t\t\t\t\t.appendTo(slotContainer);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\trect.isStart = true; // conside rect a \"seg\" now\n\t\t\t\t\t\trect.isEnd = true; //\n\t\t\t\t\t\tselectionHelper = $(slotSegHtml(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: '',\n\t\t\t\t\t\t\t\tstart: startDate,\n\t\t\t\t\t\t\t\tend: endDate,\n\t\t\t\t\t\t\t\tclassName: ['fc-select-helper'],\n\t\t\t\t\t\t\t\teditable: false\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\trect\n\t\t\t\t\t\t));\n\t\t\t\t\t\tselectionHelper.css('opacity', opt('dragOpacity'));\n\t\t\t\t\t}\n\t\t\t\t\tif (selectionHelper) {\n\t\t\t\t\t\tslotBind(selectionHelper);\n\t\t\t\t\t\tslotContainer.append(selectionHelper);\n\t\t\t\t\t\tsetOuterWidth(selectionHelper, rect.width, true); // needs to be after appended\n\t\t\t\t\t\tsetOuterHeight(selectionHelper, rect.height, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\trenderSlotOverlay(startDate, endDate);\n\t\t}\n\t}\n\t\n\t\n\tfunction clearSelection() {\n\t\tclearOverlays();\n\t\tif (selectionHelper) {\n\t\t\tselectionHelper.remove();\n\t\t\tselectionHelper = null;\n\t\t}\n\t}\n\t\n\t\n\tfunction slotSelectionMousedown(ev) {\n\t\tif (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button\n\t\t\tunselect(ev);\n\t\t\tvar dates;\n\t\t\thoverListener.start(function(cell, origCell) {\n\t\t\t\tclearSelection();\n\t\t\t\tif (cell && cell.col == origCell.col && !getIsCellAllDay(cell)) {\n\t\t\t\t\tvar d1 = realCellToDate(origCell);\n\t\t\t\t\tvar d2 = realCellToDate(cell);\n\t\t\t\t\tdates = [\n\t\t\t\t\t\td1,\n\t\t\t\t\t\taddMinutes(cloneDate(d1), snapMinutes), // calculate minutes depending on selection slot minutes \n\t\t\t\t\t\td2,\n\t\t\t\t\t\taddMinutes(cloneDate(d2), snapMinutes)\n\t\t\t\t\t].sort(dateCompare);\n\t\t\t\t\trenderSlotSelection(dates[0], dates[3]);\n\t\t\t\t}else{\n\t\t\t\t\tdates = null;\n\t\t\t\t}\n\t\t\t}, ev);\n\t\t\t$(document).one('mouseup', function(ev) {\n\t\t\t\thoverListener.stop();\n\t\t\t\tif (dates) {\n\t\t\t\t\tif (+dates[0] == +dates[1]) {\n\t\t\t\t\t\treportDayClick(dates[0], false, ev);\n\t\t\t\t\t}\n\t\t\t\t\treportSelection(dates[0], dates[3], false, ev);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\n\tfunction reportDayClick(date, allDay, ev) {\n\t\ttrigger('dayClick', dayBodyCells[dateToCell(date).col], date, allDay, ev);\n\t}\n\t\n\t\n\t\n\t/* External Dragging\n\t--------------------------------------------------------------------------------*/\n\t\n\t\n\tfunction dragStart(_dragElement, ev, ui) {\n\t\thoverListener.start(function(cell) {\n\t\t\tclearOverlays();\n\t\t\tif (cell) {\n\t\t\t\tif (getIsCellAllDay(cell)) {\n\t\t\t\t\trenderCellOverlay(cell.row, cell.col, cell.row, cell.col);\n\t\t\t\t}else{\n\t\t\t\t\tvar d1 = realCellToDate(cell);\n\t\t\t\t\tvar d2 = addMinutes(cloneDate(d1), opt('defaultEventMinutes'));\n\t\t\t\t\trenderSlotOverlay(d1, d2);\n\t\t\t\t}\n\t\t\t}\n\t\t}, ev);\n\t}\n\t\n\t\n\tfunction dragStop(_dragElement, ev, ui) {\n\t\tvar cell = hoverListener.stop();\n\t\tclearOverlays();\n\t\tif (cell) {\n\t\t\ttrigger('drop', _dragElement, realCellToDate(cell), getIsCellAllDay(cell), ev, ui);\n\t\t}\n\t}\n\t\n\n}", "function AgendaView(element, calendar, viewName) {\n\tvar t = this;\n\t\n\t\n\t// exports\n\tt.renderAgenda = renderAgenda;\n\tt.setWidth = setWidth;\n\tt.setHeight = setHeight;\n\tt.afterRender = afterRender;\n\tt.defaultEventEnd = defaultEventEnd;\n\tt.timePosition = timePosition;\n\tt.getIsCellAllDay = getIsCellAllDay;\n\tt.allDayRow = getAllDayRow;\n\tt.getCoordinateGrid = function() { return coordinateGrid }; // specifically for AgendaEventRenderer\n\tt.getHoverListener = function() { return hoverListener };\n\tt.colLeft = colLeft;\n\tt.colRight = colRight;\n\tt.colContentLeft = colContentLeft;\n\tt.colContentRight = colContentRight;\n\tt.getDaySegmentContainer = function() { return daySegmentContainer };\n\tt.getSlotSegmentContainer = function() { return slotSegmentContainer };\n\tt.getMinMinute = function() { return minMinute };\n\tt.getMaxMinute = function() { return maxMinute };\n\tt.getSlotContainer = function() { return slotContainer };\n\tt.getRowCnt = function() { return 1 };\n\tt.getColCnt = function() { return colCnt };\n\tt.getColWidth = function() { return colWidth };\n\tt.getSnapHeight = function() { return snapHeight };\n\tt.getSnapMinutes = function() { return snapMinutes };\n\tt.defaultSelectionEnd = defaultSelectionEnd;\n\tt.renderDayOverlay = renderDayOverlay;\n\tt.renderSelection = renderSelection;\n\tt.clearSelection = clearSelection;\n\tt.reportDayClick = reportDayClick; // selection mousedown hack\n\tt.dragStart = dragStart;\n\tt.dragStop = dragStop;\n\t\n\t\n\t// imports\n\tView.call(t, element, calendar, viewName);\n\tOverlayManager.call(t);\n\tSelectionManager.call(t);\n\tAgendaEventRenderer.call(t);\n\tvar opt = t.opt;\n\tvar trigger = t.trigger;\n\tvar renderOverlay = t.renderOverlay;\n\tvar clearOverlays = t.clearOverlays;\n\tvar reportSelection = t.reportSelection;\n\tvar unselect = t.unselect;\n\tvar daySelectionMousedown = t.daySelectionMousedown;\n\tvar slotSegHtml = t.slotSegHtml;\n\tvar cellToDate = t.cellToDate;\n\tvar dateToCell = t.dateToCell;\n\tvar rangeToSegments = t.rangeToSegments;\n\tvar formatDate = calendar.formatDate;\n\t\n\t\n\t// locals\n\t\n\tvar dayTable;\n\tvar dayHead;\n\tvar dayHeadCells;\n\tvar dayBody;\n\tvar dayBodyCells;\n\tvar dayBodyCellInners;\n\tvar dayBodyCellContentInners;\n\tvar dayBodyFirstCell;\n\tvar dayBodyFirstCellStretcher;\n\tvar slotLayer;\n\tvar daySegmentContainer;\n\tvar allDayTable;\n\tvar allDayRow;\n\tvar slotScroller;\n\tvar slotContainer;\n\tvar slotSegmentContainer;\n\tvar slotTable;\n\tvar selectionHelper;\n\t\n\tvar viewWidth;\n\tvar viewHeight;\n\tvar axisWidth;\n\tvar colWidth;\n\tvar gutterWidth;\n\tvar slotHeight; // TODO: what if slotHeight changes? (see issue 650)\n\n\tvar snapMinutes;\n\tvar snapRatio; // ratio of number of \"selection\" slots to normal slots. (ex: 1, 2, 4)\n\tvar snapHeight; // holds the pixel hight of a \"selection\" slot\n\t\n\tvar colCnt;\n\tvar slotCnt;\n\tvar coordinateGrid;\n\tvar hoverListener;\n\tvar colPositions;\n\tvar colContentPositions;\n\tvar slotTopCache = {};\n\t\n\tvar tm;\n\tvar rtl;\n\tvar minMinute, maxMinute;\n\tvar colFormat;\n\tvar showWeekNumbers;\n\tvar weekNumberTitle;\n\tvar weekNumberFormat;\n\t\n\n\t\n\t/* Rendering\n\t-----------------------------------------------------------------------------*/\n\t\n\t\n\tdisableTextSelection(element.addClass('fc-agenda'));\n\t\n\t\n\tfunction renderAgenda(c) {\n\t\tcolCnt = c;\n\t\tupdateOptions();\n\n\t\tif (!dayTable) { // first time rendering?\n\t\t\tbuildSkeleton(); // builds day table, slot area, events containers\n\t\t}\n\t\telse {\n\t\t\tbuildDayTable(); // rebuilds day table\n\t\t}\n\t}\n\t\n\t\n\tfunction updateOptions() {\n\n\t\ttm = opt('theme') ? 'ui' : 'fc';\n\t\trtl = opt('isRTL')\n\t\tminMinute = parseTime(opt('minTime'));\n\t\tmaxMinute = parseTime(opt('maxTime'));\n\t\tcolFormat = opt('columnFormat');\n\n\t\t// week # options. (TODO: bad, logic also in other views)\n\t\tshowWeekNumbers = opt('weekNumbers');\n\t\tweekNumberTitle = opt('weekNumberTitle');\n\t\tif (opt('weekNumberCalculation') != 'iso') {\n\t\t\tweekNumberFormat = \"w\";\n\t\t}\n\t\telse {\n\t\t\tweekNumberFormat = \"W\";\n\t\t}\n\n\t\tsnapMinutes = opt('snapMinutes') || opt('slotMinutes');\n\t}\n\n\n\n\t/* Build DOM\n\t-----------------------------------------------------------------------*/\n\n\n\tfunction buildSkeleton() {\n\t\tvar headerClass = tm + \"-widget-header\";\n\t\tvar contentClass = tm + \"-widget-content\";\n\t\tvar s;\n\t\tvar d;\n\t\tvar i;\n\t\tvar maxd;\n\t\tvar minutes;\n\t\tvar slotNormal = opt('slotMinutes') % 15 == 0;\n\t\t\n\t\tbuildDayTable();\n\t\t\n\t\tslotLayer =\n\t\t\t$(\"<div style='position:absolute;z-index:2;left:0;width:100%'/>\")\n\t\t\t\t.appendTo(element);\n\t\t\t\t\n\t\tif (opt('allDaySlot')) {\n\t\t\n\t\t\tdaySegmentContainer =\n\t\t\t\t$(\"<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>\")\n\t\t\t\t\t.appendTo(slotLayer);\n\t\t\n\t\t\ts =\n\t\t\t\t\"<table style='width:100%' class='fc-agenda-allday' cellspacing='0'>\" +\n\t\t\t\t\"<tr>\" +\n\t\t\t\t\"<th class='\" + headerClass + \" fc-agenda-axis'>\" + opt('allDayText') + \"</th>\" +\n\t\t\t\t\"<td>\" +\n\t\t\t\t\"<div class='fc-day-content'><div style='position:relative'/></div>\" +\n\t\t\t\t\"</td>\" +\n\t\t\t\t\"<th class='\" + headerClass + \" fc-agenda-gutter'> </th>\" +\n\t\t\t\t\"</tr>\" +\n\t\t\t\t\"</table>\";\n\t\t\tallDayTable = $(s).appendTo(slotLayer);\n\t\t\tallDayRow = allDayTable.find('tr');\n\t\t\t\n\t\t\tdayBind(allDayRow.find('td'));\n\t\t\t\n\t\t\tslotLayer.append(\n\t\t\t\t\"<div class='fc-agenda-divider \" + headerClass + \"'>\" +\n\t\t\t\t\"<div class='fc-agenda-divider-inner'/>\" +\n\t\t\t\t\"</div>\"\n\t\t\t);\n\t\t\t\n\t\t}else{\n\t\t\n\t\t\tdaySegmentContainer = $([]); // in jQuery 1.4, we can just do $()\n\t\t\n\t\t}\n\t\t\n\t\tslotScroller =\n\t\t\t$(\"<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>\")\n\t\t\t\t.appendTo(slotLayer);\n\t\t\t\t\n\t\tslotContainer =\n\t\t\t$(\"<div style='position:relative;width:100%;overflow:hidden'/>\")\n\t\t\t\t.appendTo(slotScroller);\n\t\t\t\t\n\t\tslotSegmentContainer =\n\t\t\t$(\"<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>\")\n\t\t\t\t.appendTo(slotContainer);\n\t\t\n\t\ts =\n\t\t\t\"<table class='fc-agenda-slots' style='width:100%' cellspacing='0'>\" +\n\t\t\t\"<tbody>\";\n\t\td = zeroDate();\n\t\tmaxd = addMinutes(cloneDate(d), maxMinute);\n\t\taddMinutes(d, minMinute);\n\t\tslotCnt = 0;\n\t\tfor (i=0; d < maxd; i++) {\n\t\t\tminutes = d.getMinutes();\n\t\t\ts +=\n\t\t\t\t\"<tr class='fc-slot\" + i + ' ' + (!minutes ? '' : 'fc-minor') + \"'>\" +\n\t\t\t\t\"<th class='fc-agenda-axis \" + headerClass + \"'>\" +\n\t\t\t\t((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : ' ') +\n\t\t\t\t\"</th>\" +\n\t\t\t\t\"<td class='\" + contentClass + \"'>\" +\n\t\t\t\t\"<div style='position:relative'> </div>\" +\n\t\t\t\t\"</td>\" +\n\t\t\t\t\"</tr>\";\n\t\t\taddMinutes(d, opt('slotMinutes'));\n\t\t\tslotCnt++;\n\t\t}\n\t\ts +=\n\t\t\t\"</tbody>\" +\n\t\t\t\"</table>\";\n\t\tslotTable = $(s).appendTo(slotContainer);\n\t\t\n\t\tslotBind(slotTable.find('td'));\n\t}\n\n\n\n\t/* Build Day Table\n\t-----------------------------------------------------------------------*/\n\n\n\tfunction buildDayTable() {\n\t\tvar html = buildDayTableHTML();\n\n\t\tif (dayTable) {\n\t\t\tdayTable.remove();\n\t\t}\n\t\tdayTable = $(html).appendTo(element);\n\n\t\tdayHead = dayTable.find('thead');\n\t\tdayHeadCells = dayHead.find('th').slice(1, -1); // exclude gutter\n\t\tdayBody = dayTable.find('tbody');\n\t\tdayBodyCells = dayBody.find('td').slice(0, -1); // exclude gutter\n\t\tdayBodyCellInners = dayBodyCells.find('> div');\n\t\tdayBodyCellContentInners = dayBodyCells.find('.fc-day-content > div');\n\n\t\tdayBodyFirstCell = dayBodyCells.eq(0);\n\t\tdayBodyFirstCellStretcher = dayBodyCellInners.eq(0);\n\t\t\n\t\tmarkFirstLast(dayHead.add(dayHead.find('tr')));\n\t\tmarkFirstLast(dayBody.add(dayBody.find('tr')));\n\n\t\t// TODO: now that we rebuild the cells every time, we should call dayRender\n\t}\n\n\n\tfunction buildDayTableHTML() {\n\t\tvar html =\n\t\t\t\"<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>\" +\n\t\t\tbuildDayTableHeadHTML() +\n\t\t\tbuildDayTableBodyHTML() +\n\t\t\t\"</table>\";\n\n\t\treturn html;\n\t}\n\n\n\tfunction buildDayTableHeadHTML() {\n\t\tvar headerClass = tm + \"-widget-header\";\n\t\tvar date;\n\t\tvar html = '';\n\t\tvar weekText;\n\t\tvar col;\n\n\t\thtml +=\n\t\t\t\"<thead>\" +\n\t\t\t\"<tr>\";\n\n\t\tif (showWeekNumbers) {\n\t\t\tdate = cellToDate(0, 0);\n\t\t\tweekText = formatDate(date, weekNumberFormat);\n\t\t\tif (rtl) {\n\t\t\t\tweekText += weekNumberTitle;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tweekText = weekNumberTitle + weekText;\n\t\t\t}\n\t\t\thtml +=\n\t\t\t\t\"<th class='fc-agenda-axis fc-week-number \" + headerClass + \"'>\" +\n\t\t\t\thtmlEscape(weekText) +\n\t\t\t\t\"</th>\";\n\t\t}\n\t\telse {\n\t\t\thtml += \"<th class='fc-agenda-axis \" + headerClass + \"'> </th>\";\n\t\t}\n\n\t\tfor (col=0; col<colCnt; col++) {\n\t\t\tdate = cellToDate(0, col);\n\t\t\thtml +=\n\t\t\t\t\"<th class='fc-\" + dayIDs[date.getDay()] + \" fc-col\" + col + ' ' + headerClass + \"'>\" +\n\t\t\t\thtmlEscape(formatDate(date, colFormat)) +\n\t\t\t\t\"</th>\";\n\t\t}\n\n\t\thtml +=\n\t\t\t\"<th class='fc-agenda-gutter \" + headerClass + \"'> </th>\" +\n\t\t\t\"</tr>\" +\n\t\t\t\"</thead>\";\n\n\t\treturn html;\n\t}\n\n\n\tfunction buildDayTableBodyHTML() {\n\t\tvar headerClass = tm + \"-widget-header\"; // TODO: make these when updateOptions() called\n\t\tvar contentClass = tm + \"-widget-content\";\n\t\tvar date;\n\t\tvar today = clearTime(new Date());\n\t\tvar col;\n\t\tvar cellsHTML;\n\t\tvar cellHTML;\n\t\tvar classNames;\n\t\tvar html = '';\n\n\t\thtml +=\n\t\t\t\"<tbody>\" +\n\t\t\t\"<tr>\" +\n\t\t\t\"<th class='fc-agenda-axis \" + headerClass + \"'> </th>\";\n\n\t\tcellsHTML = '';\n\n\t\tfor (col=0; col<colCnt; col++) {\n\n\t\t\tdate = cellToDate(0, col);\n\n\t\t\tclassNames = [\n\t\t\t\t'fc-col' + col,\n\t\t\t\t'fc-' + dayIDs[date.getDay()],\n\t\t\t\tcontentClass\n\t\t\t];\n\t\t\tif (+date == +today) {\n\t\t\t\tclassNames.push(\n\t\t\t\t\ttm + '-state-highlight',\n\t\t\t\t\t'fc-today'\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if (date < today) {\n\t\t\t\tclassNames.push('fc-past');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tclassNames.push('fc-future');\n\t\t\t}\n\n\t\t\tcellHTML =\n\t\t\t\t\"<td class='\" + classNames.join(' ') + \"'>\" +\n\t\t\t\t\"<div>\" +\n\t\t\t\t\"<div class='fc-day-content'>\" +\n\t\t\t\t\"<div style='position:relative'> </div>\" +\n\t\t\t\t\"</div>\" +\n\t\t\t\t\"</div>\" +\n\t\t\t\t\"</td>\";\n\n\t\t\tcellsHTML += cellHTML;\n\t\t}\n\n\t\thtml += cellsHTML;\n\t\thtml +=\n\t\t\t\"<td class='fc-agenda-gutter \" + contentClass + \"'> </td>\" +\n\t\t\t\"</tr>\" +\n\t\t\t\"</tbody>\";\n\n\t\treturn html;\n\t}\n\n\n\t// TODO: data-date on the cells\n\n\t\n\t\n\t/* Dimensions\n\t-----------------------------------------------------------------------*/\n\n\t\n\tfunction setHeight(height) {\n\t\tif (height === undefined) {\n\t\t\theight = viewHeight;\n\t\t}\n\t\tviewHeight = height;\n\t\tslotTopCache = {};\n\t\n\t\tvar headHeight = dayBody.position().top;\n\t\tvar allDayHeight = slotScroller.position().top; // including divider\n\t\tvar bodyHeight = Math.min( // total body height, including borders\n\t\t\theight - headHeight, // when scrollbars\n\t\t\tslotTable.height() + allDayHeight + 1 // when no scrollbars. +1 for bottom border\n\t\t);\n\n\t\tdayBodyFirstCellStretcher\n\t\t\t.height(bodyHeight - vsides(dayBodyFirstCell));\n\t\t\n\t\tslotLayer.css('top', headHeight);\n\t\t\n\t\tslotScroller.height(bodyHeight - allDayHeight - 1);\n\t\t\n\t\t// the stylesheet guarantees that the first row has no border.\n\t\t// this allows .height() to work well cross-browser.\n\t\tslotHeight = slotTable.find('tr:first').height() + 1; // +1 for bottom border\n\n\t\tsnapRatio = opt('slotMinutes') / snapMinutes;\n\t\tsnapHeight = slotHeight / snapRatio;\n\t}\n\t\n\t\n\tfunction setWidth(width) {\n\t\tviewWidth = width;\n\t\tcolPositions.clear();\n\t\tcolContentPositions.clear();\n\n\t\tvar axisFirstCells = dayHead.find('th:first');\n\t\tif (allDayTable) {\n\t\t\taxisFirstCells = axisFirstCells.add(allDayTable.find('th:first'));\n\t\t}\n\t\taxisFirstCells = axisFirstCells.add(slotTable.find('th:first'));\n\t\t\n\t\taxisWidth = 0;\n\t\tsetOuterWidth(\n\t\t\taxisFirstCells\n\t\t\t\t.width('')\n\t\t\t\t.each(function(i, _cell) {\n\t\t\t\t\taxisWidth = Math.max(axisWidth, $(_cell).outerWidth());\n\t\t\t\t}),\n\t\t\taxisWidth\n\t\t);\n\t\t\n\t\tvar gutterCells = dayTable.find('.fc-agenda-gutter');\n\t\tif (allDayTable) {\n\t\t\tgutterCells = gutterCells.add(allDayTable.find('th.fc-agenda-gutter'));\n\t\t}\n\n\t\tvar slotTableWidth = slotScroller[0].clientWidth; // needs to be done after axisWidth (for IE7)\n\t\t\n\t\tgutterWidth = slotScroller.width() - slotTableWidth;\n\t\tif (gutterWidth) {\n\t\t\tsetOuterWidth(gutterCells, gutterWidth);\n\t\t\tgutterCells\n\t\t\t\t.show()\n\t\t\t\t.prev()\n\t\t\t\t.removeClass('fc-last');\n\t\t}else{\n\t\t\tgutterCells\n\t\t\t\t.hide()\n\t\t\t\t.prev()\n\t\t\t\t.addClass('fc-last');\n\t\t}\n\t\t\n\t\tcolWidth = Math.floor((slotTableWidth - axisWidth) / colCnt);\n\t\tsetOuterWidth(dayHeadCells.slice(0, -1), colWidth);\n\t}\n\t\n\n\n\t/* Scrolling\n\t-----------------------------------------------------------------------*/\n\n\n\tfunction resetScroll() {\n\t\tvar d0 = zeroDate();\n\t\tvar scrollDate = cloneDate(d0);\n\t\tscrollDate.setHours(opt('firstHour'));\n\t\tvar top = timePosition(d0, scrollDate) + 1; // +1 for the border\n\t\tfunction scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}\n\t\tscroll();\n\t\tsetTimeout(scroll, 0); // overrides any previous scroll state made by the browser\n\t}\n\n\n\tfunction afterRender() { // after the view has been freshly rendered and sized\n\t\tresetScroll();\n\t}\n\t\n\t\n\t\n\t/* Slot/Day clicking and binding\n\t-----------------------------------------------------------------------*/\n\t\n\n\tfunction dayBind(cells) {\n\t\tcells.click(slotClick)\n\t\t\t.mousedown(daySelectionMousedown);\n\t}\n\n\n\tfunction slotBind(cells) {\n\t\tcells.click(slotClick)\n\t\t\t.mousedown(slotSelectionMousedown);\n\t}\n\t\n\t\n\tfunction slotClick(ev) {\n\t\tif (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick\n\t\t\tvar col = Math.min(colCnt-1, Math.floor((ev.pageX - dayTable.offset().left - axisWidth) / colWidth));\n\t\t\tvar date = cellToDate(0, col);\n\t\t\tvar rowMatch = this.parentNode.className.match(/fc-slot(\\d+)/); // TODO: maybe use data\n\t\t\tif (rowMatch) {\n\t\t\t\tvar mins = parseInt(rowMatch[1]) * opt('slotMinutes');\n\t\t\t\tvar hours = Math.floor(mins/60);\n\t\t\t\tdate.setHours(hours);\n\t\t\t\tdate.setMinutes(mins%60 + minMinute);\n\t\t\t\ttrigger('dayClick', dayBodyCells[col], date, false, ev);\n\t\t\t}else{\n\t\t\t\ttrigger('dayClick', dayBodyCells[col], date, true, ev);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t\n\t/* Semi-transparent Overlay Helpers\n\t-----------------------------------------------------*/\n\t// TODO: should be consolidated with BasicView's methods\n\n\n\tfunction renderDayOverlay(overlayStart, overlayEnd, refreshCoordinateGrid) { // overlayEnd is exclusive\n\n\t\tif (refreshCoordinateGrid) {\n\t\t\tcoordinateGrid.build();\n\t\t}\n\n\t\tvar segments = rangeToSegments(overlayStart, overlayEnd);\n\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\t\t\tdayBind(\n\t\t\t\trenderCellOverlay(\n\t\t\t\t\tsegment.row,\n\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\tsegment.row,\n\t\t\t\t\tsegment.rightCol\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n\t\n\t\n\tfunction renderCellOverlay(row0, col0, row1, col1) { // only for all-day?\n\t\tvar rect = coordinateGrid.rect(row0, col0, row1, col1, slotLayer);\n\t\treturn renderOverlay(rect, slotLayer);\n\t}\n\t\n\n\tfunction renderSlotOverlay(overlayStart, overlayEnd) {\n\t\tfor (var i=0; i<colCnt; i++) {\n\t\t\tvar dayStart = cellToDate(0, i);\n\t\t\tvar dayEnd = addDays(cloneDate(dayStart), 1);\n\t\t\tvar stretchStart = new Date(Math.max(dayStart, overlayStart));\n\t\t\tvar stretchEnd = new Date(Math.min(dayEnd, overlayEnd));\n\t\t\tif (stretchStart < stretchEnd) {\n\t\t\t\tvar rect = coordinateGrid.rect(0, i, 0, i, slotContainer); // only use it for horizontal coords\n\t\t\t\tvar top = timePosition(dayStart, stretchStart);\n\t\t\t\tvar bottom = timePosition(dayStart, stretchEnd);\n\t\t\t\trect.top = top;\n\t\t\t\trect.height = bottom - top;\n\t\t\t\tslotBind(\n\t\t\t\t\trenderOverlay(rect, slotContainer)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t\n\t/* Coordinate Utilities\n\t-----------------------------------------------------------------------------*/\n\t\n\t\n\tcoordinateGrid = new CoordinateGrid(function(rows, cols) {\n\t\tvar e, n, p;\n\t\tdayHeadCells.each(function(i, _e) {\n\t\t\te = $(_e);\n\t\t\tn = e.offset().left;\n\t\t\tif (i) {\n\t\t\t\tp[1] = n;\n\t\t\t}\n\t\t\tp = [n];\n\t\t\tcols[i] = p;\n\t\t});\n\t\tp[1] = n + e.outerWidth();\n\t\tif (opt('allDaySlot')) {\n\t\t\te = allDayRow;\n\t\t\tn = e.offset().top;\n\t\t\trows[0] = [n, n+e.outerHeight()];\n\t\t}\n\t\tvar slotTableTop = slotContainer.offset().top;\n\t\tvar slotScrollerTop = slotScroller.offset().top;\n\t\tvar slotScrollerBottom = slotScrollerTop + slotScroller.outerHeight();\n\t\tfunction constrain(n) {\n\t\t\treturn Math.max(slotScrollerTop, Math.min(slotScrollerBottom, n));\n\t\t}\n\t\tfor (var i=0; i<slotCnt*snapRatio; i++) { // adapt slot count to increased/decreased selection slot count\n\t\t\trows.push([\n\t\t\t\tconstrain(slotTableTop + snapHeight*i),\n\t\t\t\tconstrain(slotTableTop + snapHeight*(i+1))\n\t\t\t]);\n\t\t}\n\t});\n\t\n\t\n\thoverListener = new HoverListener(coordinateGrid);\n\t\n\tcolPositions = new HorizontalPositionCache(function(col) {\n\t\treturn dayBodyCellInners.eq(col);\n\t});\n\t\n\tcolContentPositions = new HorizontalPositionCache(function(col) {\n\t\treturn dayBodyCellContentInners.eq(col);\n\t});\n\t\n\t\n\tfunction colLeft(col) {\n\t\treturn colPositions.left(col);\n\t}\n\n\n\tfunction colContentLeft(col) {\n\t\treturn colContentPositions.left(col);\n\t}\n\n\n\tfunction colRight(col) {\n\t\treturn colPositions.right(col);\n\t}\n\t\n\t\n\tfunction colContentRight(col) {\n\t\treturn colContentPositions.right(col);\n\t}\n\n\n\tfunction getIsCellAllDay(cell) {\n\t\treturn opt('allDaySlot') && !cell.row;\n\t}\n\n\n\tfunction realCellToDate(cell) { // ugh \"real\" ... but blame it on our abuse of the \"cell\" system\n\t\tvar d = cellToDate(0, cell.col);\n\t\tvar slotIndex = cell.row;\n\t\tif (opt('allDaySlot')) {\n\t\t\tslotIndex--;\n\t\t}\n\t\tif (slotIndex >= 0) {\n\t\t\taddMinutes(d, minMinute + slotIndex * snapMinutes);\n\t\t}\n\t\treturn d;\n\t}\n\t\n\t\n\t// get the Y coordinate of the given time on the given day (both Date objects)\n\tfunction timePosition(day, time) { // both date objects. day holds 00:00 of current day\n\t\tday = cloneDate(day, true);\n\t\tif (time < addMinutes(cloneDate(day), minMinute)) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (time >= addMinutes(cloneDate(day), maxMinute)) {\n\t\t\treturn slotTable.height();\n\t\t}\n\t\tvar slotMinutes = opt('slotMinutes'),\n\t\t\tminutes = time.getHours()*60 + time.getMinutes() - minMinute,\n\t\t\tslotI = Math.floor(minutes / slotMinutes),\n\t\t\tslotTop = slotTopCache[slotI];\n\t\tif (slotTop === undefined) {\n\t\t\tslotTop = slotTopCache[slotI] =\n\t\t\t\tslotTable.find('tr').eq(slotI).find('td div')[0].offsetTop;\n\t\t\t\t// .eq() is faster than \":eq()\" selector\n\t\t\t\t// [0].offsetTop is faster than .position().top (do we really need this optimization?)\n\t\t\t\t// a better optimization would be to cache all these divs\n\t\t}\n\t\treturn Math.max(0, Math.round(\n\t\t\tslotTop - 1 + slotHeight * ((minutes % slotMinutes) / slotMinutes)\n\t\t));\n\t}\n\t\n\t\n\tfunction getAllDayRow(index) {\n\t\treturn allDayRow;\n\t}\n\t\n\t\n\tfunction defaultEventEnd(event) {\n\t\tvar start = cloneDate(event.start);\n\t\tif (event.allDay) {\n\t\t\treturn start;\n\t\t}\n\t\treturn addMinutes(start, opt('defaultEventMinutes'));\n\t}\n\t\n\t\n\t\n\t/* Selection\n\t---------------------------------------------------------------------------------*/\n\t\n\t\n\tfunction defaultSelectionEnd(startDate, allDay) {\n\t\tif (allDay) {\n\t\t\treturn cloneDate(startDate);\n\t\t}\n\t\treturn addMinutes(cloneDate(startDate), opt('slotMinutes'));\n\t}\n\t\n\t\n\tfunction renderSelection(startDate, endDate, allDay) { // only for all-day\n\t\tif (allDay) {\n\t\t\tif (opt('allDaySlot')) {\n\t\t\t\trenderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true);\n\t\t\t}\n\t\t}else{\n\t\t\trenderSlotSelection(startDate, endDate);\n\t\t}\n\t}\n\t\n\t\n\tfunction renderSlotSelection(startDate, endDate) {\n\t\tvar helperOption = opt('selectHelper');\n\t\tcoordinateGrid.build();\n\t\tif (helperOption) {\n\t\t\tvar col = dateToCell(startDate).col;\n\t\t\tif (col >= 0 && col < colCnt) { // only works when times are on same day\n\t\t\t\tvar rect = coordinateGrid.rect(0, col, 0, col, slotContainer); // only for horizontal coords\n\t\t\t\tvar top = timePosition(startDate, startDate);\n\t\t\t\tvar bottom = timePosition(startDate, endDate);\n\t\t\t\tif (bottom > top) { // protect against selections that are entirely before or after visible range\n\t\t\t\t\trect.top = top;\n\t\t\t\t\trect.height = bottom - top;\n\t\t\t\t\trect.left += 2;\n\t\t\t\t\trect.width -= 5;\n\t\t\t\t\tif ($.isFunction(helperOption)) {\n\t\t\t\t\t\tvar helperRes = helperOption(startDate, endDate);\n\t\t\t\t\t\tif (helperRes) {\n\t\t\t\t\t\t\trect.position = 'absolute';\n\t\t\t\t\t\t\tselectionHelper = $(helperRes)\n\t\t\t\t\t\t\t\t.css(rect)\n\t\t\t\t\t\t\t\t.appendTo(slotContainer);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\trect.isStart = true; // conside rect a \"seg\" now\n\t\t\t\t\t\trect.isEnd = true; //\n\t\t\t\t\t\tselectionHelper = $(slotSegHtml(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: '',\n\t\t\t\t\t\t\t\tstart: startDate,\n\t\t\t\t\t\t\t\tend: endDate,\n\t\t\t\t\t\t\t\tclassName: ['fc-select-helper'],\n\t\t\t\t\t\t\t\teditable: false\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\trect\n\t\t\t\t\t\t));\n\t\t\t\t\t\tselectionHelper.css('opacity', opt('dragOpacity'));\n\t\t\t\t\t}\n\t\t\t\t\tif (selectionHelper) {\n\t\t\t\t\t\tslotBind(selectionHelper);\n\t\t\t\t\t\tslotContainer.append(selectionHelper);\n\t\t\t\t\t\tsetOuterWidth(selectionHelper, rect.width, true); // needs to be after appended\n\t\t\t\t\t\tsetOuterHeight(selectionHelper, rect.height, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\trenderSlotOverlay(startDate, endDate);\n\t\t}\n\t}\n\t\n\t\n\tfunction clearSelection() {\n\t\tclearOverlays();\n\t\tif (selectionHelper) {\n\t\t\tselectionHelper.remove();\n\t\t\tselectionHelper = null;\n\t\t}\n\t}\n\t\n\t\n\tfunction slotSelectionMousedown(ev) {\n\t\tif (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button\n\t\t\tunselect(ev);\n\t\t\tvar dates;\n\t\t\thoverListener.start(function(cell, origCell) {\n\t\t\t\tclearSelection();\n\t\t\t\tif (cell && cell.col == origCell.col && !getIsCellAllDay(cell)) {\n\t\t\t\t\tvar d1 = realCellToDate(origCell);\n\t\t\t\t\tvar d2 = realCellToDate(cell);\n\t\t\t\t\tdates = [\n\t\t\t\t\t\td1,\n\t\t\t\t\t\taddMinutes(cloneDate(d1), snapMinutes), // calculate minutes depending on selection slot minutes \n\t\t\t\t\t\td2,\n\t\t\t\t\t\taddMinutes(cloneDate(d2), snapMinutes)\n\t\t\t\t\t].sort(dateCompare);\n\t\t\t\t\trenderSlotSelection(dates[0], dates[3]);\n\t\t\t\t}else{\n\t\t\t\t\tdates = null;\n\t\t\t\t}\n\t\t\t}, ev);\n\t\t\t$(document).one('mouseup', function(ev) {\n\t\t\t\thoverListener.stop();\n\t\t\t\tif (dates) {\n\t\t\t\t\tif (+dates[0] == +dates[1]) {\n\t\t\t\t\t\treportDayClick(dates[0], false, ev);\n\t\t\t\t\t}\n\t\t\t\t\treportSelection(dates[0], dates[3], false, ev);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\n\tfunction reportDayClick(date, allDay, ev) {\n\t\ttrigger('dayClick', dayBodyCells[dateToCell(date).col], date, allDay, ev);\n\t}\n\t\n\t\n\t\n\t/* External Dragging\n\t--------------------------------------------------------------------------------*/\n\t\n\t\n\tfunction dragStart(_dragElement, ev, ui) {\n\t\thoverListener.start(function(cell) {\n\t\t\tclearOverlays();\n\t\t\tif (cell) {\n\t\t\t\tif (getIsCellAllDay(cell)) {\n\t\t\t\t\trenderCellOverlay(cell.row, cell.col, cell.row, cell.col);\n\t\t\t\t}else{\n\t\t\t\t\tvar d1 = realCellToDate(cell);\n\t\t\t\t\tvar d2 = addMinutes(cloneDate(d1), opt('defaultEventMinutes'));\n\t\t\t\t\trenderSlotOverlay(d1, d2);\n\t\t\t\t}\n\t\t\t}\n\t\t}, ev);\n\t}\n\t\n\t\n\tfunction dragStop(_dragElement, ev, ui) {\n\t\tvar cell = hoverListener.stop();\n\t\tclearOverlays();\n\t\tif (cell) {\n\t\t\ttrigger('drop', _dragElement, realCellToDate(cell), getIsCellAllDay(cell), ev, ui);\n\t\t}\n\t}\n\t\n\n}", "function AgendaView(element, calendar, viewName) {\n\tvar t = this;\n\t\n\t\n\t// exports\n\tt.renderAgenda = renderAgenda;\n\tt.setWidth = setWidth;\n\tt.setHeight = setHeight;\n\tt.afterRender = afterRender;\n\tt.defaultEventEnd = defaultEventEnd;\n\tt.timePosition = timePosition;\n\tt.getIsCellAllDay = getIsCellAllDay;\n\tt.allDayRow = getAllDayRow;\n\tt.getCoordinateGrid = function() { return coordinateGrid }; // specifically for AgendaEventRenderer\n\tt.getHoverListener = function() { return hoverListener };\n\tt.colLeft = colLeft;\n\tt.colRight = colRight;\n\tt.colContentLeft = colContentLeft;\n\tt.colContentRight = colContentRight;\n\tt.getDaySegmentContainer = function() { return daySegmentContainer };\n\tt.getSlotSegmentContainer = function() { return slotSegmentContainer };\n\tt.getMinMinute = function() { return minMinute };\n\tt.getMaxMinute = function() { return maxMinute };\n\tt.getSlotContainer = function() { return slotContainer };\n\tt.getRowCnt = function() { return 1 };\n\tt.getColCnt = function() { return colCnt };\n\tt.getColWidth = function() { return colWidth };\n\tt.getSnapHeight = function() { return snapHeight };\n\tt.getSnapMinutes = function() { return snapMinutes };\n\tt.defaultSelectionEnd = defaultSelectionEnd;\n\tt.renderDayOverlay = renderDayOverlay;\n\tt.renderSelection = renderSelection;\n\tt.clearSelection = clearSelection;\n\tt.reportDayClick = reportDayClick; // selection mousedown hack\n\tt.dragStart = dragStart;\n\tt.dragStop = dragStop;\n\t\n\t\n\t// imports\n\tView.call(t, element, calendar, viewName);\n\tOverlayManager.call(t);\n\tSelectionManager.call(t);\n\tAgendaEventRenderer.call(t);\n\tvar opt = t.opt;\n\tvar trigger = t.trigger;\n\tvar renderOverlay = t.renderOverlay;\n\tvar clearOverlays = t.clearOverlays;\n\tvar reportSelection = t.reportSelection;\n\tvar unselect = t.unselect;\n\tvar daySelectionMousedown = t.daySelectionMousedown;\n\tvar slotSegHtml = t.slotSegHtml;\n\tvar cellToDate = t.cellToDate;\n\tvar dateToCell = t.dateToCell;\n\tvar rangeToSegments = t.rangeToSegments;\n\tvar formatDate = calendar.formatDate;\n\t\n\t\n\t// locals\n\t\n\tvar dayTable;\n\tvar dayHead;\n\tvar dayHeadCells;\n\tvar dayBody;\n\tvar dayBodyCells;\n\tvar dayBodyCellInners;\n\tvar dayBodyCellContentInners;\n\tvar dayBodyFirstCell;\n\tvar dayBodyFirstCellStretcher;\n\tvar slotLayer;\n\tvar daySegmentContainer;\n\tvar allDayTable;\n\tvar allDayRow;\n\tvar slotScroller;\n\tvar slotContainer;\n\tvar slotSegmentContainer;\n\tvar slotTable;\n\tvar selectionHelper;\n\t\n\tvar viewWidth;\n\tvar viewHeight;\n\tvar axisWidth;\n\tvar colWidth;\n\tvar gutterWidth;\n\tvar slotHeight; // TODO: what if slotHeight changes? (see issue 650)\n\n\tvar snapMinutes;\n\tvar snapRatio; // ratio of number of \"selection\" slots to normal slots. (ex: 1, 2, 4)\n\tvar snapHeight; // holds the pixel hight of a \"selection\" slot\n\t\n\tvar colCnt;\n\tvar slotCnt;\n\tvar coordinateGrid;\n\tvar hoverListener;\n\tvar colPositions;\n\tvar colContentPositions;\n\tvar slotTopCache = {};\n\t\n\tvar tm;\n\tvar rtl;\n\tvar minMinute, maxMinute;\n\tvar colFormat;\n\tvar showWeekNumbers;\n\tvar weekNumberTitle;\n\tvar weekNumberFormat;\n\t\n\n\t\n\t/* Rendering\n\t-----------------------------------------------------------------------------*/\n\t\n\t\n\tdisableTextSelection(element.addClass('fc-agenda'));\n\t\n\t\n\tfunction renderAgenda(c) {\n\t\tcolCnt = c;\n\t\tupdateOptions();\n\n\t\tif (!dayTable) { // first time rendering?\n\t\t\tbuildSkeleton(); // builds day table, slot area, events containers\n\t\t}\n\t\telse {\n\t\t\tbuildDayTable(); // rebuilds day table\n\t\t}\n\t}\n\t\n\t\n\tfunction updateOptions() {\n\n\t\ttm = opt('theme') ? 'ui' : 'fc';\n\t\trtl = opt('isRTL')\n\t\tminMinute = parseTime(opt('minTime'));\n\t\tmaxMinute = parseTime(opt('maxTime'));\n\t\tcolFormat = opt('columnFormat');\n\n\t\t// week # options. (TODO: bad, logic also in other views)\n\t\tshowWeekNumbers = opt('weekNumbers');\n\t\tweekNumberTitle = opt('weekNumberTitle');\n\t\tif (opt('weekNumberCalculation') != 'iso') {\n\t\t\tweekNumberFormat = \"w\";\n\t\t}\n\t\telse {\n\t\t\tweekNumberFormat = \"W\";\n\t\t}\n\n\t\tsnapMinutes = opt('snapMinutes') || opt('slotMinutes');\n\t}\n\n\n\n\t/* Build DOM\n\t-----------------------------------------------------------------------*/\n\n\n\tfunction buildSkeleton() {\n\t\tvar headerClass = tm + \"-widget-header\";\n\t\tvar contentClass = tm + \"-widget-content\";\n\t\tvar s;\n\t\tvar d;\n\t\tvar i;\n\t\tvar maxd;\n\t\tvar minutes;\n\t\tvar slotNormal = opt('slotMinutes') % 15 == 0;\n\t\t\n\t\tbuildDayTable();\n\t\t\n\t\tslotLayer =\n\t\t\t$(\"<div style='position:absolute;z-index:2;left:0;width:100%'/>\")\n\t\t\t\t.appendTo(element);\n\t\t\t\t\n\t\tif (opt('allDaySlot')) {\n\t\t\n\t\t\tdaySegmentContainer =\n\t\t\t\t$(\"<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>\")\n\t\t\t\t\t.appendTo(slotLayer);\n\t\t\n\t\t\ts =\n\t\t\t\t\"<table style='width:100%' class='fc-agenda-allday' cellspacing='0'>\" +\n\t\t\t\t\"<tr>\" +\n\t\t\t\t\"<th class='\" + headerClass + \" fc-agenda-axis'>\" + opt('allDayText') + \"</th>\" +\n\t\t\t\t\"<td>\" +\n\t\t\t\t\"<div class='fc-day-content'><div style='position:relative'/></div>\" +\n\t\t\t\t\"</td>\" +\n\t\t\t\t\"<th class='\" + headerClass + \" fc-agenda-gutter'>&nbsp;</th>\" +\n\t\t\t\t\"</tr>\" +\n\t\t\t\t\"</table>\";\n\t\t\tallDayTable = $(s).appendTo(slotLayer);\n\t\t\tallDayRow = allDayTable.find('tr');\n\t\t\t\n\t\t\tdayBind(allDayRow.find('td'));\n\t\t\t\n\t\t\tslotLayer.append(\n\t\t\t\t\"<div class='fc-agenda-divider \" + headerClass + \"'>\" +\n\t\t\t\t\"<div class='fc-agenda-divider-inner'/>\" +\n\t\t\t\t\"</div>\"\n\t\t\t);\n\t\t\t\n\t\t}else{\n\t\t\n\t\t\tdaySegmentContainer = $([]); // in jQuery 1.4, we can just do $()\n\t\t\n\t\t}\n\t\t\n\t\tslotScroller =\n\t\t\t$(\"<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>\")\n\t\t\t\t.appendTo(slotLayer);\n\t\t\t\t\n\t\tslotContainer =\n\t\t\t$(\"<div style='position:relative;width:100%;overflow:hidden'/>\")\n\t\t\t\t.appendTo(slotScroller);\n\t\t\t\t\n\t\tslotSegmentContainer =\n\t\t\t$(\"<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>\")\n\t\t\t\t.appendTo(slotContainer);\n\t\t\n\t\ts =\n\t\t\t\"<table class='fc-agenda-slots' style='width:100%' cellspacing='0'>\" +\n\t\t\t\"<tbody>\";\n\t\td = zeroDate();\n\t\tmaxd = addMinutes(cloneDate(d), maxMinute);\n\t\taddMinutes(d, minMinute);\n\t\tslotCnt = 0;\n\t\tfor (i=0; d < maxd; i++) {\n\t\t\tminutes = d.getMinutes();\n\t\t\ts +=\n\t\t\t\t\"<tr class='fc-slot\" + i + ' ' + (!minutes ? '' : 'fc-minor') + \"'>\" +\n\t\t\t\t\"<th class='fc-agenda-axis \" + headerClass + \"'>\" +\n\t\t\t\t((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : '&nbsp;') +\n\t\t\t\t\"</th>\" +\n\t\t\t\t\"<td class='\" + contentClass + \"'>\" +\n\t\t\t\t\"<div style='position:relative'>&nbsp;</div>\" +\n\t\t\t\t\"</td>\" +\n\t\t\t\t\"</tr>\";\n\t\t\taddMinutes(d, opt('slotMinutes'));\n\t\t\tslotCnt++;\n\t\t}\n\t\ts +=\n\t\t\t\"</tbody>\" +\n\t\t\t\"</table>\";\n\t\tslotTable = $(s).appendTo(slotContainer);\n\t\t\n\t\tslotBind(slotTable.find('td'));\n\t}\n\n\n\n\t/* Build Day Table\n\t-----------------------------------------------------------------------*/\n\n\n\tfunction buildDayTable() {\n\t\tvar html = buildDayTableHTML();\n\n\t\tif (dayTable) {\n\t\t\tdayTable.remove();\n\t\t}\n\t\tdayTable = $(html).appendTo(element);\n\n\t\tdayHead = dayTable.find('thead');\n\t\tdayHeadCells = dayHead.find('th').slice(1, -1); // exclude gutter\n\t\tdayBody = dayTable.find('tbody');\n\t\tdayBodyCells = dayBody.find('td').slice(0, -1); // exclude gutter\n\t\tdayBodyCellInners = dayBodyCells.find('> div');\n\t\tdayBodyCellContentInners = dayBodyCells.find('.fc-day-content > div');\n\n\t\tdayBodyFirstCell = dayBodyCells.eq(0);\n\t\tdayBodyFirstCellStretcher = dayBodyCellInners.eq(0);\n\t\t\n\t\tmarkFirstLast(dayHead.add(dayHead.find('tr')));\n\t\tmarkFirstLast(dayBody.add(dayBody.find('tr')));\n\n\t\t// TODO: now that we rebuild the cells every time, we should call dayRender\n\t}\n\n\n\tfunction buildDayTableHTML() {\n\t\tvar html =\n\t\t\t\"<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>\" +\n\t\t\tbuildDayTableHeadHTML() +\n\t\t\tbuildDayTableBodyHTML() +\n\t\t\t\"</table>\";\n\n\t\treturn html;\n\t}\n\n\n\tfunction buildDayTableHeadHTML() {\n\t\tvar headerClass = tm + \"-widget-header\";\n\t\tvar date;\n\t\tvar html = '';\n\t\tvar weekText;\n\t\tvar col;\n\n\t\thtml +=\n\t\t\t\"<thead>\" +\n\t\t\t\"<tr>\";\n\n\t\tif (showWeekNumbers) {\n\t\t\tdate = cellToDate(0, 0);\n\t\t\tweekText = formatDate(date, weekNumberFormat);\n\t\t\tif (rtl) {\n\t\t\t\tweekText += weekNumberTitle;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tweekText = weekNumberTitle + weekText;\n\t\t\t}\n\t\t\thtml +=\n\t\t\t\t\"<th class='fc-agenda-axis fc-week-number \" + headerClass + \"'>\" +\n\t\t\t\thtmlEscape(weekText) +\n\t\t\t\t\"</th>\";\n\t\t}\n\t\telse {\n\t\t\thtml += \"<th class='fc-agenda-axis \" + headerClass + \"'>&nbsp;</th>\";\n\t\t}\n\n\t\tfor (col=0; col<colCnt; col++) {\n\t\t\tdate = cellToDate(0, col);\n\t\t\thtml +=\n\t\t\t\t\"<th class='fc-\" + dayIDs[date.getDay()] + \" fc-col\" + col + ' ' + headerClass + \"'>\" +\n\t\t\t\thtmlEscape(formatDate(date, colFormat)) +\n\t\t\t\t\"</th>\";\n\t\t}\n\n\t\thtml +=\n\t\t\t\"<th class='fc-agenda-gutter \" + headerClass + \"'>&nbsp;</th>\" +\n\t\t\t\"</tr>\" +\n\t\t\t\"</thead>\";\n\n\t\treturn html;\n\t}\n\n\n\tfunction buildDayTableBodyHTML() {\n\t\tvar headerClass = tm + \"-widget-header\"; // TODO: make these when updateOptions() called\n\t\tvar contentClass = tm + \"-widget-content\";\n\t\tvar date;\n\t\tvar today = clearTime(new Date());\n\t\tvar col;\n\t\tvar cellsHTML;\n\t\tvar cellHTML;\n\t\tvar classNames;\n\t\tvar html = '';\n\n\t\thtml +=\n\t\t\t\"<tbody>\" +\n\t\t\t\"<tr>\" +\n\t\t\t\"<th class='fc-agenda-axis \" + headerClass + \"'>&nbsp;</th>\";\n\n\t\tcellsHTML = '';\n\n\t\tfor (col=0; col<colCnt; col++) {\n\n\t\t\tdate = cellToDate(0, col);\n\n\t\t\tclassNames = [\n\t\t\t\t'fc-col' + col,\n\t\t\t\t'fc-' + dayIDs[date.getDay()],\n\t\t\t\tcontentClass\n\t\t\t];\n\t\t\tif (+date == +today) {\n\t\t\t\tclassNames.push(\n\t\t\t\t\ttm + '-state-highlight',\n\t\t\t\t\t'fc-today'\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if (date < today) {\n\t\t\t\tclassNames.push('fc-past');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tclassNames.push('fc-future');\n\t\t\t}\n\n\t\t\tcellHTML =\n\t\t\t\t\"<td class='\" + classNames.join(' ') + \"'>\" +\n\t\t\t\t\"<div>\" +\n\t\t\t\t\"<div class='fc-day-content'>\" +\n\t\t\t\t\"<div style='position:relative'>&nbsp;</div>\" +\n\t\t\t\t\"</div>\" +\n\t\t\t\t\"</div>\" +\n\t\t\t\t\"</td>\";\n\n\t\t\tcellsHTML += cellHTML;\n\t\t}\n\n\t\thtml += cellsHTML;\n\t\thtml +=\n\t\t\t\"<td class='fc-agenda-gutter \" + contentClass + \"'>&nbsp;</td>\" +\n\t\t\t\"</tr>\" +\n\t\t\t\"</tbody>\";\n\n\t\treturn html;\n\t}\n\n\n\t// TODO: data-date on the cells\n\n\t\n\t\n\t/* Dimensions\n\t-----------------------------------------------------------------------*/\n\n\t\n\tfunction setHeight(height) {\n\t\tif (height === undefined) {\n\t\t\theight = viewHeight;\n\t\t}\n\t\tviewHeight = height;\n\t\tslotTopCache = {};\n\t\n\t\tvar headHeight = dayBody.position().top;\n\t\tvar allDayHeight = slotScroller.position().top; // including divider\n\t\tvar bodyHeight = Math.min( // total body height, including borders\n\t\t\theight - headHeight, // when scrollbars\n\t\t\tslotTable.height() + allDayHeight + 1 // when no scrollbars. +1 for bottom border\n\t\t);\n\n\t\tdayBodyFirstCellStretcher\n\t\t\t.height(bodyHeight - vsides(dayBodyFirstCell));\n\t\t\n\t\tslotLayer.css('top', headHeight);\n\t\t\n\t\tslotScroller.height(bodyHeight - allDayHeight - 1);\n\t\t\n\t\t// the stylesheet guarantees that the first row has no border.\n\t\t// this allows .height() to work well cross-browser.\n\t\tslotHeight = slotTable.find('tr:first').height() + 1; // +1 for bottom border\n\n\t\tsnapRatio = opt('slotMinutes') / snapMinutes;\n\t\tsnapHeight = slotHeight / snapRatio;\n\t}\n\t\n\t\n\tfunction setWidth(width) {\n\t\tviewWidth = width;\n\t\tcolPositions.clear();\n\t\tcolContentPositions.clear();\n\n\t\tvar axisFirstCells = dayHead.find('th:first');\n\t\tif (allDayTable) {\n\t\t\taxisFirstCells = axisFirstCells.add(allDayTable.find('th:first'));\n\t\t}\n\t\taxisFirstCells = axisFirstCells.add(slotTable.find('th:first'));\n\t\t\n\t\taxisWidth = 0;\n\t\tsetOuterWidth(\n\t\t\taxisFirstCells\n\t\t\t\t.width('')\n\t\t\t\t.each(function(i, _cell) {\n\t\t\t\t\taxisWidth = Math.max(axisWidth, $(_cell).outerWidth());\n\t\t\t\t}),\n\t\t\taxisWidth\n\t\t);\n\t\t\n\t\tvar gutterCells = dayTable.find('.fc-agenda-gutter');\n\t\tif (allDayTable) {\n\t\t\tgutterCells = gutterCells.add(allDayTable.find('th.fc-agenda-gutter'));\n\t\t}\n\n\t\tvar slotTableWidth = slotScroller[0].clientWidth; // needs to be done after axisWidth (for IE7)\n\t\t\n\t\tgutterWidth = slotScroller.width() - slotTableWidth;\n\t\tif (gutterWidth) {\n\t\t\tsetOuterWidth(gutterCells, gutterWidth);\n\t\t\tgutterCells\n\t\t\t\t.show()\n\t\t\t\t.prev()\n\t\t\t\t.removeClass('fc-last');\n\t\t}else{\n\t\t\tgutterCells\n\t\t\t\t.hide()\n\t\t\t\t.prev()\n\t\t\t\t.addClass('fc-last');\n\t\t}\n\t\t\n\t\tcolWidth = Math.floor((slotTableWidth - axisWidth) / colCnt);\n\t\tsetOuterWidth(dayHeadCells.slice(0, -1), colWidth);\n\t}\n\t\n\n\n\t/* Scrolling\n\t-----------------------------------------------------------------------*/\n\n\n\tfunction resetScroll() {\n\t\tvar d0 = zeroDate();\n\t\tvar scrollDate = cloneDate(d0);\n\t\tscrollDate.setHours(opt('firstHour'));\n\t\tvar top = timePosition(d0, scrollDate) + 1; // +1 for the border\n\t\tfunction scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}\n\t\tscroll();\n\t\tsetTimeout(scroll, 0); // overrides any previous scroll state made by the browser\n\t}\n\n\n\tfunction afterRender() { // after the view has been freshly rendered and sized\n\t\tresetScroll();\n\t}\n\t\n\t\n\t\n\t/* Slot/Day clicking and binding\n\t-----------------------------------------------------------------------*/\n\t\n\n\tfunction dayBind(cells) {\n\t\tcells.click(slotClick)\n\t\t\t.mousedown(daySelectionMousedown);\n\t}\n\n\n\tfunction slotBind(cells) {\n\t\tcells.click(slotClick)\n\t\t\t.mousedown(slotSelectionMousedown);\n\t}\n\t\n\t\n\tfunction slotClick(ev) {\n\t\tif (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick\n\t\t\tvar col = Math.min(colCnt-1, Math.floor((ev.pageX - dayTable.offset().left - axisWidth) / colWidth));\n\t\t\tvar date = cellToDate(0, col);\n\t\t\tvar rowMatch = this.parentNode.className.match(/fc-slot(\\d+)/); // TODO: maybe use data\n\t\t\tif (rowMatch) {\n\t\t\t\tvar mins = parseInt(rowMatch[1]) * opt('slotMinutes');\n\t\t\t\tvar hours = Math.floor(mins/60);\n\t\t\t\tdate.setHours(hours);\n\t\t\t\tdate.setMinutes(mins%60 + minMinute);\n\t\t\t\ttrigger('dayClick', dayBodyCells[col], date, false, ev);\n\t\t\t}else{\n\t\t\t\ttrigger('dayClick', dayBodyCells[col], date, true, ev);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t\n\t/* Semi-transparent Overlay Helpers\n\t-----------------------------------------------------*/\n\t// TODO: should be consolidated with BasicView's methods\n\n\n\tfunction renderDayOverlay(overlayStart, overlayEnd, refreshCoordinateGrid) { // overlayEnd is exclusive\n\n\t\tif (refreshCoordinateGrid) {\n\t\t\tcoordinateGrid.build();\n\t\t}\n\n\t\tvar segments = rangeToSegments(overlayStart, overlayEnd);\n\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\t\t\tdayBind(\n\t\t\t\trenderCellOverlay(\n\t\t\t\t\tsegment.row,\n\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\tsegment.row,\n\t\t\t\t\tsegment.rightCol\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n\t\n\t\n\tfunction renderCellOverlay(row0, col0, row1, col1) { // only for all-day?\n\t\tvar rect = coordinateGrid.rect(row0, col0, row1, col1, slotLayer);\n\t\treturn renderOverlay(rect, slotLayer);\n\t}\n\t\n\n\tfunction renderSlotOverlay(overlayStart, overlayEnd) {\n\t\tfor (var i=0; i<colCnt; i++) {\n\t\t\tvar dayStart = cellToDate(0, i);\n\t\t\tvar dayEnd = addDays(cloneDate(dayStart), 1);\n\t\t\tvar stretchStart = new Date(Math.max(dayStart, overlayStart));\n\t\t\tvar stretchEnd = new Date(Math.min(dayEnd, overlayEnd));\n\t\t\tif (stretchStart < stretchEnd) {\n\t\t\t\tvar rect = coordinateGrid.rect(0, i, 0, i, slotContainer); // only use it for horizontal coords\n\t\t\t\tvar top = timePosition(dayStart, stretchStart);\n\t\t\t\tvar bottom = timePosition(dayStart, stretchEnd);\n\t\t\t\trect.top = top;\n\t\t\t\trect.height = bottom - top;\n\t\t\t\tslotBind(\n\t\t\t\t\trenderOverlay(rect, slotContainer)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t\n\t/* Coordinate Utilities\n\t-----------------------------------------------------------------------------*/\n\t\n\t\n\tcoordinateGrid = new CoordinateGrid(function(rows, cols) {\n\t\tvar e, n, p;\n\t\tdayHeadCells.each(function(i, _e) {\n\t\t\te = $(_e);\n\t\t\tn = e.offset().left;\n\t\t\tif (i) {\n\t\t\t\tp[1] = n;\n\t\t\t}\n\t\t\tp = [n];\n\t\t\tcols[i] = p;\n\t\t});\n\t\tp[1] = n + e.outerWidth();\n\t\tif (opt('allDaySlot')) {\n\t\t\te = allDayRow;\n\t\t\tn = e.offset().top;\n\t\t\trows[0] = [n, n+e.outerHeight()];\n\t\t}\n\t\tvar slotTableTop = slotContainer.offset().top;\n\t\tvar slotScrollerTop = slotScroller.offset().top;\n\t\tvar slotScrollerBottom = slotScrollerTop + slotScroller.outerHeight();\n\t\tfunction constrain(n) {\n\t\t\treturn Math.max(slotScrollerTop, Math.min(slotScrollerBottom, n));\n\t\t}\n\t\tfor (var i=0; i<slotCnt*snapRatio; i++) { // adapt slot count to increased/decreased selection slot count\n\t\t\trows.push([\n\t\t\t\tconstrain(slotTableTop + snapHeight*i),\n\t\t\t\tconstrain(slotTableTop + snapHeight*(i+1))\n\t\t\t]);\n\t\t}\n\t});\n\t\n\t\n\thoverListener = new HoverListener(coordinateGrid);\n\t\n\tcolPositions = new HorizontalPositionCache(function(col) {\n\t\treturn dayBodyCellInners.eq(col);\n\t});\n\t\n\tcolContentPositions = new HorizontalPositionCache(function(col) {\n\t\treturn dayBodyCellContentInners.eq(col);\n\t});\n\t\n\t\n\tfunction colLeft(col) {\n\t\treturn colPositions.left(col);\n\t}\n\n\n\tfunction colContentLeft(col) {\n\t\treturn colContentPositions.left(col);\n\t}\n\n\n\tfunction colRight(col) {\n\t\treturn colPositions.right(col);\n\t}\n\t\n\t\n\tfunction colContentRight(col) {\n\t\treturn colContentPositions.right(col);\n\t}\n\n\n\tfunction getIsCellAllDay(cell) {\n\t\treturn opt('allDaySlot') && !cell.row;\n\t}\n\n\n\tfunction realCellToDate(cell) { // ugh \"real\" ... but blame it on our abuse of the \"cell\" system\n\t\tvar d = cellToDate(0, cell.col);\n\t\tvar slotIndex = cell.row;\n\t\tif (opt('allDaySlot')) {\n\t\t\tslotIndex--;\n\t\t}\n\t\tif (slotIndex >= 0) {\n\t\t\taddMinutes(d, minMinute + slotIndex * snapMinutes);\n\t\t}\n\t\treturn d;\n\t}\n\t\n\t\n\t// get the Y coordinate of the given time on the given day (both Date objects)\n\tfunction timePosition(day, time) { // both date objects. day holds 00:00 of current day\n\t\tday = cloneDate(day, true);\n\t\tif (time < addMinutes(cloneDate(day), minMinute)) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (time >= addMinutes(cloneDate(day), maxMinute)) {\n\t\t\treturn slotTable.height();\n\t\t}\n\t\tvar slotMinutes = opt('slotMinutes'),\n\t\t\tminutes = time.getHours()*60 + time.getMinutes() - minMinute,\n\t\t\tslotI = Math.floor(minutes / slotMinutes),\n\t\t\tslotTop = slotTopCache[slotI];\n\t\tif (slotTop === undefined) {\n\t\t\tslotTop = slotTopCache[slotI] =\n\t\t\t\tslotTable.find('tr').eq(slotI).find('td div')[0].offsetTop;\n\t\t\t\t// .eq() is faster than \":eq()\" selector\n\t\t\t\t// [0].offsetTop is faster than .position().top (do we really need this optimization?)\n\t\t\t\t// a better optimization would be to cache all these divs\n\t\t}\n\t\treturn Math.max(0, Math.round(\n\t\t\tslotTop - 1 + slotHeight * ((minutes % slotMinutes) / slotMinutes)\n\t\t));\n\t}\n\t\n\t\n\tfunction getAllDayRow(index) {\n\t\treturn allDayRow;\n\t}\n\t\n\t\n\tfunction defaultEventEnd(event) {\n\t\tvar start = cloneDate(event.start);\n\t\tif (event.allDay) {\n\t\t\treturn start;\n\t\t}\n\t\treturn addMinutes(start, opt('defaultEventMinutes'));\n\t}\n\t\n\t\n\t\n\t/* Selection\n\t---------------------------------------------------------------------------------*/\n\t\n\t\n\tfunction defaultSelectionEnd(startDate, allDay) {\n\t\tif (allDay) {\n\t\t\treturn cloneDate(startDate);\n\t\t}\n\t\treturn addMinutes(cloneDate(startDate), opt('slotMinutes'));\n\t}\n\t\n\t\n\tfunction renderSelection(startDate, endDate, allDay) { // only for all-day\n\t\tif (allDay) {\n\t\t\tif (opt('allDaySlot')) {\n\t\t\t\trenderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true);\n\t\t\t}\n\t\t}else{\n\t\t\trenderSlotSelection(startDate, endDate);\n\t\t}\n\t}\n\t\n\t\n\tfunction renderSlotSelection(startDate, endDate) {\n\t\tvar helperOption = opt('selectHelper');\n\t\tcoordinateGrid.build();\n\t\tif (helperOption) {\n\t\t\tvar col = dateToCell(startDate).col;\n\t\t\tif (col >= 0 && col < colCnt) { // only works when times are on same day\n\t\t\t\tvar rect = coordinateGrid.rect(0, col, 0, col, slotContainer); // only for horizontal coords\n\t\t\t\tvar top = timePosition(startDate, startDate);\n\t\t\t\tvar bottom = timePosition(startDate, endDate);\n\t\t\t\tif (bottom > top) { // protect against selections that are entirely before or after visible range\n\t\t\t\t\trect.top = top;\n\t\t\t\t\trect.height = bottom - top;\n\t\t\t\t\trect.left += 2;\n\t\t\t\t\trect.width -= 5;\n\t\t\t\t\tif ($.isFunction(helperOption)) {\n\t\t\t\t\t\tvar helperRes = helperOption(startDate, endDate);\n\t\t\t\t\t\tif (helperRes) {\n\t\t\t\t\t\t\trect.position = 'absolute';\n\t\t\t\t\t\t\tselectionHelper = $(helperRes)\n\t\t\t\t\t\t\t\t.css(rect)\n\t\t\t\t\t\t\t\t.appendTo(slotContainer);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\trect.isStart = true; // conside rect a \"seg\" now\n\t\t\t\t\t\trect.isEnd = true; //\n\t\t\t\t\t\tselectionHelper = $(slotSegHtml(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: '',\n\t\t\t\t\t\t\t\tstart: startDate,\n\t\t\t\t\t\t\t\tend: endDate,\n\t\t\t\t\t\t\t\tclassName: ['fc-select-helper'],\n\t\t\t\t\t\t\t\teditable: false\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\trect\n\t\t\t\t\t\t));\n\t\t\t\t\t\tselectionHelper.css('opacity', opt('dragOpacity'));\n\t\t\t\t\t}\n\t\t\t\t\tif (selectionHelper) {\n\t\t\t\t\t\tslotBind(selectionHelper);\n\t\t\t\t\t\tslotContainer.append(selectionHelper);\n\t\t\t\t\t\tsetOuterWidth(selectionHelper, rect.width, true); // needs to be after appended\n\t\t\t\t\t\tsetOuterHeight(selectionHelper, rect.height, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\trenderSlotOverlay(startDate, endDate);\n\t\t}\n\t}\n\t\n\t\n\tfunction clearSelection() {\n\t\tclearOverlays();\n\t\tif (selectionHelper) {\n\t\t\tselectionHelper.remove();\n\t\t\tselectionHelper = null;\n\t\t}\n\t}\n\t\n\t\n\tfunction slotSelectionMousedown(ev) {\n\t\tif (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button\n\t\t\tunselect(ev);\n\t\t\tvar dates;\n\t\t\thoverListener.start(function(cell, origCell) {\n\t\t\t\tclearSelection();\n\t\t\t\tif (cell && cell.col == origCell.col && !getIsCellAllDay(cell)) {\n\t\t\t\t\tvar d1 = realCellToDate(origCell);\n\t\t\t\t\tvar d2 = realCellToDate(cell);\n\t\t\t\t\tdates = [\n\t\t\t\t\t\td1,\n\t\t\t\t\t\taddMinutes(cloneDate(d1), snapMinutes), // calculate minutes depending on selection slot minutes \n\t\t\t\t\t\td2,\n\t\t\t\t\t\taddMinutes(cloneDate(d2), snapMinutes)\n\t\t\t\t\t].sort(dateCompare);\n\t\t\t\t\trenderSlotSelection(dates[0], dates[3]);\n\t\t\t\t}else{\n\t\t\t\t\tdates = null;\n\t\t\t\t}\n\t\t\t}, ev);\n\t\t\t$(document).one('mouseup', function(ev) {\n\t\t\t\thoverListener.stop();\n\t\t\t\tif (dates) {\n\t\t\t\t\tif (+dates[0] == +dates[1]) {\n\t\t\t\t\t\treportDayClick(dates[0], false, ev);\n\t\t\t\t\t}\n\t\t\t\t\treportSelection(dates[0], dates[3], false, ev);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\n\tfunction reportDayClick(date, allDay, ev) {\n\t\ttrigger('dayClick', dayBodyCells[dateToCell(date).col], date, allDay, ev);\n\t}\n\t\n\t\n\t\n\t/* External Dragging\n\t--------------------------------------------------------------------------------*/\n\t\n\t\n\tfunction dragStart(_dragElement, ev, ui) {\n\t\thoverListener.start(function(cell) {\n\t\t\tclearOverlays();\n\t\t\tif (cell) {\n\t\t\t\tif (getIsCellAllDay(cell)) {\n\t\t\t\t\trenderCellOverlay(cell.row, cell.col, cell.row, cell.col);\n\t\t\t\t}else{\n\t\t\t\t\tvar d1 = realCellToDate(cell);\n\t\t\t\t\tvar d2 = addMinutes(cloneDate(d1), opt('defaultEventMinutes'));\n\t\t\t\t\trenderSlotOverlay(d1, d2);\n\t\t\t\t}\n\t\t\t}\n\t\t}, ev);\n\t}\n\t\n\t\n\tfunction dragStop(_dragElement, ev, ui) {\n\t\tvar cell = hoverListener.stop();\n\t\tclearOverlays();\n\t\tif (cell) {\n\t\t\ttrigger('drop', _dragElement, realCellToDate(cell), getIsCellAllDay(cell), ev, ui);\n\t\t}\n\t}\n\t\n\n}", "function date_click() {\n $(\".events-container\").show(250);\n $(\"#dialog\").hide(250);\n $(\".active-date\").removeClass(\"active-date\");\n $(this).addClass(\"active-date\");\n}", "function generateList() {\r\n\tlet calendarE1 = document.getElementById('content');\r\n\r\n\t// creates calendar\r\n let calendar = new FullCalendar.Calendar(calendarE1, {\r\n plugins: [ 'list', 'timeGrid' ],\r\n\r\n header: {\r\n\t\t left: '',\r\n center: 'title',\r\n\t\t right: 'listDay, timeGridDay'\r\n },\r\n\t\t\r\n\t\t// customizes button names\r\n\t\tviews: {\r\n\t\t\tlistDay: { buttonText: 'list view'}, \r\n\t\t\ttimeGridDay: { buttonText: 'grid view'}\r\n\t\t},\r\n \r\n defaultView: 'listDay',\r\n defaultDate: eventInfo['dateStart'],\r\n navLinks: true, \t// can click day/week names to navigate views\r\n editable: false,\r\n eventLimit: true, \t// allows \"more\" link when too many events\r\n\t\tevents: availableSlots,\r\n\t\t\r\n\t\t/**\r\n\t\t * eventRender() displays current reservation availability.\r\n\t\t * @param {*} info \r\n\t\t */\r\n\t\teventRender: function(info) {\r\n\t\t\tlet remainingRes = info.event.extendedProps.RSVPlim - info.event.extendedProps.RSVPs;\r\n\t\t\tlet dispRSVP = document.createElement('td');\r\n\t\t\tdispRSVP.className = 'fc-list-item-title fc-widget-content';\r\n\t\t\tlet RSVPdata = document.createElement('a');\r\n\t\t\tRSVPdata.append('Available reservations: ' + remainingRes);\r\n\t\t\tdispRSVP.append(RSVPdata);\r\n\t\t\tinfo.el.append(dispRSVP);\r\n\t\t},\r\n\t\t\r\n\t\t/**\r\n\t\t * eventClick() is used for handling when a user clicks a slot to make a reservation.\r\n\t\t * Reference: https://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit?rq=1\r\n\t\t * @param {*} info \r\n\t\t */\r\n\t\teventClick: function(info) {\r\n\t\t\tinfo.jsEvent.preventDefault();\r\n\t\t\tvar body = {}; \t// holds data that will be sent to server\r\n\t\t\tbody['inviteID'] = info.event.extendedProps.inviteID;\r\n\t\t\tbody['slotID'] = info.event.id;\r\n\t\t\tbody['eventID'] = info.event.extendedProps.eventID;\r\n\t\t\t\r\n\t\t\t// creates reservation in database\r\n\t\t\tconst form = document.createElement('form');\r\n\t\t\tform.method = 'post';\r\n\t\t\tform.action = 'confirm_reservation.php';\r\n\t\t\t\r\n\t\t\tfor (const key in body) {\r\n\t\t\t\tif (body.hasOwnProperty(key)) {\r\n\t\t\t\tconst hiddenField = document.createElement('input');\r\n\t\t\t\thiddenField.type = 'hidden';\r\n\t\t\t\thiddenField.name = key;\r\n\t\t\t\thiddenField.value = body[key];\r\n\t\t\t\r\n\t\t\t\tform.appendChild(hiddenField);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdocument.body.appendChild(form);\r\n\t\t\tform.submit();\r\n\t\t}\r\n });\r\n calendar.render();\r\n}", "function displayEventEditWindow() {\n if (eventGrid.selModel.getCount()) {\n eventMode = \"Edit\";\n var selections = eventGrid.selModel.getSelections();\n eventDS.on('load', eventDSEditOnLoad);\n eventDS.load({params: {'id': selections[0].json.id}});\n\n if (!EventEditWindow.isVisible()) {\n EventEditWindow.show();\n } else {\n EventEditWindow.toFront();\n }\n\n }\n}", "function Events() {\n}", "function za(){function b(b){var c=j(\"unselectCancel\");c&&a(b.target).parents(c).length||d(b)}function c(a,b){d(),a=i.moment(a),b=b?i.moment(b):l(a),m(a,b),e(a,b)}\n// TODO: better date normalization. see notes in automated test\nfunction d(a){o&&(o=!1,n(),k(\"unselect\",null,a))}function e(a,b,c){o=!0,k(\"select\",null,a,b,c)}function f(b){// not really a generic manager method, oh well\nvar c=h.cellToDate,f=h.getIsCellAllDay,g=h.getHoverListener(),i=h.reportDayClick;// this is hacky and sort of weird\nif(1==b.which&&j(\"selectable\")){// which==1 means left mouse button\nd(b);var k;g.start(function(a,b){// TODO: maybe put cellToDate/getIsCellAllDay info in cell\nn(),a&&f(a)?(k=[c(b),c(a)].sort(C),m(k[0],k[1].clone().add(1,\"days\"))):k=null},b),a(document).one(\"mouseup\",function(a){g.stop(),k&&(+k[0]==+k[1]&&i(k[0],a),e(k[0],k[1].clone().add(1,\"days\"),// make exclusive\na))})}}function g(){a(document).off(\"mousedown\",b)}var h=this;\n// exports\nh.select=c,h.unselect=d,h.reportSelection=e,h.daySelectionMousedown=f,h.selectionManagerDestroy=g;\n// imports\nvar i=h.calendar,j=h.opt,k=h.trigger,l=h.defaultSelectionEnd,m=h.renderSelection,n=h.clearSelection,o=!1;\n// unselectAuto\nj(\"selectable\")&&j(\"unselectAuto\")&&a(document).on(\"mousedown\",b)}", "function handleClientLoad() {\n authorizeButton = document.getElementById('authorize-button');\n signoutButton = document.getElementById('signout-button');\n SCOPES = \"https://www.googleapis.com/auth/calendar.readonly\";\n DISCOVERY_DOCS = [\"https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest\"];\n CLIENT_ID = '352217354004-02pe7f1kfijtr6rmo09pgjddijqti3p8.apps.googleusercontent.com';\n API_KEY = 'AIzaSyBt8j6SXFMnOAU6B9HGHS6_c3FJn9Z7OPA';\n\n newEvent = {\n 'summary': 'Run outdoors!',\n 'description': 'Exercise Me predicts this time to be good for outdoor exercise. This is just a suggestion. Exercise at this time with caution.',\n 'start': {\n 'dateTime': '2015-05-28T09:00:00-07:00',\n 'timeZone': 'America/Boston'\n },\n 'end': {\n 'dateTime': '2015-05-28T17:00:00-07:00',\n 'timeZone': 'America/Boston'\n },\n 'reminders': {\n 'useDefault': false,\n 'overrides': [\n {'method': 'email', 'minutes': 12 * 60},\n {'method': 'popup', 'minutes': 30}\n ]\n }\n };\n gapi.load('client:auth2', initClient);\n}", "function MonthEvent(parent){var _this=_super.call(this,parent)||this;_this.renderedEvents=[];_this.monthHeaderHeight=0;_this.moreIndicatorHeight=19;_this.renderType='day';_this.element=_this.parent.activeView.getPanel();_this.fields=_this.parent.eventFields;_this.maxHeight=_this.parent.eventSettings.enableMaxHeight&&!_this.parent.eventSettings.enableIndicator&&!_this.parent.rowAutoHeight;_this.withIndicator=_this.parent.eventSettings.enableMaxHeight&&_this.parent.eventSettings.enableIndicator&&!_this.parent.rowAutoHeight;_this.maxOrIndicator=_this.maxHeight||_this.withIndicator;_this.moreIndicatorHeight=_this.parent.rowAutoHeight&&_this.parent.eventSettings.ignoreWhitespace?0:_this.moreIndicatorHeight;_this.addEventListener();return _this;}", "function convertCalEvent(calEvent) {\n convertedEvent = {\n 'id': calEvent.getId(),\n 'title': calEvent.getTitle(),\n 'description': calEvent.getDescription(),\n 'location': calEvent.getLocation(),\n 'recurring': calEvent.isRecurringEvent(),\n 'creators': calEvent.getOriginalCalendarId(), //getCreators(),\n 'status': calEvent.getMyStatus(),\n //'guests': calEvent.getGuestList().map(function(x) {return x.getEmail();}).filter(function(x) {return x.indexOf('resource.calendar.google.com')===-1;}).join(','),\n 'color': calEvent.getColor()\n };\n \n let guestsDetails = calEvent.getGuestList().map(function(x) {return x.getEmail();}).filter(function(x) {return x.indexOf('resource.calendar.google.com')===-1;});\n convertedEvent.guests = guestsDetails.length;\n convertedEvent.guestsDetails = guestsDetails.join(',');\n convertedEvent.type = getMeetingType(convertedEvent.creators, convertedEvent.guestsDetails);\n \n if(convertedEvent.creators.startsWith(\"geotabinc.com_\")) {convertedEvent.creators = calEvent.getCreators()}\n \n if (calEvent.isAllDayEvent()) {\n convertedEvent.starttime = calEvent.getAllDayStartDate();\n let endtime = calEvent.getAllDayEndDate();\n if (endtime - convertedEvent.starttime === 24 * 3600 * 1000) {\n convertedEvent.endtime = '';\n } else {\n convertedEvent.endtime = endtime;\n if (endtime.getHours() === 0 && endtime.getMinutes() == 0) {\n convertedEvent.endtime.setSeconds(endtime.getSeconds() - 1);\n }\n }\n } else {\n convertedEvent.starttime = calEvent.getStartTime();\n convertedEvent.endtime = calEvent.getEndTime();\n if(convertedEvent.status != 'NO') {\n convertedEvent.duration = calculateDurationHours(convertedEvent.starttime.getTime(), convertedEvent.endtime.getTime());\n }\n }\n return convertedEvent;\n}", "fmt_icalendar (calobj, evtjson) {\n \n var evtQualifier, lrule, momentNextEndDate, momentNextStartDate, nexteventStartdate;\n\n // need the evtjosn AND we need a summmary which describes the event otherwise skip it\n try {\n if ( !evtjson || !evtjson.summary) {\n console.log(\"Invalid event to format)\");\n return; \n }\n \n if ( evtjson.startDate && ( moment(evtjson.startDate,'YYYYMMDDTHHmmss').isValid() || moment(evtjson.startDate,'YYYYMMDD').isValid() ) ) {\n this.isalldayevent = ! ( moment(evtjson.startDate,'HHmmss').isValid() && evtjson.startDate.toString().length > 8) ;\n this.eventStart = moment.tz(evtjson.startDate,calobj.intimezone);\n } else {\n console.log(\"Invalid start date\");\n return; \n }\n \n // if ( this.isalldayevent ) console.log(\"$$$$$$ SET ALL DAY EVENT $$$$$$$$\");\n\n if ( evtjson.endDate && moment(evtjson.endDate,'YYYYMMDDTHHmmss').isValid() ) {\n this.eventEnd = moment.tz(evtjson.endDate,calobj.intimezone);\n } else {\n // no enddate. \n this.eventEnd = this.eventStart.clone();\n \n // eslint-disable-next-line no-warning-comments\n // TODO: if we have a duration, calculate it\n\n // otherwise Spec says if startdate is dateonly duration is 1 day otherwise 0 days\n if ( ! moment(evtjson.startDate,'YYYYMMDDTHHmmss').isValid() ) {\n this.eventEnd.add(1,'day');\n }\n }\n\n // calculate the length\n this.eventlength = this.eventEnd.diff(this.eventStart,'minutes');\n\n this.setcleansummary(calobj, evtjson.summary);\n \n // usedate = evtjson.startDate;\n // console.log(\"createevent start:\" + this.eventStart.format() + \", end:\" + this.eventEnd.format() + \", summary=\" + this.summary);\n\n // eslint-disable-next-line no-warning-comments\n // TODO: possible bug, can we have a recurring rule on a multi-day event that results in a new event that spans today\n // at the moment we filter to today or later on the rule generated dates so we might miss it\n if ( evtjson.rrule ) {\n nexteventStartdate = this.returnNextEventDateFromRule(calobj, evtjson.startDate,evtjson);\n lrule = evtjson.rrule;\n momentNextStartDate = moment.tz(nexteventStartdate,'YYYY-MM-DDTHHmmss',calobj.intimezone);\n momentNextEndDate = momentNextStartDate.add(this.eventlength,'minutes');\n evtQualifier = this.eventTimeQualifier(calobj, momentNextStartDate,momentNextEndDate);\n } else {\n // no recurring rule so check to see if it spans today\n evtQualifier = this.eventTimeQualifier(calobj, this.eventStart,this.eventEnd);\n lrule = \"\";\n if ( evtQualifier == this.EVENTSTARTSTODAY || evtQualifier == this.EVENTISPAST || evtQualifier == this.EVENTISFUTURE ) {\n momentNextStartDate = this.eventStart.clone();\n } else {\n // must span or end today so it started at midnight\n momentNextStartDate = calobj.todayDate; \n }\n momentNextEndDate = this.eventEnd;\n }\n\n // this.uidtouse = uuid.v4();\n // let sortkey = this.eventStart.format('HH:mm') + \":\" + this.summary + \":\" + uidtouse;\n // this.uid = uidtouse;\n // this.sortkey = sortkey;\n\n this.qualifier = evtQualifier;\n this.rrule = lrule;\n this.nextStart = momentNextStartDate;\n this.nextEnd = momentNextEndDate;\n\n this.isvalid = true;\n\n }\n catch(e) {\n console.log(\"error in event creation:\",e);\n }\n \n }", "function initEvents() {\n\t\t\t\t\tvar afterResize;\n\n\t\t\t\t\t/**\n\t\t\t\t\t * On load removes loader, and clicks on a current day in calendar.\n\t\t\t\t\t */\n\t\t\t\t\twindow.addEventListener('load', function () {\n\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t_h.toggleClass(loader, 'loaded');\n\t\t\t\t\t\t\t_h.triggerClick(todayBtn);\n\t\t\t\t\t\t}, 1000);\n\t\t\t\t\t}, false);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * On resize end recalculate width of chart.\n\t\t\t\t\t */\n\t\t\t\t\twindow.addEventListener('resize', function () {\n\t\t\t\t\t\tclearTimeout(afterResize);\n\t\t\t\t\t\tafterResize = setTimeout(function () {\n\t\t\t\t\t\t\trecalcCanvasWidth();\n\t\t\t\t\t\t}, 100);\n\t\t\t\t\t}, false);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Switch to previous week, and to previous month if no more weeks in month.\n\t\t\t\t\t */\n\t\t\t\t\tprevWeekBtn.addEventListener('click', function () {\n\t\t\t\t\t\tvar curWeek = calGrid.querySelector('.week__current');\n\t\t\t\t\t\tif (!curWeek.previousElementSibling) {\n\t\t\t\t\t\t\ttoggleMonth(-1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttoggleWeek(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trecalcCanvasWidth();\n\t\t\t\t\t}, false);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Switch to next week, and next month if no more weeks in month.\n\t\t\t\t\t */\n\t\t\t\t\tnextWeekBtn.addEventListener('click', function () {\n\t\t\t\t\t\tvar curWeek = calGrid.querySelector('.week__current');\n\t\t\t\t\t\tif (!curWeek.nextElementSibling) {\n\t\t\t\t\t\t\ttoggleMonth(1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttoggleWeek(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trecalcCanvasWidth();\n\t\t\t\t\t}, false);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Switch to previous month.\n\t\t\t\t\t */\n\t\t\t\t\tprevMonthBtn.addEventListener('click', function () {\n\t\t\t\t\t\ttoggleMonth(-1);\n\t\t\t\t\t\trecalcCanvasWidth();\n\t\t\t\t\t}, false);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Switch to next month.\n\t\t\t\t\t */\n\t\t\t\t\tnextMonthBtn.addEventListener('click', function () {\n\t\t\t\t\t\ttoggleMonth(1);\n\t\t\t\t\t\trecalcCanvasWidth();\n\t\t\t\t\t}, false);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Clicking on today button displays/switches to current day and week.\n\t\t\t\t\t */\n\t\t\t\t\ttodayBtn.addEventListener('click', function () {\n\t\t\t\t\t\tdrawMonthView(curMonthSave);\n\t\t\t\t\t\tselectWeek(curWeekSave, drawWeekView);\n\t\t\t\t\t\trecalcCanvasWidth();\n\t\t\t\t\t}, false);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Clicking on search icon, focuses on search field\n\t\t\t\t\t * and adds active class to parent container.\n\t\t\t\t\t */\n\t\t\t\t\tsearchLink.addEventListener('click', function (evt) {\n\t\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\t\tsearchField.focus();\n\t\t\t\t\t\t_h.toggleClass(evt.currentTarget.parentElement, 'active-search');\n\t\t\t\t\t});\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Clear searchfield on blur and remove active class\n\t\t\t\t\t */\n\t\t\t\t\tsearchField.addEventListener('blur', function (evt) {\n\t\t\t\t\t\tevt.currentTarget.value = '';\n\t\t\t\t\t\tevt.currentTarget.parentElement.classList.remove('active-search');\n\t\t\t\t\t});\n\n\t\t\t\t\t/**\n\t\t\t\t\t * On keypress perform search\n\t\t\t\t\t */\n\t\t\t\t\tsearchField.addEventListener('keypress', function (evt) {\n\t\t\t\t\t\tsearchDate(evt);\n\t\t\t\t\t}, false);\n\n\t\t\t\t\tdocument.addEventListener('click', function (evt) {\n\t\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\t\tvar target = evt.target,\n\t\t\t\t\t\t\ttargetParent = target.parentElement,\n\t\t\t\t\t\t\tdayIdx = _h.getIndex(calGrid.querySelectorAll('.day'), target),\n\t\t\t\t\t\t\tlgDay = weekView.querySelector('.lg-current-day');\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Clicking on a day in the calendar, makes week\n\t\t\t\t\t\t * of selected day current and displays selected day in the week view.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (_h.hasClass(target, 'day') && !_h.hasClass(target, 'sm-nodata-day')) {\n\t\t\t\t\t\t\tsetWeekAndDayIndexes(dates[dayIdx]);\n\t\t\t\t\t\t\tif (!_h.hasClass(targetParent, 'week__current')) {\n\t\t\t\t\t\t\t\tselectWeek(indexObj.weekIdx, drawWeekView);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tselectDay(indexObj.dayIndexInWeek);\n\t\t\t\t\t\t\trecalcCanvasWidth();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Displays current date and week,\n\t\t\t\t\t\t * toggles \"selected\" class on large day in the week view with timeout.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (target.className === 'choose-today') {\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t_h.toggleClass(lgDay, 'selected');\n\t\t\t\t\t\t\t}, 200);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Clicking on a large day in week view toggles \"selected\" class.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (target.className === 'dummy-overlay') {\n\t\t\t\t\t\t\t_h.toggleClass(targetParent, 'selected');\n\t\t\t\t\t\t}\n\t\t\t\t\t}, false);\n\t\t\t\t}", "function getCalenderEvents_(calendar) {\n\n // Create an events array to store all the event.\n let events = [];\n\n // Get all the events that occur within defined sync period.\n let syncStartDate = new Date();\n syncStartDate.setFullYear(syncStartDate.getFullYear() - syncPeriod.yearBefore);\n let syncEndDate = new Date();\n syncEndDate.setFullYear(syncEndDate.getFullYear() + syncPeriod.yearAfter);\n let calEvents = calendar.getEvents(syncStartDate, syncEndDate);\n\n // Loop through all the calendar events. Extract the event that is created by this script and place it into events array.\n for (const e of calEvents) {\n\n // SKip the events that does not contain `Created by \"${identificationString}\" spreadsheet.` tag.\n let tagKeys = e.getAllTagKeys();\n if (!tagKeys.includes('identification')) {\n continue;\n }\n else {\n let tagStr = `Created by \"${identificationString}\" spreadsheet.`;\n if (e.getTag('identification') !== tagStr) {\n continue;\n }\n }\n\n // Check if the event is part of a recurring event.\n if (e.isRecurringEvent()) {\n let repeated = false;\n for (let i = 0; i < events.length; i++) {\n let title = e.getTitle();\n if (events[i].title === title) {\n repeated = true;\n break;\n }\n }\n if (repeated) {\n continue;\n }\n }\n\n events.push(calanderToEvent_(e));\n \n }\n\n return events;\n\n}", "function actionDateSelectedForAgendaManage(){\n\n\t}", "_refreshCalendarMode() {\n const that = this;\n\n if (that.headerTemplate) {\n return;\n }\n\n that._refreshMonthNames();\n\n if (that.calendarMode === 'default') {\n that.$classicHeaderDate.addClass('jqx-hidden');\n that.$defaultHeaderDate.removeClass('jqx-hidden');\n\n const sortedDates = that._viewDates.slice(0).sort((a, b) => a.getTime() - b.getTime()),\n firstDateInView = sortedDates[0],\n lastDateInView = sortedDates[sortedDates.length - 1];\n\n firstDateInView.setDate(2);\n\n let date = firstDateInView.toLocaleDateString(that.locale, { year: that.yearFormat, month: that.monthNameFormat });\n\n if (that.months > 1) {\n lastDateInView.setDate(2);\n date += ' - ' + lastDateInView.toLocaleDateString(that.locale, { year: that.yearFormat, month: that.monthNameFormat });\n }\n\n that.$.defaultHeaderDate.innerHTML = date;\n\n if (!that.unfocusable) {\n that.$.dateElement.setAttribute('tabindex', that.tabIndex > 0 ? that.tabIndex : 0);\n }\n }\n else {\n that.$defaultHeaderDate.addClass('jqx-hidden');\n that.$classicHeaderDate.removeClass('jqx-hidden');\n that.$.dateElement.removeAttribute('tabindex');\n }\n }", "onSelect(event) {\n function displayElement(id, flag) {\n document.getElementById(id).hidden = !flag;\n return flag;\n }\n\n let dateFormatter = cal.dtz.formatter;\n\n let item = document.getElementById(\"calendar-task-tree\").currentTask;\n if (\n displayElement(\"calendar-task-details-container\", item != null) &&\n displayElement(\"calendar-task-view-splitter\", item != null)\n ) {\n document.getElementById(\"calendar-task-details-title-row\").toggleAttribute(\"hidden\", false);\n document.getElementById(\"calendar-task-details-title\").textContent = item.title\n ? item.title.replace(/\\n/g, \" \")\n : \"\";\n\n let organizer = item.organizer;\n if (\n !document\n .getElementById(\"calendar-task-details-organizer-row\")\n .toggleAttribute(\"hidden\", !organizer)\n ) {\n let name = organizer.commonName;\n if (!name || name.length <= 0) {\n if (organizer.id && organizer.id.length) {\n name = organizer.id;\n let re = new RegExp(\"^mailto:(.*)\", \"i\");\n let matches = re.exec(name);\n if (matches) {\n name = matches[1];\n }\n }\n }\n if (\n !document\n .getElementById(\"calendar-task-details-organizer-row\")\n .toggleAttribute(\"hidden\", !name)\n ) {\n document.getElementById(\"calendar-task-details-organizer\").textContent = name;\n }\n }\n\n let priority = 0;\n if (item.calendar.getProperty(\"capabilities.priority.supported\")) {\n priority = parseInt(item.priority, 10);\n }\n document\n .getElementById(\"calendar-task-details-priority-row\")\n .toggleAttribute(\"hidden\", priority == 0);\n displayElement(\"calendar-task-details-priority-low\", priority >= 6 && priority <= 9);\n displayElement(\"calendar-task-details-priority-normal\", priority == 5);\n displayElement(\"calendar-task-details-priority-high\", priority >= 1 && priority <= 4);\n\n let status = item.getProperty(\"STATUS\");\n if (\n !document\n .getElementById(\"calendar-task-details-status-row\")\n .toggleAttribute(\"hidden\", !status)\n ) {\n let statusDetails = document.getElementById(\"calendar-task-details-status\");\n switch (status) {\n case \"NEEDS-ACTION\": {\n statusDetails.textContent = cal.l10n.getCalString(\"taskDetailsStatusNeedsAction\");\n break;\n }\n case \"IN-PROCESS\": {\n let percent = 0;\n let property = item.getProperty(\"PERCENT-COMPLETE\");\n if (property != null) {\n percent = parseInt(property, 10);\n }\n statusDetails.textContent = cal.l10n.getCalString(\"taskDetailsStatusInProgress\", [\n percent,\n ]);\n break;\n }\n case \"COMPLETED\": {\n if (item.completedDate) {\n let completedDate = item.completedDate.getInTimezone(cal.dtz.defaultTimezone);\n statusDetails.textContent = cal.l10n.getCalString(\"taskDetailsStatusCompletedOn\", [\n dateFormatter.formatDateTime(completedDate),\n ]);\n }\n break;\n }\n case \"CANCELLED\": {\n statusDetails.textContent = cal.l10n.getCalString(\"taskDetailsStatusCancelled\");\n break;\n }\n default: {\n document\n .getElementById(\"calendar-task-details-status-row\")\n .toggleAttribute(\"hidden\", true);\n break;\n }\n }\n }\n let categories = item.getCategories();\n if (\n !document\n .getElementById(\"calendar-task-details-category-row\")\n .toggleAttribute(\"hidden\", categories.length == 0)\n ) {\n document.getElementById(\"calendar-task-details-category\").textContent = categories.join(\n \", \"\n );\n }\n\n let taskStartDate = item[cal.dtz.startDateProp(item)];\n if (taskStartDate) {\n document.getElementById(\"task-start-date\").textContent = cal.dtz.getStringForDateTime(\n taskStartDate\n );\n }\n document.getElementById(\"task-start-row\").toggleAttribute(\"hidden\", !taskStartDate);\n\n let taskDueDate = item[cal.dtz.endDateProp(item)];\n if (taskDueDate) {\n document.getElementById(\"task-due-date\").textContent = cal.dtz.getStringForDateTime(\n taskDueDate\n );\n }\n document.getElementById(\"task-due-row\").toggleAttribute(\"hidden\", !taskDueDate);\n\n let parentItem = item;\n if (parentItem.parentItem != parentItem) {\n // XXXdbo Didn't we want to get rid of these checks?\n parentItem = parentItem.parentItem;\n }\n let recurrenceInfo = parentItem.recurrenceInfo;\n let recurStart = parentItem.recurrenceStartDate;\n if (\n !document\n .getElementById(\"calendar-task-details-repeat-row\")\n .toggleAttribute(\"hidden\", !recurrenceInfo || !recurStart)\n ) {\n let kDefaultTimezone = cal.dtz.defaultTimezone;\n let startDate = recurStart.getInTimezone(kDefaultTimezone);\n let endDate = item.dueDate ? item.dueDate.getInTimezone(kDefaultTimezone) : null;\n let detailsString = recurrenceRule2String(\n recurrenceInfo,\n startDate,\n endDate,\n startDate.isDate\n );\n if (detailsString) {\n let rpv = document.getElementById(\"calendar-task-details-repeat\");\n rpv.textContent = detailsString.split(\"\\n\").join(\" \");\n }\n }\n let textbox = document.getElementById(\"calendar-task-details-description\");\n let description = item.hasProperty(\"DESCRIPTION\") ? item.getProperty(\"DESCRIPTION\") : null;\n textbox.value = description;\n textbox.readOnly = true;\n let attachmentRows = document.getElementById(\"calendar-task-details-attachment-rows\");\n while (attachmentRows.lastChild) {\n attachmentRows.lastChild.remove();\n }\n let attachments = item.getAttachments();\n if (displayElement(\"calendar-task-details-attachment-row\", attachments.length > 0)) {\n displayElement(\"calendar-task-details-attachment-rows\", true);\n for (let attachment of attachments) {\n let url = attachment.calIAttachment.uri.spec;\n let urlLabel = document.createXULElement(\"label\");\n urlLabel.setAttribute(\"class\", \"text-link\");\n urlLabel.setAttribute(\"value\", url);\n urlLabel.setAttribute(\"tooltiptext\", url);\n urlLabel.setAttribute(\"crop\", \"end\");\n urlLabel.setAttribute(\"onclick\", \"if (event.button != 2) launchBrowser(this.value);\");\n urlLabel.setAttribute(\"context\", \"taskview-link-context-menu\");\n attachmentRows.appendChild(urlLabel);\n }\n }\n }\n }", "function renderEvent () {\n const daysContainer = document.querySelectorAll(\".current-month-day\");\n const currentMonth = date.getMonth() + 1;\n const currentYear = date.getFullYear();\n //* Calendar days divs pass by\n for (let div of daysContainer) {\n const dayNumber = div.firstChild.innerHTML;\n //* checking that day has events\n if (!!eventsByDate[`${currentYear}-${currentMonth}-${dayNumber}`]) {\n //* Looping thru events in array\n for (let eventObjectId of eventsByDate[`${currentYear}-${currentMonth}-${dayNumber}`]){\n //* Access to event data\n const eventTitle = eventsById[eventObjectId].title;\n const eventType = eventsById[eventObjectId].eventType;\n //* Create of the event element\n let newEvent = document.createElement(\"div\");\n newEvent.classList.add(\"event-in-calendar\");\n newEvent.innerHTML = eventTitle;\n newEvent.setAttribute(\"divEventId\", eventObjectId);\n //* choosing event color depending of event type\n switch (eventType) {\n case 'Study':\n newEvent.classList.add(\"blue-event\");\n break;\n case 'Meeting':\n newEvent.classList.add(\"green-event\");\n break;\n case 'Personal':\n newEvent.classList.add(\"orange-event\");\n break;\n default:\n break;\n }\n newEvent.addEventListener('click', eventModal);\n //* Insert element in DOM\n div.firstChild.insertAdjacentElement('afterend',newEvent);\n }\n }\n }\n}", "function initCalendar(calElement, events, isRTL) {\n\n // check to remove elements from the list\n var removeAfterDrop = $('#remove-after-drop');\n\n calElement.fullCalendar({\n isRTL: isRTL,\n header: {\n left: 'prev,next today',\n center: 'title',\n right: 'month,agendaWeek,agendaDay'\n },\n buttonIcons: { // note the space at the beginning\n prev: ' fa fa-caret-left',\n next: ' fa fa-caret-right'\n },\n buttonText: {\n today: 'today',\n month: 'month',\n week: 'week',\n day: 'day'\n },\n editable: true,\n droppable: true, // this allows things to be dropped onto the calendar\n drop: function (date, allDay) { // this function is called when something is dropped\n\n var $this = $(this),\n // retrieve the dropped element's stored Event Object\n originalEventObject = $this.data('calendarEventObject');\n\n // if something went wrong, abort\n if (!originalEventObject) return;\n\n // clone the object to avoid multiple events with reference to the same object\n var clonedEventObject = $.extend({}, originalEventObject);\n\n // assign the reported date\n clonedEventObject.start = date;\n clonedEventObject.allDay = allDay;\n clonedEventObject.backgroundColor = $this.css('background-color');\n clonedEventObject.borderColor = $this.css('border-color');\n\n // render the event on the calendar\n // the last `true` argument determines if the event \"sticks\"\n // (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)\n calElement.fullCalendar('renderEvent', clonedEventObject, true);\n\n // if necessary remove the element from the list\n if (removeAfterDrop.is(':checked')) {\n $this.remove();\n }\n },\n eventDragStart: function (event/*, js, ui*/) {\n draggingEvent = event;\n },\n // This array is the events sources\n events: events\n });\n }", "function Events() {} //", "function Events() {} //", "function Events() {} //", "function Events() {} //", "function Events() {} //", "function Events() {} //", "updateEvents() {\n\n // find all day squares\n var daySquares = C('day-square');\n\n // find all events happening this month in this.events\n var monthEvents = this.events[`${this.year}`][this.month];\n\n // find all of the keys in monthEvents (string values for all dates with events)\n var monthKeys = Object.keys(monthEvents);\n\n // hides all of the exclamation icons\n for (var i = 0; i < daySquares.length; i++) {\n daySquares[i].children[1].children[0].classList.add('hidden');\n }\n\n // loops through each key/date\n monthKeys.forEach( key => {\n\n // get all classes happening on this date\n var classes = Object.keys(monthEvents[`${key}`]);\n\n // parse the date into an int\n var date = parseInt(monthKeys);\n\n // opens the .day-assignment-content of the dateSquare for the day\n var dayContent = daySquares[this.monthInfo.firstDayOfWeek + date - 1].children[1];\n\n // declares a variable to hold HTML\n var contents = '';\n \n // shows the exclamation icon for the date\n dayContent.children[0].classList.remove('hidden');\n\n // loops through each event and appends relevant data to contents\n classes.forEach( cl => {\n \n contents += `<h4>${cl}</h4>`;\n\n var assignments = monthEvents[`${key}`][`${cl}`];\n\n var assignmentsList = '';\n\n assignments.forEach( a => {\n\n contents += `<li><p>${a[\"assignment-name\"]} Due ${new Date(a[\"due-date\"]).toLocaleString()}</p></li>`;\n\n });\n\n if (assignmentsList.length != 0)\n contents += `<ul>${assignmentsList}</ul>`;\n\n });\n\n // adds contents to the html of dayContent\n dayContent.children[1].innerHTML = contents;\n\n });\n \n }", "function OpenDialog() {\t\n\t\t$('#'+AppObjectParams.ObjectsID.DialogContent).empty();\n\t\t\n\t\tif(EventDataFromCalendar.IsNew) {\n\t\t\t$('#AppCalendar-Dialog .ui-dialog-title').text(AppObjectTextsData.DialogObj.Header.Add);\n\t\t\t$('#'+AppObjectParams.ObjectsID.ButtonAdd).css({'display':'inline'});\n\t\t\t$('#'+AppObjectParams.ObjectsID.ButtonEdit).css({'display':'none'});\n\t\t\t$('#'+AppObjectParams.ObjectsID.ButtonDelete).css({'display':'none'});\n\t\t\t$('#'+AppObjectParams.ObjectsID.ButtonDeleteAll).css({'display':'none'});\n\t\t} else {\n\t\t\t$('#AppCalendar-Dialog .ui-dialog-title').text(AppObjectTextsData.DialogObj.Header.Edit);\n\t\t\t$('#'+AppObjectParams.ObjectsID.ButtonAdd).css({'display':'none'});\n\t\t\t$('#'+AppObjectParams.ObjectsID.ButtonEdit).css({'display':'inline'});\n\t\t\t$('#'+AppObjectParams.ObjectsID.ButtonDelete).css({'display':'inline'});\n\t\t\tif(EventDataFromCalendar.AppEventType === \"general\") {\n\t\t\t\t$('#'+AppObjectParams.ObjectsID.ButtonDeleteAll).css({'display':'none'});\n\t\t\t} else {\n\t\t\t\t$('#'+AppObjectParams.ObjectsID.ButtonDeleteAll).css({'display':'inline'});\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar timeArrLen = AppConfigData.Time.Labels.length;\n\t\tvar startMoment = EventDataFromCalendar.Start.clone(), endMoment = EventDataFromCalendar.End.clone(), \n\t\tstartMomentArr = startMoment.toArray(), endMomentArr = endMoment.toArray();\n\t\tvar startTimeInx = 0, endTimeInx = 0;\n\t\t\n\t\tstartMomentArr[4] = 15 * parseInt(startMomentArr[4] / 15);\n\t\tstartMoment = moment.utc(startMomentArr);\n\t\tstartTimeInx = $.inArray(startMoment.format('HH:mm'), AppConfigData.Time.Labels);\n\t\tif(startTimeInx < 0) {\n\t\t\tstartTimeInx = 0;\n\t\t\tstartMomentArr[3] = 0;\n\t\t\tstartMomentArr[4] = 0;\n\t\t\tstartMoment = moment.utc(startMomentArr);\n\t\t}\n\t\tEventDataFromCalendar.StartArr = startMomentArr;\n\t\tEventDataFromCalendar.StartTimeInx = startTimeInx;\n\t\t\n\t\tif(endMomentArr[3] == 0 && endMomentArr[4] == 0) {\n\t\t\tendMoment = moment.utc(endMomentArr).add(-1, 'minutes');\n\t\t\tendMomentArr = endMoment.toArray();\n\t\t\tendTimeInx = timeArrLen - 1;\n\t\t} else {\n\t\t\tendMomentArr[4] = 15 * parseInt(endMomentArr[4] / 15);\n\t\t\tendMoment = moment.utc(endMomentArr);\n\t\t\tendTimeInx = $.inArray(endMoment.format('HH:mm'), AppConfigData.Time.Labels);\n\t\t\tif(endTimeInx <= 0) { \n\t\t\t\tendTimeInx = 1;\n\t\t\t\tendMomentArr[3] = 0;\n\t\t\t\tendMomentArr[4] = 1;\n\t\t\t\tendMoment = moment.utc(endMomentArr);\n\t\t\t}\n\t\t}\n\t\tEventDataFromCalendar.EndArr = endMomentArr;\n\t\tEventDataFromCalendar.EndTimeInx = endTimeInx;\n\t\t\n\t\t$('#'+AppObjectParams.ObjectsID.DialogDateStart).val(startMoment.format('DD MMMM YYYY'));\n\t $('#'+AppObjectParams.ObjectsID.DialogDateEnd).val(endMoment.format('DD MMMM YYYY'));\n\t \n\t $('#'+AppObjectParams.ObjectsID.DialogTimeStart).empty();\n\t $('#'+AppObjectParams.ObjectsID.DialogTimeEnd).empty();\n\t \n\t if(EventDataFromCalendar.IsAllDay) {\n\t \t$('#'+AppObjectParams.ObjectsID.DialogTimeStart).append($('<option>').attr({'value':startTimeInx}).text(AppConfigData.Time.Labels[startTimeInx]));\n\t \t$('#'+AppObjectParams.ObjectsID.DialogTimeEnd).append($('<option>').attr({'value':endTimeInx}).text(AppConfigData.Time.Labels[endTimeInx]));\n\t } else {\n\t \t$.each(AppConfigData.Time.Labels, function(time_index, time_label) {\n\t\t \tif((time_index + 1) < timeArrLen) {\n\t\t \t\t$('#'+AppObjectParams.ObjectsID.DialogTimeStart).append($('<option>').attr({'value':time_index}).text(time_label));\n\t\t \t}\n\t\t \t$('#'+AppObjectParams.ObjectsID.DialogTimeEnd).append($('<option>').attr({'value':time_index}).text(time_label));\n\t\t });\n\t }\n\t \n\t $('#'+AppObjectParams.ObjectsID.DialogTimeStart).val(startTimeInx);\n\t $('#'+AppObjectParams.ObjectsID.DialogTimeEnd).val(endTimeInx);\n\t \n\t\tif(AppConfigData.RepeatInterval.hasOwnProperty(EventDataFromCalendar.RepeatInterval)) {\n\t\t\t$('#'+AppObjectParams.ObjectsID.DialogRepeatInterval).val(EventDataFromCalendar.RepeatInterval);\n\t\t}\n\t\tif(AppConfigData.RepeatTimes.hasOwnProperty(EventDataFromCalendar.RepeatTimes)) {\n\t\t\t$('#'+AppObjectParams.ObjectsID.DialogRepeatTimes).val(EventDataFromCalendar.RepeatTimes);\n\t\t}\n\t\tif(AppConfigData.ReminderTime.hasOwnProperty(EventDataFromCalendar.ReminderTime)) {\n\t\t\t$('#'+AppObjectParams.ObjectsID.DialogReminderTime).val(EventDataFromCalendar.ReminderTime);\n\t\t}\n\t\t\n\t\tswitch(EventDataFromCalendar.AppEventType) {\n\t\t\tcase \"general\":\n\t\t\t\tOpenDialogGeneral();\n\t\t\tbreak;\n\t\t\tcase \"medical\":\n\t\t\t\tOpenDialogMedical();\n\t\t\tbreak;\n\t\t\tcase \"measurements\":\n\t\t\t\tOpenDialogMeasurements();\n\t\t\tbreak;\n\t\t\tcase \"eating\":\n\t\t\t\tOpenDialogEating();\n\t\t\tbreak;\n\t\t\tcase \"physical\":\n\t\t\t\tOpenDialogPhysical();\n\t\t\tbreak;\n\t\t\tcase \"cognitive\":\n\t\t\t\tOpenDialogCognitive();\n\t\t\tbreak;\n\t\t\tcase \"shower\":\n\t\t\t\tOpenDialogShower();\n\t\t\tbreak;\n\t\t\tcase \"socializing\":\n\t\t\t\tOpenDialogSocializing();\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tViewOrHideOverlayElement(true);\n\t}", "function setUpConference_() {\n if (ScriptProperties.getProperty('calId')) {\n Browser.msgBox('Your event is already set up. Look in Google Drive!');\n }\n var ss = SpreadsheetApp.getActive();\n var sheet = ss.getSheetByName('DemoSetup');\n var range = sheet.getDataRange();\n var values = range.getValues();\n setUpCalendar_(values, range);\n setUpForm_(ss, values);\n ScriptApp.newTrigger('onFormSubmit').forSpreadsheet(ss).onFormSubmit()\n .create();\n ss.removeMenu('Event Manager');\n}", "function month_click(event) {\n $(\".events-container\").show(250);\n $(\"#dialog\").hide(250);\n var date = event.data.date;\n $(\".active-month\").removeClass(\"active-month\");\n $(this).addClass(\"active-month\");\n var new_month = $(\".month\").index(this);\n date.setMonth(new_month);\n init_calendar(date);\n}", "function eventFunction(e){\r\n\t//drawAllEvents();\r\n\tvar dayevents = getSlot(e.startArray, EC);\r\n\tif (!dayEventDup(e,dayevents)){\r\n\t dayevents.push(e);\r\n\t dayevents.sort(sortByEventTime);\r\n\t // show number of events, if it is amongst currently shown queries\r\n\t if (queryStates[e.qid]==1){\r\n\t\teventSource.loadQueryEvents([e]);\r\n\t }\r\n\t} \r\n }", "function launchCalendar()\n{\n launchApplication(\"/luminis/luminisService/calendarServices/calendar/getCalendarAppLaunchData\"); \n}", "getEventsToRender() {}", "function loadCalendarApi() {\n gapi.client.load('calendar', 'v3', listUpcomingEvents);\n }", "registerEvents() {\r\n const gridEvents = [\r\n // Register Grid Events.\r\n {\r\n handler: this.slickGrid,\r\n events: this.events.slickGrid\r\n },\r\n\r\n // Register DataView Events.\r\n {\r\n handler: this.dataView,\r\n events: this.events.dataView\r\n },\r\n\r\n // Register SelectionModel Events.\r\n {\r\n handler: this.selectionModel,\r\n events: this.events.selectionModel\r\n }\r\n ];\r\n\r\n // Register any plugin events.\r\n const pluginEvents = _(this.plugins)\r\n .pickBy(plugin => {\r\n return plugin.hasOwnProperty(\"events\");\r\n })\r\n .map(plugin => {\r\n return { handler: plugin.plugin, events: plugin.events };\r\n })\r\n .value();\r\n\r\n _.forEach(_.concat(gridEvents, pluginEvents), registee => this.handleEventRegistration(registee));\r\n\r\n this.registerHeaderInputEvent();\r\n }", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}" ]
[ "0.6569317", "0.64378154", "0.64097697", "0.638955", "0.6299459", "0.62309885", "0.6179522", "0.60901976", "0.60732734", "0.60716724", "0.5936425", "0.5850297", "0.5826539", "0.57463586", "0.5744016", "0.5737605", "0.57156247", "0.56866515", "0.56789315", "0.5669489", "0.56056595", "0.5577725", "0.5567656", "0.55414224", "0.5541121", "0.5532265", "0.552385", "0.5515558", "0.55112565", "0.5457058", "0.5397228", "0.53955317", "0.53927356", "0.53805876", "0.5361338", "0.5359897", "0.53208053", "0.5295825", "0.5294087", "0.5290938", "0.5280471", "0.5275056", "0.5258765", "0.52580845", "0.52526075", "0.5233753", "0.52320045", "0.5227812", "0.52128094", "0.52093285", "0.5204159", "0.5201652", "0.5171688", "0.5171359", "0.5171359", "0.51705873", "0.5162936", "0.5159095", "0.51395875", "0.51376015", "0.51360846", "0.51309735", "0.51296765", "0.51296765", "0.51296765", "0.5128467", "0.51248103", "0.5124426", "0.51213545", "0.5114263", "0.5095252", "0.50948507", "0.50847656", "0.50843215", "0.5083734", "0.5073232", "0.5060724", "0.50604665", "0.505219", "0.5048488", "0.5048482", "0.5045283", "0.5045283", "0.5045283", "0.5045283", "0.5045283", "0.5045283", "0.50413847", "0.5039389", "0.50366324", "0.5036578", "0.50299436", "0.5028811", "0.5028224", "0.5026892", "0.5023443", "0.5022112", "0.5022112", "0.5022112", "0.5022112", "0.5022112" ]
0.0
-1
Define a SGTeamMember inheriting person and adding new items
function SGTeamMember(first, last, age, gender, rank, role, id, greetingText) { Person.call(this, first, last, age, gender); this.rank = rank; this.role = role; this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTeamMember() {\n SGTeamMember.prototype = Object.create(Person.prototype);\n Object.defineProperty(SGTeamMember.prototype, 'constructor', {\n value: SGTeamMember,\n enumerable: false,\n writable: true });\n\n //Adding a SGTeamMember greeting\n SGTeamMember.prototype.greeting = function () {\n return \"Hi. My name is \" + this.rank + \" \" + this.name.first + \" \"\n + this.name.last + \". I am the \" + this.role + \" of this team.\";\n };\n\n //Instantiate the SGTeamMember object\n var teamMember = new SGTeamMember(document.getElementById(\"first\").value,\n document.getElementById(\"last\").value,\n document.getElementById(\"age\").value,\n document.getElementById(\"gender\").value,\n document.getElementById(\"rank\").value,\n document.getElementById(\"role\").value,\n document.getElementById(\"id\").value);\n\n //Display\n document.getElementById(\"OutputObjCreation\").innerHTML = teamMember.greeting();\n\n}", "function newObjects(person,choice) {\n let addToTeam;\n switch (choice) {\n case 'Manager':\n addToTeam = new Manager(person.name,person.id,person.email,person.office);\n break;\n case 'Intern':\n addToTeam = new Intern(person.name,person.id,person.email,person.school)\n break;\n case 'Engineer':\n addToTeam = new Engineer(person.name,person.id,person.email,person.github)\n break;\n }\n teamMembers.push(addToTeam)\n newMemberChoice();\n}", "function addExistingMember(self) {\n show2ListsMembersContainer(self);\n if (!self.list1) {\n getAllTeamMembers(self);\n } \n }", "function addTeamMembers() {\n inquirer\n .prompt([\n {\n type: 'list',\n name: 'addMembers',\n message: 'please select one of the following options:',\n choices: [\n 'Add an additional Engineer',\n 'Add an Intern',\n \"generate Team!\",\n ],\n },\n ])\n .then(answers => {\n switch (answers.addMembers) {\n case 'Add an additional Engineer': {\n promptEngineer();\n break;\n }\n case 'Add an Intern': {\n promptIntern();\n break;\n }\n case \"generate Team!\": {\n buildTeam();\n break;\n }\n }\n });\n }", "function addTeamMembers() {\n inquirer\n .prompt([\n {\n type: 'list',\n name: 'addMembers',\n message: 'What would you like to do?',\n choices: [\n 'Add an Engineer',\n 'Add an Intern',\n \"I'm all done. Let's see my team!\",\n ],\n },\n ])\n .then(answers => {\n switch (answers.addMembers) {\n case 'Add an Engineer': {\n promptEngineer();\n break;\n }\n case 'Add an Intern': {\n promptIntern();\n break;\n }\n case \"I'm all done. Let's see my team!\": {\n buildTeam();\n break;\n }\n }\n });\n }", "invitePerson (person) {\n if (this.inInvited(person)) return\n var p = new People()\n logger.debug('event.js', 'invitePerson', 'The id of the person being added ' + person.id)\n p.id = person.id\n p.firstName = person.firstName\n p.lastName = person.lastName\n p.nickName = person.nickName\n p.phone = person.phone\n p.address = person.address\n p.email = person.email\n this.invited.push(p)\n }", "function addMember(newmember){\n\t\t\tmembers.create(newmember);\n\t\t}", "function newMember() {\n\tinquirer\n\t\t.prompt([\n\t\t\t{\n\t\t\t\tname: 'empType',\n\t\t\t\ttype: 'list',\n\t\t\t\tmessage: 'Please select member role:',\n\t\t\t\tchoices: ['Engineer', 'Intern', '-- Finish Team --'],\n\t\t\t},\n\t\t])\n\t\t.then((res, err) => {\n\t\t\tif (err) console.error(err);\n\t\t\tswitch (res.empType) {\n\t\t\t\tcase 'Engineer':\n\t\t\t\t\taddEngineer();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Intern':\n\t\t\t\t\taddIntern();\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-- Finish Team --':\n\t\t\t\t\trenderTeam();\n\t\t\t}\n\t\t});\n}", "addTeam (newRank, newName, newVenue, newCity) {\n let newTeam = new Team(newRank, newName, newVenue, newCity)\n// To use for games home rank vs away rank\n this.allTeams.push(newTeam)\n// I know magic number is not a great way to do so, but for this assignment,\n// only have 14 teams, so used magic number\n// rank between 1~7 are in Premiership Division\n if (newRank <= 7) {\n this.allPDTeams.push(newTeam)\n this.allPDRanks.push(newTeam.rank)\n } else {\n// rank between 8~14 are in Championship Division\n this.allCDTeams.push(newTeam)\n this.allCDRanks.push(newTeam.rank)\n }\n }", "function makeTeam() {\n\n inquirer.prompt([\n {\n type: \"list\",\n name: \"memberChoice\",\n message: \"Which type of team member would you like to add?\",\n choices: [\n \"Engineer\",\n \"Intern\",\n \"I don't want to add any more team members\"\n ]\n }\n //brings up prompt that allows user to then choose if they want to add a team member of any of the specified positions\n ]).then(userInput => {\n switch(userInput.memberChoice) {\n //gives user the choice to add employees under different roles\n case \"Engineer\":\n newEngineer();\n break;\n case \"Intern\":\n newIntern();\n break;\n default:\n buildTeam();\n }\n });\n }", "async addMembersToTalk(parent, args, ctx, info) {\n // check login\n if (!ctx.request.userId) {\n throw new Error('You must be logged in to do that!');\n }\n // check that the user is the member of the talk\n // TODO\n\n // add new members\n // transform array of members\n const members = args.members.map(member => ({ id: member }));\n return ctx.db.mutation.updateTalk(\n {\n data: {\n members: {\n connect: members,\n },\n },\n where: {\n id: args.id,\n },\n },\n info\n );\n }", "joinTeam(team) {\n team.members.push(this)\n }", "function addFamilyMember(age, relationshipText, smoker) {\n // used a ternary to account for the boolean nature of checked \n smoker ? smoker = \"(smoker)\" : smoker = \"\" \n var familyList = document.querySelector('ol[class=\"household\"]');\n // creating the new li for each family member \n var newLi = document.createElement(\"li\");\n var text = document.createTextNode(`${relationshipText}: age ${age} ${smoker} `);\n newLi.appendChild(text);\n familyList.appendChild(newLi);\n // adding the delete button for removal later\n var deleteButton = document.createElement(\"button\");\n var deleteText = document.createTextNode(\"X\")\n deleteButton.appendChild(deleteText);\n newLi.appendChild(deleteButton);\n \n // must have a unique ID added onto each li so we can remove the correct family member later\n var attId = document.createAttribute(\"id\"); \n var randomNumberForID = Math.floor(Math.random() * 123456789)\n attId.value = `${relationshipText}-${randomNumberForID}`; \n newLi.setAttributeNode(attId);\n }", "function createTeam() {\n inquirer.prompt([\n {\n type: \"list\",\n name: \"memberChoice\",\n message: \"Which type of team member would you like to add?\",\n choices: [\"Engineer\", \"Intern\", \"I don't want to add any more team members\"]\n }\n ])\n .then(userChoice => {\n switch(userChoice.memberChoice) {\n case \"Engineer\":\n addEngineer();\n break;\n case \"Intern\":\n addIntern();\n break;\n default:\n generateBottom();\n console.log('Successfully Created Team File!') }\n });\n}", "function addMember() {\n inquirer.prompt([\n {\n type: 'list',\n name: 'addMember',\n message: 'What type of member would you like to add?',\n choices: [\"Intern\", \"Engineer\", \"Done, build my team\"]\n },\n\n // switch cases based on what user chooses from list. \n // 'Engineer' returns addEngineer function, 'Intern' returns addIntern function, 'Done' finishes prompt and builds team html page.\n ]).then(res => {\n switch (res.addMember) {\n case 'Engineer':\n return addEngineer();\n\n case 'Intern':\n return addIntern();\n\n case 'Done, build my team':\n return buildTeam();\n\n }\n })\n}", "function GenerateTeam() {\r\n\r\n inquirer.prompt([\r\n {\r\n type: \"list\",\r\n name: \"memberChoice\",\r\n message: \"Please make a team member selection for what you want to add.\",\r\n choices: [\r\n \"Engineer\",\r\n \"Intern\",\r\n \"I don't want to add any more team members\"\r\n ]\r\n }\r\n ]).then(userChoice => {\r\n switch (userChoice.memberChoice) {\r\n case \"Engineer\":\r\n appendEngineer();\r\n break;\r\n case \"Intern\":\r\n appendIntern();\r\n break;\r\n default:\r\n makeTeam();\r\n }\r\n });\r\n }", "function teamMembers() {\n inquirer.prompt({\n type: 'list',\n name: 'member',\n message: 'Would you like to add a new team member?',\n choices: [\"Yes, add an engineer.\", \"Yes, add an intern.\", \"No, I've added everyone on my team.\"]\n }).then(data => {\n if (data.member === \"Yes, add an engineer.\") {\n addEngineer()\n } else if (data.member === \"Yes, add an intern.\") {\n addIntern()\n } else {\n createFile()\n }\n })\n}", "function createTeam() {\n inquirer\n .prompt([\n {\n type: \"list\",\n name: \"teamMemberChoice\",\n message: `What team member would you like to add?`,\n choices: ['Engineer', 'Intern', `I don't have any team members to add.`]\n }\n ])\n .then((answer) => {\n switch (answer.teamMemberChoice) {\n case 'Engineer':\n createEngineer();\n break;\n case 'Intern':\n createIntern();\n break;\n default: buildTeamHtml();\n };\n });\n}", "addPerson() {\n this.people.pushObject(this.personName);\n }", "addPerson(person) {\n return new Item({\n name: this.name,\n date: this.date,\n dueDate: this.dueDate,\n person\n })\n }", "create(name, description = \"\", ownerId, teamProperties = {}) {\r\n const groupProps = {\r\n \"description\": description && description.length > 0 ? description : \"\",\r\n \"[email protected]\": [\r\n `https://graph.microsoft.com/v1.0/users/${ownerId}`,\r\n ],\r\n };\r\n return graph.groups.add(name, name, GroupType.Office365, groupProps).then((gar) => {\r\n return gar.group.createTeam(teamProperties).then(data => {\r\n return {\r\n data: data,\r\n group: gar.group,\r\n team: new Team(gar.group),\r\n };\r\n });\r\n });\r\n }", "function PartyMember(name, atk, str, def, mag, hp, defaultHp, mp, KO) {\n this.name = name;\n this.atk = atk;\n this.str = str;\n this.def = def;\n this.mag = mag;\n this.hp = hp;\n this.defaultHp = defaultHp;\n this.mp = mp;\n this.KO = false;\n}", "function assignMember(e){\n if(e.target.className==\"AssignMembers\"){\n \n var newMember= document.createElement('div');\n \n var selectedOptionIndexValue = document.getElementById(\"boxAssignMembersContent21\")[selectedMemberIndex].value;\n var textNode= document.createTextNode(selectedOptionIndexValue);\n newMember.appendChild(textNode);\n newMember.className=\"newMember\";\n \n e.target.parentElement.appendChild(newMember); \n } \n}", "function addTeam(name, skill){\n let tempTeam = createTeam(name, skill);\n leagueTeams.push(tempTeam);\n}", "addFollowerSpecific() {\n this.definition.extendedType = NSmartContract.SmartContractType.FOLLOWER1;\n\n let ownerLink = new roles.RoleLink(\"owner_link\", \"owner\");\n this.registerRole(ownerLink);\n\n let fieldsMap = {};\n fieldsMap[\"action\"] = null;\n fieldsMap[\"/expires_at\"] = null;\n fieldsMap[FollowerContract.PAID_U_FIELD_NAME] = null;\n fieldsMap[FollowerContract.PREPAID_OD_FIELD_NAME] = null;\n fieldsMap[FollowerContract.PREPAID_FROM_TIME_FIELD_NAME] = null;\n fieldsMap[FollowerContract.FOLLOWED_ORIGINS_FIELD_NAME] = null;\n fieldsMap[FollowerContract.SPENT_OD_FIELD_NAME] = null;\n fieldsMap[FollowerContract.SPENT_OD_TIME_FIELD_NAME] = null;\n fieldsMap[FollowerContract.CALLBACK_RATE_FIELD_NAME] = null;\n fieldsMap[FollowerContract.TRACKING_ORIGINS_FIELD_NAME] = null;\n fieldsMap[FollowerContract.CALLBACK_KEYS_FIELD_NAME] = null;\n\n let modifyDataPermission = new permissions.ModifyDataPermission(ownerLink, {fields : fieldsMap});\n this.definition.addPermission(modifyDataPermission);\n }", "addMember(groupName, memberName) {\n // This will add the memeber to all the groups with the same name.\n this.groups.filter(g => g.name && g.name.toLowerCase() == groupName.toLowerCase())\n .forEach(g => {\n if (g.members == undefined) {\n g.members = [];\n }\n g.members.push(memberName);\n });\n }", "function basicTeamSkillAdd( teamSkillID ){\n var teamSkill = NewTeamSkill( teamSkillID );\n teamSkill['variable'] = teamSkill['preSet']( TEAM_LEADER, TEAM_FRIEND );\n TEAM_SKILL.push( teamSkill );\n}", "function createTeam(){ \n inquirer.prompt([\n {\n type: \"list\",\n name: \"memberChoice\",\n message: \"Which type of team member would you like to add?\",\n choices: [\n \"Engineer\",\n \"Intern\",\n \"I don't want anymore, build the team\"\n ]\n }\n ]).then(userChoice => {\n switch(userChoice.memberChoice){\n case \"Engineer\":\n createEngineer();\n break;\n case \"Intern\":\n createIntern();\n break;\n default:\n buildTeamPage(); \n }\n })\n}", "addPlayer(team) {\n if (team) {\n const index = this.getTeamSpawn(team)\n this.player = this.newPiece({ team, type: 'warrior', player: true, index })\n }\n }", "function addTeamMember (){\n console.log(\"----------\");\n console.log(\"Let's build out your team!\");\n return inquirer.prompt([\n {\n type: \"list\",\n name: \"role\",\n message: \"What role does this team member fulfill?\",\n choices: [\"Manager\", \"Engineer\", \"Intern\", \"The Team Is Complete\"],\n }\n ])\n //this will let them choose\n .then(input => {\n switch(input.role) {\n case \"Manager\":\n enterManager();\n break;\n case \"Engineer\":\n enterEngineer();\n break;\n case \"Intern\":\n enterIntern();\n break;\n case \"The Team Is Complete\":\n render(teamTotal);\n createHtml();\n }\n })\n}", "function generateNewTeamMember() {\n inquirer.prompt([\n { type: \"list\",\n message: \"Which type of team member would you like to add?\",\n name: \"role\",\n choices: [ \n \"Engineer\", \n \"Intern\", \n \"I don't want to add any more team members\",\n ]}])\n .then (response => {\n if (response.role === \"Engineer\"){\n addEngineer();\n } else if (response.role === \"Intern\"){\n addIntern();\n }else{\n // After the user has input all employees desired, call the `render` function (required\n // above) and pass in an array containing all employee objects; the `render` function will\n // generate and return a block of HTML including templated divs for each employee!\n const html = render(employees);\n fs.writeFile(outputPath, html, (err) => {\n if (err) throw err;\n });\n }\n })\n }", "function anotherMember() {\n inquirer\n .prompt([\n {\n type: 'list',\n message: 'Would you like to add another team member?',\n choices: ['Manager', 'Engineer', 'Intern', 'None'],\n name: 'type',\n },\n ])\n .then((response) => {\n switch (response.type) {\n case 'Manager':\n managerQs();\n break;\n case 'Engineer':\n engineerQs();\n break;\n case 'Intern':\n internQs();\n break;\n default:\n generateHTML();\n break;\n }\n });\n}", "addMember(student)\n {\n this._members.push(student);\n }", "function addGroupMember() {\n var userEmail = '[email protected]';\n var groupEmail = '[email protected]';\n var member = {\n email: userEmail,\n role: 'MEMBER'\n };\n member = AdminDirectory.Members.insert(member, groupEmail);\n Logger.log('User %s added as a member of group %s.', userEmail, groupEmail);\n}", "function addPerson () {\n new Person(inputFirst, inputLast, inputPhone, inputEmail);\n\n}", "function createTeam(name, skill) {\n return{\n name: name,\n skill: skill,\n };\n}", "function Team(settings){\n var self = this,\n defaults = {\n name: \"Team\",\n players: []\n };\n\n extend(self, defaults, settings);\n}", "function addMemberToCommunity(isPublic, communityUuid, profileId, joiningText, addMemberToComCallback) {\n\t\t\tvar joinRequest = '',\n\t\t\t\trequestToJoinWithText = '';\n\t\t\tif (isPublic) {\n\t\t\t\tjoinRequest = '<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:app=\"http://www.w3.org/2007/app\" ' +\n\t\t\t\t\t'xmlns:opensearch=\"http://a9.com/-/spec/opensearch/1.1/\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\"> ' +\n\t\t\t\t\t'<contributor> <email>' + ownProfile.ownEmail + '</email> ' +\n\t\t\t\t\t'<snx:userid xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\">' + ownProfile.ownUserId + '</snx:userid>' +\n\t\t\t\t\t'<snx:userState xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\">active</snx:userState>' +\n\t\t\t\t\t'<snx:isExternal xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\">false</snx:isExternal><name>' + ownProfile.getName() + '</name>' +\n\t\t\t\t\t'</contributor> <snx:role xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\" ' +\n\t\t\t\t\t'component=\"http://www.ibm.com/xmlns/prod/sn/communities\">member</snx:role> ' +\n\t\t\t\t\t'<category term=\"person\" scheme=\"http://www.ibm.com/xmlns/prod/sn/type\"> </category> ' +\n\t\t\t\t\t'<snx:orgId xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\">a</snx:orgId> </entry>';\n\t\t\t\tif ((!communityUuid || !profileId) && $.isFunction(addMemberToComCallback)) {\n\t\t\t\t\taddMemberToComCallback.call(this, \"error\", -1);\n\t\t\t\t}\n\t\t\t\t$.ajax({\n\t\t\t\t\turl: X.T.getRootPath(\"Communities\", false) + \"/service/atom/community/members?communityUuid=\" + communityUuid,\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tcontentType: \"application/atom+xml\",\n\t\t\t\t\tdata: joinRequest\n\t\t\t\t}).always(function(xhr, ignore, thrownMessage) {\n\t\t\t\t\tif ((201 === thrownMessage.status) && (profileId === ownProfile.ownUserId) && (communityUuid === savedSettings.communityUuid)) {\n\t\t\t\t\t\tcurrentAccess.isMember = true;\n\t\t\t\t\t}\n\t\t\t\t\tif ($.isFunction(addMemberToComCallback)) {\n\t\t\t\t\t\taddMemberToComCallback.call(this, thrownMessage.responseText, (201 === thrownMessage.status));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\trequestToJoinWithText = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' +\n\t\t\t\t\t'<entry xmlns:thr=\"http://purl.org/syndication/thread/1.0\" xmlns=\"http://www.w3.org/2005/Atom\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\">' +\n\t\t\t\t\t'<title type=\"text\">ignored</title><content type=\"html\">' + joiningText + '</content><contributor> ' +\n\t\t\t\t\t'<email>' + ownProfile.ownEmail + '</email></contributor></entry>';\n\n\t\t\t\t$.ajax({\n\t\t\t\t\turl: X.T.getRootPath(\"Communities\", false) + \"/service/atom/community/requestsToJoin?communityUuid=\" + communityUuid,\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tcontentType: \"application/atom+xml\",\n\t\t\t\t\tdata: requestToJoinWithText\n\t\t\t\t}).always(function(xhr, ignore, thrownMessage) {\n\t\t\t\t\tif ($.isFunction(addMemberToComCallback)) {\n\t\t\t\t\t\taddMemberToComCallback.call(this, thrownMessage.responseText, (201 === thrownMessage.status));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\t\t}", "function pickUpItem(person,weapon){\n person.inventory[person.inventory.length] = weapon;\n hero.inventory[hero.inventory.length] = weapon;\n return person;\n}", "function newMemberInit(name, role, team) {\n inquirer.prompt([{\n name: 'email',\n type: 'input',\n message: `What is ${name}'s email?`\n }]).then((response) => {\n const empEmail = response.email;\n getProperty(name, role, empEmail, team)\n }) \n}", "addRecipients() {\n const personalize = new helper.Personalization();\n this.recipients.forEach(recipient => {\n personalize.addTo(recipient);\n });\n this.addPersonalization(personalize);\n }", "function team() {\n inquirer.prompt([\n {\n type: \"list\",\n name: \"memberType\",\n message: \"What type of employee would you like to add?\",\n choices: [\n \"Engineer\",\n \"Intern\",\n \"I don't require any new employees.\"\n ]\n }\n ]).then(function(data) {\n if (data.memberType === \"Engineer\") {\n engineer();\n } else if (data.memberType === \"Intern\") {\n intern();\n } else (outputTeam());\n \n });\n}", "function displayTeamMember(person, teamContainer) {\r\n const p = document.createElement(\"p\");\r\n p.innerHTML = person.firstName + \" \" + person.lastName + \" \" + howOldwhenjoined(person);\r\n teamContainer.appendChild(p);\r\n}", "function MemberFactory() {\n this.createMember = (name, type) => {\n let member;\n if (type === 'simple') {\n member = new SimpleMembership(name);\n } else if (type === 'standard') {\n member = new StandardMembership(name);\n } else if (type === 'super') {\n member = new SuperMembership(name);\n }\n \n member.type = type;\n \n member.define = function() {\n console.log(`${this.name} (${this.type}: ${this.cost})`);\n };\n return member;\n };\n }", "function displayTeamMemeber(person, teamContainer) {\r\n // creating\r\n const div = document.createElement(\"DIV\");\r\n\r\n // add content\r\n div.innerHTML =\r\n person.lastName + \" \" + person.firstName + \" : \" + caculateTenure(person);\r\n\r\n // add element to the container\r\n teamContainer.appendChild(div);\r\n}", "function addMember() {\n inquirer\n .prompt([\n {\n type: 'input',\n name: 'name',\n message: \"Enter team member's name\",\n default: 'Juan',\n },\n {\n type: 'list',\n name: 'role',\n message: \"Select team member's role\",\n choices: ['Engineer', 'Intern', 'Manager'],\n default: 'Engineer',\n },\n {\n type: 'input',\n name: 'id',\n message: \"Enter team member's id\",\n default: '1',\n },\n {\n type: 'input',\n name: 'email',\n message: \"Enter team member's email address\",\n default: '[email protected]',\n },\n ])\n .then(function ({ name, role, id, email }) {\n let roleInfo = '';\n if (role === 'Engineer') {\n roleInfo = 'GitHub Username';\n } else if (role === 'Intern') {\n roleInfo = 'School Name';\n } else {\n roleInfo = 'Office Number';\n }\n inquirer\n .prompt([\n {\n message: `Enter Team Member's ${roleInfo}`,\n name: 'roleInfo',\n },\n {\n type: 'list',\n message: 'Would you like to add more team members?',\n choices: ['yes', 'no'],\n name: 'moreMembers',\n },\n ])\n .then(function ({ roleInfo, moreMembers }) {\n let newMember;\n if (role === 'Engineer') {\n newMember = new Engineer(name, id, email, roleInfo);\n } else if (role === 'Intern') {\n newMember = new Intern(name, id, email, roleInfo);\n } else {\n newMember = new Manager(name, id, email, roleInfo);\n }\n employees.push(newMember);\n addHtml(newMember).then(function () {\n if (moreMembers === 'yes') {\n addMember();\n } else {\n finishHtml();\n }\n });\n });\n });\n}", "function bob(){\n new Employ(\"Bob Cool\", \"cool\", 200, 40, 30);\n setstats();\n act_money();\n}", "addPlayer(no,firstName,lastName,pos,bat,thw,age,ht,wt,birthplace) {\n let player = {\n No: no,\n firstName: firstName,\n lastName: lastName,\n POS: pos,\n BAT: bat,\n THW: thw,\n AGE: age,\n HT: ht,\n WT: wt,\n birthPlace: birthplace\n };\n //add the each of new player in the list.\n this._players.push(player);\n }", "function testMembers(){\n var members = new Members();\n members.find(\"---Name of test member (guinne pig)--\").sendSlack(\"howdy, in case you wanted to know this function is working\");\n}", "function generateTeamProfile() {\n startHTML();\n addNewEmployee();\n}", "async function buildTeam() {\n try {\n const response = await inquirer.prompt([\n {\n type: \"list\",\n message: \"Add another member? Please select from the options below\",\n name: \"memberType\",\n choices: [\"Manager\", \"Engineer\", \"Intern\", \"Done\"]\n }\n ]);\n switch (response.memberType) {\n case \"Manager\":\n addManager();\n break;\n case \"Engineer\":\n addEngineer();\n break;\n case \"Intern\":\n addIntern();\n break;\n case \"Done\":\n writeHTML(managers, engineers, interns);\n break;\n }\n } catch (err) {\n console.log(err);\n }\n}", "add() {\n this.$mdDialog.hide();\n let roles = [];\n if (this.userRole === 'workspace/admin+developer') {\n roles.push('workspace/admin');\n roles.push('workspace/developer');\n } else {\n roles.push(this.userRole);\n }\n\n this.callbackController.callbackMemberAdd(this.userEmail, roles);\n }", "addMember() {\n var newMember = {id: `member${this.state.members.length}`, name: ''};\n this.setState((prevState) => ({members: [...prevState.members, newMember]}));\n }", "async addUsersToTeam () {\n\t\tawait new AddTeamMembers({\n\t\t\trequest: this.request,\n\t\t\taddUsers: this.invitedUsers.map(userData => userData.user),\n\t\t\tteam: this.team,\n\t\t\tsubscriptionCheat: this.subscriptionCheat // allows unregistered users to subscribe to me-channel, needed for mock email testing\n\t\t}).addTeamMembers();\n\n\t\t// refetch the users since they changed when added to team\n\t\tawait Promise.all(this.invitedUsers.map(async userData => {\n\t\t\tuserData.user = await this.data.users.getById(userData.user.id);\n\t\t}));\n\t}", "function newUser() {\n\tvar mem = document.getElementById(\"newMember\").value;\n\tvar role = document.getElementById(\"newRole\").value;\n\tfor(i = 0; i <= currentProject.members.length; i++){\n\t\tif(i == currentProject.members.length){\n\t\t\tcurrentProject.members[i] = {\n\t\t\t\tname: mem,\n\t\t\t\trole: [role]\n\t\t\t};\n\t\t\tbreak;\n\t\t}\n\t}\n\tdocument.getElementById(\"AddUser\").style.display = \"none\";\n\tpopTable();\n\tdocument.getElementById(\"newMember\").value = \"\";\n\tdocument.getElementById(\"newRole\").value = \"\";\n}", "function personMaker(name, family, role) {\r\n person = {\r\n name: name,\r\n family: family,\r\n role: role,\r\n }\r\n people.push(person);\r\n}", "function MemberFactory (){\n this.createMember = function(name, type){\n let member;\n\n // create object with type\n if (type === 'simple'){\n member = new SimpleMembership(name);\n } else if(type === 'standard'){\n member = new StandardMembership(name);\n } else if( type === 'super'){\n member = new SuperMembership(name);\n }\n\n // add a type in member object\n member.type = type;\n\n member.define = function(){\n console.log(`${this.name} (${this.type}) : ${this.cost}`);\n }\n\n return member;\n }\n}", "function Member(){\n\tthis.dateJoined = 0;\n\tthis.uniqueID = \"\";\n\tthis.recordID = \"\";\n\tthis.emailAddress = \"\";\n\tthis.firstName = \"\";\n\tthis.lastName = \"\";\n\tthis.friendsList = \"\";\n\tthis.setNewUser = function(memberObj){\n\t\tconsole.log(memberObj)\n\t}\n}", "function AddPerson(data) {\n var mapped = ko.utils.arrayMap(data, function (item) {\n return new person(item);\n });\n self.people(mapped);\n }", "function appendFamily(family, type) {\n let htmlTemplate = \"\";\n for (let member of family) {\n htmlTemplate += `\n <article>\n <h4>${member.name}</h4>\n <a href='mailto:${member.mail}'>${member.mail}</a>\n </article>\n `;\n }\n document.querySelector(\"#family-members\").innerHTML = htmlTemplate;\n}", "addMemberItem(astItem) {\n if (astItem.hasAnyIncompleteTypes()) {\n this.reportWarning(`${astItem.name} has incomplete type information`);\n }\n else {\n this.innerItems.push(astItem);\n this._memberItems.set(astItem.name, astItem);\n astItem.notifyAddedToContainer(this);\n }\n }", "function activate() {\n teamMember.member.lead = (teamMember.member.name === 'Jett');\n }", "function addPlayer(self, playerInfo) {\n var spriteName = `${playerInfo.team}`;\n self.ship = new Spaceship(self, playerInfo.x, playerInfo.y, spriteName).ship;\n self.ship.laserGroup = new LaserGroup(self);\n}", "addHealthcareProfessional(userId) {\n // To do\n }", "function MemberFactory() {\n this.createMember = function(name, type) {\n let member;\n\n if(type === 'simple') {\n member = new SimpleMembership(name);\n } else if(type === 'standard') {\n member = new StandardMembership(name);\n } else if(type === 'super') {\n member = new StandardMembership(name);\n }\n\n member.type = type;\n\n member.define = function() {\n console.log(`${this.name} (${this.type}): ${this.cost}`);\n }\n\n return member;\n }\n}", "addMember(member) {\n this.params.beforeAddMember(member);\n this.params.members.push(member);\n this.updateMembersUI();\n this.params.afterAddMember(member);\n }", "function addSkills(mentors, newSkill) {\n mentors.forEach(mentor => mentor.skills.push(newSkill))\n}", "function addColleague(obj, datum, name) {\n //var colleague = datum.avatar;\n\n if ($(this).closest('.gcconnex-work-experience-entry').find(\"[data-guid=\" + datum.guid + \"]\") && $(this).closest('.gcconnex-work-experience-entry').find(\"[data-guid=\" + datum.guid + \"]\").is(\":hidden\")) {\n $(this).closest('.gcconnex-work-experience-entry').find(\"[data-guid=\" + datum.guid + \"]\").show();\n }\n else {\n $(this).closest('.gcconnex-work-experience-entry').find('.list-avatars').append(\n '<div class=\"gcconnex-avatar-in-list temporarily-added\" data-guid=\"' + datum.guid + '\" onclick=\"removeColleague(this)\">' +\n '<div class=\"remove-colleague-from-list\">X</div>' + datum.avatar + '</div>'\n );\n }\n $('.userfind').typeahead('val', ''); // clear the typeahead box\n // remove colleague from suggestible usernames list\n}", "createTeam(properties) {\r\n return this.clone(Group, \"team\").putCore({\r\n body: jsS(properties),\r\n });\r\n }", "createAllignmentGroup() {\r\n //prompt to assign names \r\n let allignment = prompt(\"Enter new allignment group:\");\r\n //array where we keep all our npcs\r\n this.allignmentGroups.push(new AllignmentGroup(allignment));\r\n }", "async publishAddToTeam () {\n\t\t// get the team again since the team object has been modified,\n\t\t// this should just fetch from the cache, not from the database\n\t\tconst team = await this.data.teams.getById(this.team.id);\n\t\tawait new AddTeamPublisher({\n\t\t\trequest: this.request,\n\t\t\tbroadcaster: this.api.services.broadcaster,\n\t\t\tusers: this.invitedUsers.map(userData => userData.user),\n\t\t\tteam: team,\n\t\t\tteamUpdate: this.transforms.teamUpdate,\n\t\t\tuserUpdates: this.transforms.userUpdates\n\t\t}).publishAddedUsers();\n\t}", "function addPeople(name, age, gender, natinalty) {\n return {\n name: name,\n age: age,\n gender: gender,\n natinalty: natinalty\n }\n}", "function newMemberChoice() {\n inquirer.prompt(nextMember).then(answer => {\n if (answer.newMember !== 'No more team members to add') {\n newMemberQuestions(answer.newMember)\n } else {\n fs.writeFile(outputPath,render(teamMembers),err => {\n if (err) throw err;\n console.log('I present to you: the Dream Team');\n });\n }\n })\n}", "function joinTeam(input) { }", "function addTeam(sender_psid, input){\n let [league, name] = input.split(\" \");\n if(!name){\n return sendMessage(sender_psid, {text: \"@addteam <league> <name>\"});\n }\n SportsDataUtils.getTeams(league, (teams)=> {\n teams = teams.filter(team => {\n return team.name.toLowerCase().includes(name.toLowerCase())\n });\n let tiles = teams.map((team) => {\n return {\n \"title\": team.name,\n \"buttons\":[\n {\n \"type\": \"postback\",\n \"title\": \"Add\",\n \"payload\": \"add:\" + league+\":\"+team.name+\":\"+team.city\n }\n ]\n }\n });\n let response = {\n \"attachment\":{\n \"type\":\"template\",\n \"payload\":{\n \"template_type\":\"generic\",\n \"elements\": tiles,\n }\n }\n };\n if (tiles.length === 0){\n response = {\n text: \"No teams match the name you entered\",\n }\n }\n if (tiles.length > 10){\n response = {\n text: \"Too many teams. Enter a more specific name.\",\n }\n }\n sendMessage(sender_psid, response);\n });\n}", "function addFriend (){\n\n}", "function addMember() {\n inquirer.prompt([{\n message: \"Enter team member's name\",\n name: \"name\"\n },\n {\n type: \"list\",\n message: \"Select members role\",\n choices: [\n \"Engineer\",\n \"Intern\",\n \"Manager\"\n ],\n name: \"role\"\n },\n {\n message: \"Enter team members id\",\n name: \"id\"\n },\n {\n message: \"Enter team members email\",\n name: \"email\"\n }])\n .then(function({name, role, id, email}) {\n let roleInfo = \"\";\n if (role === \"Engineer\") {\n roleInfo = \"GitHub username\";\n } else if (role === \"Intern\") {\n roleInfo = \"school name\";\n } else {\n roleInfo = \"office phone number\";\n }\n inquirer.prompt([{\n message: `Enter team members ${roleInfo}`,\n name: \"roleInfo\"\n },\n {\n type: \"list\",\n message: \"Enter more members if needed?\",\n choices: [\n \"yes\",\n \"no\"\n ],\n name: \"more\"\n }])\n .then(function({roleInfo, moreMembers}) {\n let newMember;\n if (role === \"Engineer\") {\n newMember = new Engineer(name, id, email, roleInfo);\n } else if (role === \"Intern\") {\n newMember = new Intern(name, id, email, roleInfo);\n } else {\n newMember = new Manager(name, id, email, roleInfo);\n }\n teamArray.push(newMember);\n addHtml(newMember)\n .then(function() {\n if (moreMembers === \"yes\") {\n addMember();\n } else {\n finishHtml();\n }\n });\n \n });\n });\n}", "async CreateMember(ctx, member) {\n member = JSON.parse(member);\n\n await ctx.stub.putState(\n member.accountNumber,\n Buffer.from(JSON.stringify(member))\n );\n\n let levelData = await ctx.stub.getState(levelKey);\n levelData = JSON.parse(levelData);\n levelData.push({\n accountNumber: member.accountNumber,\n firstName: member.firstName,\n lastName: member.lastName,\n totalPoints: member.totalPoints,\n level: 1\n });\n\n await ctx.stub.putState(levelKey, Buffer.from(JSON.stringify(levelData)));\n\n return JSON.stringify(member);\n }", "function createManager({ name, emailID, employeeId, officeNumber }) {\n const manager = new Manager(name, \"Manager\", emailID, employeeId, officeNumber)\n teamMembers.push(manager)\n buildTeam();\n}", "function createTeam() {\n //create manager add name (validate is not empty), id(validate has numbers), email(validate has email characters), officenumber(validate has numbers),\n function addManager() {\n inquirer.prompt([\n {\n type: \"input\",\n name: \"managerName\",\n message: \"What is the name of your team manager?\",\n validate: (name) => {\n if (name !== \"\") {\n return true;\n }\n return \"Please enter a valid name of at least one character.\";\n }\n },\n {\n type: \"input\",\n name: \"managerId\",\n message: \"What is the ID of your team manager?\",\n validate: (input) => {\n if (input.match(/^[1-9]\\d*$/)) {\n return true;\n }\n return \"Please enter a valid number.\";\n }\n },\n {\n type: \"input\",\n name: \"managerEmail\",\n message: \"What is the Email of your team manager?\",\n validate: (input) => {\n if (input.match(/\\S+@\\S+\\.\\S+/)) {\n return true;\n }\n return \"Please enter a valid email.\";\n }\n },\n {\n type: \"input\",\n name: \"officeNumber\",\n message: \"What is the office number of your team manager?\",\n validate: (input) => {\n if (input.match(/^[1-9]\\d*$/)) {\n return true;\n }\n return \"Please enter a valid number.\";\n }\n }\n ]).then(answers => {\n const manager = new Manager(answers.managerName, answers.managerId, answers.managerEmail, answers.officeNumber);\n teamMembers.push(manager);\n chooseMembers();\n renderTeam();\n });\n }\n\n function chooseMembers() {\n inquirer.prompt([\n {\n type: \"list\",\n name: \"memberChoice\",\n message: \"Which type of team member would you like to add?\",\n choices: [\n \"Engineer\",\n \"Intern\",\n \"I would not like to add any more team members\"\n ]\n }\n ]).then(answer => {\n switch (answer.memberChoice) {\n case \"Engineer\":\n addEngineer();\n break;\n case \"Intern\":\n addIntern();\n break;\n case \"I would not like to add any more team members\":\n break;\n default:\n renderTeam();\n }\n });\n }\n\n //create intern add name (validate has letters), id(validate is number), email(validate has email characters), school (validate has letters)\n function addIntern() {\n inquirer.prompt([\n {\n type: \"input\",\n name: \"internName\",\n message: \"What is the name of your intern?\",\n validate: (name) => {\n if (name !== \"\") {\n return true;\n }\n return \"Please enter a valid name of at least one character.\";\n }\n },\n {\n type: \"input\",\n name: \"internId\",\n message: \"What is the ID of your intern?\",\n validate: (input) => {\n if (input.match(/^[1-9]\\d*$/)) {\n return true;\n }\n return \"Please enter a valid email.\";\n }\n },\n {\n type: \"input\",\n name: \"internEmail\",\n message: \"What is the Email of your intern?\",\n validate: (input) => {\n if (input.match(/\\S+@\\S+\\.\\S+/)) {\n return true;\n }\n return \"Please enter a valid number.\";\n }\n },\n {\n type: \"input\",\n name: \"internSchool\",\n message: \"What is the name of your intern's school?\",\n validate: (input) => {\n if (input !== \"\") {\n return true;\n }\n return \"Please enter a valid school name of at least one character.\";\n }\n },\n ]).then(answers => {\n const intern = new Intern(answers.internName, answers.internId, answers.internEmail, answers.internSchool);\n teamMembers.push(intern);\n chooseMembers();\n renderTeam();\n });\n }\n\n //create engineer, add name (validate has letters), id(validate is number), email(validate has email characters), github name(validate has letters),\n function addEngineer() {\n console.log(\"Adding engineer\");\n inquirer.prompt([\n {\n type: \"input\",\n name: \"engineerName\",\n message: \"What is the name of your engineer?\",\n validate: (name) => {\n if (name !== \"\") {\n return true;\n }\n return \"Please enter a valid name of at least one character.\";\n }\n },\n {\n type: \"input\",\n name: \"engineerId\",\n message: \"What is the ID of your engineer?\",\n validate: (input) => {\n if (input.match(/^[1-9]\\d*$/)) {\n return true;\n }\n return \"Please enter a valid number.\";\n }\n },\n {\n type: \"input\",\n name: \"engineerEmail\",\n message: \"What is the Email of your engineer?\",\n validate: (input) => {\n if (input.match(/\\S+@\\S+\\.\\S+/)) {\n return true;\n }\n return \"Please enter a valid email.\";\n }\n },\n {\n type: \"input\",\n name: \"github\",\n message: \"What is your engineer's github username??\",\n validate: (input) => {\n if (input !== \"\") {\n return true;\n }\n return \"Please enter a valid username of at least one character.\";\n }\n }\n ]).then(answers => {\n const engineer = new Engineer(answers.engineerName, answers.engineerId, answers.engineerEmail, answers.github);\n teamMembers.push(engineer);\n chooseMembers();\n render\n renderTeam();\n });\n }\n\n //renderTeam, check if path exists, and if not, create one. Otherwise, write \n function renderTeam() {\n if (!fs.existsSync(OUTPUT_DIR)) {\n fs.mkdirSync(OUTPUT_DIR)\n }\n try {\n fs.writeFileSync(outputPath, render(teamMembers), \"utf-8\");\n } catch(err) {\n if (err) {\n console.log(err);\n }\n }\n }\n\n addManager()\n}", "function MemberFactory() {\n this.createMember = function (name, type) {\n let member;\n //checking the type that are passd. let we have three types of memberships, a simple membership, a standard membership and a super membership\n // it may be a web hosting application\n\n if (type === 'simple') {\n member = new SimpleMembership(name);\n\n } else if (type === 'standard') {\n member = new StandardMembership(name);\n } else if (type === 'super') {\n member = new SuperMembership(name);\n }\n member.type = type\n\n member.define = function () {\n console.log(`${this.name} ${this.type} : ${this.cost} `)\n }\n return member;\n }\n // now we have to create our constructors for our membership types(subclasses)\n\n}", "function MemberFactory(){\n // this.memberKeeper = [];\n this.createMember = function(name, type){\n let member;\n if(type==='simple'){\n member = new SimpleMember(name);\n // this.memberKeeper.push({username:name, status: type, cost:'5$'});\n console.log(`${name} added`);\n }else if(type==='standart'){\n member = new StandartMember(name);\n // this.memberKeeper.push({username:name, status: type, cost:'15$'});\n console.log(`${name} added`);\n }else if(type==='super'){\n member = new SuperMember(name);\n // this.memberKeeper.push({username:name, status: type, cost:'25$'});\n console.log(`${name} added`);\n }else{\n console.log(`${type} does not exist`);\n }\n return member;\n }\n}", "function newPerson (firstName,lastName,age){\n // adding a new object directly into the array postion `family` is the name of our array \n // we refferance `family` and then in the brackets [family.length] \n // family.length is a way to refferance the length of family. \n family[family.length] = {\n firstName: firstName,\n lastName: lastName,\n age: age,\n };\n}", "function newChatMembers(msg){\n\tif(!('new_chat_members' in msg)) return;\n\tif(msg.from.id == msg.new_chat_members[0].id) return; // someone simply joined without being invited\n\tif(!(msg.from.id in players)){\n\t\tplayers[msg.from.id] = new Player(msg.from,-1);\n\t}\n\tfor(var i = 0; i < msg.new_chat_members.length; i++){\n\t\tplayers[msg.new_chat_members[i].id] = new Player(msg.new_chat_members[i],msg.from.id);\n\t}\n\tsaveData();\n}", "function addMember(){\n // Getting data\n let age = parseInt(document.getElementsByName(\"age\")[0].value, 10);\n let relElem = document.getElementsByName(\"rel\")[0];\n let relationship = relElem.options[relElem.selectedIndex].value;\n let smoker = document.getElementsByName(\"smoker\")[0].checked;\n\n // Checking requirements\n if (age < 0 || Number.isInteger(age) === false) age = null;\n if (relationship === \"\") relationship = null;\n\n // If requirements are fulfilled, add member\n if (age != null && relationship != null) {\n const member = new Member(age, relationship, smoker);\n console.log(\"new member added\");\n householdMembers.unshift(member);\n }\n\n // Reset form and reload household members\n document.getElementsByName(\"age\")[0].value = \"\";\n document.getElementsByName(\"rel\")[0].value = \"\";\n document.getElementsByName(\"smoker\")[0].checked = false;\n reloadMembers();\n}", "function addEligibilityType (user) {\n if (!user.name) {\n user.engageType = 'profile'\n } else {\n user.engageType = 'post'\n }\n\n return user\n}", "function setPeople() {\n}", "function TeamName(name1, name2){\n\tthis.name1 = name1;\n\tthis.name2 = name2;\n}", "function add(info) {\n for (let i of info) {\n let p = makePerson(i[0], i[1], i[2], i[3]);\n people.push(p);\n }\n }", "function memsadd(item, cb) {\n var url = cfg.url + \"project/\"+item.pn+\"/assign\";\n var msg = { userNames: item.unames };\n axios.put(url, msg, axopts).then( (resp) => {\n console.log(\"memadd ok with RP\");\n return cb(null, item.pn);\n }).catch( (ex) => {\n console.log(\"memadd fail with RP\");\n return cb(\"memadd fail with RP\", null);\n });\n }", "function assignTeam (twiml, context, event, payload) {\n log('assignTeam', event);\n return new Promise((resolve, reject) => {\n const {messages} = context;\n let {Digits} = event;\n Digits = parseInt(Digits);\n const {autoTeam, callerId, goToVM, voice} = payload;\n\n // Repeats the teams menu if caller pressed 0\n if (Digits === 0) {\n twiml.redirect(\n generateCallbackURI(\n context,\n {\n callerId,\n goToVM,\n runFunction: 'teamsMenu'\n }\n )\n );\n // If caller enters an invalid selection, the call ends\n } else if (isNaN(Digits) && autoTeam !== true) {\n twiml.say(\n {voice},\n `${messages.invalidResponse} ${messages.goodbye}`\n );\n // Take the appropriate action based on call or message menu\n } else {\n let {teamsArray} = payload;\n\n // Take the caller to voicemail\n if (goToVM === true) {\n if (teamsArray.length === 1) {\n twiml.redirect(\n generateCallbackURI(\n context,\n {\n callerId,\n goToVM,\n runFunction: 'leaveAMessage',\n teamsArray\n }\n )\n );\n } else if (Digits <= teamsArray.length) {\n teamsArray = [teamsArray[Digits - 1]];\n twiml.redirect(\n generateCallbackURI(\n context,\n {\n callerId,\n goToVM,\n runFunction: 'leaveAMessage',\n teamsArray\n }\n )\n );\n // If the caller entered an invalid response, the call ends\n } else {\n twiml.say(\n {voice},\n `${messages.invalidResponse} ${messages.goodbye}`\n );\n }\n // Proceed to attempt to build a list of people on-call\n } else if (teamsArray.length === 1) {\n twiml.redirect(\n generateCallbackURI(\n context,\n {\n callerId,\n goToVM,\n runFunction: 'buildOnCallList',\n teamsArray\n }\n )\n );\n } else if (Digits <= teamsArray.length) {\n teamsArray = [teamsArray[Digits - 1]];\n twiml.redirect(\n generateCallbackURI(\n context,\n {\n callerId,\n goToVM,\n runFunction: 'buildOnCallList',\n teamsArray\n }\n )\n );\n // If the caller entered an invalid response, the call ends\n } else {\n twiml.say(\n {voice},\n `${messages.invalidResponse} ${messages.goodbye}`\n );\n }\n }\n\n resolve(twiml);\n });\n}", "function addEventMember(eventId, memberIndex) {\n var memberName = flashTeamsJSON[\"members\"][memberIndex].role;\n console.log(\"Adding member \", memberName);\n //Update JSON\n var indexOfEvent = getEventJSONIndex(eventId);\n flashTeamsJSON[\"events\"][indexOfEvent].members.push(memberName);\n var numMembers = flashTeamsJSON[\"events\"][indexOfEvent].members.length;\n\n //Grab color of member\n var newColor;\n for (i = 0; i < flashTeamsJSON[\"members\"].length; i++) {\n if (flashTeamsJSON[\"members\"][i].role == memberName) newColor = flashTeamsJSON[\"members\"][i].color;\n }\n\n //Add new line to represent member\n var group = $(\"#rect_\" + eventId)[0].parentNode;\n var thisGroup = d3.select(group);\n thisGroup.append(\"rect\")\n .attr(\"class\", \"member_line\")\n .attr(\"id\", function(d) {\n return \"event_\" + eventId + \"_eventMemLine_\" + numMembers;\n })\n .attr(\"x\", function(d) {\n return parseInt($(\"#rect_\" + eventId).attr(\"x\")) + 8;})\n .attr(\"y\", function(d) {\n return parseInt($(\"#rect_\" + eventId).attr(\"y\")) + 40 + ((numMembers-1)*8);})\n .attr(\"groupNum\", eventId)\n .attr(\"height\", 5)\n .attr(\"width\", function(d) {\n return parseInt($(\"#rect_\" + eventId).attr(\"width\")) - 8;})\n .attr(\"fill\", newColor)\n .attr(\"fill-opacity\", .9);\n}", "function Developer(name,lastName,gender,yearsOfExperience){\n \n //invocar a person que es el objeto que tiene las 3 primeros atributos\n Person.call(this.name,lastName,gender);\n this.yearsOfExperience=yearsOfExperience;\n \n}", "function addMember(board,member) {\n var url = 'https://api.trello.com/1/boards/'\n + board\n + '/members/' \n + member\n + '?allowBillableGuest=false&type=normal&key=[YOUR KEY]&token=[YOUR TOKEN]';\n \n var options =\n {\n \"method\" : \"PUT\", \n \"followRedirects\" : true,\n \"muteHttpExceptions\": true\n };\n \n var response = UrlFetchApp.fetch(url, options);\n return 1;\n}", "function party_create(){\n\n\t//log.error('party_create for '+this.tsid);\n\n\tthis.party = apiNewGroup('party');\n\n\tthis.party.init(this);\n}", "function MemberFactory() {\n this.createMember = function (name, type) {\n let member;\n\n // Checks membership choice\n if (type === \"simple\") {\n member = new SimpleMembership(name);\n } else if (type === \"standard\") {\n member = new StandardMembership(name);\n } else if (type === \"super\") {\n member = new SuperMembership(name);\n }\n\n // assigns membership to new member\n member.type = type;\n\n member.define = function () {\n console.log(`${this.name} (${this.type}): ${this.cost}`);\n };\n\n return member;\n };\n}", "printMemberList() {\n console.log('Member list for ' + this.name)\n// We use the aarow function so that \"this\" takes into account my original object and not part of it\n this.memberList.forEach((member) => {\n console.log(member + ' is invited ' + this.name)\n })\n }", "function createTeam() {\n\n inquirer\n\n // Prompts for user to provide information about employee\n .prompt([\n\n {\n type: \"input\",\n name: \"name\",\n message: \"What is the name of the employee you would like to add?\"\n },\n\n {\n type: \"input\",\n name: \"id\",\n message: \"What is the ID# of this employee?\"\n },\n\n {\n type: \"input\",\n name: \"email\",\n message: \"What is this employee's email address?\",\n \n // source of email validation expression: https://gist.github.com/Amitabh-K/ae073eea3d5207efaddffde19b1618e8\n validate: input => /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(input) \n },\n\n {\n type: \"list\",\n name: \"role\",\n message: \"What is this employee's position?\",\n choices: [\"Manager\", \"Engineer\", \"Intern\"]\n },\n ]).then((answers) => {\n\n // Asks additional prompt depending on the role selected for the employee created, then asks if user wants to create additional user\n switch (answers.role) {\n\n case \"Manager\":\n\n inquirer\n .prompt([\n\n {\n type: \"input\",\n name: \"officeNumber\",\n message: \"What is this manager's office number?\"\n }\n ]).then((answers2) => {\n\n const manager = new Manager(answers.name, answers.id, answers.email, answers2.officeNumber)\n employees.push(manager)\n\n continueTeam()\n })\n break;\n\n case \"Engineer\":\n\n inquirer\n .prompt([\n\n {\n type: \"input\",\n name: \"github\",\n message: \"What is this engineer's github profile link?\"\n }\n ]).then((answers2) => {\n\n const engineer = new Engineer(answers.name, answers.id, answers.email, answers2.github)\n employees.push(engineer)\n\n continueTeam()\n })\n break;\n\n case \"Intern\":\n\n inquirer\n .prompt([\n\n {\n type: \"input\",\n name: \"school\",\n message: \"What school does/did this intern go to?\"\n }\n ]).then((answers2) => {\n\n const intern = new Intern(answers.name, answers.id, answers.email, answers2.school)\n employees.push(intern)\n\n continueTeam()\n })\n break;\n }\n\n })\n}", "function addUserToMembers(project, user, callback) {\n project.addMembers(user, callback);\n }", "constructor(name, numOfStudents, sportsTeams){\n super(name, 'high-school', numOfStudents);\n this._sportsTeams = sportsTeams;\n }" ]
[ "0.6724782", "0.6209222", "0.6193945", "0.6099632", "0.60966015", "0.6056443", "0.6030487", "0.6025743", "0.5891332", "0.58731806", "0.5794426", "0.5742305", "0.5716586", "0.56963354", "0.5684781", "0.5684354", "0.5643509", "0.5604413", "0.55575174", "0.5527613", "0.5505644", "0.5497751", "0.5489752", "0.5489668", "0.5479051", "0.5457949", "0.54348344", "0.54230136", "0.54061747", "0.54023093", "0.5385765", "0.53793985", "0.5346284", "0.53262824", "0.5314774", "0.5303032", "0.52937186", "0.5287405", "0.52846354", "0.5253486", "0.5243136", "0.5241166", "0.52370465", "0.5226956", "0.5218392", "0.5217514", "0.5215402", "0.5198163", "0.5194511", "0.51917595", "0.5182253", "0.51771146", "0.5174382", "0.51680875", "0.51590157", "0.5155614", "0.51416683", "0.5140342", "0.5129312", "0.51288015", "0.5117226", "0.5117142", "0.51167744", "0.51160365", "0.51146805", "0.5104079", "0.50962794", "0.50960237", "0.5094369", "0.50869787", "0.50849307", "0.5074926", "0.5070376", "0.5060558", "0.50523514", "0.5044425", "0.50433904", "0.50382316", "0.5035752", "0.5035578", "0.5028793", "0.50276804", "0.5027216", "0.5024343", "0.50202143", "0.50178975", "0.5011146", "0.50068057", "0.50028104", "0.5001743", "0.49977615", "0.49965265", "0.49953097", "0.49944597", "0.49935418", "0.4992556", "0.4989231", "0.49887624", "0.49768776", "0.49672952" ]
0.64566576
1
This is the inheritance part
function createTeamMember() { SGTeamMember.prototype = Object.create(Person.prototype); Object.defineProperty(SGTeamMember.prototype, 'constructor', { value: SGTeamMember, enumerable: false, writable: true }); //Adding a SGTeamMember greeting SGTeamMember.prototype.greeting = function () { return "Hi. My name is " + this.rank + " " + this.name.first + " " + this.name.last + ". I am the " + this.role + " of this team."; }; //Instantiate the SGTeamMember object var teamMember = new SGTeamMember(document.getElementById("first").value, document.getElementById("last").value, document.getElementById("age").value, document.getElementById("gender").value, document.getElementById("rank").value, document.getElementById("role").value, document.getElementById("id").value); //Display document.getElementById("OutputObjCreation").innerHTML = teamMember.greeting(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inherit(){}", "function inherited() { }", "function SuperclassBare() {}", "function SuperclassBare() {}", "function Derived() {} // private", "function Base() {}", "function inherts(child , parent) {\n child.prototype = Object.create(parent.prototype);\n child.prototype.constructor = child;\n}", "function inheritsFrom(child, parent){\nchild.prototype = Object.create(parent.prototype);\n}", "constructor() {\n\t\tsuper(...arguments);\n\t}", "function BaseClass() {}", "function BaseClass() {}", "function Super () {}", "function Super () {}", "function Base() {\n}", "__previnit(){}", "constructor () { super() }", "function peg$subclass(child,parent){function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor}", "constructor() { super() }", "function peg$subclass(child,parent){function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor();}", "function Base() {\n }", "constructor(name,age,major){\n //this is initialize parent class\n super(name,age);\n this.major=major\n }", "function BaseElement() {\n }", "function example3 () {\n function Animal(name) {\n this.name = name;\n this.speed = 0;\n }\n\n Animal.prototype.run = function(speed) {\n this.speed += speed;\n console.log( this.name + ' бежит, скорость ' + this.speed );\n };\n\n function Rabbit(name) {\n this.name = name;\n this.speed = 0;\n }\n\n Rabbit.prototype = Object.create(Animal.prototype)\n Rabbit.prototype.constructor = Rabbit\n\n Rabbit.prototype.jump = function() {\n this.speed++;\n console.log( this.name + ' прыгает' );\n };\n\n //total overriding\n Rabbit.prototype.run = function () {\n this.speed++\n this.jump()\n }\n\n // extend parent method\n Rabbit.prototype.run = function() {\n Animal.prototype.run.apply(this, arguments) // don't forget about proper context\n this.jump()\n };\n\n var rabbit = new Rabbit('Кроль');\n}", "constructor() {\n\n\t\tsuper();\n\n\t}", "function superClass(...args) {}", "function Child() {}", "function Child() {}", "_init() {\n throw new Error('_init not implemented in child class');\n }", "testInheritance()\n {\n this._testInheritance(jfDataTypeItem, jfDataTypeObject, jfDataTypeObject);\n }", "constructor () {\r\n\t\t\r\n\t}", "function CNodeBase() {\r\n\r\n}", "constructor () {\n // Run super\n super();\n }", "constructor () {\n // Run super\n super();\n }", "constructor() {\n super();\n }", "Pick(){\n throw new Error(\"Pick() method must be implemented in child!\");\n }", "constructor(name, weapon, type){ // Constructor is something only for subclass\n // console.log(this) - js wont allow us to run this in subclass untill we use the super() keyword\n super(name, weapon); // Super calls the super class of elf (Character). It goes up and calls the constructor\n console.log('this from subclass', this)\n this.type = type\n }", "constructor(name, age, major = ''){ //we don't have to set default values used in parent class\n super(name, age); //take values from parent Class (super = parent class object)\n this.major = major;\n }", "function CVBaseElement() {\n }", "initialize() {\n // Needs to be implemented by derived classes.\n }", "function CNodeBase() {\n\n}", "testInheritance()\n {\n this._testInheritance(jfDataTypeCollection, jfDataTypeArray, jfDataTypeBase);\n }", "init() {\n this._super(...arguments);\n }", "function e(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function extend(parent, child){\n child.prototype= Object.create(parent.prototype)\n child.prototype.constructor=child\n }", "constructor() {\n super(...arguments);\n var prototype = Object.getPrototypeOf(this);\n }", "constructor() {\n super(...arguments);\n var prototype = Object.getPrototypeOf(this);\n }", "Use(){\n throw new Error(\"Use() method must be implemented in child!\");\n }", "constructor() {\n\t\tsuper();\n\t}", "constructor() {\n\t\tsuper();\n\t}", "function SuperType() {\n\t \t\t\t\tthis.property = true;\n\t \t\t\t}", "Render(){\n throw new Error(\"Render() method must be implemented in child!\");\n }", "constructor(value){\n //\n //Construct the parent.\n super(value);\n }", "function inheritFrom(subfn,superfn) {\n\tvar r = function () {}\n\tr.prototype = superfn.prototype;\n\tsubfn.prototype = new r();\n}", "constructor() {\n super()\n }", "get base() {\n\t\treturn this.__base;\n\t}", "constructor() {\r\n super();\r\n }", "constructor() {\r\n super();\r\n }", "constructor() {\r\n super();\r\n }", "constructor() {\r\n super();\r\n }", "constructor() {\r\n super();\r\n }", "constructor() {\r\n super();\r\n }", "constructor() {\r\n super();\r\n }", "constructor() {\r\n super();\r\n }", "constructor() {\r\n super();\r\n }", "constructor() {\r\n super();\r\n }", "constructor() {\r\n super();\r\n }", "constructor() {\r\n super();\r\n }", "function inherit(o1, o2){\n\t\to1.prototype = new o2(); //Object.create(o2.prototype);//ie 8 falls over on create\n\t\to1.prototype.constructor = o1;\n\t}", "constructor() {\n super();\n this._init();\n }", "get kind() {\n throw new Error('Sub-class to implement.');\n }", "constructor(legs) //parent class to child class,here the property inherited is legs.\n {\n super(legs)\n this.voice=\"bowbow\";\n }", "_validate() {\n throw new Error('_validate not implemented in child class');\n }", "function i(e,t){function i(){}i.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new i,e.prototype.constructor=e}", "constructor() {\n super()\n }", "constructor() {\n super();\n }", "constructor() {\n super();\n }", "constructor() {\n super();\n }", "constructor() {\n super(); \n }", "update() {\r\n throw new Error('must be set in subclass');\r\n }", "function UHRBase() {\n\n}", "function UHRBase() {\n\n}", "constructor(type, embedded) { super(type,embedded) }", "constructor(papa,mummy,sivlings,belongs,friend_bro_name,f_age,qualification,Job,child){\n super(papa,mummy,sivlings,belongs) \n this.friend_bro=friend_bro_name\n this.bro_age=f_age\n this.b_qualification=qualification\n this.b_job=Job\n this.baby_name=child\n }", "constructor(name,breed,age) { // then we use the constructor as any regular class\n super(name); // now here's smth new, we should use the super() method and pass the parent class arguments in it, and it should be used b4 the this keyword\n this.breed = breed;\n this.age = age;\n }", "function BaseRenderer() {\n }", "function inherit(sub, base) {\n function Inheriter() { }\n Inheriter.prototype = base.prototype;\n sub.prototype = new Inheriter();\n }", "constructor() {\n super();\n \n }", "derive() {\n super.derive();\n\n this.assignToDataset({\n SOPClassUID: DicomMetaDictionary.sopClassUIDsByName.EnhancedSR,\n Modality: \"SR\",\n ValueType: \"CONTAINER\"\n });\n\n this.assignFromReference([]);\n }", "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function ParentConstructor() {\n}", "constructor() {\r\n super()\r\n this.init()\r\n }", "function a(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "constructur() {}", "function SubC() {\n SubC.superconstructor.apply(this, arguments);\n }", "function inherit (base, from) {\n for (var a in from) {\n if (typeof base[a] === 'undefined') {\n base[a] = from[a];\n }\n }\n }", "constructor(){ super('python') }", "constructor(){ super('python') }", "constructor(title, author,pages,technology) { // constructor com as informações cosntantes da nova classe\n super(title,author,pages); // informações herdadas da classe superior\n this.technology = technology; // nova atribuição da nova classe.\n\n }", "constructor()\n {\n super();\n }" ]
[ "0.7472655", "0.74333006", "0.6846257", "0.6846257", "0.6815175", "0.6465893", "0.6360232", "0.6349798", "0.63149935", "0.6283189", "0.6283189", "0.6270408", "0.6270408", "0.62403965", "0.623518", "0.6229648", "0.6184734", "0.6180777", "0.6171984", "0.6165103", "0.6151711", "0.6136391", "0.6113623", "0.61125207", "0.6101308", "0.60911286", "0.60911286", "0.6086024", "0.6042213", "0.6040605", "0.60370743", "0.6033654", "0.6033654", "0.60261244", "0.602267", "0.6021721", "0.60144776", "0.6013881", "0.6010784", "0.60070115", "0.59903103", "0.5984832", "0.5983108", "0.5980893", "0.59762114", "0.59762114", "0.5958431", "0.59296995", "0.59296995", "0.5914967", "0.5905613", "0.58962727", "0.58923066", "0.5890354", "0.5886568", "0.5883759", "0.5883759", "0.5883759", "0.5883759", "0.5883759", "0.5883759", "0.5883759", "0.5883759", "0.5883759", "0.5883759", "0.5883759", "0.5883759", "0.582999", "0.5824691", "0.58221906", "0.5819294", "0.58185637", "0.5811577", "0.58081543", "0.58045846", "0.58045846", "0.58045846", "0.5800008", "0.57984334", "0.5797851", "0.5797851", "0.5795522", "0.5792729", "0.578702", "0.5786923", "0.57823366", "0.5779572", "0.5773427", "0.5770179", "0.5770179", "0.5770179", "0.57686573", "0.57678175", "0.5764476", "0.57586104", "0.5749407", "0.57481784", "0.5746481", "0.5746481", "0.5741539", "0.5740436" ]
0.0
-1
progress and success handlers for media multi uploads
function fileQueued(fileObj) { //var items = jQuery('#media-items').children(); var uploadtitle = '<div class="uploading-item-wrapper"><div class="uploading-item-name clearfix"><span class="filename original">'+fileObj.name+'</span></div></div>'; var uploadprocess = '<div class="progress"><div class="bar"></div></div>'; var uploadinfo = '<div class="uploading-item-info clearfix"><div class="percent">0%</div><div class="filesize"></div></div>'; // Create a progress bar containing the filename jQuery('<div class="uploading-item">').attr( 'id', 'media-item-' + fileObj.id ).append(uploadtitle+uploadprocess+uploadinfo).prependTo( jQuery('#media-items' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleUploads() {\n \n}", "_updateFilesUploadProgress(files, xhr, e) {\n if (!files[0].upload.chunked) // Handle file uploads without chunking\n for (let file of files){\n if (file.upload.total && file.upload.bytesSent && file.upload.bytesSent == file.upload.total) continue;\n if (e) {\n file.upload.progress = 100 * e.loaded / e.total;\n file.upload.total = e.total;\n file.upload.bytesSent = e.loaded;\n } else {\n // No event, so we're at 100%\n file.upload.progress = 100;\n file.upload.bytesSent = file.upload.total;\n }\n this.emit(\"uploadprogress\", file, file.upload.progress, file.upload.bytesSent);\n }\n else {\n // Handle chunked file uploads\n // Chunked upload is not compatible with uploading multiple files in one\n // request, so we know there's only one file.\n let file = files[0];\n // Since this is a chunked upload, we need to update the appropriate chunk\n // progress.\n let chunk = this._getChunk(file, xhr);\n if (e) {\n chunk.progress = 100 * e.loaded / e.total;\n chunk.total = e.total;\n chunk.bytesSent = e.loaded;\n } else {\n // No event, so we're at 100%\n chunk.progress = 100;\n chunk.bytesSent = chunk.total;\n }\n // Now tally the *file* upload progress from its individual chunks\n file.upload.progress = 0;\n file.upload.total = 0;\n file.upload.bytesSent = 0;\n for(let i = 0; i < file.upload.totalChunkCount; i++)if (file.upload.chunks[i] && typeof file.upload.chunks[i].progress !== \"undefined\") {\n file.upload.progress += file.upload.chunks[i].progress;\n file.upload.total += file.upload.chunks[i].total;\n file.upload.bytesSent += file.upload.chunks[i].bytesSent;\n }\n // Since the process is a percentage, we need to divide by the amount of\n // chunks we've used.\n file.upload.progress = file.upload.progress / file.upload.totalChunkCount;\n this.emit(\"uploadprogress\", file, file.upload.progress, file.upload.bytesSent);\n }\n }", "handleSuccessfulUpload(file) {\n const json = JSON.parse(file.xhr.response);\n\n // SilverStripe send back a success code with an error message sometimes...\n if (typeof json[0].error !== 'undefined') {\n this.handleFailedUpload(file);\n return;\n }\n\n this.props.actions.queuedFiles.removeQueuedFile(file._queuedAtTime);\n this.props.actions.gallery.addFiles(json, this.props.count + 1);\n }", "function startChunkUploads( inputItem, progressItem, onFinish )\n{\n return function ( initResults )\n {\n // check and fire up the actual upload\n var blob = inputItem.files[0];\n // lol, const.\n var BYTES_PER_CHUNK = 2 * 1024 * 1024; // 2MB chunk sizes.\n var SIZE = blob.size;\n var start = 0;\n var end = start + BYTES_PER_CHUNK;\n var status = {\n 'pending': Math.ceil( SIZE / BYTES_PER_CHUNK ),\n 'succeeded': 0,\n 'failed': 0,\n totalUploaded: 0\n };\n\n // reset upload bar\n jQuery( progressItem ).addClass( 'display').val( 0 ).attr( 'max', SIZE );\n\n // keep these synchronous for now; the back end server does not take kindly to\n // multiple outstanding requests\n while ( start < SIZE ) {\n end = Math.min( end, SIZE );\n jQuery.ajax( initResults[ 'location' ], {\n async: true,\n accepts: 'application/json',\n type: 'POST',\n error: function( jqXHR, textStatus, errorThrown ) {\n // handle bogus chrome errors\n if ( jqXHR.readyState == 0 ) {\n return;\n }\n jqXHR.bChunkFailed = true;\n },\n complete: function( jqXHR, textStatus ) {\n var cCurrent = --status.pending;\n // because of some bogus chrome errors, we cannot rely on success being called.\n if ( jqXHR.bChunkFailed )\n {\n status.failed++;\n }\n else\n {\n status.succeeded++;\n status.totalUploaded += ( end - start );\n jQuery( progressItem ).val( status.totalUploaded );\n }\n // see if we need to fire the \"all done\" callback\n if ( cCurrent == 0 )\n {\n onFinish( initResults, status );\n jQuery( progressItem ).removeClass( 'display' );\n }\n },\n headers: {\n 'Content-Type': 'application/octet-stream',\n 'Content-Range': 'bytes ' + start + '-' + ( end - 1 ) + '/' + SIZE\n },\n data: blob.slice( start, end ),\n processData: false\n } );\n start = end;\n end = start + BYTES_PER_CHUNK;\n }\n }\n}", "handleUploadFinished(event) {\n\n try {\n const uploadedFiles = event.detail.files;\n //show success toast message \n const evt = new ShowToastEvent({\n title: 'File Upload Status...',\n message: uploadedFiles.length + 'file(s) uploaded successfully.',\n variant: 'success',\n });\n this.dispatchEvent(evt);\n showSuccessMessage(this, `${uploadedFiles.length} file(s) uploaded successfully.`);\n\n let childCmp = this.template.querySelector('c-attachments-viewer');\n if (childCmp) {\n childCmp.refresh(this.recordId);\n }\n } catch (e) {\n showAsyncErrorMessage(this, e);\n }\n }", "function uploadCompleteHandler() {\n console.log(\"Upload finished.\");\n getAllFiles();\n /*\n Do what you like here.\n */\n}", "function progressHandler(e) {\n console.log(\"uploaded \" + e.currentBytes + \" / \" + e.totalBytes);\n}", "function file_upload_handler(files) {\n\tfor(var file,i=0;i<files.length;i++) {\n\t\tfile=files[i];\n\t\twork = {\n\t\t\ttype: 'file',\n\t\t\tpath: file.name,\n\t\t\tstatus: 'prepared',\n\t\t\tfileobj: file\n\t\t};\n\t\tif(!/image\\/(jpeg|png|gif|svg\\+xml)/.test(file.type)) {\n\t\t\twork.status = 'failed';\n\t\t\twork.err = 'wrong_type';\n\t\t\tshow_error(work);\n\t\t}else if(file.size > prop.size_limit) {\n\t\t\twork.status = 'failed';\n\t\t\twork.err = 'size_limit';\n\t\t\tshow_error(work);\n\t\t}else {\n\t\t\twork.qid = queueid++;\n\t\t\tshow_thumbnail(work);\n\t\t\tupload(work);\n\t\t}\n\t}\n}", "function captureSuccess(mediaFiles) {\n var i, len;\n for (i = 0, len = mediaFiles.length; i < len; i += 1) {\n \n\t\t\tvar mediaFile = mediaFiles[i];\n\t\t\tuploadFile(mediaFiles[i]);\n\t\t\t//navigator.notification.alert(mediaFile.fullPath, null, mediaFile.name);\n } \n }", "function onUploadSuccess(scope, event) {\n // if post call failure because of 403 forbidden error,\n if (event.target.status === 403) {\n scope.uploadedFiles = [];\n onUploadError(scope, event);\n return;\n }\n if (window.FormData) { // Check for IE9\n var response = getSuccessResponse(event);\n if (response) {\n scope.uploadedFiles.push(response[0]);\n } else {\n onUploadError(scope, event);\n return;\n }\n }\n Utils.triggerFn(scope.onSuccess, {'$event': event, '$scope': scope});\n if (!scope.multiple) {\n wmToaster.show('success', 'File Uploaded');\n }\n }", "function onMultiUploadClick() {\n var\n i,\n fileElem = document.getElementById('fileMulti');\n\n Y.log('User has ' + fileElem.files.length + ' selected files to upload.', 'info', NAME);\n\n if ((true === singular) && (mediaList.length > 0)) {\n Y.log('no uploading more than one file');\n return;\n }\n\n for (i = 0 ; i < fileElem.files.length; i++) {\n readAndUploadDroppedFile(fileElem.files[i]);\n if (true === singular) { return; }\n }\n\n }", "function queuePhotos(file, index, length) {\n $.ajax({\n url: \"/queue_photos\",\n type: 'POST',\n data: {filename: file.filename, data: file.data},\n success: function(data, status, xhr) {},\n complete: function(data, status, xhr) {\n if (index + 1 === length) { // if this is the last photo\n uploadPhotos();\n }\n }\n });\n }", "function fileDialogComplete(numFilesSelected, numFilesQueued) {\r\n\t//this.startUpload();\r\n\tthis.startResizedUpload(undefined, 1000, 1000, SWFUpload.RESIZE_ENCODING.JPEG, 100);\r\n}", "_errorProcessing(files, message, xhr) {\n for (let file of files){\n file.status = $3ed269f2f0fb224b$export$2e2bcd8739ae039.ERROR;\n this.emit(\"error\", file, message, xhr);\n this.emit(\"complete\", file);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"errormultiple\", files, message, xhr);\n this.emit(\"completemultiple\", files);\n }\n if (this.options.autoProcessQueue) return this.processQueue();\n }", "function startUpload() {\n totalUploaded = filesUploaded = 0;\n uploadNext();\n }", "function onUploadFinished(e) {\n\ttotFileUploaded += document.getElementById('files').files[uploadedFiles].size;\n\tuploadedFiles++;\n\tdebug('complete ' + uploadedFiles + \" of \" + totFileCount);\n\tdebug('totalFileUploaded: ' + totFileUploaded);\n\tif (uploadedFiles < totFileCount) {\n\t\tuploadNextFile();\n\t} else {\n\t\tvar bar = document.getElementById('bar');\n\t\tbar.style.width = '100%';\n\t\tbar.innerHTML = '100 % completed';\n\t\tbootbox.alert('File uploading Finished');\n\t}\n\n}", "_finished(files, responseText, e) {\n for (let file of files){\n file.status = $3ed269f2f0fb224b$export$2e2bcd8739ae039.SUCCESS;\n this.emit(\"success\", file, responseText, e);\n this.emit(\"complete\", file);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"successmultiple\", files, responseText, e);\n this.emit(\"completemultiple\", files);\n }\n if (this.options.autoProcessQueue) return this.processQueue();\n }", "function done() {\n\tupdateProgressById(\"uploadProgress\", 95)\n\n\t// console.log('finished');\n}", "function upload() {\n if (resumable == null)\n resumable = resumableInit(fileInfo, uploadCompleteHandler);\n}", "function upload() {\n fileCount = 0;\n for (var i in fileList) fileCount++;\n\n if (fileList != null) {\n //uploader.setSimUploadLimit(((fileCount > simultaneousUploads) ? simultaneousUploads : fileCount));\n uploader.uploadAll(\"/entry/uploadimage\", \"POST\", { }, \"upload\");\n }\n}", "function action_uploadFilesToServer() {\n // var fileList = [\n // {\n // fileID: timeId + \"_\" + i,\n // fileData: files[i]\n // }\n // ];\n\n\n // create a FormData object which will be sent as the data payload in the\n // AJAX request\n var formData = new FormData();\n\n // add the files to formData object for the data payload\n for(var i in uploadFiles) {\n var oneData = uploadFiles[i];\n outConsole(\"Data\", oneData);\n formData.append('uploads[]', oneData.fileData, oneData.fileData.name + \"_!_\" + userSelf.email);\n }\n\n $.ajax({\n url: '/upload-board',\n type: 'POST',\n data: formData,\n processData: false,\n contentType: false,\n success: function(data){\n action_addImgToBoard(uploadBoardID);\n }\n // , xhr: function() {\n // // create an XMLHttpRequest\n // var xhr = new XMLHttpRequest();\n //\n // // listen to the 'progress' event\n // xhr.upload.addEventListener('progress', function(evt) {\n //\n // if (evt.lengthComputable) {\n // // calculate the percentage of upload completed\n // var percentComplete = evt.loaded / evt.total;\n // percentComplete = parseInt(percentComplete * 100);\n //\n // // update the Bootstrap progress bar with the new percentage\n // $('.progress-bar').text(percentComplete + '%');\n // $('.progress-bar').width(percentComplete + '%');\n //\n // // once the upload reaches 100%, set the progress bar text to done\n // if (percentComplete === 100) {\n // $('.progress-bar').html('Done');\n // }\n //\n // }\n //\n // }, false);\n //\n // return xhr;\n // }\n });\n}", "function success(data) {\n\tupdateProgressById(\"uploadProgress\", 75)\n\tdisplayBasicStats(data);\n}", "completeMultiUpload() {\n var self = this;\n var outputTag = [];\n /*\n here we are constructing the Etag data in the required format.\n */\n self.etag.forEach((data, index) => {\n const obj = {\n ETag: data,\n PartNumber: ++index\n };\n outputTag.push(obj);\n });\n\n var params = {\n Bucket: 'ankurself', // required\n Key: self.filename, // required\n UploadId: self.uploadId, // required\n MultipartUpload: {\n Parts: outputTag\n }\n };\n\n self.s3.completeMultipartUpload(params, function(err, data) {\n if (err) {\n console.log(err, err.stack);\n } // an error occurred\n else {\n self.saveVideoURL(data.Location);\n // initialize variable back to normal\n self.etag = [];\n self.recordedChunks = [];\n self.uploadId = '';\n self.booleanStop = false;\n // self.disableAllButton();\n // self.removeLoader();\n alert('we have successfully saved the questionaire..');\n }\n });\n }", "processQueue() {\n let { parallelUploads: parallelUploads } = this.options;\n let processingLength = this.getUploadingFiles().length;\n let i = processingLength;\n // There are already at least as many files uploading than should be\n if (processingLength >= parallelUploads) return;\n let queuedFiles = this.getQueuedFiles();\n if (!(queuedFiles.length > 0)) return;\n if (this.options.uploadMultiple) // The files should be uploaded in one request\n return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));\n else while(i < parallelUploads){\n if (!queuedFiles.length) return;\n // Nothing left to process\n this.processFile(queuedFiles.shift());\n i++;\n }\n }", "function queueComplete(numFilesUploaded) {\n\tvar status = document.getElementById(\"divStatus\");\n\tstatus.innerHTML = numFilesUploaded + \" 文件\" + (numFilesUploaded === 1 ? \"\" : \"s\") + \" 上传成功.\";\n}", "function uploadFile(file, index) \n {\n\n var status = $(\".status\" + index);\n var fileDiv = $(\".fileDetails\" + index);\n\n var progress_div = $(\"<div>\").\n attr(\"class\", \"upload_progress upload_progress\" + index);\n\n var progress_percent = $(\"<div>\").\n attr(\"class\", \"upload_percent upload_percent\" + index);\n\n fileDiv.append(progress_div);\n progress_div.append(progress_percent); \n\n var fileSize = file.size;\n totalProgress = 0;\n\n // prepare XMLHttpRequest\n var xhr = new XMLHttpRequest();\n xhr.open('POST', destinationUrl, async);\n\n xhr.onload = function() {\n\n var data = $.parseJSON(this.responseText);\n \n if (this.status != \"200\") \n {\n //$(\".progress_content\").addClass(\"hide\");\n status.html(\"A \" + this.status + \" error occured. Try again!\");\n return false;\n }\n \n if (data.status == \"error\") \n {\n //$(\".progress_content\").addClass(\"hide\");\n status.html(\"Error. \" + data.message + \" Try again!\");\n return false;\n }\n else \n {\n // done - no errors\n }\n handleComplete(fileSize, status, index);\n };\n\n xhr.onerror = function() \n {\n //handleComplete(fileSize, status, index);\n }\n\n xhr.upload.onprogress = function(event){\n handleProgress(event, status, fileSize, index);\n }\n\n xhr.upload.onloadstart = function(event) \n {\n\n }\n \n // prepare FormData and send the upload details\n var formData = new FormData(); \n formData.append('myfile', file); \n formData.append('uploadDir', uploadDir); \n xhr.send(formData);\n \n }", "function sendMultipleFiles(handler){\n var length = handler.files.length,\n i = 0,\n onload = handler.onload;\n handler.current = 0;\n handler.total = 0;\n handler.sent = 0;\n while(handler.current < length)\n handler.total += handler.files[handler.current++].fileSize;\n handler.current = 0;\n if(length){\n handler.file = handler.files[handler.current];\n //console.log(handler.file);\n sendFile(handler).onload = function(rpe, xhr){\n if(++handler.current < length){\n handler.sent += handler.files[handler.current - 1].fileSize;\n handler.file = handler.files[handler.current];\n sendFile(handler).onload = arguments.callee;\n } else if(onload) {\n handler.onload = onload;\n handler.onload(rpe, xhr);\n }\n };\n };\n return handler;\n}", "function HttpUploadProgressEvent() { }", "function HttpUploadProgressEvent() { }", "function HttpUploadProgressEvent() { }", "function uploadCallback (data) {\n if (! (data && data.total)) return;\n \n // update the display\n var kbps = Math.floor(data.done / (data.nowtime - data.starttime) / 1024)\n var percent = Math.floor(data.done * 100 / data.total);\n $j(\"#progress-bar\").css('width', percent + \"%\");\n var status = Math.floor(data.done / 1024) + \" kB of \" + Math.floor(data.total / 1024) + \" kB (\" + kbps + \"kB/s), \" + percent + \"% Complete\";\n $j(\"#upload-status\").html(status);\n}", "function uploadFile(i, taskID) {\n var file = files[i];\n var req = new XMLHttpRequest();\n var url = \"Handler/FileHandler.ashx?action=uploadFile&fileType=\" + file.type + \"&taskID=\" + taskID + \"&projectID=\" + projectID;\n var form = new FormData();\n form.append(file.name, file);\n\n req.upload.addEventListener(\"progress\", function (e) {\n //Tracking progress here\n var done = e.position || e.loaded;\n var tempProgress = Math.round(((tempSize + done) / totalSize) * 100);\n if (progress < tempProgress) {\n progress = tempProgress;\n document.getElementById(\"uploadProgress\").style.width = progress + \"%\";\n }\n });\n\n req.onreadystatechange = function () {\n if (req.readyState == 4 && req.status == 200) {\n // Upload completed\n document.getElementById(\"fileList\").innerHTML += req.responseText;\n\n // Send the visual to other clients\n proxyTC.invoke(\"sendUploadedFile\", taskID, req.responseText);\n\n // If the queue still has files left then upload them\n if (i < files.length - 1) {\n tempSize += file.size;\n uploadFile(i + 1, taskID);\n }\n // Otherwise reset back to original state\n else {\n document.getElementById(\"uploadProgressContainer\").style.opacity = 0;\n document.getElementById(\"uploadProgress\").style.width = 0;\n document.getElementById(\"inputFileName\").innerHTML = \"\";\n document.getElementById(\"inputUploadFile\").value = \"\";\n }\n }\n }\n req.open('post', url, true);\n req.send(form);\n}", "function startUpload() {\r\n\r\n\ttotalUploaded = filesUploaded = 0;\r\n\tuploadNext();\r\n\r\n}", "uploadFiles(files) {\n let reader = {};\n for (let f of files) {\n reader = new FileReader();\n reader.onload = this._save(f);\n reader.readAsText(f);\n this.emit(\"updateprogress\");\n }\n }", "uploadSuccess(fileItem, res){\n // 设置好状态\n fileItem.isUploading = false;\n fileItem.isClient = false;\n fileItem.remoteSrc = res;\n\n //抛出消息\n this.dispatch(UploadController.eventTypes.onProgress, 1, fileItem);\n\n if (this.checkIsComplete()) {\n this.dispatch(UploadController.eventTypes.onCompleteUpload, this.getFilesList());\n }\n }", "function onFileUploadProgress(e) {\n\tif (e.lengthComputable) {\n\t\tvar percentComplete = parseInt((e.loaded + totFileUploaded) * 100 / totFileLength);\n\n\t\tif(percentComplete>100)\n\t\t\tpercentComplete = 100;\n\t\tvar bar = document.getElementById('bar');\n\t\tbar.style.width = percentComplete + '%';\n\t\tbar.innerHTML = percentComplete + ' % completed';\n\t\tbootbox.alert('File uploading Finished');\n\t} else {\n\t\tdebug('computation failed');\n\t}\n}", "function processFiles(filelist) {\n\n // loop through each file indivually\n // add some DOM elements so we can keep track of each file \n // check the file size to make sure it's not too big\n // If everything complies, send the AJAX request to upload.\n var numFilesAllowed = (!maxUploads || filelist.length < maxUploads) ? filelist.length : maxUploads;\n\n for(i=0; i<numFilesAllowed; i++)\n {\n\n totalProgress = 0;\n\n var fileInfoDivDetails = $(\"<div/>\").attr(\"class\", \"fileDetails fileDetails\" + i);\n fileInfoDiv.append(fileInfoDivDetails);\n\n // assign some vars from our filelist object\n var filename = filelist[i].name;\n var filesize = filelist[i].size;\n var format = filelist[i].type;\n\n\n var readableSize = humanFileSize(filesize);\n var filemoddate = filelist[i].lastModifiedDate;\n\n // create some DOM elements with the above var values\n var fileNameDiv = $(\"<div/>\").attr(\"class\", \"fileName\")\n .html(filename);\n var filesizeDiv = $(\"<div/>\").attr(\"class\", \"fileSize\")\n .html(readableSize);\n var statusDiv = $(\"<div/>\").attr(\"class\", \"status status\"+i);\n\n // Add the new element to the DOM\n fileInfoDivDetails.append(fileNameDiv);\n fileInfoDivDetails.append(filesizeDiv);\n fileInfoDivDetails.append(statusDiv);\n\n // check if our file is not too big\n if (filesize > maxUploadSize)\n {\n $(\".status\"+i).html(\"Error: File is over the max file size allowed\");\n }\n else if ($.inArray(format, formats) < 0)\n {\n $(\".status\"+i).html(\"Error: Invalid file fomrat.\");\n }\n else \n {\n // the file size is ok, so we can beging to upload the file\n // send an ajax request to the php file to make sure \n // # Todo\n // 1) The directory exists\n // 2) The file name doesn't already exist\n // we want to do this otherwise we're going to upload the file to the tmp dir anyway\n // don't upload to the tmp dir if we have errors!\n uploadFile(filelist[i], i); \n }\n }\n }// end processFiles", "function handleUpload(req, res) {\n var uploadUUID = req.parsedUrl.parsedQuery.upload_uuid;\n if (!uploadUUID || !clientMap[uploadUUID] || clientMap[uploadUUID].state == 'done') {\n logger.error('No valid uploadUUID or multiple request?!?', req);\n clientMap[uploadUUID].state = 'error';\n res.writeHead(200, {'Content-Type': 'text/html'}); \n res.end('No valid uploadUUID, please refresh the page and try again!');\n return;\n }\n\n clientMap[uploadUUID].state = 'progress';\n res.writeHead(200, {'Content-Type': 'text/html'});\n\n req.setEncoding('binary');\n var stream = parseMultipart(req, uploadUUID);\n\n //Check all the prerequisites to find out if we can really store the file!\n\n // This is a sync call so it can actually block! For simplicity purposes in this case, we use\n // this call. This call should never fail because we checked before that the dir can be created\n // but one never knows...\n try {\n var dirName = path.join(__dirname, 'uploads', clientMap[uploadUUID].id);\n fs.mkdirSync(dirName, 0755);\n } catch(err) {\n logger.error('Could not create dir: ' + dirName);\n clientMap[uploadUUID].state = 'error';\n res.end('Sorry, your upload has failed. Could not create directory: ' + dirName);\n return;\n }\n \n var fileStream = null;\n var fileName = null;\n var totalSoFar = 0;\n var fileSize = 0;\n\n \n // Set handler for a request part received\n stream.onPartBegin = function(part) {\n\n fileSize = part.parent.headers['content-length'];\n fileNameUnparsed = stream.part.filename;\n //I have tested the parser and some filenames are not correctly\n //validated... for instance, if they contain ',' no filename\n //appers\n if(typeof stream.part.filename === 'undefined') {\n logger.debug('Closing the stream as couldnt parse the filename');\n res.end('Sorry we could not parse the filename, try again!');\n clientMap[uploadUUID].error = 1;\n stream.close();\n return;\n }\n \n \n //While testing IE on a virtual machine, it does not seem to report the \n //filename properly... reports full path (with unescaped // and \\\\)\n //so we use this to remove all these annoyances\n fileName = fileNameUnparsed.replace(/\\\\/g,'').replace(/\\//g,'').replace(/\\s/g, '');\n\n logger.debug('Trying to create file, name=' + part.name + ', size=' + fileSize + ' filename=' + fileNameUnparsed + ' dir=' + dirName + 'len=' + fileSize + ' parsed=' + fileName, req);\n \n var fullPathFileName = path.join(dirName,fileName);\n logger.debug('File being created at: ' + fullPathFileName);\n fileStream = fs.createWriteStream(fullPathFileName);\n \n fileStream.addListener('error', function(err) {\n logger.error('Got error while writing to file ' + fileName + ': ' + err, req);\n clientMap[uploadUUID].error = 1;\n clientMap[uploadUUID].state = 'error';\n res.end('Sorry, your upload has failed. Could not write to disk... full? Please refresh the page and try again!');\n });\n\n //Add drain (all queued data written) handler to resume receiving request data\n fileStream.addListener('drain', function() {\n try {\n req.resume(); \n } catch(err) {\n clientMap[uploadUUID].error = 1;\n clientMap[uploadUUID].state = 'error';\n logger.error('Sorry, your upload has failed. File too big? ' + err + ' user=' + uploadUUID, req);\n res.end('Sorry, your upload has failed. File too big? ' + err);\n }\n });\n };\n\n stream.onErr = function() {\n logger.error('Error receiving data, client closed the browser?!', req);\n };\n\n // Set handler for a request part body chunk received\n stream.onData = function(chunk) {\n req.pause();\n totalSoFar += chunk.length;\n var percent = (totalSoFar/fileSize*100).toFixed(2);\n\n // Write chunk to file and update progress\n fileStream.write(chunk, 'binary');\n clientMap[uploadUUID].percent = percent;\n };\n\n // Set handler for request completed\n stream.onEnd = function(chunk) {\n // As this is after request completed, all writes should have been queued by now\n // So following callback will be executed after all the data is written out\n logger.debug('Done uploading for: ' + uploadUUID + ' state: ' + clientMap[uploadUUID].state, req);\n if(fileStream && clientMap[uploadUUID].error == 0) {\n fileStream.addListener('drain', function() {\n // Close file stream\n fileStream.end();\n // Handle request completion, as all chunks were already written\n clientMap[uploadUUID].url = ('http://' + serverAddress + ':' + serverPort + '/download?file=' + clientMap[uploadUUID].id + '/' + fileName); \n clientMap[uploadUUID].state = 'url';\n logger.debug('Done uploading file and made it available on: ' + clientMap[uploadUUID].url + ' for client with sessid: ' + uploadUUID, req);\n res.write('Upload successful!');\n res.end();\n });\n } \n };\n}", "function uploadFiles(formData) {\n $.ajax({\n url: '/upload_sample',\n method: 'post',\n data: formData,\n processData: false,\n contentType: false,\n xhr: function () {\n var xhr = new XMLHttpRequest();\n\n // Add progress event listener to the upload.\n xhr.upload.addEventListener('progress', function (event) {\n var progressBar = $('.progress-bar');\n\n if (event.lengthComputable) {\n var percent = (event.loaded / event.total) * 100;\n progressBar.width(percent + '%');\n\n if (percent === 100) {\n progressBar.removeClass('active');\n }\n }\n });\n\n return xhr;\n }\n }).done(handleSuccess).fail(function (xhr, status) {\n alert(status);\n });\n}", "function upload(files, callback){\n let allowedFormats= [\"jpg\", \"jpeg\", \"png\"];\n let maxSize = (1024 * 1024) * 2; //2MB\n for(let i=0; i<files.length; i++){\n let format = files[i][\"name\"].split(\".\").pop();\n if(allowedFormats.indexOf(format) > -1 ){\n let name = files[i][\"name\"];\n let size = files[i][\"size\"];\n\n //img too big\n if(size >= maxSize){\n new Notification(\"Image must be smaller than 2MB\", 8, \"error\").render();\n }\n else{\n new Notification(\"Uploading...\", 15).render();\n var formImage = new FormData();\n formImage.append('image', files[i]);\n var session = getCookie(\"session\");\n if(session !== \"\"){\n formImage.append('sid', session);\n Quas.ajax({\n url: \"/php/upload.php\",\n type: \"POST\",\n data: formImage,\n //contentType:false,\n //cache: false,\n //processData: false,\n success: function(data){\n clearNotifications(\"default\");\n\n if(data.substr(0,3) === \"/i/\"){\n new Notification(\"Uploaded: \" + name, 4, \"success\").render();\n callback(data);\n }\n else{\n new Notification(\"Upload Error\", 8, \"error\").render();\n console.log(\"Upload Error:\"+data);\n }\n }});\n }\n }\n }\n //invalid format\n else{\n new Notification(\"File format must be png or jpeg\", 8, \"error\").render();\n }\n }\n}", "function onUploadComplete(e) {\n totalUploaded += document.getElementById('files').files[filesUploaded].size;\n filesUploaded++;\n debug('complete ' + filesUploaded + \" of \" + fileCount);\n debug('totalUploaded: ' + totalUploaded);\n if (filesUploaded < fileCount) {\n uploadNext();\n } else {\n var bar = document.getElementById('bar');\n bar.style.width = '100%';\n bar.innerHTML = '100% complete';\n }\n }", "function fileQueued(fileObj) {\n\t// Get rid of unused form\n\tjQuery('.media-blank').remove();\n\t// Collapse a single item\n\tif ( jQuery('.type-form #media-items>*').length == 1 && jQuery('#media-items .hidden').length > 0 ) {\n\t\tjQuery('.toggle').toggle();\n\t\tjQuery('.slidetoggle').slideUp(200).siblings().removeClass('hidden');\n\t}\n\t// Create a progress bar containing the filename\n\tjQuery('#media-items').append('<div id=\"media-item-' + fileObj.id + '\" class=\"media-item child-of-' + post_id + '\"><div class=\"progress\"><div class=\"bar\"></div></div><div class=\"filename original\">' + fileObj.name + '</div></div>');\n\t// Display the progress div\n\tjQuery('#media-item-' + fileObj.id + ' .progress').show();\n\n\t// Disable the submit button\n\tjQuery('#insert-gallery').attr('disabled', 'disabled');\n}", "totaluploadprogress () {\n }", "function onUploadProgress(event) {\r\n\t\t\tprog = Math.round(100*(event[\"bytesLoaded\"]/event[\"bytesTotal\"]));\r\n\t\t\tthis.progressReport.innerHTML = \"已上传 \" + prog + \"% ...\";\r\n\t\t}", "function ajax_upload(files) {\t\t\t\t\t\n\t\t\t\t\t$('.progress').removeClass('hidden');\n\t\t\t\t\t$('.progress-bar').css({ \"width\": \"0%\" });\n\t\t\t\t\t$('.progress-bar span').html('0% complete');\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tvar formData = new FormData();\t\t\t\t\t\n\t\t\t\t\t//formData.append('any_var', 'any value');\n\t\t\t\t\tfor (var i = 0; i < files.length; i++) {\n\t\t\t\t\t\t//formData.append('img_file_' + i, files[i]); \n\t\t\t\t\t\tformData.append('img_file[]', files[i]);\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\turl : \"assets/js/upload.php\",\n\t\t\t\t\t\ttype : 'post',\n\t\t\t\t\t\tdata : formData,\n\t\t\t\t\t\tdataType : 'json',\t\t\t\t\t\t\n\t\t\t\t\t\tprocessData: false,\n\t\t\t\t\t\tcontentType: false,\n\t\t\t\t\t\terror : function(request){\n\t\t\t\t\t\t\tajax_msg(false, 'An error has occured while uploading photo.'); \t\t\t\t\t\t\t\t\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess : function(json){\n\t\t\t\t\t\t\tvar img_preview = $('#img-preview');\n\t\t\t\t\t\t\tvar col = '.col-sm-2';\n\t\t\t\t\t\t\t$('.progress').addClass('hidden');\t\n\t\t\t\t\t\t\tvar photos = $('<div class=\"photos\"></div>');\n\t\t\t\t\t\t\t$(photos).html(json.img);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar lt = $(col, photos).length;\n\t\t\t\t\t\t\t$('col', photos).hide();\n\t\t\t\t\t\t\t$(img_preview).prepend(photos.html());\n\t\t\t\t\t\t\t$(col + ':lt('+lt+')', img_preview).fadeIn(2000);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(json.error != '') \n\t\t\t\t\t\t\t\tajax_msg(false, json.error);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tprogress: function(e) {\n\t\t\t\t\t\t\tif(e.lengthComputable) {\n\t\t\t\t\t\t\t\tvar pct = (e.loaded / e.total) * 100;\n\t\t\t\t\t\t\t\t$('.progress-bar').css({ \"width\": pct + \"%\" });\t\n\t\t\t\t\t\t\t\t$('.progress-bar span').html(pct + '% complete');\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tconsole.warn('Content Length not reported!');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\t\t\t\t\t\n\t\t\t\t}", "function onUploadStart(event) {\n\n}", "function upload_files(form_id){\r\n\tvar url = $(\"#\" + form_id).prop(\"action\");\r\n if (url.lastIndexOf(\"master_id\") > 0){\r\n $.getJSON(url, function(files){\r\n var fu = $(\"#\" + form_id).data('blueimpFileupload'), template;\r\n fu._adjustMaxNumberOfFiles(-files.length);\r\n console.log(files);\r\n template = fu._renderDownload(files).appendTo($('#'+ form_id +' .files'));\r\n fu._reflow = fu._transition && template.length && template[0].offsetWidth;\r\n template.addClass('in');\r\n $('#loading').remove();\r\n });\r\n }\r\n\r\n}", "function onUploadComplete(e) {\r\n\ttotalUploaded += document.getElementById('files').files[filesUploaded].size;\r\n\tfilesUploaded++;\r\n\t// debug('complete ' + filesUploaded + \" of \" + fileCount);\r\n\t// debug('totalUploaded: ' + totalUploaded);\r\n\tif (filesUploaded < fileCount) {\r\n\t\tuploadNext();\r\n\t} else {\r\n\t\tvar bar = document.getElementById('bar');\r\n\t\tbar.style.width = '100%';\r\n\t\tbar.innerHTML = '100% complete';\r\n\t\t//notification();\r\n\t}\r\n}", "function finishUpload()\n {\n aws_params.MultipartUpload = {\n Parts: aws_parts \n };\n console.log('Completing...', aws_parts);\n\n s3.completeMultipartUpload(aws_params, function(err, data) {\n if (err) setError('Error completing upload: ' + err);\n else \n { \n uploadDone();\n }\n });\n }", "function queueComplete(numFilesUploaded) {\r\n//\talert('aas');\r\n}", "uploadFile(file, cb) {\n\n function transferComplete(e) {\n if(e.currentTarget.status === 200) {\n var data = JSON.parse(e.currentTarget.response)\n var path = '/media/' + data.name\n cb(null, path)\n } else {\n cb(new Error(e.currentTarget.response))\n }\n }\n\n function updateProgress(e) {\n if (e.lengthComputable) {\n //var percentage = (e.loaded / e.total) * 100;\n //self.documentSession.hubClient.emit('upload', percentage);\n }\n }\n\n var formData = new window.FormData()\n formData.append(\"files\", file)\n var xhr = new window.XMLHttpRequest()\n xhr.addEventListener(\"load\", transferComplete)\n xhr.upload.addEventListener(\"progress\", updateProgress)\n xhr.open('post', this.config.httpUrl, true)\n xhr.send(formData)\n }", "function queueComplete(numFilesUploaded) {\n\tvar status = document.getElementById(\"divStatus\");\n\tstatus.innerHTML = \"已上传 \"+numFilesUploaded + \" 文件\";\n}", "function uploadProfileCovers(el, evt, i_d, mth) {\n\n var input = ga(evt.target);\n var _form_i = input.parent();\n var form_data = new FormData(_form_i[0]);\n\n $.ajax({\n url: _st.uploadCovers, //Server script to process data\n type: 'POST',\n xhr: function() { // Custom XMLHttpRequest\n var Xhr = $.ajaxSettings.xhr();\n if(Xhr.upload) { // Check if upload property exists\n Xhr.upload.addEventListener('progress', function(e) {\n var upload_percentage = ajaxuploadprogress(e);\n\n if(mth === 'slideshow') ga('#photos_sort_slideshow .upload_bar_percent#pbar-' + i_d).css({\n 'width': upload_percentage + '%',\n 'display': 'inline'\n });\n else {\n _form_i.parent().find('.cr_theme_progress_br').css({\n 'width': upload_percentage + '%'\n });\n\n }\n }, false); // For handling the progress of the upload\n }\n return Xhr;\n },\n //Ajax events\n beforeSend: function(jqXHR) {\n if(!validateUpload(input)) {\n jqXHR.abort();\n return displayErr(lang.up_invalid_file_ext.replace('%s', _st.photoTypes));\n } else {\n\n if(mth === 'slideshow')\n ga('#o-' + i_d + ' i').hide();\n else {\n _form_i.parent().find('.cr_theme_progress_br').css({\n 'width': '0%'\n });\n _form_i.find('.cr_th_txt').text(lang.uploading);\n _form_i.find('.ic_theme_from_comp').addClass('_uploading');\n //_form_i.closest('.cr_theme_btn').addClass('_uploading');\n\n }\n\n }\n\n },\n success: function(data) {\n var response = validateJson(data);\n if(response['status'] === 'OK') {\n\n\n if(response.method === 'cover') {\n\n customCoverSet(response.cover_url, response.theme_id);\n\n\n } else {\n\n var _serch_elm = ga('#o-' + i_d);\n _serch_elm.addClass('_noopac').attr('data-sid', response.photoid);\n _serch_elm.find('.attach-photo_del').attr('id', 'slshowim_' + response.photoid);\n readURL(evt, el, '#i-' + i_d, 1);\n setTimeout(function() {\n _serch_elm.find('.upload_bar_percent').fadeOut(1000, function() {\n ga(this).removeAttr('style')\n });\n }, 2000);\n\n }\n\n\n } else return displayErr(data);\n },\n error: function() {\n return displayErr(lang.somethingWrong)\n },\n // Form data\n data: form_data,\n //Options to tell jQuery not to process data or worry about content-type.\n cache: false,\n contentType: false,\n processData: false\n });\n\n\n}", "function uploadLoop(cookie, passCallback, failCallback) {\r\n\t//console.log(\"length:\", chunks.length);\r\n\tfor (var i = 0; i < chunks.length; i++) {\r\n\t\tvar chunk = chunks[i];\r\n\t\tif (i == (chunks.length - 1)) {\r\n\t\t\t//console.log(\"uploading last chunk\");\r\n\t\t\t//last one\r\n\t\t\tuploadchunk(chunk, cookie, i, function () {\r\n\t\t\t //get image info and set uploadedImg to new image\r\n\t\t\t\t// /upload/info\r\n\t\t\t\tvar xhr = new XMLHttpRequest();\r\n\t\t\t\txhr.addEventListener(\"load\", function() {\r\n\t\t\t\t\tif (this.status == 200) {\r\n\t\t\t\t\t\t//Successful request\r\n\t\t\t\t\t\tvar json = JSON.parse(this.responseText);\r\n\t\t\t\t\t\tsuccess = json.success;\r\n\t\t\t\t\t\tpath = json.path;\r\n\t\t\t\t\t\t//console.log(\"Success\",success,\"path\",path);\r\n\t\t\t\t\t\t//setTestImage(path);\r\n\t\t\t\t\t\t//var end = new Date();\r\n\t\t\t\t\t\t//alert('It took ' + (end - start) + ' ms.');\r\n\t\t\t\t\t\tif (passCallback != null) {\r\n\t\t\t\t\t\t\tpassCallback(path);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (this.status == 400) {\r\n\t\t\t\t\t\t//API error\r\n\t\t\t\t\t\tvar json = JSON.parse(this.responseText);\r\n\t\t\t\t\t\talert(\"failed to upload\");\r\n\t\t\t\t\t\t//console.log(\"error\", json.error);\r\n\t\t\t\t\t\tif (failCallback != null) {\r\n\t\t\t\t\t\t\tfailCallback();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t//console.log(\"statusCode\", this.status);\r\n\t\t\t\t\t\talert(\"super failed to upload\");\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\txhr.open(\"POST\", url3);\r\n\t\t\t\t//console.log(\"Sending request to\", url3);\r\n\t\t\t\t//console.log({cookie : cookie, uploadid : uid});\r\n\t\t\t\txhr.send(JSON.stringify({cookie : cookie, uploadid : uid}));\r\n\t\t\t});\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//upload like normal\r\n\t\t\t//console.log(\"uploading normal chunk\");\r\n\t\t\tuploadchunk(chunk, cookie, i, null);\r\n\t\t}\r\n\t}\r\n}", "function onUploadComplete(event) {\r\n\t\t\tthis.progressReport.innerHTML = \"上传完毕\";\r\n\t\t}", "function streamUploadProgress(evt, progressBarContainer) {\r\n if (evt.lengthComputable) {\r\n var percentComplete = Math.round(evt.loaded * 100 / evt.total);\r\n\r\n if (percentComplete < 100)\r\n FileUploadUtil.updateProgressBar(progressBarContainer, percentComplete);\r\n }\r\n else {\r\n console.error('Unable to compute file upload progress');\r\n }\r\n }", "function HttpUploadProgressEvent() {}", "function HttpUploadProgressEvent() {}", "function upload()\n{\n\t// indicate that the uploading is starting.\n\t$element = $('.photo-display .progress-element').addClass('uploading');\n\t\n $(\"#photo-upload\").submit();\n}", "function queueComplete(numFilesUploaded) {\n\t//var status = document.getElementById(\"divStatus\");\n\t//status.innerHTML = numFilesUploaded + \" file\" + (numFilesUploaded === 1 ? \"\" : \"s\") + \" uploaded.\";\n}", "function queueComplete(numFilesUploaded) {\n\t//var status = document.getElementById(\"divStatus\");\n\t//status.innerHTML = numFilesUploaded + \" file\" + (numFilesUploaded === 1 ? \"\" : \"s\") + \" uploaded.\";\n}", "function parsemult(){\n // let upload = mul({storage: storage, fileFilter: helpers.imageFilter}).single('passport');\n // upload(req, res, function(err){\n // if (req.fileValidationError) {\n // throw err(req.fileValidationError);\n // }\n // else if (!req.file) {\n // return console.log('Please select an image to upload');\n // }\n // else if (err instanceof multer.MulterError) {\n // return res.send(err);\n // }\n // else if (err) {\n // return res.send(err);\n // }\n \n // })\n res.send('This function is still in progress')\n }", "function uploadRawFile(player, playlistId) {\n //recursive method, jums from the first file to the last one\n var file = null;\n if (player == \"0\") {\n if (currentUploadedFileIndex < files0ToUpload.length) {\n file = files0ToUpload[currentUploadedFileIndex];\n }\n }\n else {\n if (currentUploadedFileIndex < files1ToUpload.length) {\n file = files1ToUpload[currentUploadedFileIndex];\n }\n }\n if (file != null) {\n var data = new FormData();\n data.append(file.name, file);\n\n $.ajax({\n type: \"POST\",\n url: \"/Home/UploadPlaylistItem?playlistId=\" + playlistId,\n contentType: false,\n processData: false,\n data: data,\n success: function (result) {\n\n for (var i = 0; i < player_playlist[player].playlist.length; i++) {\n if (player_playlist[player].playlist[i].id == \"-1\" && player_playlist[player].playlist[i].name == file.name) {\n player_playlist[player].playlist[i].id = result;\n }\n }\n //go to next song\n currentUploadedFileIndex += 1;\n uploadRawFile(player, playlistId);\n },\n error: function (error) {\n alert('Error while creating the playlist: ' + error.statusText);\n console.log(error.responseText);\n currentUploadedFileIndex = 0;\n $('#modal2').modal('hide');\n //$.magnificPopup.close();\n }\n });\n }\n else {\n if (player == \"0\") {\n files0ToUpload = [];\n }\n else {\n files1ToUpload = [];\n }\n currentUploadedFileIndex = 0;\n $('#modal2').modal('hide');\n //$.magnificPopup.close();\n alert(\"Changes were saved succesfully\");\n }\n}", "function saveMultiPart() {\n var _URL;\n console.log(\"With file\");\n // to trigger a reload, make it different\n rayv.currentItem.img = true;\n // if a file is present\n // resize it\n // multipart form with image upload\n var img = new Image();\n //_URL = window.URL || window.webkitURL;\n img.onload = function () {\n canvasResize(file, {\n width: 288,\n height: 0,\n crop: false,\n quality: 80,\n callback: function (data, width, height) {\n // Create a new form-data\n // Add file data\n var f = canvasResize('dataURLtoBlob', data);\n f.name = file.name;\n $.ajax({\n url: '/item',\n data: build_form(f),\n dataType: 'json',\n cache: false,\n contentType: false,\n processData: false,\n type: 'POST',\n success: save_success_handler,\n error: function (a, b, c) {\n BB.hide_waiting();\n console.error(\n 'saveMultiPart /item: ' + b + ', ' + c);\n }\n });\n// var fd = build_form(f);\n// var xhr = new XMLHttpRequest();\n// xhr.open('POST', '/item', true);\n// xhr.setRequestHeader(\"X-Requested-With\",\n// \"XMLHttpRequest\");\n// xhr.setRequestHeader(\"pragma\", \"no-cache\");\n// // File uploaded\n// xhr.addEventListener(\"load\", save_success_handler);\n// // Send data\n// xhr.send(fd);\n }\n\n });\n };\n _URL = window.URL || window.webkitURL;\n img.src = _URL.createObjectURL(file);\n }", "processFiles(files) {\n for (let file of files){\n file.processing = true; // Backwards compatibility\n file.status = $3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING;\n this.emit(\"processing\", file);\n }\n if (this.options.uploadMultiple) this.emit(\"processingmultiple\", files);\n return this.uploadFiles(files);\n }", "function ajaxFileTabUpload(file, directory, done, index) {\n var _readChunk = function(reader, file, nextChunk, size, loadFunc, errorFunc) {\n reader.onload = loadFunc;\n reader.onerror = errorFunc;\n\n var start = nextChunk * size;\n console.log(\"Reading \"+index+\" from \" + start + \" to \" + (start + size) + \" \" +reader.readyState);\n var blob = file.slice(start, start + size);\n \n reader.readAsArrayBuffer(blob);\n };\n\n // Init the file reader\n \n\n var path = directory + encodeURIComponent(file.name); // The full url of the uploaded file\n// var step = 1024*1024*100; // The chunk size - 100MB\n var step = 1024*1024*100; // XXXX MUST RESET-low value for testing The chunk size - 1MB\n var total = file.size; // The total file size\n var totalChunks = Math.ceil(total / step); // Total number of chunks in file\n var nextChunk = 0; // Index of the next chunk\n var eventQueue = []; // The queue of events to execute\n \n var runningEvents = []; // the N currently running events\n var completedEvents = []; // the list of events that are finished\n var maxParallelEvents = 3; // The max parallel events\n var completedEvents2 = Object();\n \n var eventComplete = true ; // Flag for if the current event is complete\n var eventError = null; // Flag for if the event has encountered an error\n var token = null; // The token for this upload resource\n var totalQueue = null; // The total events that were in the queue\n\n var uploadToasterFile = $(\".upload-toaster-file[name='\" + escapeJquerySelector(file.name) + \"']\");\n var progressbar = uploadToasterFile.find(\".upload-toaster-file-progress\");\n // Set the cancel button functionality\n uploadToasterFile.find(\".upload-toaster-file-cancel\")\n .click(function() {\n \tr.cancel();\n // Set the progressbar cancel message\n progressbar.progressbar(\"value\", 100);\n progressbar\n .find(\".ui-progressbar-value\")\n .css(\"background\", \"#FCF1F3\");\n progressbar\n .find(\".upload-toaster-file-progress-label\")\n .text(\"Canceled!\");\n\n // Mark this upload as done\n eventError = \"Upload canceled\";\n });\n\n var _setPercentComplete = function() {\n var percent = 100 - Math.floor((eventQueue.length / totalQueue) * 100);\n progressbar.progressbar(\"value\", percent);\n };\n\n // Populate the event queue\n\n // Read the first chunk - Done now so we can detect error states early\n var reader1 = new FileReader();\n \n var readChunk1 = function() {\n \t_readChunk(reader1, file, nextChunk, step,\n function() {\n eventComplete = true;\n _setPercentComplete();\n },\n function() {\n eventError = \"Read Error: This could be because your connection closed during the \" +\n \"upload or it could be because you were trying to upload a directory. Aborting upload.\";\n });\n }\n readChunk1.gpeventName = 'readChunk1';\n readChunk1.gpdoParallel= false;\t\n eventQueue.push(readChunk1);\n\n function createUploadPath()\n {\n $.ajax({\n type: \"POST\",\n url: \"/gp/rest/v1/upload/multipart/?path=\" + encodeURIComponent(path) + \"&parts=\" + totalChunks + \"&fileSize=\" + file.size,\n success: function(data) {\n eventComplete = true;\n token = data['token'];\n _setPercentComplete();\n completedEvents2[checkQuota.gpeventName] = true;\n },\n error: function(data) {\n eventError = data;\n }\n });\n }\n\n // Create the upload resource\n var checkQuota = function() {\n checkDiskQuota(function(diskInfo)\n {\n var validateObj = validateDiskQuota(diskInfo, file.size);\n if(validateObj.error === false)\n {\n createUploadPath();\n }\n else\n {\n eventError = validateObj.message;\n }\n });\n \n }\n checkQuota.gpdoParallel=false;\n checkQuota.gpeventName=\"check quota\";\n completedEvents2[checkQuota.gpeventName] = false;\n eventQueue.push(checkQuota);\n\n // Add the first PUT (since we have already read it in)\n var pushChunk1 = function() {\n var uploadPayload = new Uint8Array(reader1.result);\n $.ajax({\n type: \"PUT\",\n dataType: \"arraybuffer\",\n processData: false,\n contentType: false,\n data: uploadPayload,\n url: \"/gp/rest/v1/upload/multipart/?path=\" + encodeURIComponent(path) + \"&token=\" + encodeURIComponent(token) + \"&index=\" + nextChunk + \"&parts=\" + totalChunks,\n success: function() {\n nextChunk++;\n _setPercentComplete();\n completedEvents2[pushChunk1.gpeventName] = true;\n },\n error: function(data) {\n eventError = data;\n }\n });\n \n }\n pushChunk1.gpeventName = 'pushChunk1';\n pushChunk1.gpdoParallel= true;\t\n completedEvents2[pushChunk1.gpeventName] = false;\n eventQueue.push(pushChunk1);\n \n \n\n // Add the remaining reads then PUTs\n for (var i = 1; i < totalChunks; i++) {\n \tx = i;\n \tconsole.log(x);\n \t\n // Then upload it\n var pushChunk = function() {\n \tchunkindex = arguments.callee.gpindex;\n \tconsole.log(\"Pushing \" + chunkindex);\n \tvar reader = new FileReader();\n \t reader.onloadend = function() {\n \t console.log(\"ready with \" + chunkindex);\n \t var uploadPayload = new Uint8Array(reader.result);\n \t \n $.ajax({\n type: \"PUT\",\n dataType: \"arraybuffer\",\n processData: false,\n contentType: false,\n data: uploadPayload,\n url: \"/gp/rest/v1/upload/multipart/?path=\" + encodeURIComponent(path) + \"&token=\" + encodeURIComponent(token) + \"&index=\" + chunkindex + \"&parts=\" + totalChunks,\n success: function() {\n \n _setPercentComplete();\n completedEvents2['pushChunk'+chunkindex] = true;\n },\n error: function(data) {\n eventError = data;\n }\n });\n \n \t \n \t };\n \treader.onerror = function() {\n \t console.log(reader.error.message);\n \t };\n \t_readChunk(reader, file, chunkindex, step,\n function() {\n //eventComplete = true;\n _setPercentComplete();\n },\n function() {\n eventError = \"Uploading directories is not supported. Aborting upload.\";\n });\n \t\n }\n pushChunk.gpindex = i;\n pushChunk.gpeventName = 'pushChunk'+i;\n pushChunk.gpdoParallel= true;\t\n completedEvents2['pushChunk'+i] = false;\n eventQueue.push(pushChunk)\n }\n\n // Add the check to make sure everything is uploaded\n var finalCheck = function() {\n $.ajax({\n type: \"GET\",\n url: \"/gp/rest/v1/upload/multipart/?path=\" + encodeURIComponent(path) + \"&token=\" + encodeURIComponent(token) + \"&parts=\" + totalChunks,\n success: function(data) {\n var missing = data['missing'];\n if (missing.length > 0) {\n eventError = \"Parts missing: \" + missing;\n }\n else {\n eventComplete = true;\n _setPercentComplete();\n completedEvents2['finalCheck'] = true;\n }\n },\n error: function(data) {\n eventError = data;\n }\n });\n }\n finalCheck.gpeventName='finalCheck';\n finalCheck.gpdoParallel=false;\n completedEvents2['finalCheck'] = false;\n eventQueue.push(finalCheck);\n\n // Add the command to assemble the file\n var assemble = function() {\n progressbar\n .find(\".upload-toaster-file-progress-label\")\n .text(\"Assembling File...\");\n progressbar.attr(\"title\", \"Please wait... For large files this could take several minutes...\");\n progressbar.tooltip();\n $.ajax({\n type: \"POST\",\n url: \"/gp/rest/v1/upload/multipart/assemble/?path=\" + encodeURIComponent(path) + \"&token=\" + token + \"&parts=\" + totalChunks,\n success: function(data) {\n eventComplete = true;\n token = data['token'];\n completedEvents2['assemble'] = true;\n //update the disk usage\n initStatusBox();\n },\n error: function(data) {\n eventError = data;\n }\n });\n }\n assemble.gpeventName=\"assemble\";\n assemble.gpdoParallel = false\t;\n completedEvents2['assemble'] = false;\n eventQueue.push(assemble);\n\n // Add the event to mark this upload as done\n var finishUI = function() {\n progressbar.progressbar(\"value\", 100);\n done[index] = true;\n eventComplete = true;\n completedEvents2['finishUI'] = true;\n }\n finishUI.gpeventName=\"finishUI\";\n finishUI.gpdoParallel = false;\n eventQueue.push(finishUI)\n completedEvents2['finishUI'] = false;\n \n // Execute the event queue\n var _checkEventQueue = function() {\n if (eventError !== null) { // OH SHIT - There's an error\n if (typeof eventError === 'object') {\n eventError = eventError.responseText;\n }\n\n // Set the top error message\n showErrorMessage(eventError);\n\n // Set the progressbar error message\n progressbar.progressbar(\"value\", 100);\n progressbar\n .find(\".ui-progressbar-value\")\n .css(\"background\", \"#FCF1F3\");\n progressbar\n .find(\".upload-toaster-file-progress-label\")\n .text(\"Error!\");\n\n // Mark this upload as done\n done[index] = true;\n return;\n }\n\n \n \n // remove any that have completed from the running list\n for (var i = 0; i < runningEvents.length; i++) {\n \tevent = runningEvents[i];\n \t\n \tif ( completedEvents2[event.gpeventName] == true )\t{}\n \t\tconsole.log(\"Event completed \"+ event.gpeventName)\n\t \trunningEvents = runningEvents.filter( function( el ) {\n\t \t\t\t return (el != event);\n\t \t} ); \t\t\n \t\tcompletedEvents.push(event);\n \t}\n \n \n // if the next event says doParallel is OK\n // then start the next event\n \n var event = eventQueue.shift(); // Get the next event\n \n \n if (event !== null && event !== undefined) {\n \tsingleOK = (event.gpdoParallel == false) && (runningEvents.length == 0);\n \tanotherParallel = (event.gpdoParallel ==true ) && (runningEvents.length < maxParallelEvents)\n \tlaunchAnotherEvent = singleOK || anotherParallel;\n \n \tif (launchAnotherEvent){\n \t\trunningEvents.push(event);\n \t\t\n \tevent(); \n \t} else {\n \t\t// put the event back until later\n \t\teventQueue.unshift(event)\n \t}\n \t\n } \t\n if ((eventQueue.length > 0) || (runningEvents.length > 0)) {\n setTimeout(_checkEventQueue, 1000); // Check the event queue again in a bit\n }\n \n \n };\n\n totalQueue = eventQueue.length;\n _checkEventQueue();\n}", "function addUploadItems()/*:void*/ {\n var uploadContainer/*:Container*/ =AS3.as( this.queryById(com.coremedia.cms.editor.sdk.upload.dialog.UploadProgressDialog.PROGRESS_LIST), Ext.container.Container);\n for (var i/*:int*/ = 0; i < AS3.getBindable(this,\"files\").length; i++) {\n var progressContainer/*:UploadProgressContainer*/ = new com.coremedia.cms.editor.sdk.upload.dialog.UploadProgressContainer(AS3.cast(com.coremedia.cms.editor.sdk.upload.dialog.UploadProgressContainer,{\n file: AS3.getBindable(this,\"files\")[i],\n folder: AS3.getBindable(this,\"folder\"),\n settings: AS3.getBindable(this,\"settings\"),\n callback:AS3.bind( this,\"uploadActiveItem\")\n }));\n uploadContainer.add(progressContainer);\n this.uploadContainers$zpGw.push(progressContainer);\n }\n }", "function uploadSingleFile(file, progressBarSingle, progressBarMain, totalFileSize, filesSizePushToServer, startUploadButton, serverURL, createSingleFileItemFromServer, ul, fileID, createListFilesOnServer, StoreListOfFilesOnServer) {\n var progressBarSingleItem = progressBarSingle;\n var progressBarMainVar = progressBarMain;\n var formData = new window.FormData();\n formData.append('uploads[]', file, file.name); // console.log(totalFileSize);\n // console.log(filesSizePushToServer);\n\n var totalPercentage = parseInt(filesSizePushToServer / totalFileSize * 100, 10);\n var xhr = new window.XMLHttpRequest();\n xhr.open('POST', serverURL, true);\n xhr.upload.addEventListener('progress', function (evt) {\n if (evt.lengthComputable) {\n // calculate the percentage of upload completed\n var percentComplete = evt.loaded / evt.total;\n percentComplete = parseInt(percentComplete * 100, 10); // console.log(percentComplete);\n // update the Bootstrap progress bar with the new percentage\n\n progressBarSingleItem.setAttribute('style', \"width: \".concat(percentComplete, \"%\"));\n progressBarSingleItem.innerHTML = \"\".concat(percentComplete, \" %\");\n progressBarMainVar.setAttribute('style', \"width: \".concat(totalPercentage, \"%\"));\n progressBarMainVar.innerHTML = \"\".concat(totalPercentage, \" %\"); // once the upload reaches 100%, set the progress bar text to done\n\n if (percentComplete === 100) {\n progressBarSingleItem.innerHTML = 'Done';\n }\n }\n });\n xhr.send(formData);\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState !== 4) {\n return;\n }\n\n if (xhr.status !== 200) {\n console.log(\"\".concat(xhr.status, \": \").concat(xhr.statusText));\n } else {\n startUploadButton.setAttribute('disabled', 'disabled');\n var responseFromServer = JSON.parse(xhr.response);\n StoreListOfFilesOnServer = createListFilesOnServer(StoreListOfFilesOnServer, responseFromServer);\n console.dir(responseFromServer);\n setTimeout(createSingleFileItemFromServer, 1000, ul, responseFromServer, fileID);\n console.log('upload successful!\\n');\n }\n };\n}", "function createMediaOptions(elementId){\n var $element = $('#' + elementId);\n var $attributes = $element.parents('.form-elements');\n \n var filedata = document.getElementById(elementId);\n var formData = new FormData();\n var i = 0, len = filedata.files.length, file;\n for (i; i < len; i++) {\n file = filedata.files[i];\n formData.append(\"file[]\", file);\n }\n $.ajax({\n url: BASE_URL + '/forms/options-media-upload',\n type: 'POST',\n data: formData,\n xhr: function() {\n var xhr = $.ajaxSettings.xhr();\n \n xhr.upload.onprogress = function(ev) {\n if (ev.lengthComputable) {\n var progress = $element.parent().find('.progress .progress-bar');\n var percentComplete = parseInt((ev.loaded / ev.total) * 100);\n \n progress.css('width', percentComplete + '%');\n progress.text(percentComplete + '%');\n if (percentComplete === 100) {\n progress.removeClass('progress-bar-info progress-bar-striped active').addClass('progress-bar-success');\n setTimeout(function(){\n $element.parent().find('.progress').fadeOut(1000, function() { \n $(this).remove();\n });\n }, 2000);\n \n }\n }\n };\n\n return xhr;\n// if(myXhr.upload){\n// myXhr.upload.addEventListener('progress',progress, false);\n// }\n },\n dataType: 'json',\n cache: false,\n contentType: false,\n processData: false,\n beforeSend: function(){\n $element.parent().append('<div class=\"progress\"><div class=\"progress-bar progress-bar-info progress-bar-striped active\" role=\"progressbar\" style=\"width: 0%\">0%</div></div>'); \n },\n success: function (response) {\n if(response.success) { \n var optionImages = response.images.length;\n if(optionImages > 0 && $attributes.find('div.form-group.field-options').length) {\n var openOption;\n $.each(response.images, function(index, image){\n $attributes.find('div.form-group.field-options div.option-actions a.add-opt').trigger('click');\n openOption = parseInt($attributes.find('div.form-group.field-options ol.sortable-options li').length) - 1;\n \n $attributes.find('div.form-group.field-options ol.sortable-options li:eq('+openOption+') input.option-label').val('<img src=\"' + image + '\" alt=\"option_media\">');\n $attributes.find('div.form-group.field-options ol.sortable-options li:eq('+openOption+') input.option-value').val(image);\n });\n $attributes.find('select[name=column_format]').val('image');\n// if(optionImages > openOptions) {\n// requiredAddClicks = optionImages - openOptions;\n// } \n// else if(optionImages < openOptions) {\n// requiredRemoveClicks = openOptions - optionImages;\n// }\n \n// if(requiredAddClicks > 0) {\n// for(var c=1; c<=optionImages; c++) {\n// $attributes.find('div.form-group.field-options div.option-actions a.add-opt').trigger('click');\n// }\n// }\n \n// if(requiredRemoveClicks > 0) {\n// for(var c=openOptions-1; c>=optionImages; c--) {\n// $attributes.find('div.form-group.field-options ol.sortable-options li:eq('+c+') a.remove.btn').trigger('click');\n// }\n// }\n }\n } else {\n //alert(response.message);\n swal({ type: 'error', showCloseButton: true , html:response.message});\n }\n },\n complete: function(){ $element.val(''); } \n });\n}", "function jb_upload_attach(files, input, evt) {\n var readAttach = function(o) {\n //var input = event.target;\n var reader = new FileReader();\n reader.onload = function() {\n var dataURL = reader.result;\n var container = $('#at_upload_' + o);\n var output = container.find('img')[0]; //container.find('.img_fak')[0];\n if(container.length == 0) return false;\n output.src = dataURL;\n // output.style.backgroundImage = 'url('+dataURL+')';\n container.find('.__uploadingInfo')\n .addClass('__off');\n container.find('.uploading_ovr')\n .addClass('__on');\n setTimeout(function() {\n container.find('.uploading_ovr.__on,.pup_bar_m_upload')\n .remove();\n }, 1500);\n };\n reader.readAsDataURL(files[o]);\n }\n var count = 0;\n var totalFiles = files.length;\n var jb_rd_btn = $('.jb_ready_btn'),\n jb_files_to_app = $('.jb_attached_files');\n var trigger_attachUp = function() {\n if(typeof files[count] === 'undefined' || count > totalFiles - 1) {\n if(jb_attach_uploads.length) jb_rd_btn.removeClass('__disabled');\n edUpload();\n return false;\n }\n var formData = new FormData();\n formData.append('files[]', files[count]);\n formData.append('to', recipientId);\n $.ajax({\n url: _st.attachUpload,\n type: 'POST',\n xhr: function() { // Custom XMLHttpRequest\n var Xhr = $.ajaxSettings.xhr();\n if(Xhr.upload) { // Check if upload property exists\n Xhr.upload.addEventListener('progress', function(e) {\n var p_cont = $('#at_upload_' + count + ' .main_progress_photo');\n if(e.lengthComputable) {\n var p_percentage = Math.round((e.loaded / e.total) * 100);\n p_cont.css('width', p_percentage + '%');\n }\n }, false); // For handling the progress of the upload\n }\n return Xhr;\n },\n //Ajax events\n beforeSend: function() {\n readAttach(count);\n },\n success: function(data) {\n var response = validateJson(data);\n if(response['status'] === 'OK') {\n var container = $('#at_upload_' + count);\n var u_image = container.find('img');\n jb_attach_uploads.push(response['photoid']);\n u_image.attr({\n 'src': '/getPhoto?p=' + response['photoid'] + '&attach=true&v' + (new Date())\n .getTime()\n });\n container.children(':first')\n .addClass('selectable-card __selected')\n .attr({\n 'data-photoc': response['photoid'],\n 'onclick': 'jb_uploaded_attach_click(event,this)',\n 'id': 'abidal_' + response['photoid']\n });\n container.find('#restore_recent_upload')\n .attr('href', '/profile?q=' + (response['userid']) + '&cmd=phreturn&i=' + (response['albumid']) + '&phf=' + (response['filename']) + '&ex=' + (response['extension']) + '&fsz=' + (response['filesize']) + '&pos=0&ad=' + response['added']);\n container.find('#delete_recent_upload')\n .removeAttr('style')\n .attr('href', '/profile?q=' + (response['userid']) + '&cmd=deletephoto&ph=' + response['photoid']);\n setTimeout(function() {\n container.removeAttr('id');\n count++;\n trigger_attachUp();\n }, 50);\n } else return displayErr(data);\n },\n error: function() {\n return displayErr(lang.somethingWrong)\n },\n // Form data\n data: formData,\n //Options to tell jQuery not to process data or worry about content-type.\n cache: false,\n contentType: false,\n processData: false\n });\n }\n trigger_attachUp();\n}", "function captureMultipleUploadImageSuccess(mediaFiles)\n{\n\tMsgDisplay(\"Inside impl camera\");\n\tvar connection = navigator.network.connection.type;\n\tvar state = {};\n\tstate[Connection.UNKNOWN] = 'Unknown connection';\n\tstate[Connection.NONE] = 'No network connection';\n\tstate[Connection.ETHERNET] = 'Ethernet connection';\n\tstate[Connection.WIFI] = 'WiFi connection';\n\tstate[Connection.CELL_2G] = 'Cell 2G connection';\n\tstate[Connection.CELL_3G] = 'Cell 3G connection';\n\tstate[Connection.CELL_4G] = 'Cell 4G connection';\n\t\n\tif(state[connection] == 'No network connection' || state[connection] == 'Unknown connection'){\n\t\tMsgDisplay(\"Navigator - - \"+state[connection]);\n\t\tfor (i = 0, len = mediaFiles.length; i < len; i += 1) {\n\t\t\tMsgDisplay(\"Media \"+mediaFiles[i].name+mediaFiles[i].fullPath+dataURL);\n\t\t\tstoreImageLocal(mediaFiles[i].name,mediaFiles[i].fullPath,dataURL);\n\t\t}\n\t}\n\telse{\n\t\tMsgDisplay(\"Navigator - - \"+state[connection]);\n\t\tvar i, len;\n\t\tfor (i = 0, len = mediaFiles.length; i < len; i += 1) {\n\t\t\tuploadFile(mediaFiles[i],dataURL);\n\t\t}\n\t}\n}", "function onUpload(ele, progressEle, data) {\n data.events.on('upload.progress', data.fileId, ({ progress }) => {\n const val = 0 - (100 - progress);\n progressEle.style.transform = `translateX(${val}%)`;\n });\n\n data.events.on('upload.done', data.fileId, ({ id }) => {\n data.id = id;\n status(ele, 'done');\n removeClass(ele, 'uploading');\n makeActions(ele, data);\n\n removeUploadEvents(data);\n });\n\n data.events.on('upload.failed', data.fileId, () => {\n addClass(ele, 'stopped');\n status(ele, 'error', () => {\n remove(ele, data);\n });\n });\n\n data.events.on('destroy', data.fileId, data._onDestroy);\n}", "complete( results, file ){\n //call parseUpload and pass the results.data to it (the array of json objects)\n Meteor.call( 'parseUpload', results.data, ( error, response ) => {\n if (error){\n Bert.alert(error.reason, 'warning');\n //console.log(error.reason);\n }else{\n template.uploading.set( false );\n\t Bert.alert('Upload Complete', 'success', 'growl-top-right');\n }\n });\n }", "function uploadActiveItem()/*:void*/ {\n if (this.uploadContainers$zpGw.length > this.activeUploadIndex$zpGw) {\n var uploadContainer/*:UploadProgressContainer*/ = this.uploadContainers$zpGw[this.activeUploadIndex$zpGw];\n uploadContainer.startUpload();\n this.activeUploadIndex$zpGw++;\n }\n else {\n //all files processed, check error state afterwards\n var close/*:Boolean*/ = true;\n for (var i/*:int*/ = 0; i < AS3.getBindable(this,\"files\").length; i++) {\n if (AS3.getBindable(this,\"files\")[i].getStatus() === com.coremedia.cms.editor.sdk.upload.FileWrapper.STATUS_ERROR) {\n close = false;\n this.setTitle(this.resourceManager.getString('com.coremedia.cms.editor.sdk.upload.Upload', 'UploadProgressDialog_upload_failed'));\n break;\n }\n }\n if (close) {\n this.close();\n }\n }\n }", "function updateAndCheckProgress(totalFiles, altStatusText) {\r\n\tvar currentProgress = $(\"#upload-status-progressbar\").progressbar(\"option\", \"value\");\r\n\tcurrentProgress = currentProgress + (100 / totalFiles);\r\n\t\r\n\t// Update the progress bar\r\n\t$(\"#upload-status-progressbar\").progressbar({value: currentProgress});\r\n\t\r\n\t// Check if that was the last file and hide the animation if it was\r\n\tif(currentProgress >= 99) {\r\n\t\t$(\"#upload-status-text\").html((altStatusText ? altStatusText : \"Please wait..\"));\r\n\r\n setTimeout(function() {\r\n \r\n $(\"#upload-box\").fadeOut(300);\r\n $(\"#upload-animation\").hide();\r\n //sendToServer();\r\n calculateAndShowResults();\r\n \r\n },1000);\r\n\t}\r\n}", "function uploadFiles(progressBarTag, singleProgressBarArr, serverURL, formData, createListFilesFromServer, ul, createListFilesOnServer, StoreListOfFilesOnServer) {\n // let responseFromServer = [];\n var progressBarTagItem = progressBarTag;\n var allStartUploadButons = document.querySelectorAll('.start');\n var xhr = new window.XMLHttpRequest();\n xhr.open('POST', serverURL, true);\n xhr.upload.addEventListener('progress', function (evt) {\n if (evt.lengthComputable) {\n // calculate the percentage of upload completed\n var percentComplete = evt.loaded / evt.total;\n percentComplete = parseInt(percentComplete * 100, 10); // update the Bootstrap progress bar with the new percentage\n\n progressBarTagItem.setAttribute('style', \"width: \".concat(percentComplete, \"%\"));\n progressBarTagItem.innerHTML = \"\".concat(percentComplete, \" %\"); // once the upload reaches 100%, set the progress bar text to done\n\n if (percentComplete === 100) {\n progressBarTagItem.innerHTML = 'Done';\n }\n\n singleProgressBarArr.forEach(function (elem) {\n var item = elem;\n item.setAttribute('style', \"width: \".concat(percentComplete, \"%\"));\n item.innerHTML = \"\".concat(percentComplete, \" %\"); // once the upload reaches 100%, set the progress bar text to done\n\n if (percentComplete === 100) {\n item.innerHTML = 'Done';\n }\n });\n }\n });\n xhr.send(formData);\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState !== 4) {\n return;\n }\n\n if (xhr.status !== 200) {\n console.log(\"\".concat(xhr.status, \": \").concat(xhr.statusText));\n } else {\n var responseFromServer = JSON.parse(xhr.response);\n StoreListOfFilesOnServer = createListFilesOnServer(StoreListOfFilesOnServer, responseFromServer);\n console.dir(responseFromServer);\n console.dir(StoreListOfFilesOnServer);\n setTimeout(createListFilesFromServer, 1500, ul, responseFromServer, StoreListOfFilesOnServer);\n allStartUploadButons.forEach(function (item) {\n item.setAttribute('disabled', 'disabled');\n });\n console.log('upload successful!\\n');\n }\n };\n}", "function handleFileProgress(event) {\n\n}", "function uiUploader(a) {\n \"use strict\";\n function b(a) {\n for (var b = 0; b < a.length; b++) i.files.push(a[b])\n }\n function c() {\n return i.files\n }\n function d(a) {\n i.options = a;\n for (var b = 0; b < i.files.length && i.activeUploads != i.options.concurrency; b++) i.files[b].active || h(i.files[b], i.options.url)\n }\n function e(a) {\n i.files.splice(i.files.indexOf(a), 1)\n }\n function f() {\n i.files.splice(0, i.files.length)\n }\n function g(a) {\n var b = [\"n/a\", \"bytes\", \"KiB\", \"MiB\", \"GiB\", \"TB\", \"PB\", \"EiB\", \"ZiB\", \"YiB\"],\n c = +Math.floor(Math.log(a) / Math.log(1024));\n return (a / Math.pow(1024, c)).toFixed(c ? 1 : 0) + \" \" + b[isNaN(a) ? 0 : c + 1]\n }\n function h(a, b) {\n var c, e, f, h = \"\",\n j = \"file\";\n if (i.activeUploads += 1, a.active = !0, c = new window.XMLHttpRequest, e = new window.FormData, c.open(\"POST\", b), c.upload.onloadstart = function() {},\n c.upload.onprogress = function(b) {\n b.lengthComputable && (a.loaded = b.loaded, a.humanSize = g(b.loaded), i.options.onProgress(a))\n },\n c.onload = function() {\n i.activeUploads -= 1,\n d(i.options),\n i.options.onCompleted(a, c.responseText)\n },\n c.onerror = function() {},\n h) for (f in h) h.hasOwnProperty(f) && e.append(f, h[f]);\n return e.append(j, a, a.name),\n c.send(e),\n c\n }\n var i = this;\n return i.files = [],\n i.options = {},\n i.activeUploads = 0,\n a.info(\"uiUploader loaded\"),\n {\n addFiles: b,\n getFiles: c,\n files: i.files,\n startUpload: d,\n removeFile: e,\n removeAll: f\n }\n}", "uploadMedia(file, mediaMode) {\n\n }", "function uploadMedia() {\n var signedURL;\n var file;\n file = self.myFile;\n if(file !== undefined){\n //get a signed S3 request for the file selected by user\n homeService.getSignedS3Request(file).then(function(response){\n //if signed request is received successfully\n if(response.status === 200){\n signedURL = response.data.signed_request;\n console.log(response.data);\n // upload the file with the signed request\n var xhr = new XMLHttpRequest();\n // define event listeners to track update status and progress\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 // open a PUT request to upload the file\n xhr.open(\"PUT\", signedURL);\n // make the file publically downloadable\n xhr.setRequestHeader('x-amz-acl', 'public-read');\n //disable the submit while file is being uploaded\n // set the progress bar value to zero in case user uploads multiple files back to back\n self.progress = 0;\n\n xhr.onload = function() {\n //if file upload request is completed successfully\n if (xhr.status === 200) {\n console.log(\"File upload complete\");\n self.postUploadCleanup(file);\n }\n };\n xhr.onerror = function() {\n alert(\"Could not upload file.\");\n };\n\n self.progressVisible = true;\n console.log(signedURL);\n xhr.send(file);\n\n }\n else {\n console.log(response);\n }\n });\n }\n\n }", "function handle_job_done(status_fn) {\n const result_fn = status_fn.replace('_log.log', '_output.mp3');\n $(\"#upload_result_button\").show();\n\n if (is_uploaded(result_fn)) {\n populate_upload_result_link(result_fn);\n } else {\n $(\"#upload_result_button\").click(function () {\n upload_result(result_fn);\n });\n $(\"#upload_result_button\").prop(\"disabled\", false);\n }\n}", "handleUpload(){\n var self= this;\n if(this.state.files.length > 0){\n var files = this.state.files;\n this.setState({buttontitle:\"Uploading....\"})\n var req = request.post(apiBaseUrl+'/fileupload');\n files.forEach((file)=> {\n // console.log(\"upload clicked\",file.name);\n req.attach(file.name, file);\n });\n req.end(function(err,res){\n if(err){\n console.log(\"error ocurred\");\n }\n console.log(\"res\",res);\n self.props.indexthis.switchPage();\n });\n }\n else{\n alert(\"Please upload some files first\");\n this.setState({buttontitle:\"Upload to server\"});\n }\n }", "function uploaded(err, data, response) {\n\n // we need a numeric index for the uploaded image, to refer on it.\n // this image-value is 'media_id_string' and is part of data object, that comes back.\n // we save that as 'id'\n var id = data.media_id_string;\n\n // this is what we will tweet later by calling 'post' function on 'T'\n var tweet = {\n status: '#codingrainbow live from node.js',\n // there could be multiple 'id'-s, so we save it in a array -->\n // media_ids: [id, id2, id3 ...]\n media_ids: [id]\n }\n // posting the tweet\n T.post('statuses/update', tweet, tweeted);\n\n }", "function queueComplete(numFilesUploaded) {\n //var status = document.getElementById(\"divStatus\");\n //status.innerHTML = numFilesUploaded + \" file\" + (numFilesUploaded === 1 ? \"\" : \"s\") + \" uploaded.\";\n}", "async handleFileUploads(req, res) {\n if (typeof apollo_server_core_1.processFileUploads !== 'function') {\n return;\n }\n const contentType = req.headers['content-type'];\n if (this.uploadsConfig && contentType && contentType.startsWith('multipart/form-data')) {\n ;\n req.filePayload = await apollo_server_core_1.processFileUploads(req, res, this.uploadsConfig);\n }\n }", "function massUpload() {\n // Open the modal\n $('#uploadModal').modal();\n\n const flourishingClients = clients.filter(client => client.fields['Flourishing Index'] === 'Web');\n\n $('#counter').html(`<p><span id=\"finishedUploads\">0</span> / ${flourishingClients.length}</p>`);\n\n flourishingClients.map(client => {\n // console.log(client);\n uploadChallenge(client);\n });\n }", "function _submitTeamsMedia() {\n vm.myDropzone.processQueue(); //queue is processed here, since we set 'autoProcessQueue' to 'false'\n }", "onUploadProgress(e) {\n const progress = (e.loaded * 100) / e.total;\n document.getElementById(element).setAttribute('value', progress);\n }", "function upload_next() {\n\tworking--;\n\tif(queue.length>0) {\n\t\twork = queue.shift();\n\t\tselect_upload(work);\n\t}\n}", "function replaceFileUpload(target){\n\tvar i = 0\n\tvar fileUploaders = []\n\t$(target).each(function() {\n\t\tvar fileUploader = new qq.FileUploader( {\n\t\t\taction: \"/ajax/thumb/\",\n\t\t\telement: $(target)[i],\n\t\t\tmultiple: false,\n\t\t\tallowedExtensions: ['jpg', 'jpeg', 'png', 'gif'], \n\t\t\tsizeLimit: 0, \n\t\t\tminSizeLimit: 0,\n\t\t\ttemplate: '<div class=\"qq-uploader\">' + \n '<div class=\"qq-upload-drop-area\"><span>Drop files here to upload</span></div>' +\n '<div class=\"qq-upload-button\">Click to Browse or Drag Image Here</div>' +\n '<ul class=\"qq-upload-list\"></ul>' + \n '</div>',\n\t\t\tonError: function(id, fileName){\n\t\t\t\t//get error image\n\t\t\t\t$(thumbTarget).attr(\"src\", '');\n\t\t\t},\n\t\t\tonSubmit: function(id, fileName){\n\t\t\t\t//remove previous item from list\n\t\t\t\t$('.qq-upload-list').children().remove()\n\t\t\t\t//get loading image\n\t\t\t\t$(thumbTarget).attr(\"src\", STATIC_URL+'core/img/thumb-loader.gif');\n\t\t\t},\n\t\t\tonComplete: function( id, fileName, responseJSON ) {\n\t\t\t\tif( responseJSON.success ) {\n\t\t\t\t\tconsole.log('image uplaod success!');\n\t\t\t\t\tonFileChange();\n\t\t\t\t\t//store and delete previoius thumb\n\t\t\t\t\tprevUpload = $('input#id_uImage').val();\n\t\t\t\t\tconsole.log('prevUpload = '+prevUpload);\n\t\t\t\t\tif (prevUpload){\n\t\t\t\t\t\tuImageDelete(prevUpload);\n\t\t\t\t\t}\n\t\t\t\t\t//update uImage with tmpName for form and model\n\t\t\t\t\t$('input#id_uImage').attr(\"value\", responseJSON.tmpName);\n\t\t\t\t\t//update variable with current uploaded file name for deletion\n\t\t\t\t\tuFileName = responseJSON.tmpName\n\t\t\t\t\t//update thumb\n\t\t\t\t\tupdateThumb(thumbTarget, responseJSON, '#id_imgUrl');\n\n\t\t\t\t}else{\n\t\t\t\t\tconsole.warn('image uplaod failed :(')\n\t\t\t\t}\n\t\t\t},\n\t\t\tonAllComplete: function( uploads ) {\n\t\t\t\t// uploads is an array of maps\n\t\t\t\t// the maps look like this: { file: FileObject, response: JSONServerResponse }\n\t\t\t\tconsole.log('All uploads complete!: '+uploads)\n\t\t\t\t//re attach onFileChange due to html reset in file uplaoder\n\t\t\t},\n\t\t\tparams: {\n\t\t\t 'csrf_token': $('input[name=csrfmiddlewaretoken]').val(),\n\t\t\t 'csrf_name': 'csrfmiddlewaretoken',\n\t\t\t 'csrf_xname': 'X-CSRFToken',\n\t\t\t},\n\t\t} ) ;\n\t\t//modify file uploader properties\n\t\tfileUploader._formatFileName = function(name){\n\t\t\tif (name.length > 15){\n\t\t\t\tname = name.slice(0, 15) + '...' + name.slice(-4); \n\t\t\t}\n\t\t\treturn name;\n\t\t}\n\t\tfileUploaders[i] = fileUploader;\n\t\ti++;\n\t});\n\treturn fileUploaders\n}", "function uploadCompleted(s) {\n\tupload = $(\"#rup\").get(0).getUploadStatus();\n\tif(upload == 1) {\n\t\tvar responseText = $(\"#rup\").get(0).getResponse();\n\t\t$(\"#ModalDialogApp\").dialog(\"destroy\").remove();\n\t\t$.get( \"./propiedadPict.php?acc=rf\", function(res){\t\t\t\n\t\t\tif (responseText.indexOf(\"<li>\") >= 0) showMsg(responseText, \"error-alert\", true);\n\t\t\telse if (responseText.indexOf(\"Atencion!\") >= 0) showMsg(responseText, \"warning-alert\", true);\n\t\t\telse showMsg(responseText, \"succesfull-alert\", false);\n\t\t\t$(\"#galleryContainer\").html(res);\n\t\t\tif ($(\"#galleryContainer > #gallery\").children(\"li\").length >= 18) {\n\t\t\t\t$(\"<span />\").addClass(\"ui-icon ui-icon-minus\").appendTo($(\"#btnOpenRadApp\").text(\"Galeria Completa\").addClass(\"ui-state-disabled\"));\n\t\t\t\t$(\"#btnOpenRadApp\").attr(\"href\", \"#\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$(\"<span />\").addClass(\"ui-icon ui-icon-plus\").appendTo($(\"#btnOpenRadApp\").text(\"Agregar Imagenes\").removeClass(\"ui-state-disabled\"));\n\t\t\t\t$(\"#btnOpenRadApp\").attr(\"href\", \"./propiedadPict.php?acc=ra\");\n\t\t\t}\n\t\t});\n\t}\n\telse {\n\t\tshowMsg(\"La subida de Archivos ha FALLADO\", \"error-alert\", true);\n\t}\n\t\n\treturn true;\n}", "function _successSubmitTeamsMedia(data, status, settings) {\n vm.$notificationsService.success(\"Successfully submitted an Image.\");\n vm.$teamsService.onTeamsSelectMediaByTeamsId(vm.successTeamsSelectMediaByTeamsId, vm.errorTeamsSelectMediaByTeamsId, vm.$teamsId);\n }", "uploadprogress (file, progress, bytesSent) {\n if (file.previewElement) for (let node of file.previewElement.querySelectorAll(\"[data-dz-uploadprogress]\"))node.nodeName === \"PROGRESS\" ? node.value = progress : node.style.width = `${progress}%`;\n }", "function uploadMedia(req, res, next) { // This is just for my Controller same as app.post(url, function(req,res,next) {....\n var form = new formidable.IncomingForm();\n form.multiples = true;\n form.keepExtensions = true;\n form.uploadDir = uploadDir;\n form.parse(req, (err, fields, files) => {\n if (err) return res.status(500).json({\n error: err\n });\n res.status(200).json({\n uploaded: true\n });\n });\n form.on('fileBegin', function (name, file) {\n const [fileName, fileExt] = file.name.split('.');\n file.path = path.join(uploadDir, `${fileName}_${new Date().getTime()}.${fileExt}`);\n });\n}", "function captureImageSuccess(mediaFiles) {\n var i, len;\n for (i = 0, len = mediaFiles.length; i < len; i += 1) {\n image = mediaFiles[i];\n console.log(image.size);\n processImage(true); //always saves to temp so always true\n }\n}", "function onUpload(files, showUploadProgress, setLink) {\n files.forEach((file, idx) => {\n const ref = storage.ref(`images/${file.name}`)\n const task = ref.put(file);\n task.on('state_changed',\n snapshot => {\n const percentage = Math.round((snapshot.bytesTransferred / snapshot.totalBytes) * 100)\n showUploadProgress(idx, percentage)\n }, error => {\n console.log(error)\n }, () => {\n const promise = task.snapshot.ref.getDownloadURL()\n promise.then(url => {\n setLink(idx, url)\n })\n })\n })\n}", "function uploadProgress(event, file, bytes, maxBytes) {\n\t\t\t\tvar percent = Math.floor((bytes/maxBytes)*100);\n\n\t\t\t\t// Upload finished, we mark as finalizing\n\t\t\t\tif (percent>=100) {\n\t\t\t\t\tpercent=100;\n\t\t\t\t\t// If the finalizing process is too long, we add sample preview\n\t\t\t\t\ttimeoutSamplePreview = setTimeout(function() {\n\t\t\t\t\t\tif (uploadElement.is('.finished')) return;\n\t\t\t\t\t\tuploadElement.removeClass('uploading').addClass('finalizing');\n\t\t\t\t\t\tpreviewElement.html(file.name);\n\t\t\t\t\t}, 1000);\n\t\t\t\t}\n\t\t\t\t// Updating UI\n\t\t\t\tbarElement.css('width', percent+'%');\n\t\t\t\tpercentElement.text(percent+' %');\n\t\t\t}", "function queueComplete(numFilesUploaded) {\r\r\n\tvar status = document.getElementById(\"divStatus\");\r\r\n\tstatus.innerHTML = numFilesUploaded + \" file\" + (numFilesUploaded === 1 ? \"\" : \"s\") + \" uploaded.\";\r\r\n}", "_onProgress( e ) {\n if ( !e.lengthComputable ) return;\n let percent = Math.round( ( e.loaded * 100 ) / e.total );\n this._callHandler( 'progress', this._xhr, percent );\n }", "multipleUpload({files, path, nameFile, idObjeto, model, limit}){\n return new Promise((resolve, reject)=>{\n try {\n this.defaultFolder(env.files.uploadsPath + path) \n limit = files.length == undefined ? 1 : files.length\n if(limit > 4){\n limit = 4\n } \n let urls = []\n for(let i = 0; i < limit; i++){\n let extension = ''\n let path_origem = ''\n let name = ''\n if(limit == 1 ){\n extension = this.fileExtension(files.type.split('/')[1])\n path_origem = files.path;\n name = nameFile +'.'+extension;\n }else{\n extension = this.fileExtension(files[i].type.split('/')[1])\n path_origem = files[i].path;\n name = nameFile+i +'.'+extension;\n }\n let path_destino = env.files.uploadsPath + path + name;\n mv(path_origem, path_destino, async function(err){ \n if(!err){\n urls.push(env.files.uploadsUrl + path + name)\n Upload.find({idObjeto: idObjeto}).then((doc)=>{\n if(doc.length > 0){\n Upload.findOneAndUpdate({idObjeto: idObjeto}, {\n model: model.collection.name,\n idObjeto: idObjeto,\n local: path_destino,\n nome: name,\n extensao: extension,\n url: env.files.uploadsUrl + path + name\n }).then(()=> {\n if(parseInt(limit) == urls.length){\n resolve(urls)\n }\n }).catch(reject)\n }else{\n new Upload({\n model: model.collection.name,\n idObjeto: idObjeto,\n local: path_destino,\n nome: name,\n extensao: extension,\n url: env.files.uploadsUrl + path + name\n }).save().then(()=> {\n if(parseInt(limit) == urls.length){\n resolve(urls)\n }\n }).catch(reject)\n }\n })\n }else{\n reject({name: \"upload\", message: err})\n }\n })\n } \n } catch (error) {\n reject({name: \"upload\", message: error})\n }\n })\n }" ]
[ "0.72166723", "0.6759011", "0.6690268", "0.6680694", "0.66543263", "0.6648346", "0.6554648", "0.650841", "0.6475504", "0.6475412", "0.64716095", "0.64379007", "0.64331603", "0.63567746", "0.63420486", "0.63374996", "0.6336398", "0.6335095", "0.63304543", "0.6329161", "0.6322954", "0.6302281", "0.6300725", "0.6283246", "0.62803763", "0.6270699", "0.6257605", "0.6238528", "0.6238528", "0.6238528", "0.6238023", "0.62261695", "0.6207396", "0.6203043", "0.6199081", "0.6196979", "0.6192248", "0.61859286", "0.61842936", "0.61673766", "0.61655647", "0.61374", "0.6129611", "0.6127371", "0.6126237", "0.6118707", "0.6114485", "0.6110356", "0.6105384", "0.6104573", "0.6068332", "0.60672516", "0.6059711", "0.6053719", "0.6031372", "0.60288715", "0.60284466", "0.60284466", "0.6018679", "0.60097843", "0.60097843", "0.6005728", "0.5997328", "0.5997192", "0.5992696", "0.5988489", "0.5983757", "0.5979926", "0.5969904", "0.59635735", "0.5962355", "0.59599346", "0.59489954", "0.59446603", "0.59329265", "0.5930166", "0.59263045", "0.59098685", "0.5906602", "0.5899005", "0.5896563", "0.5896294", "0.58925563", "0.5891931", "0.5887637", "0.587999", "0.5879896", "0.5879185", "0.5876688", "0.5875296", "0.5873341", "0.58625823", "0.5859819", "0.5857938", "0.5857358", "0.585588", "0.58530676", "0.5850258", "0.5849188", "0.5846793" ]
0.6082613
50
check to see if a large file failed to upload
function fileUploading( up, file ) { var hundredmb = 5 * 1024 * 1024, max = parseInt( up.settings.filters.max_file_size, 10 ); if (file.size > hundredmb ) { setTimeout( function() { if ( file.status < 3 && file.loaded === 0 ) { // not uploading //FileError( file, pluploadL10n.big_upload_failed.replace( '%1$s', '<a class="uploader-html" href="#">' ).replace( '%2$s', '</a>' ) ); FileError( file, pluploadL10n.upload_failed); up.stop(); // stops the whole queue up.removeFile( file ); up.start(); // restart the queue } }, 10000 ); // wait for 10 sec. for the file to start uploading } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateExtensionBeforeUpload(file){\n var maxSize = 5000000 // 5 MB \n var size = file.size;\n var checkFileSize = false;\n if(maxSize > size){\n checkFileSize = true; \n }\n return checkFileSize;\n \t}", "function file_size_check(type,size){\n\n if(type == \"image\"){\n if (size > 1048576){\n alert(\"Image File exceeds 1 MB, please reduce the size and re upload\")\n ted_log(\"File size is too large. File is= \"+size)\n\n return false\n } else {\n return true\n }\n } else {\n\n if (size > 104857600){\n alert(\"Song file exceeds 100MB, please reduce the size and re upload\")\n ted_log(\"File size is too large. File is= \"+size)\n\n return false\n } else {\n return true\n }\n\n };\n\n\n}", "onBeforeUpload(file) {\n // Allow upload files under 5Gb, and only in png/jpg/jpeg formats\n if (\n file.size <= 5368709120 &&\n /png|jpg|jpeg|mp4|pdf|mp3|pptx|ppt|webm|/i.test(file.extension)\n ) {\n return true;\n }\n return 'Please upload image, with size equal or less than 10MB';\n }", "onBeforeUpload(file) {\n // Allow upload files under 5Gb, and only in png/jpg/jpeg formats\n if (\n file.size <= 5368709120 &&\n /png|jpg|jpeg|mp4|pdf|mp3|pptx|ppt|webm|/i.test(file.extension)\n ) {\n return true;\n }\n return 'Please upload image, with size equal or less than 10MB';\n }", "onBeforeUpload(file) {\n // Ensure image size is smaller, in bytes, than 25 MB\n if (file.size > 26214400) {\n return 'Image is too large. Please upload a smaller image file.';\n }\n // Check that uploaded file is an image in a proper format\n else if (!/png|jpg|jpeg/i.test(file.extension)) {\n return 'Please upload a valid image file.';\n }\n return true;\n }", "function sizeValid(self, size) {\n if(self.files[0].size > size) {\n reset();\n errorMsg.html(\"Image has to be less than 3MB.\");\n return false;\n } else {\n return true;\n }\n }", "function fileSize(size) {\n if (size > 2097152) {\n return false; //file size is greater than 2MB\n } else {\n return true;\n }\n}", "function fileUploadFailed() {\n console.log(\"Failed to upload file\");\n}", "function isTooBig(file, maxFileSize) {\n const fileSize = file.size / 1024 / 1024 // in MB\n\n return fileSize > maxFileSize\n}", "function tsugiCheckFileMaxSize () {\n $(function(){\n $('form').submit(function(){\n var isOk = true;\n $('input[type=file][data-max-size]').each(function(){\n if(typeof this.files[0] !== 'undefined'){\n var maxSize = parseInt($(this).attr('data-max-size'),10);\n var maxText = $(this).attr('data-max-text');\n if (typeof maxText == 'undefined' ) maxText = \"Error: {0} is > {1} bytes\";\n size = this.files[0].size;\n if ( size > maxSize ) {\n alert(maxText.format(this.files[0].name, maxSize) );\n }\n isOk = maxSize > size;\n return isOk;\n }\n });\n return isOk;\n });\n });\n}", "onBeforeUpload(file) {\n // Allow upload files under 10MB, and only in png/jpg/jpeg formats\n const allowedSize = file.size <= MAX_SIZE;\n const allowedExtension = /png|jpg|jpeg/i.test(file.extension);\n return allowedSize && allowedExtension ? true : `גודל קובץ מקסימלי ${MAX_SIZE / 1024 ** 2}`;\n }", "function hasFailedUploads() {\r\n return failedUploads && failedUploads.length;\r\n }", "function validateBatch(files, uploadInputId) {\n if (files.length > settings.batchSize) {\n $(uploadErrorContainerDivSelector).append(`<li>The upload exceeds the limit of ${settings.batchSize} files</li>`);\n $(uploadErrorContainerDivSelector).show();\n return false;\n }\n return true;\n }", "function handleFileUploadError(_data) {\r\n\tcheckError(_data.response().jqXHR, '_folderMessage');\r\n}", "function onUploadFailed(e) {\r\n\talert(\"Error uploading file\");\r\n}", "function onUploadFailed(e) {\n alert(\"Error uploading file\");\n }", "function checkFileSize(id)\n{\n\t\n var fup = document.getElementById(\"#corresuploaddoc\"+id);\n var fileName = fup.value;\n var ext = fileName.substring(fileName.lastIndexOf('.') + 1);\n \n\tif (typeof ($(\"#corresuploaddoc\"+id)[0].files) != \"undefined\") {\n var size = parseFloat($(\"#corresuploaddoc\"+id)[0].files[0].size / 1024).toFixed(2);\n // alert(size + \" KB.\");\n //3070 means 3*1024=3070kb=3mb\n if(size>10240)\n \t {\n \t bootbox.alert('Please choose file less than 10MB');\n \t document.getElementById(\"#corresuploaddoc\"+id).value = \"\";\n \t }\n } else {\n \tbootbox.alert(\"This browser does not support HTML5.\");\n }\n \n}", "function ValidateFile(limit) {\n var wImgFile = document.getElementById('fileinput').files[0];\n\t\tif(wImgFile == null){ModifyElement(\"fl\", \"block\", \"Upload an image\"); return \"isempty\";} //if no file -> return \"isempty\";\n\t\t\n\t\tvar cRegex = new RegExp(\"(.*?)\\.(gif|jpg|jpeg|png|swf|psd|bmp|jpc|jp2|jpx|jb2|swc|iff|wbmp|xbm|ico|webp)$\");\n\t\tvar oPasscount = 0;\n\t\t\n\t\t//truncate filename for display\n\t\tvar wName = (wImgFile.name.length < 30) ? wImgFile.name : wImgFile.name.substring(0,20) + \"...\" + wImgFile.name.substring(wImgFile.name.lastIndexOf(\".\")-3,wImgFile.name.length);\n\t\t//modify label to show the selected file\n\t\tModifyElement(\"fl\", \"block\", wName);\n\t\t\n\t\tvar wSizeWarn = document.getElementById(\"sizeWarning\");\n\t\tvar wTypeWarn = document.getElementById(\"typeWarning\");\n\t\t\n\t\t//Size warning - file must be greater than 12b\n\t\tif(wImgFile.size < 12){\n\t\t\tif(typeof(wSizeWarn) != 'undefined' && wSizeWarn != null){\n\t\t\t\tModifyElement(\"sizeWarning\", \"block\", \"* File is smaller than 12b: \\[\" + wName + \"\\] is \" + wImgFile.size + \"b in size.\");\n\t\t\t} else{\n\t\t\t\tAddElement(\"warnings\",\"p\",\"sizeWarning\",\"upload_warning\",\"* File is smaller than 12b: \\[\" + wName + \"\\] is \" + wImgFile.size + \"b in size.\");\n\t\t\t}\n\t\t}\n\t\telse { \n\t\t\tModifyElement(\"sizeWarning\", \"none\", \"no error\");\n\t\t\toPasscount += 1;\n\t\t}\n\t\t\n\t\t//Size warning - file must be less than limit if there is one\n\t\tif(limit!=null && wImgFile.size > limit){\n\t\t\toPasscount-=1; //prevents error overwriting\n\t\t\t\n\t\t\tif(typeof(wSizeWarn) != 'undefined' && wSizeWarn != null){\n\t\t\t\tModifyElement(\"sizeWarning\", \"block\", \"* File is greater than \" + Math.floor(limit/1000) + \"Kb: \\[\" + wName + \"\\] is \" + Math.ceil(wImgFile.size/1000) + \"Kb in size.\");\n\t\t\t} else{\n\t\t\t\tAddElement(\"warnings\",\"p\",\"sizeWarning\",\"upload_warning\",\"* File is greater than \" + Math.floor(limit/1000) + \"Kb: \\[\" + wName + \"\\] is \" +Math.ceil(wImgFile.size/1000) + \"b in size.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Type warning - file must be an image\n if (!(cRegex.test(wImgFile.name.toLowerCase()))) {\n\t\t\tif(typeof(wTypeWarn) != 'undefined' && wTypeWarn != null){\n\t\t\t\tModifyElement(\"typeWarning\", \"block\", \"* File \\[\" + wName + \"\\] is not a valid image type (.jpeg, .png, .gif)\");\n\t\t\t} else{\n\t\t\t\tAddElement(\"warnings\",\"p\",\"typeWarning\",\"upload_warning\",\"* File \\[\" + wName + \"\\] is not a valid image type (.jpeg, .png, .gif)\");\n\t\t\t}\n }\n\t\telse { \n\t\t\tModifyElement(\"typeWarning\", \"none\", \"no error\");\n\t\t\toPasscount += 1;\n\t\t}\n\n\t\treturn (oPasscount == 2);\n}", "onUploadFail() {\n $(this.options.progressBar)\n .removeClass(\"progress-bar-animated progress-bar-striped\")\n .addClass(\"bg-danger\");\n\n new Noty({\n timeout: 5000,\n text: $(this.options.fileInput).attr(\"data-upload-fail-message\"),\n type: \"error\"\n }).show();\n\n this.enableAddFileButton();\n }", "function validateFile(file, uploadInputId) {\n let fileExtension = file.name.split('.').pop().toLowerCase();\n if (settings.allowedExtensions.indexOf(fileExtension) < 0) {\n $(uploadErrorContainerDivSelector).append(`<li>${fileExtension} extension is not allowed</li>`);\n $(uploadErrorContainerDivSelector).show();\n return false;\n }\n\n if (file.size > settings.size) {\n $(uploadErrorContainerDivSelector).append(`<li>${file.name} (${file.size} bytes) exceeds upload limit</li>`);\n $(uploadErrorContainerDivSelector).show();\n return false;\n }\n return true;\n }", "function validateFileExtention(){\n\tvar ext=\"\";\n\tvar kilobyte=1024;\n\tvar len=$('input[type=file]').val().length;\n\tvar count=0;\n\t $('input[type=file]').each(function () {\n\t var fileName = $(this).val().toLowerCase(),\n\t regex = new RegExp(\"(.*?)\\.(pdf|jpeg|png|jpg|gif)$\");\n\t\t\t if(fileName.length!=0){\n\t \tif((this.files[0].size/kilobyte)<=kilobyte){\n\t\t\t\t}else{\n\t\t\t\t\tif(fileName.lastIndexOf(\".\") != -1 && fileName.lastIndexOf(\".\") != 0)\n\t\t\t\t ext= fileName.substring(fileName.lastIndexOf(\".\")+1); \n\t\t\t\t\talert(\"Please Upload Below 1 MB \"+ext+\" File\");\n\t\t\t\t\tcount++;\n\t\t\t\t\t//alert('Maximum file size exceed, This file size is: ' + this.files[0].size + \"KB\");\n\t\t\t\t\t$(this).val('');\n\t\t\t\treturn false;\n\t\t\t\t}\n\t\t if (!(regex.test(fileName))) {\n\t\t $(this).val('');\n\t\t alert('Please select correct file format');\n\t\t count++;\n\t\t return false; \t\n\t\t }\n\t }\n\t });\n\t if(count!=0){\n\t\t return false; \n\t }else{\n\t\t return true;\n\t }\n}", "function doCheckForLargeFiles(id) {\n var files = getAudioVideoFiles(DriveApp.getFolderById(id));\n return files.some(function(file) {\n return file.getSize() > 25 << 20;\n });\n}", "function CheckFile(file)\n{\n var msg;\n var error=0;\n var maxSize=1024*1024*5;\n if(file.files[0].size>maxSize)\n error=error+1;\n var filesExt = ['jpg', 'gif', 'png','jpeg'];\n var parts = $(file).val().split('.');\n if(filesExt.join().search(parts[parts.length - 1]) == -1){\n error=error+2;\n }\n if(error!=0){\n switch (error) {\n case 1:\n msg='Файл перевищує 5 Мб';\n break;\n case 2:\n msg='Неправильний формат файлу';\n break;\n case 3:\n msg='Файл перевищує 5 Мб. Неправильний формат файлу';\n break;\n }\n $('#errorMessage').text(msg);\n $('#errorMessage').show();\n $('#imgButton').attr('disabled','true');\n }else{\n $('#errorMessage').hide();\n $('#imgButton').removeAttr('disabled');\n }\n}", "function isPassValidation(files) {\r\n var errorMessage = \"\";\n var disallowedTypes = disallowedFileTypes;\n var disallowedTypeArray = disallowedTypes.split(\";\");\n var limitSize = maxFileSizeByByte;\n var typeErrorCount = 0;\n var typeErrorContent = \"\";\n var sizeErrorCount = 0;\n var sizeErrorContent = \"\";\n var zeroSizeErrorCount = 0;\n var zeroSizeErrorContent = \"\";\n var allowedFiles = [];\n\n if (disallowedTypeArray.length > 0) {\r\n for (var k = 0; k < disallowedTypeArray.length; k++) {\r\n if (String.IsNullOrEmpty(disallowedTypeArray[k])) {\r\n continue;\r\n }\n\n if (disallowedTypeArray[k].indexOf(\".\") != 0) {\r\n disallowedTypeArray[k] = \".\" + disallowedTypeArray[k];\r\n }\r\n }\r\n }\n\n for (var j = 0; j < files.length; j++) {\r\n var isDisallowed = false;\n var fileName = files[j].name;\n\n if (disallowedTypeArray.length > 0) {\r\n\n var dotIndex = fileName.lastIndexOf(\".\");\n\n if (dotIndex > -1) {\r\n var suffix = fileName.substring(dotIndex, fileName.length);\n\n if (disallowedTypeArray.contains(suffix)) {\r\n isDisallowed = true;\n typeErrorCount++;\n typeErrorContent += fileName + \"; \";\r\n }\r\n }\r\n }\n\n if (files[j].size == 0 && !isDisallowed) {\r\n isDisallowed = true;\n zeroSizeErrorCount++;\n zeroSizeErrorContent += fileName + \"; \";\r\n }\n\n if (!isDisallowed && parseInt(limitSize) > 0 && files[j].size > parseInt(limitSize)) {\r\n isDisallowed = true;\n sizeErrorCount++;\n sizeErrorContent += fileName + \"; \";\r\n }\n\n if (!isDisallowed) {\r\n allowedFiles.push(files[j]);\r\n }\r\n }\n\n if (typeErrorCount > 0) {\r\n var typeErrorMsgPattern = typeErrorPattern;\n errorMessage = String.format(typeErrorMsgPattern, typeErrorCount, typeErrorContent);\n errorMessage += \"<br/>\";\r\n }\n\n if (sizeErrorCount > 0) {\r\n var sizeErrorMsgPattern = sizeErrorPattern;\n errorMessage += String.format(sizeErrorMsgPattern, sizeErrorCount, sizeErrorContent);\n errorMessage += \"<br/>\";\r\n }\n\n if (zeroSizeErrorCount > 0) {\r\n\n var zeroSizeErrorMsgPattern = zeroSizeErrorPattern;\n errorMessage += String.format(zeroSizeErrorMsgPattern, zeroSizeErrorCount, zeroSizeErrorContent);\n errorMessage += \"<br/>\";\r\n }\n\n if (errorMessage.length == 0) {\r\n return allowedFiles;\r\n }\n\n // used in attachment list iframe for Resubmit link button.\n if (!$.exists('#' + errorMsgId)) {\r\n parent.showMessage(errorMsgId, errorMessage, \"Error\", true, 1, true);\r\n }\n else {\r\n showMessage(errorMsgId, errorMessage, \"Error\", true, 1, true);\r\n }\n\n return allowedFiles;\r\n }", "function validateAttachFile() {\n var tempName = \"\";\n var fileName = fileInput.files[0].name;\n var fileExtension = fileName.split('.').pop().toLowerCase();\n var fileSize = fileInput.files[0].size;\n \n if(jQuery.inArray(fileExtension, ['png', 'jpg', 'jpeg', 'PNG', 'JPG', 'JPEG']) == -1) {\n errorMsg = \"<i>\" + fileName + \"</i> has invalid file type<br>\";\n attachment = \"\"\n } else if(fileSize > 4000000) {\n errorMsg = \"The size of <i>\" + fileName + \"</i> is too big<br>\";\n fileInputText.value = \"\";\n attachment = \"\";\n } else {\n errorMsg = \"\";\n if (fileName.lastIndexOf('\\\\')) {\n tempName = fileName.lastIndexOf('\\\\') + 1;\n } else if (fileName.lastIndexOf('/')) {\n tempName = fileName.lastIndexOf('/') + 1;\n }\n fileInputText.value = fileName.slice(tempName, fileName.length);\n attachment = fileInput.files[0];\n }\n}", "function isPassValidation(files) {\n var errorMessage = \"\";\n var disallowedTypes = disallowedFileTypes;\n var disallowedTypeArray = disallowedTypes.split(\";\");\n var limitSize = maxFileSizeByByte;\n var typeErrorCount = 0;\n var typeErrorContent = \"\";\n var sizeErrorCount = 0;\n var sizeErrorContent = \"\";\n var zeroSizeErrorCount = 0;\n var zeroSizeErrorContent = \"\";\n var allowedFiles = [];\n\n if (disallowedTypeArray.length > 0) {\n for (var k = 0; k < disallowedTypeArray.length; k++) {\n if (String.IsNullOrEmpty(disallowedTypeArray[k])) {\n continue;\n }\n\n if (disallowedTypeArray[k].indexOf(\".\") != 0) {\n disallowedTypeArray[k] = \".\" + disallowedTypeArray[k];\n }\n }\n }\n\n for (var j = 0; j < files.length; j++) {\n var isDisallowed = false;\n var fileName = files[j].name;\n\n if (disallowedTypeArray.length > 0) {\n\n var dotIndex = fileName.lastIndexOf(\".\");\n\n if (dotIndex > -1) {\n var suffix = fileName.substring(dotIndex, fileName.length);\n\n if (disallowedTypeArray.contains(suffix)) {\n isDisallowed = true;\n typeErrorCount++;\n typeErrorContent += fileName + \"; \";\n }\n }\n }\n\n if (files[j].size == 0 && !isDisallowed) {\n isDisallowed = true;\n zeroSizeErrorCount++;\n zeroSizeErrorContent += fileName + \"; \";\n }\n\n if (!isDisallowed && parseInt(limitSize) > 0 && files[j].size > parseInt(limitSize)) {\n isDisallowed = true;\n sizeErrorCount++;\n sizeErrorContent += fileName + \"; \";\n }\n\n if (!isDisallowed) {\n allowedFiles.push(files[j]);\n }\n }\n\n if (typeErrorCount > 0) {\n var typeErrorMsgPattern = typeErrorPattern;\n errorMessage = String.format(typeErrorMsgPattern, typeErrorCount, typeErrorContent);\n errorMessage += \"<br/>\";\n }\n\n if (sizeErrorCount > 0) {\n var sizeErrorMsgPattern = sizeErrorPattern;\n errorMessage += String.format(sizeErrorMsgPattern, sizeErrorCount, sizeErrorContent);\n errorMessage += \"<br/>\";\n }\n\n if (zeroSizeErrorCount > 0) {\n\n var zeroSizeErrorMsgPattern = zeroSizeErrorPattern;\n errorMessage += String.format(zeroSizeErrorMsgPattern, zeroSizeErrorCount, zeroSizeErrorContent);\n errorMessage += \"<br/>\";\n }\n\n if (errorMessage.length == 0) {\n return allowedFiles;\n }\n\n // used in attachment list iframe for Resubmit link button.\n if (!$.exists('#' + errorMsgId)) {\n parent.showMessage(errorMsgId, errorMessage, \"Error\", true, 1, true);\n }\n else {\n showMessage(errorMsgId, errorMessage, \"Error\", true, 1, true);\n }\n\n return allowedFiles;\n }", "function validateFile({ target }) {\n const file = target.files[0];\n\n if (file.size > attachedFileSizeLimit) {\n alert('El tamaño del archivo excede el límite permitido.');\n target.value = null; //emptying the control\n return null;\n }\n\n // if all is ok add the file to the stack to be uploaded\n target.validity.valid && setFiles([...files, file]);\n }", "function checkName() {\n fs.lstat(finalPath, err => {\n if (err === null) {\n hash = getHash()\n newFileName = hash + '.' + fileExt\n tmpPath = path.join(os.tmpdir(), newFileName)\n finalPath = path.join(settings.path, newFileName)\n checkName()\n return\n }\n\n file.on('limit', () => {\n fs.unlink(tmpPath, checkErr)\n\n res.status(413)\n res.end(errorRes('exceeded max file size'))\n })\n\n file.on('end', () => {\n if (removeUpload) {\n fs.unlink(tmpPath, checkErr)\n return\n }\n\n move(tmpPath, finalPath, err => {\n if (err) {\n res.status(500)\n res.end(\n JSON.stringify(\n new GeneralError('server encountered an error'),\n null,\n 2\n )\n )\n return\n }\n\n if (removeUpload) {\n fs.unlink(finalPath, checkErr)\n }\n mvDone = true\n checkDone()\n })\n })\n\n file.pipe(fs.createWriteStream(tmpPath))\n })\n }", "function uploadFailed(evt) {\n alert(\"There was an error attempting to upload the file.\");\n }", "function checkFile(imgPath) {\n\n clearTimeout(fileCheckTimer);\n\n // Check whether saving is finished\n fileCheckTimer = setTimeout(function() {\n\n fs.stat(imgPath, function(err, stat) {\n if(err) console.log(err);\n\n var currentFileSize = stat.size;\n\n if(currentFileSize === fileSize) {\n // Still saving recall this function\n checkFile(imgPath);\n } else {\n // Filesize has not increased\n // - post the image\n // - clear the timer\n // - set fileSize back to zero\n postFile(imgPath);\n clearTimeout(fileCheckTimer);\n fileSize = 0;\n }\n\n });\n\n }, 1000);\n}", "function ValidateFileUpload2(){\n\t$('#errFileMax2').html('');\n\t$('#upload_file').removeClass('validation-failed');\n\t$('#upload_file').removeClass('validation-success');\n\tvar fileCount = document.getElementById(\"file-upload-2\").files.length;\n\tif(fileCount > 10){\n\t\t$('#upload_file').addClass('validation-failed');\n\t\t$('#file_2_error').html('Chọn quá 10 file cho một lần upload');\n\t\treturn false;\n\t}\n\telse{\n\t\t$('#upload_file').addClass('validation-success');\n\t\t$('#file_2_error').html('');\n\t\treturn true;\n\t}\n}", "function fileChangeCheck(fileUp) {\n var fileName = fileUp[\"0\"].files[\"0\"].name;//獲取本地文件名稱\n var fileSize = fileUp[\"0\"].files[\"0\"].size;//獲取文件大小\n //檢查上傳文件是否超過2MB\n fileSize = fileSize / 1024;\n if (fileSize > 2048) {\n alert(\"图片不能大于2MB\");\n $(this).val(\"\");\n return false;\n } else {\n //檢查上傳文件是圖片文件\n var fileName = fileName.substring(fileName.lastIndexOf(\".\") + 1).toLowerCase();\n if (fileName != \"jpg\" && fileName != \"jpeg\" && fileName != \"png\" && fileName != \"gif\") {\n alert(\"请选择图片格式上传(jpg,png,gif,gif等)!\");\n $(this).val(\"\");\n return false;\n } else {\n return true;\n }\n }\n}", "function validarPeso(datos) {\n if (datos.files && datos.files[0]) {\n var pesoFichero = datos.files[0].size / 1024;\n if (pesoFichero > pesoPermitido) {\n $('#texto').text('El peso maximo permitido del fichero es: ' + pesoPermitido + ' KBs Su fichero tiene: ' + pesoFichero + ' KBs');\n return false;\n } else {\n return true;\n }\n }\n}", "function onUploadError(event) {\r\n\t\t\tthis.progressReport.innerHTML = \"上传失败\";\r\n\t\t}", "function checkImgFile(file) {\n //Check File Size\n if (file.size > 0 && file.size < 1000000) {\n //Check File Name\n var extension = file.name.substr(file.name.lastIndexOf('.') + 1).toUpperCase();\n if (extension == \"PNG\" || extension == \"JPG\" || extension == \"JPEG\" || extension == \"GIF\")\n return 1;\n else\n return \"Supported File Types: PNG, JPG, GIF\";\n }\n else\n return \"Supported File Size: 1MB Maximum\";\n }", "function fileIsErrorFree(file, errors)\n{\n isError = false;\n if (isInvalid(file.name))\n {\n isError = true;\n errors.noName += 1;\n }\n if (isInvalid(file.path))\n {\n isError = true;\n errors.noPath += 1;\n }\n if (isError)\n {\n errors.errors += 1;\n errors.errorFiles.push(file);\n return false;\n }\n return true;\n}", "function _requestErrorHandler(error, response, file) {\n if (error) {\n return error;\n } else if (response.statusCode >= 300) {\n return true;\n }\n return false;\n}", "function enforceFileLimits(req, res, next) {\n for (const file of Object.values(req.files)) {\n if (file.truncated) {\n return next(createHttpError(400, 'Files must be 5MB or smaller.'));\n }\n if (!/^image\\//.test(file.mimetype)) {\n return next(createHttpError(400, 'File must be an image'));\n }\n }\n next();\n}", "function fileUploaderValidationImgOnly(fileUploader, maxSizeInBytes) {\n var id_value = document.getElementById(fileUploader.id).value;\n if (id_value != '') {\n var valid_extensions = /(.jpg|.jpeg|.gif|.png|.bmp)$/i;\n if (valid_extensions.test(id_value)) {\n if (document.getElementById(fileUploader.id).files[0].size > parseInt(maxSizeInBytes)) {\n document.getElementById(fileUploader.id).value = \"\";\n alert('File size should not be greater than ' + parseInt(maxSizeInBytes / 1024).toString() + 'KB');\n }\n }\n else {\n document.getElementById(fileUploader.id).value = \"\";\n alert('Invalid File');\n }\n }\n}", "function updateSize() {\n var mb_in_bytes = 1024 * 1024;\n var file = document.getElementById(\"data-file\").files[0],\n type_file = file.name.split('.').pop();\n if (file.size < mb_in_bytes * 5 && type_file === \"docx\") {\n return true;\n }\n return false;\n}", "function validateFiles(inputFile) {\n var maxExceededMessage = \"Le fichier est supérieur à 5 Mo, veuillez réduire la taille de votre fichier.\";\n var extErrorMessage = \"Les formats: .jpg, .jpeg, .gif or .png sont acceptés uniquement\";\n var allowedExtension = [\"jpg\", \"jpeg\", \"gif\", \"png\"];\n\n var extName;\n var maxFileSize = $(inputFile).data('max-file-size');\n var sizeExceeded = false;\n var extError = false;\n\n $.each(inputFile.files, function() {\n if (this.size && maxFileSize && this.size > parseInt(maxFileSize)) {sizeExceeded=true;};\n extName = this.name.split('.').pop();\n if ($.inArray(extName, allowedExtension) == -1) {extError=true;};\n });\n if (sizeExceeded) {\n window.alert(maxExceededMessage);\n $(inputFile).val('');\n };\n\n if (extError) {\n window.alert(extErrorMessage);\n $(inputFile).val('');\n };\n}", "function _checkError(file) {\n var errorMessage = null;\n if( !file ) errorMessage = \"Error creating file on Google Drive :(\";\n if( file.error ) errorMessage = file.message;\n\n if( errorMessage ) {\n _setMessage(errorMessage, \"danger\");\n $(\"#export-csv\").removeClass(\"disabled\").html(\"Export\");\n return true;\n }\n return false;\n}", "async function spaceCheck(fileSize, userID) {\n var folderSize = await checkUploadLimit(userID)\n var dataLimit = await getDataLimit() * 1000000\n\n if (folderSize + fileSize <= dataLimit) {\n return true;\n } else {\n console.log((\"not enough space\"));\n return false;\n }\n\n}", "function checkSize(response) {\n var size = response.headers.get('content-length');\n // Do stuff based on response size\n console.log(`found size is: ${size} bytes`);\n}", "function upload(e) {\n if (e.target.files[0].size > 1024 * 1024 * 2) {\n alert('Please upload image 2MB or below')\n return\n }\n ReactSaveImg\n .uploadFile(e.target.files[0], newFileName)\n .then((data) => {\n setImage(\"\")\n setImage(data.location)\n })\n .catch(err => console.error(err))\n }", "function validateFile(input,ext,size)\n{\n var file_name = input.value;\n var split_extension = file_name.split(\".\").pop();\n var extArr = ext.split(\"|\");\n if($.inArray(split_extension.toLowerCase(), extArr ) == -1)\n {\n $(input).val(\"\");\n showToaster('error','You Can Upload Only .'+extArr.join(\", \")+' files !');\n return false;\n }\n if(size != \"\"){\n \n }\n}", "validateFormatFiles() {\n var exito = true;\n var erroresEnArchivos = false; // Para comprobar si hay errores\n var maximoDeArchivos = NUM_MAX_FILES_UPLOAD; // El número máximo de archivos que se podrán enviar\n var pesoMaximoPorArchivo = 100000; // El peso máximo en bytes por archivo.\n var matrizDeTiposAdmitidos = new Array(\"image/jpeg\", \"image/png\", \"image/gif\", \"image/tiff\");\n var erroresTipoAdmitidos = new Array();\n var archivosSeleccionados = $(\"#ficheros\")[0][\"files\"];\n\n var numMaxArchivos = false;\n // Si se excede el número de archivos, marcamos que hay error.\n if (archivosSeleccionados.length > maximoDeArchivos) {\n exito = false;\n this.showMessageUpload(this.ID_DIV_MSG_ERROR, messages.mensaje_error_subir_maximo_fotografías_1 + maximoDeArchivos + messages.mensaje_error_subir_maximo_fotografías_2);\n this.emptySelectedFiles();\n\n } else {\n\n if (!erroresEnArchivos) {\n // Si no hay error, seguimos comprobando\n for (var archivo in archivosSeleccionados) {\n if (archivosSeleccionados[archivo][\"name\"] != undefined && archivosSeleccionados[archivo][\"type\"] != undefined) {\n if (archivo != parseInt(archivo)) continue;\n \n if (matrizDeTiposAdmitidos.indexOf(archivosSeleccionados[archivo][\"type\"]) < 0) {\n erroresTipoAdmitidos.push(archivosSeleccionados[archivo][\"name\"]);\n erroresEnArchivos = true;\n }\n }\n }\n }\n\n\n if (erroresEnArchivos) {\n if (erroresTipoAdmitidos.length > 0) {\n var msgError = \"\";\n for (var i = 0; erroresTipoAdmitidos != null && i < erroresTipoAdmitidos.length; i++) {\n msgError = msgError + erroresTipoAdmitidos[i];\n if (erroresTipoAdmitidos.length - i > 1) {\n msgError = msgError + \",\";\n }\n } // for\n\n this.showMessageUploadList(this.ID_DIV_MSG_ERROR, messages.mensaje_error_archivos_no_son_imagenes, erroresTipoAdmitidos);\n }\n this.emptySelectedFiles();\n exito = false;\n } else if (archivosSeleccionados.length == 0) {\n this.showMessageUpload(this.ID_DIV_MSG_ERROR, messages.mensaje_error_archivos_no_son_imagenes);\n this.hideDivMessage(this.ID_DIV_MSG_SUCCESS);\n exito = false;\n }\n }\n\n return exito;\n }", "function validateJPG(file, cb) {\n var data = fs.readFileSync(file),\n len = data.length,\n last = data.slice(len-2,len),\n ends = (last[0] === 0xFF && last[1] === 0xD9);\n cb(ends ? false : \"jpg file \"+file+\" is incomplete.\");\n }", "function isQuotaExceeded(e) {\n var quotaExceeded = false;\n if (e) {\n if (e.code) {\n switch (e.code) {\n case 22:\n quotaExceeded = true;\n break;\n case 1014:\n // Firefox\n if (e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n quotaExceeded = true;\n }\n break;\n }\n } else if (e.number === -2147024882) {\n // Internet Explorer 8\n quotaExceeded = true;\n }\n }\n return quotaExceeded;\n }", "function checkForFile (fileUrl) {\n var xhr = $.ajax({\n type: \"HEAD\",\n async: true,\n url: fileUrl,\n success: function(message, text, response) {\n var fileLength = xhr.getResponseHeader('Content-Length');\n if (fileLength == 0) {\n displayError('Media file is zero length: ' + fileUrl);\n return false;\n }\n },\n error: function (error) {\n displayError('Missing media file: ' + fileUrl);\n return false;\n }\n });\n \n return true;\n}", "function processSingleFileFailed(fileInfo, containerId, progressBarContainer, errorContainerId, isTimeout) {\r\n //add file id to the array of failed uploads\r\n if (failedUploads)\r\n failedUploads.push(fileInfo.FileId);\r\n\r\n if (fileUploaderCollection\r\n && fileUploaderCollection[containerId]\r\n && fileUploaderCollection[containerId].fileInfoArray) {\r\n var filesArray = fileUploaderCollection[containerId].fileInfoArray;\r\n\r\n var matchCount = filesArray.filter(function (el) {\r\n return el.FileId === fileInfo.FileId;\r\n });\r\n\r\n if (matchCount > 0) {\r\n filesArray[idx].StateString = 'Failed';\r\n }\r\n }\r\n\r\n //Continue button should be disabled\r\n DisableFinishButton(true);\r\n\r\n //update progress for the failed file to 0\r\n FileUploadUtil.updateProgressBar(progressBarContainer, 0);\r\n executeSingleFileFinished(containerId, fileInfo.FileId);\r\n\r\n //mark file row as failed\r\n var fileRow = $('#' + fileInfo.FileId).parent();\r\n\r\n if (fileRow) {\r\n fileRow.addClass('fileWarning');\r\n }\r\n\r\n //display error message\r\n if (isTimeout)\r\n showMessage(errorContainerId, timeoutErrorMsg, \"Error\", true, 1, true);\r\n else\r\n showMessage(errorContainerId, uploadCommonErrorMsg, \"Error\", true, 1, true);\r\n }", "function readURL(input){\n //alert(input.files[0].size);\n if(input.files[0].size<2200000){\n\n if(input.files && input.files[0]){\n var read = new FileReader();\n\n read.onload = function(f){\n $('#imagePrev').attr('src', f.target.result);\n };\n read.readAsDataURL(input.files[0]);\n }\n }\n else{\n alert(\"Picture size exceeding 2MB !, Please upload again.\");\n }\n}", "function upload() {\n if (resumable == null)\n resumable = resumableInit(fileInfo, uploadCompleteHandler);\n}", "function validateFileBeforeUpload (file){\n // file type checking \n var validFormats = ['jpg','jpeg','png'];\n var filename = file.name;\n var ext = filename.substr(filename.lastIndexOf('.')+1);\n var matchExt = false;\n for (var index = 0; index < validFormats.length; index++) {\n if(ext == validFormats[index]){\n matchExt = true; \n }\n \t}\n \t return matchExt; \n\t}", "_onError(event) {\n const span = document.createElement(\"span\");\n span.innerHTML = \"\" + \"Upload failed. Retrying in 5 seconds.\";\n this.node.appendChild(span);\n this.retry = setTimeout(() => this.callbackUpload(), 5000, this.data);\n\n TheFragebogen.logger.error(this.constructor.name + \".callbackUpload()\", \"Upload failed with HTTP code: \" + this.request.status + \". Retrying in 5 seconds.\");\n }", "function verifyFileInS3(req, res) {\n function headReceived(err, data) {\n if (err) {\n res.status(500);\n console.log(err);\n res.end(JSON.stringify({error: \"Problem querying S3!\"}));\n }\n else if (expectedMaxSize != null && data.ContentLength > expectedMaxSize) {\n res.status(400);\n res.write(JSON.stringify({error: \"Too big!\"}));\n deleteFile(req.body.bucket, req.body.key, function(err) {\n if (err) {\n console.log(\"Couldn't delete invalid file!\");\n }\n\n res.end();\n });\n }\n else {\n res.end();\n }\n }\n\n callS3(\"head\", {\n bucket: req.body.bucket,\n key: req.body.key\n }, headReceived);\n}", "function checkFileType( file, cb ) {\n\n // the regex came from Andrew Mead's node course lecture 124\n if ( !file.originalname.match( /\\.(jpg|jpeg|png)$/ ) ) {\n\n // remember the return keyword will stop the function execution and then set our error\n // message\n return cb( new Error( 'Please upload a jpeg, jpg or png image' ) )\n\n }\n\n // we're good to go so let's pass in null for the error and pass in true as the second\n // argument, which will accept the file upload\n cb( null, true )\n\n\n} // end of checkFileType function", "function validate_image (id) {\n\t/*alert('hiiii');\n if (typeof ($(\"#\"+id)[0].files) != \"undefined\") {\n var size = parseFloat($(\"#fileUpload\")[0].files[0].size / 1024).toFixed(2);\n alert(size + \" KB.\");\n } else {\n alert(\"This browser does not support HTML5.\");\n }*/\n\treturn true;\n}", "function verifyElementWasUploaded(timeWait) {\r\n $.ajax({\r\n url: endpoint + '?format=json&name=' + encodeURIComponent(file.name),\r\n type: 'GET',\r\n xhrFields: {\r\n withCredentials: true\r\n }\r\n }).done(function (data, textStatus, jqXHR) {\r\n var fileAvailable = data && data.length > 0;\r\n if (!fileAvailable) {\r\n setTimeout(function retry() {\r\n verifyElementWasUploaded(timeWait * 2);\r\n }, timeWait * 2);\r\n } else {\r\n uploadOk(file);\r\n }\r\n }).fail(function headFail(jqXHR, textStatus) {\r\n uploadOk(file);\r\n });\r\n }", "function fileQueueError(file, errorCode, message)\n {\n try\n {\n switch (errorCode)\n {\n case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:\n alert(\"You have attempted to queue too many files.\\n\" + (message === 0 ? \"You have reached the upload limit.\" : \"You may select \" + (message > 1 ? \"up to \" + message + \" files.\" : \"one file.\")));\n return false;\n case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:\n alert(\"The file you selected is too big.\");\n this.debug(\"Error Code: File too big, File name: \" + file.name + \", File size: \" + file.size + \", Message: \" + message);\n return false;\n case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:\n alert(\"The file you selected is empty. Please select another file.\");\n this.debug(\"Error Code: Zero byte file, File name: \" + file.name + \", File size: \" + file.size + \", Message: \" + message);\n return false;\n case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:\n alert(\"The file you choose is not an allowed file type.\");\n this.debug(\"Error Code: Invalid File Type, File name: \" + file.name + \", File size: \" + file.size + \", Message: \" + message);\n return false;\n default:\n alert(\"An error occurred in the upload. Try again later.\");\n this.debug(\"Error Code: \" + errorCode + \", File name: \" + file.name + \", File size: \" + file.size + \", Message: \" + message);\n return false;\n }\n }\n catch(e){}\n \n if (typeof(handlers.file_queue_error_handler) == 'function')\n {\n handlers.file_queue_error_handler(file, errorCode, message);\n }\n }", "function checkPdf(pdf) {\n\tconsole.log(\"checkPdf()\");\n\tvar pdfType = pdf.type;\n\tvar pdfSize = pdf.size;\n\tconsole.log(pdfSize + pdfType)\n\tvar error = \"\";\n\tvar uploadOk = true;\n\t// Extension check\n\tif (pdfType != \"application/pdf\") {\n\t\tuploadOk = false;\n\t\terror = error + \"Il file selezionato non è un pdf.<br>\";\n\t}\n\t// Size check\n\tif (pdfSize > 2000000) {\n\t\tuploadOk = false;\n\t\terror = error + \"Il file selezionato è troppo pesante. Il limite supportato è di 2 MB.<br>\" + '\\n';\n\t}\n\t// Error?\n\tif (!uploadOk) {\n\t\terror = error + \"Il caricamento non è andato a buon fine!\";\n\t\t$(\"#alert-corsi-pdf\").append('<div class=\"alert alert-danger alert-dismissable fade in\">' + \n\t\t\t'<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>' + error +\n\t\t\t'</div>');\n\t}\n\treturn uploadOk;\n}", "function checkRemoteFile() {\n remoteLogExists(remote_file_hash, (exists) => {\n if (!exists) {\n var notif = toastr.warning('Your file is no more on the server, you need to upload it again', 'File uploaded')\n fileUploadDisabledClean()\n redirectToastrClick(notif, \"input_data_title\")\n }\n })\n}", "function fileReadFail(data){\n console.log(data);\n}", "function checkFileType(file, cb) {\r\n //Allowed types\r\n const fileTypes = /jpeg|jpg|png|gif/;\r\n //check ext\r\n const extName = fileTypes.test(path.extname(file.originalname).toLowerCase());\r\n const mimetype = fileTypes.test(file.mimetype); //mimetype for images is image/jpeg or image/jpg etc.\r\n if (extName && mimetype) {\r\n return cb(null, true); //error : null and accept file : true\r\n } else {\r\n cb('Error: Images Only!'); //this is catched on upload(req,res,(err)=>{}) here in err.\r\n }\r\n}", "function validateFile(dest, cb) {\n if(dest.indexOf(\".jpg\") > -1) {\n validateJPG(dest, cb);\n }\n else if(dest.indexOf(\".png\") > -1) {\n validatePNG(dest, cb);\n }\n // no idea how to validate. So just claim it's fine.\n else { cb(false); }\n }", "function isValidFile(file) { \n\n //document.getElementById('results-section').style.display = 'block';\n\n //if (!window.FileReader) {\n // bodyAppend(\"The file API isn't supported on this browser yet.\");\n // return;\n //}\n\n //if (!input) {\n // bodyAppend(\"Um, couldn't find the fileinput element.\");\n //}\n //else if (!input.files) {\n // bodyAppend(\"This browser doesn't seem to support the `files` property of file inputs.\");\n //}\n //else if (!input.files[0]) {\n // bodyAppend(\"Please select a file before clicking 'Load'\");\n //}\n /*else*/ {\n //var file = input.files[0];\n var sizeInMB = (file.size / (1024 * 1024)).toFixed(2);\n\n if (sizeInMB > 1) { \n bodyAppend(\"File \" + file.name + \" is \" + file.size + \" bytes in size (\" + sizeInMB + \" megabytes in size)\" + \"- File isn't valid\");\n return false;\n } \n \n var filename = file.name;\n var parts = filename.split('.');\n var extension = parts[parts.length - 1];\n\n if (extension === \"csv\" || extension === \"xml\") {\n bodyAppend(\"File \" + file.name + \" is \" + file.size + \" bytes in size (\" + sizeInMB + \" megabytes in size) \" + \"with format \" + extension + \" - File is valid\");\n return true;\n }\n else {\n bodyAppend(\"File \" + file.name + \" is \" + file.size + \" bytes in size (\" + sizeInMB + \" megabytes in size)\" + \"with format \" + extension + \"- File isn't valid\");\n return false;\n }\n } \n}", "function oversize() {\n $('#post_error').text(\"Soubor je příliš velký!\");\n}", "function sjb_is_attachment( event ) {\n var error_free = true;\n $(\".sjb-attachment\").each(function () {\n\n var element = $(\"#\" + $(this).attr(\"id\"));\n var valid = element.hasClass(\"valid\");\n var is_required_class = element.hasClass(\"sjb-not-required\"); \n\n // Set Error Indicator on Invalid Attachment\n if (!valid) {\n if (!(is_required_class && 0 === element.get(0).files.length)) {\n error_free = false;\n }\n }\n\n // Stop Form Submission\n if (!error_free) {\n event.preventDefault();\n }\n });\n\n return error_free;\n }", "function loadFailed() {\n\talert(\"加载上传组件失败!\");\n}", "function file__ENCODING__ERR_ques_(fileExceptionCode) /* (fileExceptionCode : fileExceptionCode) -> bool */ {\n return (fileExceptionCode === 5);\n}", "function fileShareError(event) {\n // cleanup\n receiveBuffer = [];\n incomingFileData = [];\n receivedSize = 0;\n // error\n if (sendInProgress) {\n console.error(\"fileShareError\", event);\n alert(\"error: File Sharing \" + event.error);\n sendInProgress = false;\n }\n}", "function fc_UploadFile_Validar(idUpload) { \n var file = document.getElementById(idUpload); \n var fileName=file.value; \n\n fileName = fileName.slice(fileName.lastIndexOf(\"\\\\\") + 1); \n tipoError = -1;\n if ( fileName.length > 0 )\n {\n var ext = (fileName.toLowerCase().substring(fileName.lastIndexOf(\".\")))\n var listado = new Array(\".xls\",\".csv\");\n var ok = false;\n for (var i = 0; i < listado.length; i++){\n if (listado [i] == ext) { \n ok = true;\n break; \n }\n } \n if(ok){ \n tipoError = 0;\n }else{\n tipoError = 2;\n }\n }\n else\n { \n tipoError = 1; \n }\n return tipoError; \n}", "function getTotalSizeListFileUpload(uploaderIn){\n\tvar listFileTotalSizeByte = 0;\n\tfor(var i =0; i<uploaderIn.queue.length;i++){\n\t\tvar item = uploaderIn.queue[i];\n\t\tvar fileSize = item.file.size;\n\t\tlistFileTotalSizeByte += fileSize;\n\t}\n\tvar listFileTotalSizeMB = listFileTotalSizeByte/1024/1024;\n\tif(listFileTotalSizeMB > MAX_TOTAL_FILE_LENGTH_MEGABYTE){\n\t\treturn false;\n\t}\n\t\n\treturn true;\n}", "function checkAllFileUploadedFn(uploaderIn){\n\tvar checkFileAllisUpload = true;\n\tfor(var i =0; i<uploaderIn.queue.length;i++){\n\t\tvar item = uploaderIn.queue[i];\n\t\tvar itemStatus = item.isSuccess;\n\t\tif(!itemStatus){\n\t\t\tcheckFileAllisUpload = false\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn checkFileAllisUpload;\n}", "function handleUpload(req, res) {\n var uploadUUID = req.parsedUrl.parsedQuery.upload_uuid;\n if (!uploadUUID || !clientMap[uploadUUID] || clientMap[uploadUUID].state == 'done') {\n logger.error('No valid uploadUUID or multiple request?!?', req);\n clientMap[uploadUUID].state = 'error';\n res.writeHead(200, {'Content-Type': 'text/html'}); \n res.end('No valid uploadUUID, please refresh the page and try again!');\n return;\n }\n\n clientMap[uploadUUID].state = 'progress';\n res.writeHead(200, {'Content-Type': 'text/html'});\n\n req.setEncoding('binary');\n var stream = parseMultipart(req, uploadUUID);\n\n //Check all the prerequisites to find out if we can really store the file!\n\n // This is a sync call so it can actually block! For simplicity purposes in this case, we use\n // this call. This call should never fail because we checked before that the dir can be created\n // but one never knows...\n try {\n var dirName = path.join(__dirname, 'uploads', clientMap[uploadUUID].id);\n fs.mkdirSync(dirName, 0755);\n } catch(err) {\n logger.error('Could not create dir: ' + dirName);\n clientMap[uploadUUID].state = 'error';\n res.end('Sorry, your upload has failed. Could not create directory: ' + dirName);\n return;\n }\n \n var fileStream = null;\n var fileName = null;\n var totalSoFar = 0;\n var fileSize = 0;\n\n \n // Set handler for a request part received\n stream.onPartBegin = function(part) {\n\n fileSize = part.parent.headers['content-length'];\n fileNameUnparsed = stream.part.filename;\n //I have tested the parser and some filenames are not correctly\n //validated... for instance, if they contain ',' no filename\n //appers\n if(typeof stream.part.filename === 'undefined') {\n logger.debug('Closing the stream as couldnt parse the filename');\n res.end('Sorry we could not parse the filename, try again!');\n clientMap[uploadUUID].error = 1;\n stream.close();\n return;\n }\n \n \n //While testing IE on a virtual machine, it does not seem to report the \n //filename properly... reports full path (with unescaped // and \\\\)\n //so we use this to remove all these annoyances\n fileName = fileNameUnparsed.replace(/\\\\/g,'').replace(/\\//g,'').replace(/\\s/g, '');\n\n logger.debug('Trying to create file, name=' + part.name + ', size=' + fileSize + ' filename=' + fileNameUnparsed + ' dir=' + dirName + 'len=' + fileSize + ' parsed=' + fileName, req);\n \n var fullPathFileName = path.join(dirName,fileName);\n logger.debug('File being created at: ' + fullPathFileName);\n fileStream = fs.createWriteStream(fullPathFileName);\n \n fileStream.addListener('error', function(err) {\n logger.error('Got error while writing to file ' + fileName + ': ' + err, req);\n clientMap[uploadUUID].error = 1;\n clientMap[uploadUUID].state = 'error';\n res.end('Sorry, your upload has failed. Could not write to disk... full? Please refresh the page and try again!');\n });\n\n //Add drain (all queued data written) handler to resume receiving request data\n fileStream.addListener('drain', function() {\n try {\n req.resume(); \n } catch(err) {\n clientMap[uploadUUID].error = 1;\n clientMap[uploadUUID].state = 'error';\n logger.error('Sorry, your upload has failed. File too big? ' + err + ' user=' + uploadUUID, req);\n res.end('Sorry, your upload has failed. File too big? ' + err);\n }\n });\n };\n\n stream.onErr = function() {\n logger.error('Error receiving data, client closed the browser?!', req);\n };\n\n // Set handler for a request part body chunk received\n stream.onData = function(chunk) {\n req.pause();\n totalSoFar += chunk.length;\n var percent = (totalSoFar/fileSize*100).toFixed(2);\n\n // Write chunk to file and update progress\n fileStream.write(chunk, 'binary');\n clientMap[uploadUUID].percent = percent;\n };\n\n // Set handler for request completed\n stream.onEnd = function(chunk) {\n // As this is after request completed, all writes should have been queued by now\n // So following callback will be executed after all the data is written out\n logger.debug('Done uploading for: ' + uploadUUID + ' state: ' + clientMap[uploadUUID].state, req);\n if(fileStream && clientMap[uploadUUID].error == 0) {\n fileStream.addListener('drain', function() {\n // Close file stream\n fileStream.end();\n // Handle request completion, as all chunks were already written\n clientMap[uploadUUID].url = ('http://' + serverAddress + ':' + serverPort + '/download?file=' + clientMap[uploadUUID].id + '/' + fileName); \n clientMap[uploadUUID].state = 'url';\n logger.debug('Done uploading file and made it available on: ' + clientMap[uploadUUID].url + ' for client with sessid: ' + uploadUUID, req);\n res.write('Upload successful!');\n res.end();\n });\n } \n };\n}", "function onFileUploadFailed(e) {\n\tbootbox.alert(\"Error uploading file\");\n}", "uploadBigFile(genreAddress, file, f = null) {\n\t\tconsole.log(\"Got it!\");\n var date_added = Date.now();\n var orig_filename_list = file.name.split(\".\");\n var filename = orig_filename_list[0].replace(/\\s/g, \"_\").replace(/[^\\x00-\\x7F]/g, \"\").replace(/\\'/g, \"\").replace(/\\\"/g, \"\") + \"-\" + date_added + \".\" + orig_filename_list[orig_filename_list.length - 1];\n\n\t\tvar f_path = \"merged-ZeroLSTN/\" + genreAddress + \"/data/users/\" + app.siteInfo.auth_address + \"/\" + filename;\n\t\tconsole.log(f_path);\n\n page.checkOptional(genreAddress, false, () => {\n page.cmd(\"bigfileUploadInit\", [f_path, file.size], (init_res) => {\n var formdata = new FormData();\n formdata.append(file.name, file);\n\n var req = new XMLHttpRequest();\n\n req.upload.addEventListener(\"progress\", console.log);\n req.upload.addEventListener(\"loadend\", () => {\n page.cmd(\"wrapperNotification\", [\"info\", \"File saved. Click Save to publish!\"]);\n if (f !== null && typeof f === \"function\") f(filename);\n });\n req.withCredentials = true;\n req.open(\"POST\", init_res.url);\n req.send(formdata);\n });\n });\n\t}", "function checkAllFileOfQueueUploaded(uploaderIn){\n\tvar checkFileAllisUpload = true;\n\tfor(var i =0; i<uploaderIn.queue.length;i++){\n\t\tvar item = uploaderIn.queue[i];\n\t\tvar itemStatus = item.isSuccess;\n\t\tif(!itemStatus){\n\t\t\tcheckFileAllisUpload = false\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn checkFileAllisUpload;\n}", "function limitUpload() {\n\n $('#multiUpload').find('input[data-maxfiles]').on('change', function() {\n\n var max = $(this).attr('data-maxfiles');\n\n if (this.files.length > max) {\n MechAlert.no('Максимальна кількість файлів для одночасного завантаження: ' + max);\n this.value = '';\n }\n });\n}", "function uncompressedSize() {\n fs.stat(path.join(file), (err, stat) => {\n if (err) throw err;\n console.log(\"\\nCheck! Check!\\nThesize of this file is \", stat.size);\n });\n }", "function validateImageWithSize (files,height,width) \n{\n \n var image_height = height || \"\";\n var image_width = width || \"\";\n if (typeof files !== \"undefined\") \n {\n for (var i=0, l=files.length; i<l; i++) \n {\n var blnValid = false;\n var ext = files[0]['name'].substring(files[0]['name'].lastIndexOf('.') + 1);\n if(ext == \"JPEG\" || ext == \"jpeg\" || ext == \"jpg\" || ext == \"JPG\" || ext == \"png\" || ext == \"PNG\")\n {\n blnValid = true;\n }\n \n if(blnValid ==false) \n { \n\n showAlert(\"Sorry, \" + files[0]['name'] + \" is invalid, allowed extensions are: jpeg , jpg , png\",\"error\");\n $(\".fileupload-preview\").html(\"\");\n $(\".fileupload\").attr('class',\"fileupload fileupload-new\");\n $(\"#profile_image\").val('');\n \n return false;\n }\n else\n { \n var reader = new FileReader();\n reader.readAsDataURL(files[0]);\n reader.onload = function (e) \n {\n var image = new Image();\n image.src = e.target.result;\n \n image.onload = function () \n {\n var height = this.height;\n var width = this.width;\n console.log(\"current height:\"+height+\" validate height:\"+image_height );\n\n console.log(\"current width:\"+width+\" validate width:\"+image_width);\n\n if(height > image_height/* || width > image_width */)\n {\n $('#logo').val('');\n showAlert(\"Height and Width must be less than or equal to \"+image_height+\" X \"+image_width+\".\" ,\"error\");\n $(\".fileupload-preview\").html(\"\");\n $(\".fileupload\").attr('class',\"fileupload fileupload-new\");\n $(\"#image\").val('');\n return false; \n }\n else\n {\n //swal(\"Uploaded image has valid Height and Width.\");\n return true;\n }\n };\n \n }\n \n } \n \n }\n \n }\n else\n {\n showAlert(\"No support for the File API in this web browser\" ,\"error\");\n } \n}", "function validFile(req, res, next) {\n if (req.query.type !== \"file\") {\n res.status(400).json({\n success: false,\n message: \"Invalid URL\"\n });\n } else {\n next();\n }\n}", "function mcFileUploading($rootScope){\n \"use strict\";\n\n var uploader = null;\n var errorCallback = null;\n var successCallback = null;\n var uploaderOptions = {};\n var inputFileName = \"__fileSender__\";\n var abortUploadingID = null;\n var abortPreparingUploading = null;\n var abortUploadingCB = null;\n var abortNow = false;\n var whereWeWork = \"\";\n\n function parseFile(file, callback) {\n var fileSize = file.size;\n var chunkSize = 512 * 1024; // bytes\n var offset = 0;\n var chunkReaderBlock = null;\n var onePercent = file.size / 100;\n var currentPercent = 0;\n\n var readEventHandler = function (evt) {\n if (!abortNow){\n if (evt.target.error == null) {\n offset += evt.target.result.byteLength;\n currentPercent = (offset / onePercent).toFixed();\n\n callback(null, evt.target.result, currentPercent); // callback for handling read chunk\n } else {\n callback(evt.target.error);\n\n return;\n }\n\n if (offset >= fileSize) {\n callback(null, null, 100);\n\n return;\n }\n\n chunkReaderBlock(fileReader, offset, chunkSize, file);\n }\n };\n\n chunkReaderBlock = function (_reader, _offset, length, _file) {\n var reader = _reader || new FileReader();\n var blob = _file.slice(_offset, length + _offset);\n\n if (!_reader) {\n if (uploaderOptions.onBeforeFileAdd) {\n uploaderOptions.onBeforeFileAdd(file);\n }\n\n if (!abortPreparingUploading){\n abortPreparingUploading = function () {\n reader.abort();\n reader.onload = null;\n\n abortPreparingUploading = null;\n }\n }\n\n reader.onload = readEventHandler;\n }\n\n reader.readAsArrayBuffer(blob);\n\n return reader;\n };\n\n var fileReader = chunkReaderBlock(null, offset, chunkSize, file);\n }\n\n function startUploadAfterCheck(info, file) {\n uploaderOptions.Hash = info.Hash; // SHA1 хэш файла\n uploaderOptions.Width = $rootScope.thumbsSize.x; // произвольная ширина уменьшеной копии изображения\n uploaderOptions.Height = $rootScope.thumbsSize.y; // произвольная высота уменьшенной копии изображения\n uploaderOptions.FileName = info.FileName; // локальное название файла\n\n if (!info.Present) { // file not exist - uploading\n uploader.define(\"upload\", mcService.getLocalHostPath($rootScope.isWebClient) + \"/uploading/?sid=\" + mcConst.SessionID + \"&hash=\" + info.Hash + whereWeWork);\n uploader.addFile(file);\n } else {\n if (successCallback) {\n successCallback.apply(uploaderOptions, arguments);\n } else {\n console.trace('No set success callback on file uploading');\n }\n }\n }\n\n function electronUploader() {\n $rootScope.$broadcast(window._messages_.clientData.sendCMDToElectron, [\n mcConst._CMD_.ce_file_upload_start,\n uploaderOptions.filePath,\n {\n Where : uploaderOptions.Where,\n ID : uploaderOptions.ID,\n Type : uploaderOptions.Type,\n chatType : uploaderOptions.chatType\n }\n ]);\n\n abortUploadingCB = function () {\n abortUploadingCB = null;\n\n $rootScope.$broadcast(window._messages_.clientData.sendCMDToElectron, [\n mcConst._CMD_.ce_file_upload_abort\n ]);\n };\n \n abortPreparingUploading = function () {\n abortPreparingUploading = null;\n\n $rootScope.$broadcast(window._messages_.clientData.sendCMDToElectron, [\n mcConst._CMD_.ce_file_upload_prepare_abort\n ]);\n };\n }\n\n function checkFileExist(params, cb) {\n $rootScope.SendCMDToServer(\n [ mcConst._CMD_.cs_is_file_exists, mcConst.SessionID ]\n .concat(params || [])\n .concat(cb)\n );\n }\n\n function _goUploadClipboardImage() {\n var calcSha1 = mcService.SHA1();\n var Hash = \"\";\n var fileReader = new FileReader();\n\n fileReader.onloadend = function() {\n var screenImg = this.result;\n var imageInfo = uploaderOptions.clipboardImage;\n\n calcSha1.append(screenImg);\n\n if (!imageInfo.name || (imageInfo.name && imageInfo.name.indexOf(\"image.\") === 0 && !imageInfo.path) ){\n try{\n imageInfo[\"name\"] = \"Screenshot (\" + mcConst.UserInfo.Nick + \") \" + mcService.formatDate(new Date(), \"dd-mm-yyyy hh-nn-ss\") + \".png\";\n } catch (e) {}\n }\n\n Hash = calcSha1.end();\n\n checkFileExist([\n Hash , // SHA1 хэш файла\n mcConst._CMD_.msgType.IMAGE, // тип файла. 2 - изображение, 4 - обычный файл\n imageInfo.name, // локальное название файла\n uploaderOptions.Where,\n uploaderOptions.ID ,\n mcService.fileTimeStamp()\n ], function (data) {\n startUploadAfterCheck(data, imageInfo);\n });\n };\n\n fileReader.readAsArrayBuffer(uploaderOptions.clipboardImage);\n }\n\n function _goUploadFile() {\n var fileInput= this;\n var calcSha1 = mcService.SHA1();\n var file = fileInput.files[0];\n var MsgType = uploaderOptions.Type;\n\n if (file){\n uploaderOptions.fileSize = file.size;\n uploaderOptions.lastModifiedDate = file.lastModified || file.lastModifiedDate;\n\n setTimeout(function () {\n parseFile(file, function (err, data, percent) {\n if (err) {\n console.error(\"Read error: \" + err);\n } else {\n if (data) {\n if (uploaderOptions.onPrepareProgress){\n uploaderOptions.onPrepareProgress(percent);\n }\n\n calcSha1.append(data);\n } else {\n var Hash = calcSha1.end();\n\n if (fileInput.value) {\n fileInput.value = \"\";\n }\n\n checkFileExist([\n Hash , // SHA1 хэш файла\n MsgType , // тип файла. 2 - изображение, 4 - обычный файл\n uploaderOptions.Type === mcConst._CMD_.msgType.IMAGE\n ? file.name // локальное название файла\n : file.path || file.name,\n uploaderOptions.Where , // куда вставлять файл (priv, conf, bbs, broadcast, forum, kanban)\n uploaderOptions.ID , // число-идентификатор, для кого отправлять файл:\n // 1, private - UIN\n // 2, conference - UID\n // 3, forum - ID топика\n // 4, kanban - ID таска\n // 5, bbs - -1\n // 6, broadcast - -1\n mcService.fileTimeStamp(file.lastModified || file.lastModifiedDate)\n ], function (data) {\n startUploadAfterCheck(data, file);\n });\n }\n }\n });\n }, 100);\n }/* else {\n if (errorCallback){\n errorCallback();\n }\n }*/\n }\n\n function fileFromDialog() {\n var element = document.getElementById(inputFileName);\n\n if (!element){\n element = document.createElement('div');\n\n element.id = inputFileName;\n element.className = 'hideFileInput';\n\n document.body.appendChild(element);\n }\n\n element.innerHTML = '<input type=\"file\">';\n\n var fileInput = element.firstChild;\n\n if (fileInput.value && mcService.isIE()) {\n fileInput.parentNode.replaceChild(\n fileInput.cloneNode(true),\n fileInput\n );\n\n fileInput = document.getElementById(inputFileName).firstChild;\n }\n\n switch (uploaderOptions.Type) {\n case mcConst._CMD_.msgType.IMAGE:\n fileInput.accept = \"image/png, image/gif, image/jpeg, image/jpg\";\n break;\n\n case mcConst._CMD_.msgType.VIDEO:\n fileInput.accept = \"video/mp4, video/x-m4v, .mkv, video/mpeg, video/webm, video/*\";\n break;\n\n default:\n fileInput.accept = \"\";\n }\n\n if (fileInput.fileEvent){\n fileInput.removeEventListener('change', fileInput.fileEvent);\n }\n\n fileInput.fileEvent = _goUploadFile;\n\n fileInput.addEventListener('change', fileInput.fileEvent);\n\n fileInput.click();\n }\n\n function uploadFile(_errorCallback, _successCallback, _uploaderOptions){\n errorCallback = _errorCallback;\n successCallback = _successCallback;\n uploaderOptions = _uploaderOptions || {};\n\n // -- clipboard image --\n if (uploaderOptions.clipboardImage) {\n _goUploadClipboardImage();\n } else\n\n // -- drop file into chat text --\n if (uploaderOptions.filePath && uploaderOptions.dropFile){\n _goUploadFile.apply(uploaderOptions.dropFile);\n } else\n\n // -- clipboard file, only for electron app --\n if (uploaderOptions.filePath){\n electronUploader();\n } else\n \n // -- file from dialog window --\n {\n fileFromDialog();\n }\n }\n\n // ========================================================\n\n var _msg = window._messages_.mcFileUploader = {\n abortUploading : 'abortUploading',\n abortPreparingUploading : 'abortPreparingUploading',\n uploadFile : 'uploadFile'\n };\n\n $rootScope.$on(_msg.abortUploading, function () {\n abortNow = true;\n\n if (abortPreparingUploading) {\n abortPreparingUploading();\n }\n\n if (uploader && abortUploadingID) {\n uploader.stopUpload(abortUploadingID);\n uploader.destructor();\n }\n\n if (abortUploadingCB){\n abortUploadingCB();\n }\n\n uploaderOptions = {};\n });\n\n $rootScope.$on(_msg.abortPreparingUploading, function () {\n if (abortPreparingUploading) {\n abortPreparingUploading();\n }\n\n if (uploader){\n uploader.destructor();\n }\n });\n\n $rootScope.$on(_msg.uploadFile, function(e,args){\n uploader = $$(\"uploadAPI\");\n\n if (uploader){\n uploader.destructor();\n }\n\n abortUploadingID = null;\n abortPreparingUploading = null;\n abortUploadingCB = null;\n abortNow = false;\n\n whereWeWork = $rootScope.hasOwnProperty(\"GetChatType\") ? \"&where=\" + $rootScope.GetChatType().toLowerCase() : \"\";\n\n var opt = args[2] || {};\n\n if (!opt.uploadProgress && !$$(\"uploadProgress\")){\n webix.ui({ id: \"uploadProgress\", view: \"list\", scroll: false, padding: 0, borderless: true, hidden: true, select: false});\n }\n\n uploader = webix.ui({\n id : \"uploadAPI\",\n view : \"uploader\",\n multiple: false,\n link : opt.uploadProgress || \"uploadProgress\",\n apiOnly: true,\n on : {\n onAfterFileAdd: function (file) {\n abortUploadingID = file.id;\n\n if (uploaderOptions.onAfterFileAdd){\n uploaderOptions.onAfterFileAdd(file);\n }\n },\n onUploadComplete:function(){\n if (successCallback) {\n successCallback.apply(uploaderOptions, []);\n } else {\n console.trace('No set success callback on file uploading');\n }\n\n errorCallback = null;\n successCallback = null;\n },\n onFileUploadError:function(){\n console.warn(\"Error during file uploading\");\n\n if (errorCallback) {\n errorCallback.apply(null, arguments);\n }\n\n errorCallback = null;\n successCallback = null;\n }\n }\n });\n\n uploadFile.apply(null, args);\n });\n}", "uploadFile(variable, options, success, error, inputFields, requestParams) {\n let fileParamCount = 0;\n const fileArr = [], promArr = [];\n _.forEach(inputFields, (inputField) => {\n if (_.isArray(inputField)) {\n if (inputField[0] instanceof File) {\n fileParamCount++;\n }\n _.forEach(inputField, (input) => {\n if (input instanceof File || _.find(_.values(input), o => o instanceof Blob)) {\n fileArr.push(input);\n this.totalFilesCount++;\n fileParamCount = fileParamCount || 1;\n }\n });\n }\n else {\n if (inputField instanceof File) {\n fileParamCount++;\n this.totalFilesCount++;\n fileArr.push(inputField);\n }\n }\n });\n if (fileParamCount === 1) {\n if (inputFields.files.length > 1) {\n _.forEach(fileArr, (file) => {\n promArr.push(this.uploadFileInFormData(variable, options, success, error, file, requestParams));\n });\n return Promise.all(promArr);\n }\n else {\n return this.uploadFileInFormData(variable, options, success, error, fileArr[0], requestParams);\n }\n }\n }", "function validate_format(req, res, next) {\n // For MemoryStorage, validate the format using `req.file.buffer`\n // For DiskStorage, validate the format using `fs.readFile(req.file.path)` from Node.js File System Module\n let mime = fileType(req.file.path);\n\n // if can't be determined or format not accepted\n if(!mime || !accepted_extensions.includes(mime.ext))\n return next(new Error('The uploaded file is not in ' + accepted_extensions.join(\", \") + ' format!'));\n \n next();\n}", "function validFile(req, res, next) {\n if (req.query.type !== \"file\") {\n res.status(400).json({\n success: false,\n message: \"Invalid URL\",\n });\n } else {\n next();\n }\n}", "function testSubmitBadFile() {\n let f_req = new XMLHttpRequest();\n f_req.responseType = 'arraybuffer';\n\n\tf_req.onreadystatechange = function() {\n if (this.readyState === 4 && this.status === 200) {\n file = new File([this.response], 'btest.txt');\n onSubmit();\n }\n };\n\tf_req.open(\"GET\", \"/static/img/test/bad.txt\");\n\tf_req.send();\n}", "function onUploadError(event) {\n $('#' + event[\"id\"]).html('Error Uploading: ' + event.status);\n}", "async uploadFile(file, filename, options) {\n const MB = Math.pow(2, 20);\n let cancelled = false;\n if (options.onCancelToken) {\n options.onCancelToken(() => {\n cancelled = true;\n });\n }\n this.isCanceled(cancelled);\n const uploadID = await this.createMultipartUpload(filename, options);\n const bytesPerChunk = options.chunkSize || 7 * MB;\n const fileSize = file.length || file.size;\n const chunkAmount = Math.floor(fileSize / bytesPerChunk) + 1;\n const partsPerTime = 3;\n if (chunkAmount > 1 && bytesPerChunk < 5 * MB) {\n throw new Error(\"Chunk sizes cannot be lower than 5mb if the upload will have multiple parts\");\n }\n let offsetStart = 0;\n let offsetEnd = bytesPerChunk;\n let partNumber = 1;\n let error = null;\n const parts = [];\n const promises = [];\n this.isCanceled(cancelled);\n while (offsetStart < fileSize) {\n const sliced = file.slice(offsetStart, offsetEnd);\n while (promises.length >= partsPerTime) {\n this.isCanceled(cancelled);\n if (error) {\n throw error;\n }\n await sleep_1.default(1000);\n }\n const promise = this._addToQueue(filename, uploadID, partNumber, sliced, options);\n promises.push(promise);\n promise.then((partData) => {\n if (promises.indexOf(promise) >= 0) {\n promises.splice(promises.indexOf(promise), 1);\n }\n parts.push(partData);\n if (options.onProgress) {\n const percentage = (parts.length * 100) / chunkAmount;\n const limitedPercentage = Math.min(percentage, 100).toFixed(2);\n const roundedPercentage = Number(limitedPercentage);\n options.onProgress(roundedPercentage);\n }\n });\n promise.catch((err) => {\n error = err;\n });\n this.isCanceled(cancelled);\n await sleep_1.default(500);\n offsetStart = offsetEnd;\n offsetEnd = offsetStart + bytesPerChunk;\n partNumber += 1;\n }\n while (promises.length > 0) {\n this.isCanceled(cancelled);\n if (error) {\n throw error;\n }\n await sleep_1.default(1000);\n }\n this.isCanceled(cancelled);\n for (let i = 0; i < 3; i += 1) {\n try {\n return this._completeMultipartUpload(filename, uploadID, parts, options);\n }\n catch (ex) {\n await sleep_1.default(1000);\n if (i === 2) {\n throw ex;\n }\n }\n }\n }", "onFileUpload(file, type) {\n\t\tthis.setState(\n\t\t\t(st) => ({\n\t\t\t\tstartFiles : {\n\t\t\t\t\t...st.startFiles,\n\t\t\t\t\t[type] : file\n\t\t\t\t}\n\t\t\t}),\n\t\t\t() => {\n\t\t\t\tif (\n\t\t\t\t\tthis.state.startFiles.usernames &&\n\t\t\t\t\tthis.state.startFiles.passwords &&\n\t\t\t\t\tthis.state.startFiles.usernames.size + this.state.startFiles.passwords.size < 1024 * 1024 * 1\n\t\t\t\t) {\n\t\t\t\t\tthis.setState({ valid: true })\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t`Combined file size for uploaded files is too high (${(this.state.startFiles.usernames.size +\n\t\t\t\t\t\t\tthis.state.startFiles.passwords.size) /\n\t\t\t\t\t\t\t(1024 * 1024)}MB). Required less than ~1MB combined.`\n\t\t\t\t\t)\n\t\t\t\t\talert(\n\t\t\t\t\t\t`Combined file size for uploaded files is too high (${(this.state.startFiles.usernames.size +\n\t\t\t\t\t\t\tthis.state.startFiles.passwords.size) /\n\t\t\t\t\t\t\t(1024 * 1024)}MB).`\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t)\n\t}", "function validateForm() {\n\t// (Can't use `typeof FileReader === \"function\"` because apparently\n\t// it comes back as \"object\" on some browsers. So just see if it's there\n\t// at all.)\n\tif (!window.FileReader) {\n\t\tconsole.log(\"The file API isn't supported on this browser yet.\");\n\t\treturn false;\n\t}\n\t\n\tconsole.log('Form submitted!');\n\tvar inpObj = document.getElementById('inputImage');\n\tif (!inpObj.value) {\n\t\tconsole.log(\"you didnt enter an image\");\n\t}\n\telse if (!inpObj.files) {\n\t\tconsole.log(\"This browser doesn't support the `files` property of file inputs.\");\n\t}\n\telse if (!inpObj.files[0]) {\n\t\tconsole.log(\"Please select a file before clicking 'Submit'\");\n\t}\n\telse {\n\t\tfile = inpObj.files[0];\n\t\tconsole.log(\"File \" + file.name + \" is \" + file.size + \" bytes in size\");\n\t\t//if larger than 5Mbytes\n\t\tif(file.size > 5120000){\n\t\t\tconsole.log(\"the file is larger than 5Mbytes(5,120,000 bytes)!\");\n\t\t}\n\t\t\n\t\tdisplayImage(inpObj);\n\t}\t\t\n\treturn false;\n}", "function checkSizeLimit(order) {\n var orderSize = order.getQuantity();\n if(orderSize > 10000 || 1 > orderSize) return false;\n return true;\n}", "function file__NOT__READABLE__ERR_ques_(fileExceptionCode) /* (fileExceptionCode : fileExceptionCode) -> bool */ {\n return (fileExceptionCode === 4);\n}", "function getTotalSizeListFileUpload(uploaderIn){\n\tvar listFileTotalSizeByte = 0;\n\tfor(var i =0; i<uploaderIn.queue.length;i++){\n\t\tvar item = uploaderIn.queue[i];\n\t\tvar fileSize = item.file.size;\n\t\tlistFileTotalSizeByte += fileSize;\n\t}\n\tvar listFileTotalSizeMB = listFileTotalSizeByte/1024/1024;\n\tif(listFileTotalSizeMB >5){\n\t\treturn true;\n\t}\n\n\treturn true;\n}", "function existing_chunks_checker() {\n var filesChecked = 0;\n var filesToVerify = [];\n var fileSizes = [];\n var allRequestsChecked = 0;\n var requestsCounter = 0;\n var numfilesToVerify = 0;\n var simultaneous_check = g_simultaneous_down * 4;\n g_allChunks.forEach(function (videoChunk) { //checking existance and size of dowloaded video chunks.\n fs.stat(g_DOWNLOAD_DIR + g_TEMP + videoChunk, function (err, stats) {\n if (stats) { // chunk downloaded already\n filesToVerify.push(videoChunk);\n fileSizes.push(stats.size);\n filesChecked += 1;\n if (filesChecked === g_allChunks.length) {\n numfilesToVerify = filesToVerify.length;\n divide_requests();\n }\n } else { // does not exist, download this chunk\n filesChecked += 1;\n g_allChunksToDownload.push(videoChunk);\n if ((filesChecked === g_allChunks.length) && !filesToVerify.length) {\n process_playlist(g_allChunksToDownload);\n } else if (filesChecked === g_allChunks.length) {\n numfilesToVerify = filesToVerify.length;\n divide_requests();\n }\n }\n });\n });\n\n function divide_requests() { //prevent sending potentially thousands of requests at once.\n filesToVerify.length < simultaneous_check ? simultaneous_check = filesToVerify.length : '';\n console.log('Veryfied: ', Math.round((numfilesToVerify - filesToVerify.length)/numfilesToVerify*100) +'%');\n for (var i = 0; i < simultaneous_check; i++) {\n request_file_size(filesToVerify[i], fileSizes[i], simultaneous_check);\n }\n }\n\n function request_file_size(videoChunk, fileSize, numAtOnce) { //comparing file size on disk to content length in header from https request.\n var chunkUrl = url.resolve(g_m3u_url, videoChunk);\n var options = request_options(chunkUrl, 'HEAD'); // get headers only\n var req = https.request(options, function (res) {\n res.on('data', function () {});\n res.on('end', function () {\n allRequestsChecked += 1;\n requestsCounter += 1;\n filesToVerify.shift();\n fileSizes.shift();\n if (res.headers['content-length'] == fileSize) { // correct filesize, no need to redownload.\n g_readyToAppend.push(videoChunk);\n } else { // // incomplete file, redownload\n g_allChunksToDownload.push(videoChunk);\n }\n if ((filesChecked === g_allChunks.length) && (allRequestsChecked === numfilesToVerify)) {\n console.log('verified size of ' + allRequestsChecked + ' files/' + g_allChunks.length + ', ' + g_readyToAppend.length + ' are OK.');\n if (g_allChunksToDownload.length) {\n process_playlist(g_allChunksToDownload);\n } else {\n output_name_check(null, true, concat_all);\n }\n } else if (requestsCounter === numAtOnce) {\n requestsCounter = 0;\n divide_requests();\n }\n });\n });\n req.on('error', function (e) {\n console.log('Warning problem with size checking request: ' + e.code);\n console.log(e);\n allRequestsChecked += 1; //when problems with checking files online, add to download list.\n filesToVerify.shift();\n g_allChunksToDownload.push(videoChunk);\n if ((filesChecked === g_allChunks.length) && (allRequestsChecked === numfilesToVerify)) {\n console.log('verified size of ' + allRequestsChecked + ' files/' + g_allChunks.length + ', ' + g_readyToAppend.length + ' are OK.');\n if (g_allChunksToDownload.length) {\n process_playlist(g_allChunksToDownload);\n } else {\n output_name_check(null, true, concat_all);\n }\n } else if (requestsCounter === numAtOnce) {\n divide_requests();\n }\n }).setTimeout(5000, function() {\n console.log(\"request headers timeout\");\n this.abort();\n });\n req.end();\n }\n\n}", "function onUploadError(scope, event) {\n Utils.triggerFn(scope.onError, {'$event': event, '$scope': scope});\n if (!scope.multiple) {\n wmToaster.show('error', 'File upload failed');\n }\n }", "function fileNotPresent(fileBlob){\n for(let i = 0; i < uploadFiles.length; i++){\n if(uploadFiles[i].name === fileBlob.name\n && uploadFiles[i].type === fileBlob.type\n && uploadFiles[i].lastModified === fileBlob.lastModified\n && uploadFiles[i].size === fileBlob.size){\n return false;\n }\n }\n return true;\n}", "validFileUpload(ctx, fileStream, filePath, isUploadFile360 = false) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\t// Check file type upload\n\t\t\t// Get mimeType from file request\n\t\t\tconst mimeType = ctx.meta.mimetype;\n\t\t\t// Get file extension from file request\n\t\t\tconst splitFileNameArr = ctx.meta.filename.split(\".\");\n\t\t\tconst extension = _.last(splitFileNameArr);\n\t\t\tconst isFileImage = APP_SETTING.FILE_CONFIG.VALIDATION.FILE_TYPE.IMAGE\n\t\t\t\t.findIndex((type) => type.mimeType === mimeType\n\t\t\t\t\t&& type.extension.findIndex((ext) => ext === extension) >= 0) >= 0;\n\t\t\tconst isFileVideo = APP_SETTING.FILE_CONFIG.VALIDATION.FILE_TYPE.VIDEO\n\t\t\t\t.findIndex((type) => type.mimeType === mimeType\n\t\t\t\t\t&& type.extension.findIndex((ext) => ext === extension) >= 0) >= 0;\n\t\t\tconst isFileDocument = APP_SETTING.FILE_CONFIG.VALIDATION.FILE_TYPE.DOCUMENT\n\t\t\t\t.findIndex((type) => type.mimeType === mimeType\n\t\t\t\t\t&& type.extension.findIndex((ext) => ext === extension) >= 0) >= 0;\n\t\t\tlet maximumFileSize = 0;\n\t\t\tif (isFileImage) {\n\t\t\t\tmaximumFileSize = APP_SETTING.FILE_CONFIG.VALIDATION.MAX_FILE_SIZE.IMAGE;\n\t\t\t} else if (isFileVideo) {\n\t\t\t\tmaximumFileSize = APP_SETTING.FILE_CONFIG.VALIDATION.MAX_FILE_SIZE.VIDEO;\n\t\t\t} else if (isFileDocument) {\n\t\t\t\tmaximumFileSize = APP_SETTING.FILE_CONFIG.VALIDATION.MAX_FILE_SIZE.DOCUMENTS;\n\t\t\t} else {\n\t\t\t\treturn reject(Error(`${\n\t\t\t\t\tctx.meta.filename} is not support. mimeType ${mimeType} and extension ${extension} not correct `));\n\t\t\t}\n\t\t\tconst stat = fs.statSync(filePath);\n\t\t\tconst fileSize = this.convertLengthToSize(stat.size);\n\t\t\tif (fileSize.mb > maximumFileSize && !isUploadFile360) {\n\t\t\t\treturn reject(Error(`${\n\t\t\t\t\tctx.meta.filename} is exceed file size MB. File ${ctx.meta.mimetype} limit to upload is ${\n\t\t\t\t\tmaximumFileSize} MB!`));\n\t\t\t} if (isUploadFile360 && fileSize.mb > APP_SETTING.FILE_CONFIG.VALIDATION.MAX_FILE_SIZE.IMAGE360) {\n\t\t\t\treturn reject(Error(`${\n\t\t\t\t\tctx.meta.filename} is exceed file size MB. File ${ctx.meta.mimetype} limit to upload is ${APP_SETTING.FILE_CONFIG.VALIDATION.MAX_FILE_SIZE.IMAGE360} MB!`));\n\t\t\t}\n\t\t\treturn resolve(true);\n\t\t});\n\t}", "function error(err) {\n myAlertOnValium.show({\n type: 'danger',\n title: 'Upload failed',\n content: err || ''\n });\n }", "function isOutOfSpace(e) {\n return e && (e.name === 'QUOTA_EXCEEDED_ERR' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED' || e.name === 'QuotaExceededError');\n}" ]
[ "0.7009517", "0.69744873", "0.69640195", "0.69640195", "0.6829291", "0.68288743", "0.6725757", "0.66173923", "0.649176", "0.64755553", "0.62461025", "0.6187233", "0.6181545", "0.6058019", "0.60517704", "0.60460395", "0.6036406", "0.60172814", "0.59773743", "0.596959", "0.59623826", "0.59355175", "0.5933524", "0.58890474", "0.58537346", "0.58449686", "0.5842409", "0.58393174", "0.58246815", "0.58065164", "0.58058345", "0.5798334", "0.57901645", "0.573592", "0.5735064", "0.5734596", "0.5706339", "0.56964535", "0.56872386", "0.5674708", "0.56622374", "0.56489694", "0.5621593", "0.5600353", "0.5594493", "0.55811816", "0.55521613", "0.5545762", "0.55397105", "0.5539526", "0.55296814", "0.54960597", "0.54876536", "0.54787576", "0.5452416", "0.5450548", "0.5439481", "0.54339963", "0.5433958", "0.54332817", "0.5423248", "0.54078585", "0.5406923", "0.5399272", "0.5383372", "0.5375462", "0.53636163", "0.53443414", "0.5328297", "0.5314916", "0.53073615", "0.5303803", "0.5271156", "0.5253315", "0.52472144", "0.5243021", "0.52426445", "0.5240224", "0.5224066", "0.52233857", "0.5218452", "0.5218151", "0.5209424", "0.5208245", "0.52060235", "0.52046645", "0.5193067", "0.5192455", "0.51683795", "0.5158863", "0.51584095", "0.51582336", "0.5155329", "0.51536834", "0.51507103", "0.5148051", "0.5146009", "0.514337", "0.51419616", "0.51389223" ]
0.6004872
18
Implementation of the properties defined in the interface
function Person(name) { this.name = name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get properties() { return this._properties; }", "static get properties(){let props={};if(super.properties){props=Object.assign(props,super.properties)}return props}", "static get properties(){let props={items:{name:\"items\",type:\"Array\",value:\"[]\",reflectToAttribute:!1,observer:!1},source:{name:\"source\",type:\"String\",value:\"\",reflectToAttribute:!1,observer:!1}};if(super.properties){props=Object.assign(props,super.properties)}return props}", "static get properties() {\n return {\n ...super.properties,\n __aspects: {\n type: Object,\n },\n __columns: {\n type: Array,\n },\n __items: {\n type: Array,\n },\n };\n }", "static get properties() {\n return { ...super.properties\n };\n }", "static get properties() {\n let props = {\n title: {\n name: \"title\",\n type: String,\n value: \"\",\n reflectToAttribute: false,\n observer: false\n },\n subtitle: {\n name: \"subtitle\",\n type: String,\n value: \"\",\n reflectToAttribute: false,\n observer: false\n },\n source: {\n name: \"source\",\n type: String,\n value: \"\",\n reflectToAttribute: false,\n observer: false\n }\n };\n if (super.properties) {\n props = Object.assign(props, super.properties);\n }\n return props;\n }", "static get properties(){return{}}", "static get properties(){return{}}", "property (interOrName) {\n const properties = this.properties;\n // if given a name for an existing child interface, returns it\n if (properties.hasOwnProperty(interOrName)) return properties[interOrName];\n // constructs a new interface or uses an existing one (if an existing one was passed in)\n const child = (interOrName instanceof Interface ? interOrName : new Interface(interOrName, this)); // TODO: nested names, so the `.then` interface for `Promise` would have name `Promise.then` instead of just `then`\n return properties[child.name] = child;\n }", "static get properties() {\n return {\n ...super.properties,\n };\n }", "static get properties() {\n return {\n ...super.properties,\n };\n }", "static get properties() {\n return {\n ...super.properties,\n };\n }", "setProperties(properties) {\n for (const [key, value] of properties.entries()) {\n switch(key) {\n case \"type\": this.type = value;\n break;\n case \"startArrowHead\": this.startArrowHead = value;\n break;\n case \"endArrowHead\": this.endArrowHead = value;\n }\n }\n }", "static get properties() {\n return {\n \"cityProp\": {\n \"name\": \"cityProp\",\n \"type\": \"String\",\n \"value\": \" \",\n \"reflect\": true,\n \"attribute\": true,\n \"observer\": false\n },\n \"inputId\": {\n \"name\": \"inputId\",\n \"type\": \"String\",\n \"value\": \" \",\n \"reflectToAttribute\": false,\n \"observer\": false\n },\n \"width\": {\n \"name\": \"width\",\n \"type\": \"String\",\n \"value\": \" \",\n \"reflectToAttribute\": false,\n \"observer\": false\n }\n}\n;\n }", "static get properties() {\n return {\n header: {type:Object},\n body:{type:Object},\n footer: {type:Object},\n };\n }", "static get properties() {\n let props = {}\n;\n if (super.properties) {\n props = Object.assign(props, super.properties);\n }\n return props;\n }", "static get properties() {\n return {\n value: {\n type: String,\n },\n fontSize: {\n type: Number,\n attribute: \"font-size\",\n },\n wordWrap: {\n type: Boolean,\n attribute: \"word-wrap\",\n },\n readOnly: {\n type: Boolean,\n attribute: \"read-only\",\n },\n /**\n * THIS MAKES MULTIPLES EDITORS WORK BECAUSE OF EVENTS\n * DO NOT MESS WITH THIS AND IT HAS TO BE SET\n */\n uniqueKey: {\n type: String,\n attribute: \"unique-key\",\n },\n eventTypes: {\n type: Object,\n },\n language: {\n type: String,\n },\n theme: {\n type: String,\n },\n libPath: {\n type: String,\n attribute: \"lib-path\",\n },\n editorReference: {\n type: String,\n reflect: true,\n attribute: \"editor-reference\",\n },\n /**\n * automatically set focus on the iframe\n */\n autofocus: {\n type: Boolean,\n reflect: true,\n },\n /**\n * hide line numbers\n */\n hideLineNumbers: {\n type: Boolean,\n attribute: \"hide-line-numbers\",\n },\n tabSize: {\n type: Number,\n attribute: \"tab-size\",\n },\n };\n }", "static get properties() {\n return {\n payerAddress: { type: String },\n payeeAddress: { type: String },\n reason: { type: String },\n amountRequired: { type: Number },\n rn: { type: Object },\n eth: { type: Object },\n txHash: { type: String },\n };\n }", "static get properties() {\n return {\n src: {\n type: String\n },\n /**\n * Read-only value that is true when the image is loaded.\n */\n loaded: {\n type: Boolean\n },\n /**\n * Read-only value that tracks the loading state of the image when the `preload`\n * option is used.\n */\n loading: {\n type: Boolean\n },\n /**\n * aria-describedby attribute\n */\n describedBy: {\n type: String,\n attribute: \"described-by\"\n },\n /**\n * Read-only value that indicates that the last set `src` failed to load.\n */\n error: {\n type: Boolean\n }\n };\n }", "static get properties() {\n return {\n id: { type: String, reflect: true },\n };\n }", "static get properties() {\n return {\n id: {\n attribute: \"searchid\",\n type: String,\n },\n defaultText: {\n attribute: \"defaulttext\",\n type: String,\n },\n searchMode: {\n attribute: \"searchmode\",\n type: String,\n },\n remoteUrl: {\n attribute: \"remoteurl\",\n type: String,\n },\n derivation: {\n attribute: \"derivation\",\n type: String,\n },\n };\n }", "static get properties() {\n return {\n width: {\n name: \"width\",\n type: \"String\",\n value: \"300px\",\n reflectToAttribute: false,\n observer: false\n },\n height: {\n name: \"height\",\n type: \"String\",\n value: \"300px\",\n reflectToAttribute: false,\n observer: false\n }\n };\n }", "static get properties() {\n return {\n label: { type: String },\n value: { type: String },\n disabled: { type: Boolean, reflect: true },\n elevation: { type: Number },\n active: { type: Boolean, reflect: true },\n comingSoon: { type: Boolean, reflect: true, attribute: \"coming-soon\" },\n };\n }", "static get properties() {\n return {\n ...super.properties,\n /**\n * color\n */\n color: {\n type: String\n },\n /**\n * tiny, small, medium, large, epic sizing.\n */\n size: {\n type: String,\n reflect: true\n }\n };\n }", "static get properties() {\n return {\n greeting: {\n type: String,\n notify: true,\n reflectToAttribute: true\n }\n };\n }", "function descriminatingProperty() { }", "static get properties() {\n return {\n ...super.properties,\n\n disableResponsive: {\n type: Boolean,\n attribute: \"disable-responsive\",\n },\n /**\n * Fields to convert to JSON Schema.\n */\n fields: {\n type: Array,\n },\n /**\n * Conversion from fields array with inputMethods to JSON schema types and formats.\n * _See [Configuring fieldsConversion Property](configuring-the-fieldsconversion-property) above._\n */\n schematizer: {\n type: Object,\n attribute: \"schematizer\",\n },\n /**\n * Schema label\n */\n label: {\n type: String,\n },\n /**\n * tracks all activeTabs as an object\n */\n __activeTabs: {\n type: Object,\n attribute: \"active-path\",\n },\n /**\n * default theme for code editor\n */\n codeTheme: {\n type: String,\n attribute: \"code-theme\",\n },\n };\n }", "static get properties() {\n return {\n icon: {\n type: String\n },\n trackIcon: {\n type: String,\n attribute: \"track-icon\"\n },\n title: {\n type: String\n },\n url: {\n type: String\n },\n icon: {\n type: String\n },\n id: {\n type: String,\n reflect: true\n },\n active: {\n type: Boolean\n },\n selected: {\n type: String\n }\n };\n }", "static get properties() {\n return {\n ...super.properties,\n\n link: {\n type: String,\n },\n title: {\n type: String,\n },\n editMode: {\n type: Boolean,\n },\n };\n }", "static get properties() {\n return { ...super.properties };\n }", "static get properties() {\n return {\n displayNewTile: {type:String},\n tileTitle: {type:String},\n tileComments:{type:String},\n tilePicture: {type:String},\n tileDetails:{type:String},\n newImagePath:{type:String}\n };\n }", "interface(properties) {\r\n const keys = Object.keys(properties);\r\n const decode = (input) => {\r\n if (!isObject(input)) {\r\n return Either_1.Left(reportError('an object', input));\r\n }\r\n const result = {};\r\n for (const key of keys) {\r\n if (!input.hasOwnProperty(key) &&\r\n !properties[key]._isOptional) {\r\n return Either_1.Left(`Problem with property \"${key}\": it does not exist in received object ${JSON.stringify(input)}`);\r\n }\r\n const decodedProperty = properties[key].decode(input[key]);\r\n if (decodedProperty.isLeft()) {\r\n return Either_1.Left(`Problem with the value of property \"${key}\": ${decodedProperty.extract()}`);\r\n }\r\n const value = decodedProperty.extract();\r\n if (value !== undefined) {\r\n result[key] = value;\r\n }\r\n }\r\n return Either_1.Right(result);\r\n };\r\n const encode = (input) => {\r\n const result = {};\r\n for (const key of keys) {\r\n result[key] = properties[key].encode(input[key]);\r\n }\r\n return result;\r\n };\r\n return {\r\n decode,\r\n encode,\r\n unsafeDecode: (input) => decode(input).mapLeft(Error).unsafeCoerce(),\r\n schema: () => keys.reduce((acc, key) => {\r\n const isOptional = properties[key]._isOptional;\r\n if (!isOptional) {\r\n acc.required.push(key);\r\n }\r\n acc.properties[key] = optimizeSchema(properties[key].schema());\r\n return acc;\r\n }, {\r\n type: 'object',\r\n properties: {},\r\n required: []\r\n })\r\n };\r\n }", "static get properties() {\n return {\n prop1: {type: String}\n };\n }", "constructor() {\n /**\n * Methods of interface\n * @private\n * @type {Array<Method>}\n */\n this._methods = [];\n\n /**\n * Getters of interface\n * @private\n * @type {Array<string>}\n */\n this._getters = [];\n /**\n * Setters of interface\n * @private\n * @type {Array<string>}\n */\n this._setters = [];\n\n // add methods\n this.addMethodsAutomatically();\n }", "static get properties() {\n return {\n derivation: {\n attribute: 'derivation',\n type: String\n }\n }\n }", "static get properties() {\n return {\n /** The talk information */\n talk: { type: Object },\n /** Analytics class */\n analytics: { type: Object },\n };\n }", "get property() {\n return super.property;\n }", "static get properties() {\n return {\n id: {\n attribute: \"mapid\",\n },\n derivation: {\n attribute: \"derivation\",\n type: String,\n },\n };\n }", "properties() {\n return [];\n }", "static get properties() {\n return {\n /**\n * fields for the prompt popover.\n */\n fields: {\n type: Array,\n value: [\n {\n property: \"text\",\n title: \"Text\",\n description: \"The link text\",\n inputMethod: \"textfield\"\n },\n {\n property: \"link\",\n title: \"Link\",\n description: \"The link URL\",\n inputMethod: \"textfield\"\n }\n ]\n },\n /**\n * the text of the prompt, as in \"Link href\" or \"Image src\"\n */\n prompt: {\n name: \"prompt\",\n type: String,\n value: \"Value\"\n },\n /**\n * the target of the prompt\n */\n target: {\n name: \"target\",\n type: Object,\n value: null\n },\n /**\n * The prefilled value of the prompt\n */\n value: {\n type: Object,\n value: {\n link: null\n }\n }\n };\n }", "static get properties() {\n return {};\n }", "static get properties() {\n return {};\n }", "static get properties() {\n return {};\n }", "static get properties() {\n return {\n clase: { type: String },\n disabled: { type: Boolean },\n texto: { type: String },\n };\n }", "static get properties() {\n return {\n ...super.properties,\n glitch: {\n type: Boolean,\n },\n red: {\n type: Boolean,\n reflect: true,\n },\n fadein: {\n type: Boolean,\n reflect: true,\n },\n glitchMax: {\n type: Number,\n attribute: \"glitch-max\",\n },\n glitchDuration: {\n type: Number,\n attribute: \"glitch-duration\",\n },\n };\n }", "static get properties() {\n return {\n newDish: {\n type: Object\n }\n };\n }", "static get properties() {\n return {\n eventMap: {},\n resourceMap: {},\n releasedElements: {}\n };\n }", "static get properties() {\n return {\n title: { type: String },\n items: { type: Array },\n loading: { type: String },\n };\n }", "static get properties() {\n return {\n /** The ID of the item is the auth provider. i.e. 'google', 'facebook', etc */\n id: {\n type: String,\n value: \"\"\n },\n\n /** The text of the label to be displayed. */\n label: {\n type: String,\n value: \"\"\n },\n\n /** The icon to be displayed. */\n icon: {\n type: String,\n value: \"\"\n }\n };\n }", "function getPublicProperties() {\n return {\n goFw: slideForward,\n goBk: slideBackward,\n goTo: makeActiveSlide,\n align: alignToActiveSlide,\n dragBy: transformByIncrement,\n stopAutoslide: stopAutoslide,\n startAutoslide: startAutoslide,\n resetAutoslide: resetAutoslide,\n append: appendSlide,\n prepend: prependSlide,\n addAt: addSlideAtIndex,\n removeSlide: removeSlide,\n };\n }", "getProperties(){\n\t\tlet className = this.getModelClass();\n\t\tlet $properties = className.$properties();\n\t\tvar rtn = {};\n\t\tvar propNames = Object.getOwnPropertyNames($properties);\n\t\tfor(let prop of propNames){\n\t\t\trtn[prop] = this[prop];\n\t\t}\n\t\treturn rtn;\n\n\t}", "static get properties() {\n return {\n 'checkable': {\n value: false,\n type: 'boolean'\n },\n 'checked': {\n value: false,\n type: 'boolean'\n },\n 'checkMode': {\n value: 'checkbox',\n allowedValues: ['checkbox', 'radioButton'],\n type: 'string'\n },\n 'dropDownHeight': {\n value: null,\n type: 'number?'\n },\n 'expanded': {\n value: false,\n type: 'boolean'\n },\n 'label': {\n value: '',\n type: 'any'\n },\n 'level': {\n value: null,\n type: 'number?'\n },\n 'separator': {\n value: false,\n type: 'boolean'\n },\n 'value': {\n value: null,\n type: 'any'\n }\n };\n }", "static get properties() {\n return {\n ...super.properties,\n /**\n * Stores an array of all the players on the page.\n */\n players: {\n type: Array,\n },\n /**\n * Manages which player is currently active.\n */\n activePlayer: {\n type: Object,\n },\n };\n }", "static get properties() {\n return {\n name: {\n type: String\n },\n selected: {\n type: String,\n value: 'Item One'\n },\n\n wideLayout: {\n type: Boolean,\n value: false,\n observer: 'onLayoutChange',\n },\n\n items: {\n type: Array,\n value: function() {\n return ['Item One', 'Item Two', 'Item Three', 'Item Four', 'Item Five'];\n }\n }\n }\n }", "function Properties (prop) {\n this.prop = prop;\n this.addProp = function (name, value) {\n this[name] = value;\n }\n}", "static get properties() {\n return {\n lat: {\n type:String,\n value:\"39.469489\"\n },\n lng: {\n type:String,\n value:\"-0.376214\"\n },\n zoom: {\n type:Number,\n value:13\n }\n };\n }", "static get properties() {\n return {\n name: {\n type: String\n }\n }\n }", "static get properties() {\n return {\n title: {\n type: String\n },\n initialTool: {\n attribute: 'initialtool',\n type: String\n },\n }\n }", "function Property(options) {\n if (options === void 0) { options = {}; }\n this._pid = nextPID();\n this._value = options.value;\n this._create = options.create;\n this._coerce = options.coerce;\n this._compare = options.compare;\n this._changed = options.changed;\n }", "loadOwnProperties(){\r\n \t\t\r\n\t}", "get property(){}", "static get properties() {}", "function PropertyDetection() {}", "get properties() {\n return tag.configure(SharePointQueryableInstance(this, \"properties\"), \"f.properties\");\n }", "static get properties() {\n return {\n ...super.properties,\n\n title: {\n name: \"title\",\n type: String,\n },\n author: {\n name: \"author\",\n type: String,\n },\n authorimage: {\n name: \"authorimage\",\n type: String,\n },\n authorlink: {\n name: \"authorlink\",\n type: String,\n },\n readtime: {\n name: \"readtime\",\n type: Number,\n },\n timestamp: {\n name: \"timestamp\",\n type: Number,\n },\n image: {\n name: \"image\",\n type: String,\n },\n link: {\n name: \"link\",\n type: String,\n },\n shadow: {\n name: \"shadow\",\n type: Number,\n },\n size: {\n name: \"size\",\n type: String,\n },\n placeholder: {\n name: \"placeholder\",\n type: String,\n },\n alt: {\n name: \"alt\",\n type: String,\n },\n };\n }", "getProperties() {\n\t\treturn this.metadata.properties || {};\n\t}", "static get properties() {\n return {\n id: {\n attribute: 'tableid',\n type: String\n },\n subscriptions: {\n type: Array,\n converter: value => value ? value.split(',') : []\n }\n }\n }", "function Property(name, price, rating, location, rooms, datesBooked, features, image, imageCredit) {\n this.name = name;\n this.price = price;\n this.rating = rating;\n this.location = location;\n this.rooms = rooms;\n this.datesBooked = datesBooked;\n this.features = features;\n this.image = image;\n this.imageCredit = imageCredit;\n}", "static get properties() {\n return {\n ...super.properties,\n username: { type: String },\n password: { type: String },\n errorMSG: { type: String },\n hidePassword: { type: Boolean },\n hasPass: { type: Boolean },\n };\n }", "static get properties() {\n return {\n // ...super.properties,\n count: { type: Number }\n };\n }", "get properties() {\n\t\treturn [\"autoScrollStep\",\"colorScheme\",\"currentTimeIndicator\",\"currentTimeIndicatorInterval\",\"contextMenuDataSource\",\"contextMenuClipboardActions\",\"eventTemplate\",\"eventCollectorTemplate\",\"eventRenderMode\",\"eventTooltipTemplate\",\"cellTemplate\",\"dateCurrent\",\"dataExport\",\"dataSource\",\"dateSelectorFormatFunction\",\"dayFormat\",\"disabled\",\"disableAutoScroll\",\"disableDrag\",\"disableDrop\",\"disableResize\",\"disableSelection\",\"disableWindowEditor\",\"disableContextMenu\",\"disableEventMenu\",\"disableViewMenu\",\"disableDateMenu\",\"dragFeedbackFormatFunction\",\"dragOffset\",\"filter\",\"filterable\",\"filterMode\",\"events\",\"firstDayOfWeek\",\"footerTemplate\",\"groupByDate\",\"groupOrientation\",\"groupTemplate\",\"groups\",\"hourEnd\",\"hourStart\",\"hourFormat\",\"headerTemplate\",\"headerDatePosition\",\"headerNavigationStyle\",\"headerViewPosition\",\"hideAllDay\",\"hideNonworkingWeekdays\",\"hideTodayButton\",\"hideViewMenuCheckableItems\",\"hideWeekend\",\"legendLocation\",\"legendPosition\",\"horizontalScrollBarVisibility\",\"locale\",\"max\",\"maxEventsPerCell\",\"min\",\"messages\",\"minuteFormat\",\"monthFormat\",\"nonworkingDays\",\"nonworkingHours\",\"notificationInterval\",\"resizeHandlesVisibility\",\"resizeInterval\",\"resources\",\"restrictedDates\",\"restrictedHours\",\"rightToLeft\",\"scrollButtonsPosition\",\"shadeUntilCurrentTime\",\"showLegend\",\"spinButtonsDelay\",\"spinButtonsInitialDelay\",\"statuses\",\"theme\",\"timelineHeaderFormatFunction\",\"timelineDayScale\",\"timeRulerTicks\",\"timeZone\",\"timeZones\",\"tooltipDelay\",\"tooltipOffset\",\"verticalScrollBarVisibility\",\"view\",\"viewType\",\"views\",\"viewSelectorType\",\"weekdayFormat\",\"yearFormat\",\"unfocusable\",\"undoRedoSteps\",\"windowCustomizationFunction\"];\n\t}", "static get properties() {\n name: {\n Type: String\n }\n }", "static get properties() {\n name: {\n Type: String\n }\n }", "function IntObject_UpdateProperties()\n{\n\t//has HTML?\n\tif (this.HTML)\n\t{\n\t\t//ping as this will take time\n\t\tMain_Ping();\n\t\t//always run this\n\t\tthis.UpdateSapSpecificThemeProperties();\n\t\t//create a table of properties already processed\n\t\tvar ePropTable = {};\n\t\t//create an array of properties to update\n\t\tvar aPropTable = [];\n\t\t//loop through all properties to update\n\t\tfor (var eProp in this.RefreshProperties)\n\t\t{\n\t\t\t//ensure its a number\n\t\t\teProp = Get_Number(eProp);\n\t\t\t//switch on property\n\t\t\tswitch (eProp)\n\t\t\t{\n\t\t\t\tcase __NEMESIS_PROPERTY_FONT_RENDERING_REQUIRED:\n\t\t\t\tcase __NEMESIS_PROPERTY_OFFSET_X:\n\t\t\t\tcase __NEMESIS_PROPERTY_OFFSET_Y:\n\t\t\t\tcase __NEMESIS_PROPERTY_CAPTION:\n\t\t\t\t\t//has this caption already been marked?\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_CAPTION])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark caption for update\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_CAPTION] = true;\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_CAPTION);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_PADDING:\n\t\t\t\t\t//has this already been marked for update?\n\t\t\t\t\tif (!ePropTable[eProp])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\tePropTable[eProp] = true;\n\t\t\t\t\t\taPropTable.push(eProp);\n\t\t\t\t\t\t//check class\n\t\t\t\t\t\tswitch (this.DataObject.Class)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase __NEMESIS_CLASS_EDIT:\n\t\t\t\t\t\t\t\t//has height already been marked for update?\n\t\t\t\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_HEIGHT])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_HEIGHT] = true;\n\t\t\t\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_HEIGHT);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_AUTO_RESIZE:\n\t\t\t\tcase __NEMESIS_PROPERTY_WIDTH:\n\t\t\t\tcase __NEMESIS_PROPERTY_HEIGHT:\n\t\t\t\t\t//has this already been marked for update?\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_HEIGHT])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_HEIGHT);\n\t\t\t\t\t\t//only need one of these, dont bother with updating the other\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_WIDTH] = true;\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_HEIGHT] = true;\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_AUTO_RESIZE] = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_ASPECT_RATIO:\n\t\t\t\t\t//has this already been marked for update?\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_ASPECT_RATIO])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_ASPECT_RATIO);\n\t\t\t\t\t\t//only need one of these, dont bother with updating the other\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_WIDTH] = true;\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_HEIGHT] = true;\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_ASPECT_RATIO] = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_STATIC_TEMPLATE:\n\t\t\t\tcase __NEMESIS_PROPERTY_EXTRA_STATIC_TEMPLATE:\n\t\t\t\tcase __NEMESIS_PROPERTY_HEADER_HEIGHT:\n\t\t\t\t\t//has static template been marked for update?\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_STATIC_TEMPLATE])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark static template instead for update\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_STATIC_TEMPLATE] = true;\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_STATIC_TEMPLATE);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_WS_CAPTION:\n\t\t\t\tcase __NEMESIS_PROPERTY_DS_3DLOOK:\n\t\t\t\tcase __NEMESIS_PROPERTY_DIALOG:\n\t\t\t\tcase __NEMESIS_PROPERTY_MINIMIZE_BUTTON:\n\t\t\t\tcase __NEMESIS_PROPERTY_MAXIMIZE_BUTTON:\n\t\t\t\t\t//has static template been marked for update?\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_STATIC_TEMPLATE])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark ws caption instead for update\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_WS_CAPTION] = true;\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_WS_CAPTION);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_TOOLTIPS:\n\t\t\t\t\t//check class\n\t\t\t\t\tswitch (this.DataObject.Class)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase __NEMESIS_CLASS_TOOL_BAR:\n\t\t\t\t\t\tcase __NEMESIS_CLASS_STATUSBAR:\n\t\t\t\t\t\t\t//has content already been marked for update?\n\t\t\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_CONTENT])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_CONTENT] = true;\n\t\t\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_CONTENT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t//has this already been marked for update?\n\t\t\t\t\t\t\tif (!ePropTable[eProp])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\t\t\tePropTable[eProp] = true;\n\t\t\t\t\t\t\t\taPropTable.push(eProp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_COLUMN_HEADER:\n\t\t\t\tcase __NEMESIS_PROPERTY_HEADER:\n\t\t\t\t\t//has header already been marked for update?\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_HEADER])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark content for update\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_HEADER] = true;\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_COLUMNS_WIDTH:\n\t\t\t\t\t//has content already been marked for update?\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_CONTENT])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_CONTENT] = true;\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_CONTENT);\n\t\t\t\t\t}\n\t\t\t\t\t//has header already been marked for update?\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_HEADER])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_HEADER] = true;\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_MATCH_CODE_IMAGE:\n\t\t\t\tcase __NEMESIS_PROPERTY_ALIGN:\n\t\t\t\t\t//check class\n\t\t\t\t\tswitch (this.DataObject.Class)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase __NEMESIS_CLASS_TREE_GRID:\n\t\t\t\t\t\t\t//has content already been marked for update?\n\t\t\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_CONTENT])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_CONTENT] = true;\n\t\t\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_CONTENT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t//has this already been marked for update?\n\t\t\t\t\t\t\tif (!ePropTable[eProp])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\t\t\tePropTable[eProp] = true;\n\t\t\t\t\t\t\t\taPropTable.push(eProp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_FLAT:\n\t\t\t\t\t//check class\n\t\t\t\t\tswitch (this.DataObject.Class)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase __NEMESIS_CLASS_LIST_VIEW:\n\t\t\t\t\t\tcase __NEMESIS_CLASS_TOOL_BAR:\n\t\t\t\t\t\t\t//has content already been marked for update?\n\t\t\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_CONTENT])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_CONTENT] = true;\n\t\t\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_CONTENT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t//has this already been marked for update?\n\t\t\t\t\t\t\tif (!ePropTable[eProp])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\t\t\tePropTable[eProp] = true;\n\t\t\t\t\t\t\t\taPropTable.push(eProp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_TREENODESTATE:\n\t\t\t\tcase __NEMESIS_PROPERTY_IMAGELIST:\n\t\t\t\t\t//check class\n\t\t\t\t\tswitch (this.DataObject.Class)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase __NEMESIS_CLASS_TREE_GRID:\n\t\t\t\t\t\t\t//has tree column already been marked for update?\n\t\t\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_TREE_COLUMN])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_TREE_COLUMN] = true;\n\t\t\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_TREE_COLUMN);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t//these properties require an update of content\n\t\t\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_CONTENT])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//mark content for update\n\t\t\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_CONTENT] = true;\n\t\t\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_CONTENT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_NCOLUMNS:\n\t\t\t\tcase __NEMESIS_PROPERTY_COLUMNS_TEMPLATE:\n\t\t\t\tcase __NEMESIS_PROPERTY_EXTRACONTENT:\n\t\t\t\tcase __NEMESIS_PROPERTY_CELL_BORDER:\n\t\t\t\tcase __NEMESIS_PROPERTY_TREEIMAGEINDEX:\n\t\t\t\tcase __NEMESIS_PROPERTY_LISTIMAGEINDEX:\n\t\t\t\tcase __NEMESIS_PROPERTY_BAR_TOOLTIPS:\n\t\t\t\tcase __NEMESIS_PROPERTY_NODESTATE:\n\t\t\t\tcase __NEMESIS_PROPERTY_PARTSWIDTH:\n\t\t\t\tcase __NEMESIS_PROPERTY_NODEIMAGEINDEX:\n\t\t\t\tcase __NEMESIS_PROPERTY_IMAGE_HEIGHT:\n\t\t\t\tcase __NEMESIS_PROPERTY_IMAGE_WIDTH:\n\t\t\t\tcase __NEMESIS_PROPERTY_LIST:\n\t\t\t\tcase __NEMESIS_PROPERTY_SHOW_TEXT:\n\t\t\t\tcase __NEMESIS_PROPERTY_NODEVIRTUALKEY:\n\t\t\t\tcase __NEMESIS_PROPERTY_COLUMNS_POS:\n\t\t\t\tcase __NEMESIS_PROPERTY_YSCROLLSTEP:\n\t\t\t\t\t//these properties require an update of content\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_CONTENT])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark content for update\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_CONTENT] = true;\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_CONTENT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_MENU:\n\t\t\t\tcase __NEMESIS_PROPERTY_MENUNODESTATE:\n\t\t\t\tcase __NEMESIS_PROPERTY_MENU_BK_COLOR:\n\t\t\t\tcase __NEMESIS_PROPERTY_MENU_IMG_BK_COLOR:\n\t\t\t\tcase __NEMESIS_PROPERTY_MENU_HIGHLIGHT_COLOR:\n\t\t\t\tcase __NEMESIS_PROPERTY_MENU_TEXT_UNSELECTED_COLOR:\n\t\t\t\tcase __NEMESIS_PROPERTY_MENU_TEXT_SELECTED_COLOR:\n\t\t\t\tcase __NEMESIS_PROPERTY_MENU_TEXT_DISABLED_COLOR:\n\t\t\t\tcase __NEMESIS_PROPERTY_MENU_IMAGES:\n\t\t\t\tcase __NEMESIS_PROPERTY_MENU_IMAGES_RIGHT:\n\t\t\t\tcase __NEMESIS_PROPERTY_MENU_ITEM_COLORS:\n\t\t\t\t\t//these properties require an update of menu\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_MENU])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark menu for update\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_MENU] = true;\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_MENU);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_CONTENT_TYPE:\n\t\t\t\t\t//has html content already been marked for update?\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_HTML_CONTENT])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark html content for update\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_HTML_CONTENT] = true;\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_HTML_CONTENT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_BORDER:\n\t\t\t\tcase __NEMESIS_PROPERTY_BORDER_LEFT:\n\t\t\t\tcase __NEMESIS_PROPERTY_BORDER_RIGHT:\n\t\t\t\tcase __NEMESIS_PROPERTY_BORDER_TOP:\n\t\t\t\tcase __NEMESIS_PROPERTY_BORDER_BOTTOM:\n\t\t\t\tcase __NEMESIS_PROPERTY_CLIENTEDGE:\n\t\t\t\tcase __NEMESIS_PROPERTY_BORDER_RADIUSES:\n\t\t\t\t\t//border not yet marked?\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_BORDER])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark border for update\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_BORDER] = true;\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_BORDER);\n\t\t\t\t\t\t//has this already been marked for update?\n\t\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_HEIGHT])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_HEIGHT);\n\t\t\t\t\t\t\t//only need one of these, dont bother with updating the other\n\t\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_WIDTH] = true;\n\t\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_HEIGHT] = true;\n\t\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_AUTO_RESIZE] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//does it have hotspot?\n\t\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_HOTSPOT] && Get_Bool(this.Properties[__NEMESIS_PROPERTY_HOTSPOT], false))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//mark hotspot for update\n\t\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_HOTSPOT] = true;\n\t\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_HOTSPOT);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_COLOR_DEFAULT:\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_COLOR_SELECTED:\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_COLOR_FOCUSED:\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_COLOR_READONLY:\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_COLOR_DISABLED:\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_COLOR_PRESSED:\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_COLOR_HOVERED:\n\t\t\t\tcase __NEMESIS_PROPERTY_FG_COLOR_DEFAULT:\n\t\t\t\tcase __NEMESIS_PROPERTY_FG_COLOR_SELECTED:\n\t\t\t\tcase __NEMESIS_PROPERTY_FG_COLOR_FOCUSED:\n\t\t\t\tcase __NEMESIS_PROPERTY_FG_COLOR_READONLY:\n\t\t\t\tcase __NEMESIS_PROPERTY_FG_COLOR_DISABLED:\n\t\t\t\tcase __NEMESIS_PROPERTY_FG_COLOR_PRESSED:\n\t\t\t\tcase __NEMESIS_PROPERTY_FG_COLOR_HOVERED:\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_IMAGE_DEFAULT:\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_IMAGE_DISABLED:\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_IMAGE_FOCUSED:\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_IMAGE_HOVERED:\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_IMAGE_PRESSED:\n\t\t\t\tcase __NEMESIS_PROPERTY_BK_IMAGE_READONLY:\n\t\t\t\tcase __NEMESIS_PROPERTY_BACKIMAGE_POS:\n\t\t\t\tcase __NEMESIS_PROPERTY_BACKIMAGE_DISABLED_POS:\n\t\t\t\tcase __NEMESIS_PROPERTY_BACKIMAGE_FOCUSED_POS:\n\t\t\t\tcase __NEMESIS_PROPERTY_BACKIMAGE_HOVERED_POS:\n\t\t\t\tcase __NEMESIS_PROPERTY_BACKIMAGE_PRESSED_POS:\n\t\t\t\tcase __NEMESIS_PROPERTY_BACKIMAGE_READONLY_POS:\n\t\t\t\tcase __NEMESIS_PROPERTY_IMAGE:\n\t\t\t\tcase __NEMESIS_PROPERTY_IMAGE_DISABLED:\n\t\t\t\tcase __NEMESIS_PROPERTY_IMAGE_HOVERED:\n\t\t\t\tcase __NEMESIS_PROPERTY_IMAGE_PRESSED:\n\t\t\t\tcase __NEMESIS_PROPERTY_IMAGE_POS:\n\t\t\t\tcase __NEMESIS_PROPERTY_IMAGE_DISABLED_POS:\n\t\t\t\tcase __NEMESIS_PROPERTY_IMAGE_HOVERED_POS:\n\t\t\t\tcase __NEMESIS_PROPERTY_IMAGE_PRESSED_POS:\n\t\t\t\tcase __NEMESIS_PROPERTY_VALIGN:\n\t\t\t\tcase __NEMESIS_PROPERTY_GRID_IMAGES:\n\t\t\t\t\t//background not yet marked?\n\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_BK_COLOR_DEFAULT])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark background for update\n\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_BK_COLOR_DEFAULT] = true;\n\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_BK_COLOR_DEFAULT);\n\t\t\t\t\t\t//does it have hotspot?\n\t\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_HOTSPOT] && Get_Bool(this.Properties[__NEMESIS_PROPERTY_HOTSPOT], false))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//mark hotspot for update\n\t\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_HOTSPOT] = true;\n\t\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_HOTSPOT);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_PROPERTY_MULTISELECTION:\n\t\t\t\t\t//check class\n\t\t\t\t\tswitch (this.DataObject.Class)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase __NEMESIS_CLASS_LIST_BOX:\n\t\t\t\t\t\t\t//content already marked?\n\t\t\t\t\t\t\tif (!ePropTable[__NEMESIS_PROPERTY_CONTENT])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\t\t\tePropTable[__NEMESIS_PROPERTY_CONTENT] = true;\n\t\t\t\t\t\t\t\taPropTable.push(__NEMESIS_PROPERTY_CONTENT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t//ignore this\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t//has this already been marked for update?\n\t\t\t\t\tif (!ePropTable[eProp])\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark property for update\n\t\t\t\t\t\tePropTable[eProp] = true;\n\t\t\t\t\t\taPropTable.push(eProp);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//got any properties?\n\t\tif (aPropTable.length > 0)\n\t\t{\n\t\t\t//has HTML Update Properties?\n\t\t\tif (this.HTML.UpdateProperties)\n\t\t\t{\n\t\t\t\t//use it to update the properties\n\t\t\t\tthis.HTML.UpdateProperties(aPropTable);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//call generic processing\n\t\t\t\tBasic_UpdateProperties(this, aPropTable);\n\t\t\t}\n\t\t}\n\t}\n\t//clean up refreshed properties\n\tthis.RefreshProperties = {};\n}", "static get properties() {\n return {\n toggleIcon: {\n type: String\n },\n\n /*\n Key information:\n * value specifies the property's default value.\n * notify tells Polymer to dispatch property change events when the property's value changes. This lets the change be observed by other nodes.\n * The reflectToAttribute property tells Polymer to update the corresponding attribute when the property changes. This lets you style the element using an attribute selector, like icon-toggle[pressed].\n */\n pressed: {\n type: Boolean,\n value: false,\n notify: true,\n reflectToAttribute: true\n }\n };\n }", "static createProperty(name,options=defaultPropertyDeclaration){// Note, since this can be called by the `@property` decorator which\n// is called before `finalize`, we ensure storage exists for property\n// metadata.\nthis._ensureClassProperties();this._classProperties.set(name,options);// Do not generate an accessor if the prototype already has one, since\n// it would be lost otherwise and that would never be the user's intention;\n// Instead, we expect users to call `requestUpdate` themselves from\n// user-defined accessors. Note that if the super has an accessor we will\n// still overwrite it\nif(options.noAccessor||this.prototype.hasOwnProperty(name)){return}const key=\"symbol\"===typeof name?Symbol():`__${name}`;Object.defineProperty(this.prototype,name,{// tslint:disable-next-line:no-any no symbol in index\nget(){return this[key]},set(value){const oldValue=this[name];this[key]=value;this._requestUpdate(name,oldValue)},configurable:!0,enumerable:!0})}", "getPropertyList() {\n let identityFlag = {\n isActive: null,\n isStolen: null\n };\n\n let properties = {\n deviceIMEI: null,\n ownerAddress: null,\n attributesHash: null,\n firstBlockNumber: null,\n lastBlockNumber: null,\n identityFlag: identityFlag\n };\n return properties;\n }", "static get properties() {\n\t\treturn {\n\t\t\tsaveditems: { type: Array },\n\t\t\tfilter: { type: String },\n\t\t\ttask: { type: String }\n\t\t};\n\t}", "static get properties(){return{/**\n * Commands to listen for and take action on\n */commands:{name:\"commands\",type:\"Object\",value:{},observer:\"_commandsChanged\"},/**\n * The name that HAL 9000 should respond to.\n */respondsTo:{name:\"respondsTo\",type:\"String\",value:\"(hal)\",observer:\"_respondsToChanged\"},/**\n * Debug mode for annyang\n */debug:{name:\"debug\",type:\"Boolean\",value:!1,observer:\"_debugChanged\"},/**\n * Start automatically\n */auto:{name:\"auto\",type:\"Boolean\",reflectToAttribute:!0,observer:\"_autoChanged\"},/**\n * Status of listening\n */enabled:{name:\"enabled\",type:\"Boolean\",reflectToAttribute:!0,observer:\"_enabledChanged\"},/**\n * Pitch of speech\n */pitch:{name:\"pitch\",type:\"Number\",reflectToAttribute:!0,value:.9},/**\n * Rate of speech\n */rate:{name:\"rate\",type:\"Number\",reflectToAttribute:!0,value:.9},/**\n * Language of the speaker\n */language:{name:\"language\",type:\"String\",reflectToAttribute:!0,value:\"en-US\"}}}", "setProperties(properties) {\n Object.assign(this, properties);\n }", "setProperties(properties) {\n Object.assign(this, properties);\n }", "constructor() {\n\t this.properties = [];\n\t }", "static get properties() {\n return {\n ...super.properties,\n question: { type: String, reflect: true },\n correctOrder: { type: Array },\n numberOfOptions: { type: Number },\n numberCorrrect: { type: Number },\n celebrate: { type: Boolean },\n shame: { type: Boolean },\n mute: { type: Boolean },\n disabled: { type: Boolean },\n noBackground: { type: Boolean, attribute: \"no-background\" },\n };\n }", "_initializeProperties() {}", "static get properties() {\n return {\n 'label': {\n value: '',\n type: 'string'\n },\n 'labelSize': {\n value: null,\n type: 'number?'\n }\n };\n }", "static get properties () {\n return {\n message: { type: String },\n pie: { type: Boolean }\n };\n }", "static $properties() {\n\t\treturn {\n\t\t\t_id: null,\n\t\t}\n\t}", "static get properties() {\n return {\n 'direction': {\n value: 'row',\n type: 'string',\n defaultReflectToAttribute: true\n },\n 'horizontalContentAlignment': {\n value: 'flex-start',\n type: 'string',\n defaultReflectToAttribute: true\n },\n 'verticalContentAlignment': {\n value: 'flex-start',\n type: 'string',\n defaultReflectToAttribute: true\n }\n };\n }", "get props() { return this._props }", "static get properties(){return{source:{name:\"source\",type:\"String\",reflectToAttributes:!0,observer:\"_sourceChanged\"},caption:{name:\"caption\",type:\"String\",reflectToAttributes:!0}}}", "static get properties() {\n return {\n message: { type: String },\n };\n }", "static get properties() {\n return {\n creditStatus:{\n type:String,\n value :\"Not Approved\"\n },\n appliactionStatus:{\n type:String,\n value:\"New\"\n },\n greeting: {\n type: String\n },\n baseUrl:\n {\n type: String,\n value: \"http://10.117.189.210:8090/app\"\n },\n subUrl:\n {\n type: String,\n value: `/login`\n },\n alertMsg: {\n type: String,\n value: \"\"\n },\n showLoginForm:{\n type:Boolean,\n value:true\n },\n showSignUpForm:{\n type:Boolean,\n value:false\n },\n createdAccountDetails:{\n type:Object, \n value:{}\n }\n }\n }", "static get properties() {\n return {\n eventMap: {},\n resourceMap: {},\n releasedElements: {},\n toDrawOnProjectRefresh: new Set()\n };\n }", "static get properties() {\r\n return {\r\n hour: Number,\r\n minute: Number,\r\n setting: Boolean,\r\n zone: {\r\n observer: \"_zoneChanged\",\r\n type: Object,\r\n },\r\n };\r\n }", "update(_changedProperties) {\n super.update();\n }", "static get properties() {\n return {\n isSelfAdmin: {\n type: Boolean,\n readOnly: false,\n notify: true\n },\n participants: {\n type: Array,\n readOnly: false,\n notify: true\n },\n subject: {\n type: String,\n readOnly: false,\n notify: true\n },\n chatImage: {\n type: String,\n readOnly: false,\n notify: true\n },\n adminKeyImage: {\n type: String,\n readOnly: false,\n notify: true,\n value: m_basePath + \"img/admin_key.png\"\n },\n pendingParticipantImage: {\n type: String,\n readOnly: false,\n notify: true,\n value: m_basePath + \"img/pending_participant.png\"\n },\n expanderImage: {\n type: String,\n readOnly: false,\n notify: true,\n value : m_basePath + \"img/menu_token.png\"\n },\n videoCallImage: {\n type: String,\n readOnly: false,\n notify: true,\n value : m_basePath + \"img/video_call.png\"\n },\n voiceCallImage: {\n type: String,\n readOnly: false,\n notify: true,\n value : m_basePath + \"img/voice_call.png\"\n },\n optionsMenuImage: {\n type: String,\n readOnly: false,\n notify: true,\n value : m_basePath + \"img/options_menu.png\"\n },\n isHasAudio: {\n type: Boolean,\n readOnly: false,\n notify: true,\n value: false\n },\n isHasVideo: {\n type: Boolean,\n readOnly: false,\n notify: true,\n value: false\n },\n isMediaEnabled: {\n type: Boolean,\n readOnly: false,\n notify: true,\n value: true\n },\n isOneToOne: {\n type: Boolean,\n readOnly: false,\n notify: true\n },\n noSubjectPlaceHolder: {\n type: String,\n readOnly: false,\n notify: true,\n value : \"\"\n }\n };\n }", "static getNewProperties() {\n return {};\n }", "static get properties() {\n return {\n ...super.properties,\n /**\n * heading / label of the modal\n */\n title: {\n type: String,\n },\n /**\n * open state\n */\n opened: {\n type: Boolean,\n reflect: true,\n },\n /**\n * Close label\n */\n closeLabel: {\n attribute: \"close-label\",\n type: String,\n },\n /**\n * Close icon\n */\n closeIcon: {\n type: String,\n attribute: \"close-icon\",\n },\n /**\n * The element that invoked this. This way we can track our way back accessibly\n */\n invokedBy: {\n type: Object,\n },\n /**\n * support for modal flag\n */\n modal: {\n type: Boolean,\n },\n /**\n * can add a custom string to style modal based on what is calling it\n */\n mode: {\n type: String,\n reflect: true,\n },\n };\n }", "getInterfaceLanguage() {\n return interfaceLanguage;\n }", "_initDefinedProperties() {\n //initialise graph parameters\n this.width = this.getAttribute('width') || 300;\n this.height = this.getAttribute('height') || 300;\n this.drawXAxis = this.getAttribute('hide-x-axis') !== null ? false : true;\n this.drawYAxis = this.getAttribute('hide-y-axis') !== null ? false : true;\n this.drawOrigin = this.getAttribute('hide-origin') !== null ? false : true;\n this.drawGrid = this.getAttribute('show-grid') !== null ? true : false;\n //indicates that the x axis only should be measured in multiples of pi\n this.piUnits = this.getAttribute('pi-units') !== null ? true : false;\n //overrides the default unit-marking step sizes\n //if not set, will be defined after unitSize in _initDerivedProperties()\n this.stepX = this.getAttribute('step-x') ?\n this._parseNumberToRational(this.getAttribute('step-x')) : null;\n this.stepY = this.getAttribute('step-y') ?\n this._parseNumberToRational(this.getAttribute('step-y')) : null;\n this.drawXUnits = this.getAttribute('hide-x-units') !== null ? false : true;\n this.drawYUnits = this.getAttribute('hide-y-units') !== null ? false : true;\n\n this.range = {\n x: this._parseRange(this.getAttribute('range-x') || '(-10, 10)'),\n y: this._parseRange(this.getAttribute('range-y') || '(-10, 10)')\n }\n\n this.gutter = {\n left: parseInt(this.getAttribute('gutter-left')) || GUTTER_LEFT,\n right: parseInt(this.getAttribute('gutter-right')) || GUTTER_RIGHT,\n top: parseInt(this.getAttribute('gutter-top')) || GUTTER_TOP,\n bottom: parseInt(this.getAttribute('gutter-bottom')) || GUTTER_BOTTOM\n }\n }", "getHaxProperties(){return this.haxProperties}" ]
[ "0.64714545", "0.6186689", "0.6126559", "0.61251825", "0.61143583", "0.6005949", "0.59955233", "0.59955233", "0.59861", "0.5961021", "0.5961021", "0.5961021", "0.5951046", "0.59273577", "0.5922874", "0.591547", "0.58995116", "0.5894872", "0.5864184", "0.58364415", "0.58247495", "0.5810428", "0.57867146", "0.5766584", "0.57660127", "0.57610327", "0.5750105", "0.5749713", "0.573696", "0.5730862", "0.57291585", "0.5706808", "0.5702618", "0.5687837", "0.5675617", "0.5672635", "0.56725675", "0.56659055", "0.56621075", "0.56485415", "0.56262106", "0.56262106", "0.56262106", "0.56211895", "0.56185097", "0.5615918", "0.55858743", "0.55846596", "0.5578972", "0.557727", "0.55749613", "0.5572038", "0.5571346", "0.55619526", "0.555763", "0.5553407", "0.5535915", "0.5535305", "0.55304843", "0.5508576", "0.5500913", "0.54977983", "0.54926807", "0.548929", "0.54808235", "0.54681045", "0.54645956", "0.5463303", "0.546293", "0.545063", "0.54487723", "0.54440844", "0.54440844", "0.5432815", "0.5432031", "0.54291314", "0.5425637", "0.54200584", "0.54000366", "0.5397637", "0.5397637", "0.5395293", "0.5389725", "0.53784", "0.5372652", "0.53620243", "0.53513753", "0.53325695", "0.53299403", "0.53129846", "0.5308165", "0.53071195", "0.53065324", "0.53026164", "0.53002316", "0.5299826", "0.5293889", "0.52937204", "0.52916914", "0.52902484", "0.5289243" ]
0.0
-1
Start the HTTP server.
function startHttpServer() { return new Promise(resolve => { // Wrap in a promise so we can be notified when the server has started. const app = express(); setupHandlers(app); const port = process.env.PORT && parseInt(process.env.PORT) || 3000; app.listen(port, () => { resolve(); // HTTP server is listening, resolve the promise. }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async start () {\n assert(!this._server, 'http server is already started');\n this._app = express();\n this._app.use('/healthcheck', healthcheck(this._config));\n this._app.use('/', video(this._counterService, this._config));\n\n this._server = http.createServer(this._app);\n this._statsServer = new StatsServer(this._server, this._communicationMesh);\n await this._statsServer.start();\n this._logger.info({ port: this._config.get('LISTEN_PORT') }, 'Goint to listen http:// and ws:// at port');\n this._server.listen(this._config.get('LISTEN_PORT'));\n }", "start() {\n this.httpServer.start();\n }", "startHTTPServer()\r\n {\r\n var self = this;\r\n if(!this.httpServer)\r\n {\r\n this.httpServer = Http.createServer();\r\n this.httpServer.on(\"request\", function(_request, _response){\r\n self.requestReceived(_request, _response);\r\n });\r\n\r\n // start the server on the port given in the settings\r\n this.httpServer.listen(this.settings.port, function() {\r\n self.logVerbose('Raumserver listening on port ' + self.settings.port.toString());\r\n });\r\n }\r\n }", "function startWebserver() {\n\n if ( curProtocol === 'https' ) {\n const credentials = {\n key: fs.readFileSync( configs.protocol[ curProtocol ].privateKey ),\n cert: fs.readFileSync( configs.protocol[ curProtocol ].certificate ),\n ca: fs.readFileSync( configs.protocol[ curProtocol ].ca )\n };\n const https_server = https.createServer( credentials, handleRequest );\n\n // start HTTPS webserver\n https_server.listen( configs.protocol[ curProtocol ].port );\n\n console.log( 'HTTPS server started at: https://' + configs.domain + ':' + configs.protocol[ curProtocol ].port );\n\n } else if ( curProtocol === 'http' ) {\n const http_server = http.createServer( handleRequest );\n\n // start HTTP webserver\n http_server.listen( configs.protocol[ curProtocol ].port );\n\n console.log( 'HTTP server started at: http://' + configs.domain + ':' + configs.protocol[ curProtocol ].port);\n\n } else {\n console.error( \"neither 'http' or 'https' configuration specified\" );\n }\n }", "function startHttpServer() {\n var server = http.createServer(httpRequestHandler);\n var port = program.port || httpRequestHandler.get('port');\n\n server.listen(port, function() {\n console.log('\\nPersonalization server listening on port ' + port);\n });\n}", "function startServer() {\n Http.listen(env.serverPort, () => {\n console.log('Listening at :' + env.serverPort + '...');\n });\n}", "function startServer () {\n require('http').createServer(function (req, res) {\n req.addListener('end', function (e) {\n //\n // Serve files!\n //\n server.serve(req, res, function (resp) {\n if (resp && (resp.status === 404)) { // If the file wasn't found\n\n server.serveFile('/index.html', 302, resp.headers, req, res);\n }\n });\n });\n }).listen(8080);\n\n console.log('server now listening on port: 8080')\n}", "function start(){\n server = http.createServer(app).listen( config.port );\n logger.info((new Date()).toString()+ \":: PROJECT_NAME server listening on port::\", config.port, \", environment:: \", app.settings.env);\n}", "function run(httpServer) {\n httpServer.listen();\n}", "startServer() {\n let requestHandler = this.onRequest.bind(this);\n let port = this.port;\n http.createServer(requestHandler).listen(port);\n console.log(\"Server running at http://localhost:%d\", port);\n }", "function start (opts) {\n const port = opts.server\n const server = http.createServer(onRequest)\n server.listen(port, 'localhost', onListen)\n\n function onListen () {\n console.log(`${pkgJSON.name} starting on http://localhost:${port}`)\n }\n\n function onRequest (req, res) {\n handleRequest(opts, req, res)\n }\n}", "start() {\n this._app.listen(config.get('web.port'), config.get('web.address'));\n LogService.info(\"ApiHandler\", \"API Listening on \" + config.get(\"web.address\") + \":\" + config.get(\"web.port\"));\n }", "function main() {\n let cfg = loadConfig()\n startHttpServer(cfg)\n}", "startWebServer() {\n express.listen(this.master.CLA.port, () => console.log(`Running on port ${this.master.CLA.port}`))\n this.loadRoutes()\n }", "start(){\n this.applyMiddleWare();\n this.init();\n this.instance.listen(process.env.SERVER_PORT,()=>{\n console.log(`Server started on port ${process.env.SERVER_HOST}.`);\n console.log(`Navigate to http://${process.env.SERVER_HOST}:${process.env.SERVER_PORT}`);\n });\n }", "start() {\n // listen to coming requests\n const port = Number(this.config.port || process.env.PORT || 0);\n const host = this.config.host || '127.0.0.1';\n this.server.listen(port, host, () => {\n this.app.locals.url = `${this.app.locals.schema}://${host}:${port}`;\n log.info(`Server started on ${this.app.locals.url}`);\n });\n }", "function startServer() {\n\tserver = require(__dirname + '/NetworkServer');\n\tserver.startServer();\n}", "function createHttpServer() {\n\t\tutil.log('Starting http server...');\n\t\thttp.createServer(function (req, response) {\n\n\t\t\tvar setHeader = function (status, ctype) {\n\t\t\t\tif (typeof ctype === constants.variables.undef) {\n\t\t\t\t\tctype = 'text/plain';\n\t\t\t\t}\n\n\t\t\t\tresponse.writeHead(status, {\n\t\t\t\t\t'Content-Type': ctype\n\t\t\t\t});\n\t\t\t};\n\n\t\t\ttry {\n\t\t\t\tvar parsedUrl = url.parse(req.url, true);\n\t\t\t\tvar queryData = parsedUrl.query;\n\t\t\t\tvar _ids = queryData.id;\n\n\t\t\t\t//set default response \n\t\t\t\tsetHeader(200);\n\n\t\t\t\tif (queryData.mode && queryData.mode === 'upload') {\n\t\t\t\t\tfileupload.upload(req, response, _ids, function (cb) {\n\t\t\t\t\t\tcb();\n\t\t\t\t\t});\n\n\t\t\t\t} else if (parsedUrl.path.indexOf('/static/') > -1) {\n\t\t\t\t\tvar img = fs.readFileSync(constants.variables.appPath + parsedUrl.path);\n\t\t\t\t\tsetHeader(200, 'image/jpeg');\n\t\t\t\t\tresponse.end(img, 'binary');\n\t\t\t\t} else {\n\t\t\t\t\tresponse.end(\"furb.static.serv\\n\");\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tsetHeader(500);\n\t\t\t\tresponse.end('maybe overload?');\n\t\t\t\tutil.inspect(e);\n\t\t\t}\n\t\t}).listen(constants.variables.httpPort);\n\t}", "async function start() {\n // Create and start the server. Any errors during creation are fatal.\n try {\n // Create the server.\n const server = await create();\n\n // Make sure we can handle unhandled rejections and signals.\n handleUnhandledRejections(process, server);\n handleSignals(process, server);\n\n // Add all of the routes.\n server.route(sendOtpRoute);\n server.route(healthcheckRoute);\n\n // Start the server, log details of where it is running.\n await server.start();\n const { protocol, host, port } = server.info;\n server.log('info', `Server running at: ${protocol}://${host}:${port}`);\n } catch (err) {\n console.log(`An error occurred starting the server: ${err}`);\n process.exit(1);\n }\n}", "function startServer() {\r\n // Start listening on port 3000\r\n httpServer.listen(Constants.PORT, function () {\r\n console.log('listening on *: ', Constants.PORT);\r\n });\r\n\r\n // Start serving the game\r\n let server = new GameServer(io);\r\n server.init();\r\n}", "function httpserv(options) {\n process.on('message', handleMessage);\n var server = require('http').createServer(httpHandler);\n server.listen(options.port, function() { console.info(\"httpserv is listening on \"+getIPAddresses().join(\";\")+\" port \"+options.port); });\n require('./wsserv').wsserv(server);\n const appmain = require('./appmain.js').init(options);\n getApp = appmain.getApp;\n runApp = appmain.runApp;\n changedApps = appmain.changedApps;\n listAppsApks = appmain.listAppsApks;\n}", "function onHttpStart() {\n console.log(\"Express http server listening on \" + HTTP_PORT);\n }", "function onHttpStart() {\n console.log(\"Express http server listening on: \" + HTTP_PORT + \"\\n\");\n}", "function start(options) {\n app.get('/', function(req, res) {\n res.end('Hello World');\n });\n \n monitor.app(app.listen(options.port));\n }", "start() {\n this._.on('request', this.onRequest.bind(this));\n this._.on('error', this.onError.bind(this));\n this._.on('listening', this.onListening.bind(this));\n\n this._.listen(this.config.port);\n }", "function start_server () {\n var server = new msp.Proxy();\n server.listen(8050);\n log('Proxying from http://:8050');\n}", "function start_server(){\n let options = {}\n\n if (config.https.enabled) {\n options = {\n key: fs.readFileSync(config.https.key_file).toString(),\n cert: fs.readFileSync(config.https.cert_file).toString()\n };\n if (config.https.ca_certs) {\n options.ca = [];\n for (const ca in config.https.ca_certs) {\n options.ca.push(fs.readFileSync(config.https.ca_certs[ca]).toString());\n }\n }\n }\n\n const app = require('../app');\n server = http.createServer(app); \n\n /**\n * Get port from environment and store in Express.\n */\n server.listen(normalize_port(config.port));\n server.on('error', on_error);\n server.on('listening', on_listening);\n\n if (config.https.enabled) {\n const serverSecure = https.createServer(options, app);\n\n serverSecure.listen(config.https.port, function() {\n debug('Listening on port ' + serverSecure.address().port);\n });\n }\n}", "async function main() {\n log.header();\n const server1 = http.createServer({}, httpRequest);\n server1.on('listening', () => log.state('HTTP server listening:', httpPort));\n server1.listen(httpPort);\n}", "function startHttpServer(app) {\n var httpServer;\n\n try {\n httpServer = http.createServer(app);\n httpServer.on('error', httpError);\n httpServer.listen(config.httpPort);\n\n // if the app is being served through nginx, show the nginx information\n // instead of the HTTP port for the app\n if (process.env.NGINX_PORT) {\n console.log('Server started: https://localhost:' + process.env.NGINX_PORT);\n } else {\n console.log('Server started on HTTP: ' + config.httpPort);\n }\n\n } catch (e) {\n console.error('Error while starting HTTP server on ' + config.httpPort + ':');\n console.error(e);\n throw e;\n }\n}", "function onHttpStart() {\n console.log(\"Express http server listening on: \" + HTTP_PORT);\n}", "function onHttpStart() {\n console.log(\"Express http server listening on: \" + HTTP_PORT);\n}", "function onHttpStart() {\n console.log(\"Express http server listening on: \" + HTTP_PORT);\n}", "function onHttpStart() {\n console.log(\"Express http server listening on: \" + HTTP_PORT);\n}", "function onHttpStart() {\n console.log(\"Express http server listening on: \" + HTTP_PORT);\n}", "function onHttpStart() {\n console.log(\"Express http server listening on: \" + HTTP_PORT);\n}", "function onHttpStart() {\n console.log(\"Express http server listening on: \" + HTTP_PORT);\n}", "function onHttpStart() {\n console.log(\"Express http server listening on: \" + HTTP_PORT);\n}", "function onHttpStart() {\n console.log(\"Express http server listening on: \" + HTTP_PORT);\n}", "function StartWebServer(port) {\n if (port == 0 || port == 65535) return;\n obj.args.port = port;\n if (obj.tlsServer != null) {\n if (obj.args.lanonly == true) {\n obj.tcpServer = obj.tlsServer.listen(port, function () { console.log('MeshCentral HTTPS web server running on port ' + port + '.'); });\n } else {\n obj.tcpServer = obj.tlsServer.listen(port, function () { console.log('MeshCentral HTTPS web server running on ' + certificates.CommonName + ':' + port + '.'); });\n }\n } else {\n obj.tcpServer = obj.app.listen(port, function () { console.log('MeshCentral HTTP web server running on port ' + port + '.'); });\n }\n }", "function onHttpStart() {\r\n console.log(\"Express http server listening on: \" + HTTP_PORT);\r\n}", "function onHttpStart() {\n console.log('Express http server listening on: ' + HTTP_PORT);\n}", "start (port) {\n // Listen for and handle incoming HTTP requests\n this.server.on('request', (request, response) => {\n const res = new Response(response)\n this.handleRequest(request, res)\n })\n\n this.server.listen(port)\n }", "async listenHTTP( host, )\n\t{\n\t\tfor await( const denoRequest of HttpServer.serve( host, ) )\n\t\t\tnew Request( denoRequest, )\n\t\t\t\t.then( this['::'].handle, )\n\t\t\t\t.then( denoRequest['::'].respond, )\n\t\t\t;\n\t}", "start(callback) {\n let srv = this._httpServer;\n if(srv === undefined) {\n this._createHTTPServer(callback);\n return;\n }\n \n if(!callback) {\n return;\n }\n \n if(srv.listening) {\n callback(undefined);\n return;\n }\n srv.once('listening', () => {\n srv.removeListener('error', callback);\n callback();\n });\n srv.once('error', callback);\n }", "function startServer(){\n server.start((err) => {\n if (err) {\n throw err;\n }\n console.log(`Server running at: ${server.info.uri}`);\n //pino.info('Server running at 8080')\n });\n}", "async function startWebServer () {\n const shutdownOptions = {\n logger: console,\n forceTimeout: 30000\n }\n\n if (sslEnabled) {\n secureCtx = await createSecureContext()\n // create with `secureCtx` so we can renew certs without restarting the server\n const httpsServer = https.createServer(\n {\n SNICallback: (_, cb) => cb(null, secureCtx)\n },\n app\n )\n // update secureCtx to reassign the new cert files\n app.use(\n '/reload-certs',\n async () => (secureCtx = await createSecureContext())\n )\n // graceful shutdown prevents new clients from connecting & waits for to diconnect\n app.use(graceful(httpsServer, shutdownOptions))\n // websocket uses same fd\n attachWebSocket(httpsServer)\n // callback gets public facing ip\n httpsServer.listen(sslPort, checkPublicIpAddress)\n }\n\n const httpServer = http.createServer(app)\n app.use(graceful(httpServer, shutdownOptions))\n\n if (sslEnabled) {\n // set up a route to redirect http to https\n httpServer.get('*', function (req, res) {\n res.redirect('https://' + req.headers.host + req.url)\n })\n } else {\n attachWebSocket(httpServer)\n }\n httpServer.listen(port, checkPublicIpAddress)\n}", "function startServer() {\n\tapp.serverInstance = server.listen(config.PORT, config.HOST, function() {\n\t\tlogger.info('Express server listening on %d, in %s mode...', config.PORT, config.ENV);\n\t});\n}", "function startListen() {\r\n if (!_startWebServer)\r\n return;\r\n\r\n try {\r\n if (settingsHelper.settings.port != undefined)\r\n port = settingsHelper.settings.port;\r\n\r\n self.onLog(\"Listening to port: \" + settingsHelper.settings.port);\r\n self.onLog();\r\n\r\n server = http.createServer(app);\r\n\r\n // parse application/x-www-form-urlencoded\r\n app.use(bodyParser.urlencoded({ extended: false }));\r\n\r\n app.use(function (req, res) {\r\n res.header('Content-Type', 'text/html');\r\n var response = '<style>body {font-family: \"Helvetica Neue\",Helvetica,Arial,sans-serif; background: rgb(52, 73, 94); color: white;}</style>';\r\n response += '<h1><img src=\"https://microservicebus.com/Images/Logotypes/Logo6.svg\" style=\"height:75px\"/> Welcome to the ' + settingsHelper.settings.nodeName + ' node</h1><h2 style=\"margin-left: 80px\">API List</h2>';\r\n\r\n app._router.stack.forEach(function (endpoint) {\r\n if (endpoint.route != undefined) {\r\n if (endpoint.route.methods.get != undefined && endpoint.route.methods.get == true)\r\n response += '<div style=\"margin-left: 80px\"><b>GET</b> ' + endpoint.route.path + \"</div>\";\r\n if (endpoint.route.methods.delete != undefined && endpoint.route.methods.delete == true)\r\n response += '<div style=\"margin-left: 80px\"><b>DELETE</b> ' + endpoint.route.path + \"</div>\";\r\n if (endpoint.route.methods.post != undefined && endpoint.route.methods.post == true)\r\n response += '<div style=\"margin-left: 80px\"><b>POST</b> ' + endpoint.route.path + \"</div>\";\r\n if (endpoint.route.methods.put != undefined && endpoint.route.methods.put == true)\r\n response += '<div style=\"margin-left: 80px\"><b>PUT</b> ' + endpoint.route.path + \"</div>\";\r\n }\r\n });\r\n\r\n res.send(response);\r\n });\r\n\r\n app.use('/', express.static(__dirname + '/html'));\r\n\r\n self.onLog(\"REST endpoints:\".green);\r\n app._router.stack.forEach(function (endpoint) {\r\n if (endpoint.route != undefined) {\r\n if (endpoint.route.methods.get != undefined && endpoint.route.methods.get == true)\r\n self.onLog(\"GET: \".yellow + endpoint.route.path);\r\n if (endpoint.route.methods.delete != undefined && endpoint.route.methods.delete == true)\r\n self.onLog(\"DELETE: \".yellow + endpoint.route.path);\r\n if (endpoint.route.methods.post != undefined && endpoint.route.methods.post == true)\r\n self.onLog(\"POST: \".yellow + endpoint.route.path);\r\n if (endpoint.route.methods.put != undefined && endpoint.route.methods.put == true)\r\n self.onLog(\"PUT: \".yellow + endpoint.route.path);\r\n }\r\n });\r\n\r\n server = http.createServer(app).listen(port, function (err) {\r\n self.onLog(\"Server started on port: \".green + port);\r\n self.onLog();\r\n });\r\n }\r\n catch (e) {\r\n self.onLog('Unable to start listening on port ' + port);\r\n }\r\n }", "function startServer() {\n if (!opts.p) {\n console.log(opts.p)\n }else\n {\n if (opts.f === '') {\n fs.writeFileSync(tileDirectory + 'index.html', preview(geojsonFiles[0],mapCenter.geometry.coordinates,8));\n }else{\n fs.writeFileSync(tileDirectory + 'index.html', preview(tileLayerName,mapCenter.geometry.coordinates,8));\n }\n var StaticServer = require('static-server');\n var server = new StaticServer({\n rootPath: tileDirectory, // required, the root of the server file tree\n name: 'my-http-server', // optional, will set \"X-Powered-by\" HTTP header\n port: 80, // optional, defaults to a random port\n host: '127.0.0.1', // optional, defaults to any interface\n cors: '*', // optional, defaults to undefined\n followSymlink: true, // optional, defaults to a 404 error\n templates: {\n index: 'index.html', // optional, defaults to 'index.html'\n notFound: '404.html' // optional, defaults to undefined\n }\n });\n\n server.start(function () {\n console.log('Server listening to', server.port);\n });\n opener('http://127.0.0.1/')\n }\n}", "start() {\n\t\tlet self = this;\n\t\tthis.app.listen(this.app.get(\"port\"), () => {\n\t\t\tconsole.log(`Server Listening for port: ${self.app.get(\"port\")}`);\n\t\t});\n\t}", "function server(options) {\n\toptions = options || {};\n\tconst port = options.port || 0;\n\tconst listen = options.listen || '::1';\n\tconst handlers = options.handlers || [static_handler.file_handler('/', ROOT_DIR)];\n\n\tconst serv = http.createServer((req, res) => {\n\t\treq.socket.setNoDelay(true);\n\n\t\tconst pathname = url.parse(req.url).pathname;\n\n\t\tfor (const h of handlers) {\n\t\t\tif (h(req, res, pathname) !== 'unhandled') {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t});\n\tserv.listen(port, listen, () => {\n\t\tconst domain = ((listen === '::') || (listen == '0.0.0.0')) ? 'localhost' : (\n\t\t\tlisten.includes(':') ? `[${listen}]` : listen\n\t\t);\n\t\tif (options.start_callback) {\n\t\t\toptions.start_callback(null, 'http://' + domain + ':' + serv.address().port + '/');\n\t\t}\n\t});\n\tserv.on('error', (err) => {\n\t\tthrow err;\n\t});\n\treturn serv;\n}", "start() {\r\n this.server.listen(process.env.PORT, () => {\r\n logger.info(colors.green(`● API server running on [::]:${ process.env.PORT }`));\r\n });\r\n }", "function serve() {\n var server = gls.static('dist/', PORT);\n //server.start();\n var promise = server.start();\n //optionally handle the server process exiting\n promise.then(function(result) {\n console.log('server started')\n openBrowser()\n });\n}", "function startServer() {\n var server = new Server();\n console.log('server started');\n}", "function startServer () {\n // Enable CORS for all requests\n app.use(require('cors')());\n\n // Note: the order which we add middleware to Express here is important!\n app.use('/sys', mbaasExpress.sys([]));\n app.use('/mbaas', mbaasExpress.mbaas);\n\n // Note: important that this is added just before your own Routes\n app.use(mbaasExpress.fhmiddleware());\n\n // Important that this is last as per express conventions!\n app.use(mbaasExpress.errorHandler());\n\n const port = process.env.FH_PORT || process.env.OPENSHIFT_NODEJS_PORT || 8001;\n const host = process.env.OPENSHIFT_NODEJS_IP || '0.0.0.0';\n\n server.listen(port, host, undefined, () => {\n log.info(`application started on ${host}:${port}`);\n });\n}", "function startExpress() {\n\n http.createServer(app).listen(app.get('port'), () => {\n console.log('Web server is running on ', app.get('port'));\n });\n}", "async registerHttpServer() {\n this.httpServer = new HttpServer(this.app, this.port);\n this.httpServer.on('error', (err) => {\n this.emit('error', err);\n });\n this.httpServer.on('info', (msg) => {\n this.emit('info', msg);\n });\n\n await this.httpServer.init();\n }", "function start() {\n console.log(\"server start . . .\");\n initialize();\n}", "function startApp() {\n server.use(handler).listen(PORT, err => {\n if (err) throw err;\n console.log(`> Ready on ${PORT}`);\n });\n }", "CrearServidorHttp() {\n this.server = http.createServer(this.app);\n }", "async function startService () {\n try {\n app.use(express.json())\n app.use(express.static('public'))\n await startMicroLib()\n reloadCallback()\n startWebServer()\n } catch (e) {\n console.error(e)\n }\n}", "function start() {\n if (path.startsWith(\"http\")) {\n webCat(path);\n } else {\n cat(path);\n }\n}", "async function serve() {\n createCtrlcHandler('serve');\n logServeMode();\n watch(serverFiles, restartServer);\n await startServer();\n await performPreBuildSteps();\n}", "async function start(){\n try {\n await server.start();\n }\n catch(err){\n console.log(err);\n process.exit(1);\n }\n\n console.log('Server running at: ', server.info.uri);\n console.log('Environment: ', config.get('env'));\n console.log('ON: ', os.hostname());\n}", "async listen() {\n const { resolvedPort } = this;\n this.httpServer.listen(resolvedPort);\n rapid.log(`Listening on port ${resolvedPort}`);\n }", "function start(route) {\n function onRequest(req, res) {\n // server code\n console.log(\"Request Received\");\n\n var pathname = localURL.parse(req.url).pathname;\n console.log(\"Request for \" + pathname + \" received.\");\n \n route(pathname);\n\n switch (pathname) {\n case '/':\n\n res.writeHead(200, {'Content-Type': 'text/plain'});\n appId(res);\n res.end('res.end\\n');\n break;\n\n default:\n fourZeroFour(res);\n\n }\n }\n\n var server = localHTTP.createServer(onRequest);\n\n if (process.env.PORT === undefined) {\n console.log('Running locally; browse to http://localhost:8888/\\n');\n server.listen(8888, '127.0.0.1');\n } else { // Running on c9.io.\n server.listen(process.env.PORT, '0.0.0.0');\n console.log(\"Server has started.\");\n console.log(\"Listning on port: \" + process.env.PORT);\n }\n}", "async start() {\n await this.resolvePort();\n\n const Koa = (this.Koa = require('koa'));\n const bodyParser = require('koa-bodyparser');\n const Http = require('http');\n const koaApp = (this.koaApp = new Koa());\n\n this.httpServer = Http.createServer(koaApp.callback());\n\n let { publicPath, publicPaths } = this.config;\n\n await rapid._hookEmit('middlewareWillAttach');\n if (publicPath) addPublicDir(publicPath);\n if (publicPaths) publicPaths.forEach(addPublicDir);\n\n koaApp.use(errorHandlerMiddleware);\n koaApp.use(addUtilityFunctionsMiddleware);\n koaApp.use(loggerMiddleware);\n koaApp.use(bodyParser());\n\n if (this.config.cors) {\n koaApp.use(koaCors());\n }\n await rapid._hookEmit('middlewareDidAttach');\n\n function addPublicDir(publicPath) {\n const serveStatic = require('koa-static');\n const fullPublicPath = rapid.localPath(publicPath);\n koaApp.use(serveStatic(fullPublicPath));\n }\n }", "function start(route, handle) {\n function onRequest(request, response) {\n var pathname = url.parse(request.url).pathname;\n console.log(\"Request for \" + pathname + \" received.\");\n route(handle,pathname,response,request);\n }\n \n//creates server on load\n http.createServer(onRequest).listen(4000);\n console.log(\"Server has started.\");\n}", "async function startServer() {\n await server.start(TEST_SERVER_PORT);\n}", "async start() {\n let configHttp = config.get('http');\n let port = process.env.PORT || configHttp.port;\n\n log.info('start express server on port %s', port);\n\n return new Promise(function(resolve) {\n httpHandle = expressApp.listen(port, function() {\n log.info('express server started');\n resolve();\n });\n });\n }", "async start(){\n\t\tpatchLoader.call(this);\n\t\tthis.dbProviderPool = new DBProviderPool();\n\t\tlet providers = [];\n\t\tfor (let i in this.config.database){\n\t\t\tproviders.push(this.dbProviderPool.connect(i, this.config.database[i]));\n\t\t}\n\t\tif (!this.httpApp){\n\t\t\tproviders.push(new Promise((resolve, reject) => {\n\t\t\t\tthis.httpApp = express();\n\t\t\t\tif (this.config.bodyParser !== false){\n\t\t\t\t\tthis.httpApp.use(bodyParser.json(this.config.bodyParser ? this.config.bodyParser : undefined));\n\t\t\t\t}\n\t\t\t\tthis.httpServer = http.createServer(this.httpApp);\n\t\t\t\tthis.httpServer.on('error', reject);\n\t\t\t\tthis.httpServer.listen(this.config.http.port, () => {\n\t\t\t\t\tconsole.info(`Server started on ${this.config.http.port} port`);\n\t\t\t\t\tRouter.RouterHTTP.prototype.httpServer = this.httpServer;\n\t\t\t\t\tthis.httpServer.on('error', (err) => {\n\t\t\t\t\t\tconsole.error(err.stack);\n\t\t\t\t\t});\n\t\t\t\t\tresolve();\n\t\t\t\t});\n\t\t\t}));\n\t\t}\n\t\tawait Promise.all(providers);\n\t}", "function startServer() {\n const proxyApp = express();\n const webServer = require('http').createServer(proxyApp);\n const port = process.env.port || 3088;\n\n // set up routes and enable CORS\n proxyApp.use(cors())\n proxyApp.get('/api/cars', getCarOwners); \n const path = __dirname + '/../dist';\n console.log('Hosting server at http://localhost:' + port)\n if (fs.existsSync(path)) {\n const staticContent = express.static(path);\n proxyApp.use(staticContent);\n } else {\n proxyApp.get('/', (req, res, next) => {\n res.send('<h1>Applicaton not built and published</h1>')\n next();\n });\n }\n\n // local server for Dev acting as Proxy for original service\n webServer.listen(port, () => {\n successlog.info('CORS enabled proxy API server launched..');\n });\n}", "function startServer() {\n protocolDownloader\n .getSchemas()\n .catch(e => process.exit(1))\n .then(() => schemaParser.readSchemas())\n .then(() =>\n app.listen(port, () => console.log(`Server starting at port: ${port}!`))\n );\n}", "function start(){\n var port = process.env.PORT || config.server.port;\n app.listen(port);\n console.log(\"server pid %s listening on port %s in %s mode\",\n process.pid,\n port,\n app.get('env')\n );\n}", "function startServer(address) {\n // Creates a server\n const server = http.createServer(handleRequest);\n // Starts the server\n const endpoint = address.split(':');\n server.listen(endpoint[1], endpoint[0], (err) => {\n if (err) {\n throw err;\n }\n console.log(`Node HTTP listening on ${address}`);\n });\n}", "serve() {\n\t\tconst server = new Server(this);\n\t\tconst serverConfig = this._config.devServer;\n\n\t\tserver.logServer('/log');\n\n\t\tif (serverConfig.enableRawProxy) {\n\t\t\tserver.rawProxy('/proxy');\n\t\t}\n\n\t\tconst proxyMap = serverConfig.proxy;\n\t\tObject.keys(proxyMap)\n\t\t\t.forEach((path) => {\n\t\t\t\tserver.proxy(path, proxyMap[path]);\n\t\t\t});\n\n\t\tlet staticFiles = {};\n\t\tfor (const entity of this._config.include) {\n\t\t\tif (entity.static) {\n\t\t\t\tstaticFiles = Object.assign(staticFiles, entity.static);\n\t\t\t}\n\t\t}\n\n\t\tlogger.silly(`Serving static files: \\n${JSON.stringify(staticFiles, null, '\\t')}`);\n\n\t\tfor (const [customPath, filePath] of Object.entries(staticFiles)) {\n\t\t\tconst alias = `/${customPath.replace(/^\\//, '')}`;\n\t\t\tconst absolutePath = this._pathHelper.resolveAbsolutePath(filePath);\n\n\t\t\tif (fs.existsSync(absolutePath)) {\n\t\t\t\tserver.serveStatic(alias, absolutePath);\n\t\t\t} else {\n\t\t\t\tlogger.warn(`Can't serve static path ${kleur.green(alias)} from ${kleur.underline(absolutePath)}`);\n\t\t\t}\n\t\t}\n\n\t\tthis._codeSource.watch();\n\n\t\tserver.start(serverConfig.port)\n\t\t\t.then((addresss) => {\n\t\t\t\tlogger.output(`Server started at ${kleur.underline(addresss)}`);\n\t\t\t}, (err) => {\n\t\t\t\tlogger.error(`Error starting server: ${err.toString()}`);\n\t\t\t\tlogger.debug(err.stack);\n\t\t\t});\n\t}", "function startServer() {\r\n\tif ((process.argv[2] == 'help' || !process.argv[2]) && useCommandLine) {\r\n\t\tconsole.log('node index.js {local,online} [shutdownKey] [port]');\r\n\t\tprocess.exit(0);\r\n\t}\r\n\tvar local = process.argv[2] == 'local';\r\n\tvar shutdownK = process.argv[3] || 'q';\r\n\tvar port = process.argv[4] || 8000;\r\n\tif (local) {\r\n\t\tinitServer('localhost', port);\r\n\t} else {\r\n\t\tvar ip = ipGetter.address();\r\n\t\tconsole.log('Connect to: http://' + ip + ':8000/');\r\n\t\tinitServer(ip, port);\r\n\t}\r\n\tif (useCommandLine) {\r\n\t\tbindShutdownKey(shutdownK);\r\n\t}\r\n\tnetInit();\r\n\tMaps.forEach(map => map.data.id = newID(false));\r\n\tlog(0, 'Map id\\'s set');\r\n\tloadMap(Maps[0]);\r\n\tsetInterval(mainLoop, msPerFrame);\r\n}", "function start() {\n app.listen(app.get('port'), function() {\n console.log('Node app is running on port', app.get('port'));\n });\n}", "async function start () {\n await app.initDB()\n app.initSocket()\n app.initMiddlewares()\n app.initSubApp()\n await app.initHttp()\n }", "start() {\n // Start the app on the specific interface (and port).\n this.server.listen(this.port, () => {\n console.log('%s: Node server started on %s:%d ...',\n Date(Date.now() ), this.ip, this.port);\n });\n\n // Start the runtime\n RED.start();\n }", "function serve() {\n var http = require('http');\n http.createServer(function(req, res){\n fs.readFile(html_source, 'utf8', function(err, data) {\n if (err) {\n res.send(err);\n console.log(err);\n }\n res.end(data.toString());\n });\n }).listen(port);\n console.log(\"\\nRunning \".yellow + \"joy\".blue + \" development server\".yellow);\n console.log(\"http://127.0.0.1:1337\".green);\n console.log(\"Ctrl-C to Stop\\n\".green);\n}", "function serverStart() {\n\tvar port = server.address().port;\n\tconsole.log('Server listening on port ' + port);\n}", "start() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n // Address and port are available as soon as the server\n // started listening, resolving localhost requires\n // some time.\n this.server.listen(0, \"localhost\", (error) => {\n if (error) {\n reject(error);\n return;\n }\n // tslint:disable-next-line\n console.log(`Express server listening on port: ${this.server.address().port}`);\n resolve();\n });\n });\n });\n }", "started() {\n\n\t\tthis.app.listen(Number(this.settings.port), err => {\n\t\t\tif (err)\n\t\t\t\treturn this.broker.fatal(err);\n\t\t\tthis.logger.info(`API Server started on port ${this.settings.port}`);\n\t\t});\n\n\t}", "start() {\n if (this.server) {\n return;\n }\n\n const options = {\n key: fs.readFileSync('key.pem'),\n cert: fs.readFileSync('cert.pem'),\n };\n\n this.server = tls.createServer(options, socket => {\n socket.setEncoding('utf8');\n const connection = new Connection(socket);\n this.connections.add(connection);\n socket.on('error', err => {});\n socket.on('close', hadError => {\n connection.cancel();\n this.connections.delete(connection);\n });\n });\n\n this.server.listen(4433);\n\n this.webServer = new WebServer(options);\n }", "function startServer (config, controller) {\n // TODO port will be required for multi-team auth\n if (config.port) {\n controller.setupWebserver(config.port)\n }\n}", "function start(port) {\n users_info_data.openUsersInfoDatabase();\n let service = HTTP.createServer(handle);\n try { service.listen(port, 'localhost'); }\n catch (err) { throw err; }\n console.log(\"Visit localhost:\" + port);\n}", "startListening() {\n\t\tthis.server.listen(this.port, () => {\n\t\t\tconsole.log('Server started listening on port', this.port);\n\t\t});\n\t}", "start() {\n if (this.server) {\n throw Error(\"InvokeServer already started\")\n }\n this.cb = null\n this.err = null\n this.msg = null\n\n this.server = http.createServer((request,response) => this._recieve(request,response))\n this.server.listen(8999)\n }", "function serverStart() {\n var port = this.address().port;\n console.log(\"Server listening on port \" + port);\n}", "function start(port, remoteUrl, remotePort) {\n proxyServerUrl = remoteUrl;\n proxyServerPort = remotePort;\n\n // Create an http server to capture browser input\n var server = http.createServer(httpHandler.bind(null, getReqNum, proxyServerUrl, proxyServerPort, httpsStatus)).listen(port);\n\n // On connection to handle HTTPs\n server.on('connect', httpsHandler.bind(null, getReqNum, proxyServerUrl, proxyServerPort)); // HTTPS connect listener\n\n console.info(\"Http&Https proxy listening on port: \" + port);\n}", "_createServer(){\n if ( this._server === null ){\n // Create a new HTTP server.\n this._server = net.createServer(this._options);\n // Bind event handlers.\n this._bindEventHandlers();\n }\n }", "function startHttpServer(messageChannel) {\n return new Promise(resolve => { // Wrap in a promise so we can be notified when the server has started.\n const app = express();\n setupHandlers(app, messageChannel);\n\n const port = process.env.PORT && parseInt(process.env.PORT) || 3000;\n app.listen(port, () => {\n resolve(); // HTTP server is listening, resolve the promise.\n });\n });\n}", "function start(response) {\n\tconsole.log(\"Request handler 'start' was called.\");\n\t\n\t/*just for now define some fake topics already in the system*/\n\t/*data.insertTopic(\"things are happening\", \"www.google.com\");\n\tdata.insertTopic(\"other things are happening\", \"www.google.com\");\n\tdata.insertTopic(\"many things are happening\", \"www.google.com\");*/\n\t\n\tresponse.writeHead(200, {'Content-Type' : MIME_TYPES['.html']});\n\tvar buffer = fs.readFile('index.html',\n\tfunction(err, data) { serveFile(err, data, response); } );\n}", "start()\n {\n this.app.use(\n this.bp.json(\n {\n limit: '50mb'\n }\n )\n );\n\n this.app.use(\n this.bp.urlencoded(\n {\n limit: '50mb',\n extended: true\n }\n )\n );\n\n this.server.listen(Config.WebServer.Port, () =>\n {\n Logger.info(`Server started on port: ${this.server.address().port}`);\n }\n );\n\n this.app.all('*', (req, res) =>\n {\n res.header('Access-Control-Allow-Origin', '*');\n res.header('Access-Control-Allow-Headers', 'Content-type');\n this.handleReq(req, res);\n }\n );\n }", "function start(route, handle) {\r\n function onRequest(request, response) {\r\n //var postData =\"\";\r\n var pathname = url.parse(request.url).pathname;\r\n console.log(\"Request for \" + pathname + \" received.\");\r\n route(handle, pathname, response, request);\r\n }\r\n\r\n //如何定义局部变量?http是全局的。这里onRequest不是回调?\r\n // listen就构造了一个消息监听循环?\r\n http.createServer(onRequest).listen(8888);\r\n console.log(\"Server has started.\");\r\n}", "function startServer(port, cb) { \n server = http.createServer(app);\n server.listen(port, function (err) {\n console.log('Listening on ' + port);\n if (cb !== undefined) { cb(err); }\n });\n}", "function main() {\n const config = createConfig();\n const server = createServer(config);\n\n const {hostname, port} = config.getWebserverHost();\n console.error(`Starting rpi-clock webserver on ${hostname}:${port}`);\n server.listen(port, hostname);\n}", "fireUpEngines() {\n const httpServer = http.createServer(this.app);\n httpServer.listen(this.configuration.port);\n console.log(`TreeHouse HTTP NodeJS Server listening on port ${this.configuration.port}`);\n\n // HTTPS - Optional\n if (this.configuration.https) {\n const httpsServer = https.createServer(this.getHttpsCredentials(), this.app);\n httpsServer.listen(this.configuration.https.port);\n console.log(`TreeHouse HTTPS NodeJS Server listening on port ${this.configuration.https.port}`);\n }\n }", "async function startClient() {\n\tconst entryFiles = resolve(__dirname, './index.html');\n\tconst options = {};\n\tconst bundler = new Bundler(entryFiles, options);\n\tawait bundler.serve(config.guiPort);\n}" ]
[ "0.7759217", "0.771617", "0.7695088", "0.76249075", "0.75297314", "0.74441195", "0.73875606", "0.73631877", "0.7362271", "0.7272456", "0.7224689", "0.7114068", "0.7081332", "0.707595", "0.6918703", "0.6918306", "0.6903541", "0.688631", "0.6860296", "0.68597335", "0.68437314", "0.68376774", "0.68126136", "0.67708766", "0.6770309", "0.6769488", "0.6766606", "0.673753", "0.6726271", "0.6720337", "0.6720337", "0.6720337", "0.6720337", "0.6720337", "0.6720337", "0.6720337", "0.6720337", "0.67184114", "0.67127997", "0.66924256", "0.66799504", "0.6673527", "0.66375285", "0.6624509", "0.66243124", "0.6614289", "0.65897787", "0.65828735", "0.6573041", "0.65646094", "0.65426904", "0.6523756", "0.6512885", "0.64985126", "0.6482525", "0.6457036", "0.64544064", "0.6454254", "0.64486104", "0.64257056", "0.642509", "0.6424991", "0.64166975", "0.6415705", "0.6401738", "0.6390114", "0.63889813", "0.6371939", "0.63670725", "0.6364047", "0.6351432", "0.63282585", "0.6324684", "0.6305198", "0.6302284", "0.6288346", "0.62858385", "0.62848294", "0.627526", "0.62631017", "0.6262068", "0.62600553", "0.6243282", "0.62423486", "0.6240689", "0.623331", "0.62113386", "0.62009066", "0.6199947", "0.6199821", "0.61969495", "0.6194419", "0.6177512", "0.61706144", "0.61545175", "0.6152297", "0.61511815", "0.615081", "0.61203796", "0.6108226" ]
0.68410206
21
Gets an article record from a server and processes it to html according to the value of the forEdit parameter. Assumes existence of the urlBase global variable with the base of the server url (e.g. " availability of the Mustache.render() function and Mustache templates with id="templatearticle" (if forEdit=false) and id="templatearticleform" (if forEdit=true).
function fetchAndProcessArticle(targetElm, artIdFromHash, offsetFromHash, totalCountFromHash,forEdit) { const url = `${urlBase}/article/${artIdFromHash}`; fetch(url) .then(response =>{ if(response.ok){ return response.json(); }else{ //if we get server error return Promise.reject(new Error(`Server answered with ${response.status}: ${response.statusText}.`)); } }) .then(responseJSON => { if(forEdit){ responseJSON.formTitle="Article Edit"; responseJSON.formSubmitCall = `processArtEditFrmData(event,${artIdFromHash},${offsetFromHash},${totalCountFromHash},'${urlBase}')`; responseJSON.submitBtTitle="Save article"; responseJSON.urlBase=urlBase; responseJSON.backLink=`#article/${artIdFromHash}/${offsetFromHash}/${totalCountFromHash}`; document.getElementById(targetElm).innerHTML = Mustache.render( document.getElementById("template-article-form").innerHTML, responseJSON ); }else{ responseJSON.backLink=`#articles/${offsetFromHash}/${totalCountFromHash}`; responseJSON.editLink=`#artEdit/${responseJSON.id}/${offsetFromHash}/${totalCountFromHash}`; responseJSON.deleteLink=`#artDelete/${responseJSON.id}/${offsetFromHash}/${totalCountFromHash}`; document.getElementById(targetElm).innerHTML = Mustache.render( document.getElementById("template-article").innerHTML, responseJSON ); } }) .catch (error => { ////here we process all the failed promises const errMsgObj = {errMessage:error}; document.getElementById(targetElm).innerHTML = Mustache.render( document.getElementById("template-articles-error").innerHTML, errMsgObj ); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchAndProcessArticle(targetElm, artIdFromHash, offsetFromHash, totalCountFromHash,forEdit) {\r\n const url = `${urlBase}/article/${artIdFromHash}`;\r\n\r\n fetch(url)\r\n .then(response =>{\r\n if(response.ok){\r\n return response.json();\r\n }else{ //if we get server error\r\n return Promise.reject(new Error(`Server answered with ${response.status}: ${response.statusText}.`));\r\n }\r\n })\r\n .then(responseJSON => {\r\n if(forEdit){\r\n responseJSON.formTitle=\"Article Edit\";\r\n responseJSON.formSubmitCall =\r\n `processArtEditFrmData(event,${artIdFromHash},${offsetFromHash},${totalCountFromHash},'${urlBase}')`;\r\n responseJSON.submitBtTitle=\"Save article\";\r\n responseJSON.urlBase=urlBase;\r\n\r\n responseJSON.backLink=`#article/${artIdFromHash}/${offsetFromHash}/${totalCountFromHash}`;\r\n\r\n document.getElementById(targetElm).innerHTML =\r\n render(\r\n document.getElementById(\"template-article-form\").innerHTML,\r\n responseJSON\r\n );\r\n }else{\r\n\r\n responseJSON.backLink=`#articles/${offsetFromHash}/${totalCountFromHash}`;\r\n responseJSON.editLink=`#artEdit/${responseJSON.id}/${offsetFromHash}/${totalCountFromHash}`;\r\n responseJSON.deleteLink=`#artDelete/${responseJSON.id}/${offsetFromHash}/${totalCountFromHash}`;\r\n\r\n document.getElementById(targetElm).innerHTML =\r\n render(\r\n document.getElementById(\"template-article\").innerHTML,\r\n responseJSON\r\n );\r\n }\r\n\r\n })\r\n .catch (error => { ////here we process all the failed promises\r\n const errMsgObj = {errMessage:error};\r\n document.getElementById(targetElm).innerHTML =\r\n render(\r\n document.getElementById(\"template-articles-error\").innerHTML,\r\n errMsgObj\r\n );\r\n });\r\n\r\n}", "function fetchAndProcessArticle(\r\n targetElm,\r\n artIdFromHash,\r\n offsetFromHash,\r\n totalCountFromHash,\r\n commentOffset,\r\n commentTotal,\r\n forEdit\r\n) {\r\n const url = `${urlBase}/article/${artIdFromHash}`;\r\n\r\n fetch(url)\r\n .then(response => {\r\n if (response.ok) {\r\n return response.json();\r\n } else {\r\n //if we get server error\r\n return Promise.reject(\r\n new Error(\r\n `Server answered with ${response.status}: ${response.statusText}.`\r\n )\r\n );\r\n }\r\n })\r\n .then(responseJSON => {\r\n if (forEdit) {\r\n responseJSON.formTitle = \"Article Edit\";\r\n responseJSON.formSubmitCall = `processArtEditFrmData(event,${artIdFromHash},${offsetFromHash},${totalCountFromHash},'${urlBase}')`;\r\n responseJSON.submitBtTitle = \"Save article\";\r\n responseJSON.urlBase = urlBase;\r\n\r\n responseJSON.backLink = `#article/${artIdFromHash}/${offsetFromHash}/${totalCountFromHash}/1/100`;\r\n\r\n document.getElementById(targetElm).innerHTML = render(\r\n document.getElementById(\"template-article-form\").innerHTML,\r\n responseJSON\r\n );\r\n } else {\r\n responseJSON.backLink = `#articles/${offsetFromHash}/${totalCountFromHash}/1/100`;\r\n responseJSON.editLink = `#artEdit/${\r\n responseJSON.id\r\n }/${offsetFromHash}/${totalCountFromHash}/1/100`;\r\n responseJSON.deleteLink = `#artDelete/${\r\n responseJSON.id\r\n }/${offsetFromHash}/${totalCountFromHash}/1/100`;\r\n\r\n document.getElementById(targetElm).innerHTML = render(\r\n document.getElementById(\"template-article\").innerHTML,\r\n responseJSON\r\n );\r\n\r\n const coffset = parseInt(commentOffset);\r\n fetch(url + \"/comment?max=10&offset=\" + (coffset - 1) * 10)\r\n .then(response => {\r\n if (response.ok) {\r\n return response.json();\r\n } else {\r\n //if we get server error\r\n return Promise.reject(\r\n new Error(\r\n `Server answered with ${response.status}: ${\r\n response.statusText\r\n }.`\r\n )\r\n );\r\n }\r\n })\r\n .then(responseJSON => {\r\n const commentCount =\r\n Math.floor(responseJSON.meta.totalCount / 10) + 1;\r\n document.getElementById(\"komentare\").innerHTML = \"\";\r\n for (let i = 0; i < 10; i++) {\r\n if (responseJSON.comments[i])\r\n document.getElementById(\"komentare\").innerHTML += render(\r\n document.getElementById(\"template-article-comment\").innerHTML,\r\n responseJSON.comments[i]\r\n );\r\n }\r\n\r\n const nav = {\r\n CcurrPage: coffset,\r\n CpageCount: commentCount,\r\n currPage: offsetFromHash,\r\n pageCount: totalCountFromHash,\r\n id: artIdFromHash\r\n };\r\n if (nav.CcurrPage > 1) nav.CprevPage = nav.CcurrPage - 1;\r\n if (nav.CcurrPage < nav.CpageCount)\r\n nav.CnextPage = nav.CcurrPage + 1;\r\n document.getElementById(\"komentare\").innerHTML += render(\r\n document.getElementById(\"template_nav_comment\").innerHTML,\r\n nav\r\n );\r\n });\r\n }\r\n })\r\n .catch(error => {\r\n ////here we process all the failed promises\r\n const errMsgObj = { errMessage: error };\r\n document.getElementById(targetElm).innerHTML = render(\r\n document.getElementById(\"template-articles-error\").innerHTML,\r\n errMsgObj\r\n );\r\n });\r\n}", "async edit({ params, request, response, view }) {}", "function doArticleEdit() {\r\n\tallElements = document.getElementById('contentRow').children[1];\r\n\ttmp = allElements.children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/Newspaper/,\"报 纸\");\r\n\t\r\n\tallElements = document.getElementById('command');\r\n\ttmp = allElements.parentNode.children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/Edit article/,\"编辑文章\");\r\n\ttmp = allElements.children[1];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/Article title:/,\"文章标题:\");\r\n\ttmp = allElements.children[6];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/Message:/,\"正文:\");\r\n\t\r\n\treplaceLinkByHref({\r\n\t\t\"editNewspaper.html\":[\"Edit newspaper\",\"修改报纸信息\"],\r\n\t\t\"http://wiki.e-sim.org/en/Newspaper\":[\"Newspaper tutorial on wiki\",\"关于报纸\"]\r\n\t});\r\n\treplaceInputByValue({\r\n\t\t\"Edit article\":[\"Edit article\",\"编辑提交\"]\r\n\t});\r\n}", "function makeBlogEditable(isEditable) {\n if(isEditable){\n getMainBody(false);\n }\n else {\n getMainBody(true);\n }\n \n }", "async edit ({ params, request, response, view }) {\n }", "async edit ({ params, request, response, view }) {\n }", "async edit ({ params, request, response, view }) {\n }", "async edit ({ params, request, response, view }) {\n }", "async edit ({ params, request, response, view }) {\n }", "async edit ({ params, request, response, view }) {\n }", "async edit ({ params, request, response, view }) {\n }", "function doArticleEdit() {\r\n\tallElements = document.getElementById('contentRow').children[1];\r\n\ttmp = allElements.children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/Newspaper/,\"Gazete\");\r\n\t\r\n\tallElements = document.getElementById('command');\r\n\ttmp = allElements.parentNode.children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/Edit article/,\"Makaleyi d\\u00fczenle\");\r\n\ttmp = allElements.children[1];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/Article title:/,\"Makale ba\\u015fl\\u0131\\u011f\\u0131:\");\r\n\ttmp = allElements.children[6];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/Message:/,\"Mesaj:\");\r\n\t\r\n\treplaceLinkByHref({\r\n\t\t\"editNewspaper.html\":[\"Edit newspaper\",\"Gazeteyi d\\u00fczenle\"],\r\n\t\t\"http://wiki.e-sim.org/en/Newspaper\":[\"Newspaper tutorial on wiki\",\"Gazete e\\u011fitimi\"]\r\n\t});\r\n\treplaceInputByValue({\r\n\t\t\"Edit article\":[\"Edit article\",\"Makaleyi d\\u00fczenle\"]\r\n\t});\r\n}", "function change_article_state(articleid, operation, control)\n{\n var req = new Request.HTML({ url: api_request_path(\"articlelist\", operation+\"/\"+articleid),\n method: 'post',\n onRequest: function() {\n $(control).addClass('working');\n show_spinner($(control));\n },\n onSuccess: function(respTree, respElems, respHTML) {\n hide_spinner($(control));\n $(control).removeClass('working');\n\n var err = respHTML.match(/^<div id=\"apierror\"/);\n\n if(err) {\n $('errboxmsg').set('html', respHTML);\n errbox.open();\n\n // No error, entry was flagged, the element provided should\n // be the new <tr>...\n } else {\n var tmp = new Element('table').set('html', respHTML);\n tmp = tmp.getChildren()[0];\n if(tmp) {\n tmp = tmp.getChildren()[0];\n\n if(tmp) {\n var oldElem = $('artrow-'+articleid);\n tmp.replaces(oldElem);\n oldElem.destroy();\n } else {\n $('errboxmsg').set('html', \"<p>Malformed API response</p>\");\n errbox.open();\n }\n } else {\n $('errboxmsg').set('html', \"<p>Malformed API response</p>\");\n errbox.open();\n }\n }\n }\n });\n req.send();\n}", "function doArticleEdit() {\r\n\tallElements = document.getElementById('contentRow').children[1];\r\n\ttmp = allElements.children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/Newspaper/,\"Újság\");\r\n\t\r\n\tallElements = document.getElementById('command');\r\n\ttmp = allElements.parentNode.children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/Edit article/,\"Cikk szerkesztése\");\r\n\ttmp = allElements.children[1];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/Article title:/,\"Cikk címe:\");\r\n\ttmp = allElements.children[6];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/Message:/,\"Üzenet:\");\r\n\t\r\n\treplaceLinkByHref({\r\n\t\t\"editNewspaper.html\":[\"Edit newspaper\",\"Újság szerkesztése\"],\r\n\t\t\"http://wiki.e-sim.org/en/Newspaper\":[\"Newspaper tutorial on wiki\",\"Újság útmutató\"]\r\n\t});\r\n\treplaceInputByValue({\r\n\t\t\"Edit article\":[\"Edit article\",\"Cikk szerkesztése\"]\r\n\t});\r\n}", "async function renderEditPage(res, ehr, hasError = false) {\n renderFormPage(res, ehr, 'edit', hasError)\n}", "async edit({ params, view }) {\n //fetching from the database\n const post = await Post.find(params.id)\n //redirect to the edit page\n return view.render('posts.edit', {\n post: post\n })\n }", "function edit() {\n\tdocument.getElementById(\"editbtn\").disabled = true;\t\t//Prevent sapm or misclick\n\t$.ajax({\n\t\turl: getapi(),\n\t\ttype: \"POST\",\n\t\tdata: {\n\t\t\tedit:$('#idedit').val(),\n\t\t\turl:$('#urledit').val()\n\t\t},\n\t\tsuccess:function(){\n\t\t\t$('#status').css('display','inline');\n\t\t\t$('#status').attr('class','alert alert-success');\n\t\t\t$('#status').html('Success!');\n\t\t\tsetTimeout(function(){\n\t\t\t\tlocation.reload();\n\t\t\t},2000);\n\t\t},\n\t\terror:function(xhr){\n\t\t\tvar err = eval(\"(\" + xhr.responseText + \")\");\n\t\t\t$('#status').css('display','inline');\n\t\t\t$('#status').attr('class','alert alert-danger');\n\t\t\t$('#status').html(err.error);\n\t\t\tdocument.getElementById(\"editbtn\").disabled = false;\n\t\t}\n\t});\n}", "function getEditDetails(id, filename) { \t\r\n\t$('#savebutton').attr('disabled',false);\t//-------Enable the save button previously disabled\t\r\n\t$('#backtomodule').html('<a href=\"javascript:;\" onclick=\"getReset()\"><span class=\"iconBack\">&nbsp;</span>Go Back</a>');\r\n\t$('#formloading').hide();\t\r\n\t$('#addEditText').html('Edit');\r\n\t$(\"#delImg, #crossImg , #imgtag, #hdln1\").hide();\r\n\t$('#hdlnplaceholder1').show();\r\n\t$(\"#addcontent\").addClass(\"selected\");\r\n\t$.post('get.php', {'id' :id, 'action':'e'}, function(data) {// alert(data);\r\n\t\tif(data == '%$#@%') {\r\n\t\t\tgetReset();\r\n\t\t\tshowAccessMsg();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tshowEdit(data);\r\n\t});\r\n\t$('#divTrash').hide();\r\n}", "handleEditorReturn(newArticle){\n if (newArticle){ // not a cancel\n if (this.state.currentArticle){ // this is a replacement, remove the old article\n //get the id of the article we're interested in\n let editedArticleID = this.state.currentArticle._id;\n let editedArticle = Object.assign({}, this.state.currentArticle, {title:newArticle.title, extract:newArticle.extract, edited: newArticle.edited} );\n const articleStr = JSON.stringify(editedArticle);\n const request = new Request(\n SERVER + \"/articles/\" + editedArticleID,\n {\n method:'PUT', //replace the old one\n body: articleStr,\n headers: new Headers({'Content-type': 'application/json'})\n }\n );\n\n fetch(request)\n .then((response)=>{\n if (response.ok){\n return response.json();\n }\n })\n .then((newArticle)=>{\n const newCollection = this.state.collection.map((article)=>{\n if (article._id === editedArticle._id){\n return newArticle;\n }\n return article;\n });\n //update the collection and current article\n this.setState({currentArticle: editedArticle, collection: newCollection});\n });\n }\n\n //add a new article\n let addArticle = Object.assign({}, newArticle, {title:newArticle.title, extract:newArticle.extract, edited: newArticle.edited} );\n const articleStr = JSON.stringify(addArticle);\n const request = new Request(\n SERVER + \"/articles/\" ,\n {\n method:'POST', //add new article\n body: articleStr,\n headers: new Headers({'Content-type': 'application/json'})\n }\n );\n\n fetch(request)\n .then((response)=>{\n if (response.ok){\n\n return response.json();\n }\n })\n .then((newArticle)=>{\n const newCollection = this.state.collection.map((article)=>{\n if (article._id === addArticle._id){\n return newArticle;\n }\n return article;\n });\n //update the collection and current article\n this.setState({currentArticle: addArticle, collection: newCollection});\n });\n }\n // switch to the browsing view\n this.setState({mode:'view'});\n }", "function loadPostIfEdit(){\n let id = Quas.getUrlValues()[\"p\"];\n if(id === undefined) return false;\n Quas.ajax({\n url : \"/php/post-edit-open.php\",\n type : \"POST\",\n data : {\n id : id,\n sid : getCookie(\"session\"),\n },\n return : \"json\",\n success : function(res){\n if(res.constructor == String) return;\n let data = res[0];\n Toolbar.postID = id\n Quas.getEl(\"#post-editor-title\").val(Quas.decodeHtmlSpecialChars(data.title));\n Quas.getEl(\"#post-editor\").val(Quas.decodeHtmlSpecialChars(data.text));\n if(data.published > 0){\n let pt = new Date(data.publish_time);\n //already published\n if(Date.now() > pt.getTime()){\n Quas.getEl(\".publish-time-btn\").visible(false);\n }\n //published but scheduled for the future\n else{\n Toolbar.curTime = pt;\n setTimeString();\n }\n Toolbar.alreadyPublished();\n }\n lazyLoader();\n }\n });\n return true;\n}", "function edit_task(_task_id) {\n if(typeof(_task_id) != 'undefined'){\n taskid = _task_id;\n }\n\n $.get(admin_url + 'tasks/task/'+taskid,function(response){\n $('#_task').html(response)\n $('body').find('#_task_modal').modal('show');\n });\n}", "async function edit(req, res) {}", "function enhance_edit_page() \r\n{\r\n\tif(location.href.match('&op=edit'))\r\n\t{\r\n\t\tvar pageForms = document.getElementsByTagName('form');\r\n\t\tvar pageEditForm = pageForms[pageForms.length-1];\r\n\t\tvar pageTextareas = document.getElementsByTagName('textarea');\r\n\t\t\t\t\r\n\t\t/*** configure textarea ***/\r\n\t\t\r\n\t\t//get reference to textarea for global use\t\t\r\n\t\tpageEditBox = pageTextareas[pageTextareas.length-1];//pageEditForm.elements[3];\r\n\t\t\r\n\t\t// set textarea size\r\n\t\tpageEditBox.cols = editbox_col_size;\r\n\t\tpageEditBox.rows = editbox_row_size;\r\n\t\t\r\n\t\t/*** Add HTML Comments buttons */\r\n\t\tadd_button(pageEditForm, \"Add Comments\", add_comments);\r\n\t\tadd_button(pageEditForm, \"Remove Comments\", strip_comments);\r\n\t\tadd_button(pageEditForm, \"Create Table\", create_table);\r\n\t\t\r\n\t\t/*** Create the HTML selection element ***/\r\n\t\t\r\n\t\t//get reference to HTML Tag Select for global use\t\r\n\t\thtmlPasteSelect = document.createElement('select');\r\n\r\n\t\tpopulate_select(htmlPasteSelect, htmlSelectTag);\r\n\t\thtmlPasteSelect.addEventListener(\"change\", html_select_change, true);\r\n\t\tpageEditForm.insertBefore(htmlPasteSelect, pageEditForm.elements[pageEditForm.elements.length]);\r\n\t\t\r\n\t\t//get reference to Img Select for global use\t\r\n\t\thtmlImgSelect = document.createElement('select');\r\n\t\t\r\n\t\tpopulate_select(htmlImgSelect, htmlSelectImg);\r\n\t\thtmlImgSelect.addEventListener(\"change\", html_select_img_change, true);\r\n\t\tpageEditForm.insertBefore(htmlImgSelect, pageEditForm.elements[pageEditForm.elements.length]);\r\n\t\t\r\n\t\t\r\n\r\n\t}\t\r\n}", "async function renderEditPage(res,book, hasError = false){\n renderFormPage(res, book, 'edit', hasError)\n}", "function getArticle() {\n if (!_.isNull(detail.queryParams.articleId)) {\n\n var getArticleSuccess = function(data) {\n detail.article = data;\n setLatestArticle();\n detail.currentArticle = getCurrentArticle();\n detail.currentEvents = getCurrentRun();\n renderArticle();\n getDetailActions();\n }\n var getArticleError = function(data) {\n log.error(config.errors.en.type.api + ': ' + config.api.article + '/' + detail.queryParams.articleId);\n log.info(data);\n var errorInfo = utils.formatErrorInformation(data);\n errorInfo.errorType = null;\n errorInfo.ref = 'getArticleError';\n errorInfo.type = config.errors.en.type.api;\n $('#article').empty().html(detail.template.errorMessage(errorInfo));\n $('#error-console').empty().html(detail.template.errorDetail(errorInfo));\n }\n\n $.ajax({\n url: config.api.article + '/' + detail.queryParams.articleId,\n cache: false,\n dataType: 'json',\n success: getArticleSuccess,\n error: getArticleError,\n\n });\n } else {\n // var errorInfo = utils.formatErrorInformation(data);\n var errorInfo = {};\n errorInfo.errorType = null;\n errorInfo.ref = 'getArticleError';\n errorInfo.statusText = config.errors.en.missingInformation;\n errorInfo.type = config.errors.en.type.application;\n errorInfo.message = config.errors.en.noArticleId;\n $('#article').empty().html(detail.template.errorMessage(errorInfo));\n\n }\n }", "function EditHandler() {\n fetch(GetApi, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(GetData),\n }).then((res) => {\n if (res.status === 200) {\n fetch(GetApi)\n .then((res) => res.json())\n .then((data) => SetstatusApi(data));\n }\n });\n\n SetEditdata(!EditData);\n }", "function loadArticle(){\n\tlet xmlhttp = new XMLHttpRequest();\n\txmlhttp.onreadystatechange = function() {\n\t\tif (this.readyState == 4 && this.status == 200) {\n\t\t let result = JSON.parse(this.responseText);\n\t\t document.getElementById('article').innerHTML = result.description;\n\t \t\tdocument.getElementById('article-title').innerHTML = result.title;\n\t\t}\n\t};\n\txmlhttp.open('GET', './backend/data-' + findGetParameter('id') + '.json', true);\n\txmlhttp.send();\n}", "async getArticle(id){\n /**\n * GEt article if this is an edit article form\n */\n\n if( id ){\n // Get the article from the store\n let { article } = this.props\n \n // Get from the articles in th store if it is not the current article in the store\n if (id != article.id) {\n article= this.props.articles.filter(item=> item.id == id) [0]\n }\n\n if(article && article.id){\n await this.setState ({\n article_id: id,\n title: article.title,\n description: article.description\n })\n }\n } else {\n await this.setState ({\n article_id: 0,\n title: '',\n description: ''\n })\n\n }\n }", "function recepieEdit( idStr ){ // render the edit recepie screen\n\tif ( !validateUser() ){ return; }\n // console.log(\"Get recepie:\", idStr, \"and render in recepieEdit template\");\n\tlet url = `https://cookuniproject-default-rtdb.firebaseio.com/recepies/${idStr}.json`;\n\tsetInfoBox();\n\tfetch(url)\n .then(function (response) {\n if ( response.status < 300 ) {\n\t\t\tclearInfoBox();\n\t\t}\n return response.json();\n })\n .then(function (data) {\n // console.log(\"Recepie Edit Data:\", JSON.stringify(data));\n let src = document.getElementById(\"recepieEdit\").innerHTML;\n let template = Handlebars.compile(src);\n data.recepieID = idStr;\n // console.log( JSON.stringify(data.ingredients) );\n if( Array.isArray( data.ingredients ) ){\n data.ingredients = data.ingredients.join(\", \");\n }else{\n setErrorBox(\"Warning, Failed to make a proper ingredients entry, fix to enable saving.\");\n data.ingredients = JSON.stringify(data.ingredients);\n }\n let context = data;\n let html = template(context);\n render(html);\n let editButton = document.getElementById(\"editButton\");\n\t\teditButton.addEventListener( \"click\", (e) => { e.preventDefault(); sendEditRecepie(); });\n let category = document.getElementById(\"editCategory\");\n category.selectedIndex = getCatIdx( data.category );\n return data;\n });\n}", "function getEntityToEdit(entityId, servlet) {\n var entity = [entityId];\n var entitiesToEdit = {\"entitiesToEdit\": entity, \"typeOperation\": \"SELECT\"};\n postServletJSON(servlet, entitiesToEdit);\n}", "function showEdit(req, res) {\n\t// Get slug\n\tvar slug = req.params.slug;\n\t// Find in database \n\tEvent.findOne({'slug': slug}, function(err, event) {\n\t\t// return message\n\t\tif (err) {\n\t\t\tres.status(404).send({ message: 'Event not found!' });\n\t\t}\n\t\telse {\n\t\t\tres.status(200).render('pages/edit', { event });\n\t\t}\n\t});\n}", "function ajaxEdit(ident, field, value, postto) {\n var data = {\n id: ident,\n field: field,\n value: value\n }\n $.ajax({\n url: postto,\n data: data,\n type: 'POST'\n }).done(function(data) {\n $(\"#pageMessage\").html(\n data\n );\n setTimeout(function() {\n $(\"#pageMessage\").html(\"\");\n }, 2000);\n }).fail(function(data) {\n $(\"#pageMessage\").html(\n data\n );\n setTimeout(function() {\n $(\"#pageMessage\").html(\"\");\n }, 2000);\n });\n}", "function displayArticles() {\n var articlesContent = document.getElementById('articles-content');\n articlesContent.innerHTML = '';\n for (var i = 0; i < articleList.models.length; i++) {\n //create elements\n var articleElement = document.createElement('article');\n var articleTitleElement = document.createElement('h3');\n var articleBodyElement = document.createElement('p');\n var buttonEditArticle = document.createElement('button');\n var buttonRemoveArticle = document.createElement('button');\n var articleIdFromI = document.createElement('div');\n // add classes, id and text to elements\n articleIdFromI.innerHTML = i+1;\n articleIdFromI.style.visibility = 'hidden';\n buttonEditArticle.className = 'edit-article';\n buttonRemoveArticle.className = 'remove-article';\n articleTitleElement.innerHTML = articleList.models[i].title;\n articleBodyElement.innerHTML = articleList.models[i].body.slice(0, 40) + \"... <br><a href='article.html?articleId=\" + (i + 1) + \"'>Read more...</a>\";\n buttonEditArticle.textContent = 'Edit';\n buttonRemoveArticle.textContent = 'Delete';\n // append elements to DOM\n articleElement.appendChild(articleTitleElement);\n articleElement.appendChild(articleBodyElement);\n articleElement.appendChild(buttonEditArticle);\n articleElement.appendChild(buttonRemoveArticle);\n articleElement.appendChild(articleIdFromI);\n articlesContent.appendChild(articleElement);\n }\n //Create add article button at the end of the article list\n var addArticleButtonZone = document.getElementById('add-button-id');\n var addNewArticleButton = document.createElement('button');\n addNewArticleButton.innerHTML = 'Add Article';\n addNewArticleButton.id = 'add-article';\n addArticleButtonZone.appendChild(addNewArticleButton);\n }", "function renderArticle() {\n if (article && _.isEmpty(detail.errors)) {\n $('#article').empty().html(detail.template.articleTemplate(\n {\n article: detail.article,\n currentArticle: detail.currentArticle,\n currentEvents: detail.currentEvents,\n currentVersion: detail.queryParams.versionNumber,\n currentRun: detail.queryParams.runId,\n scheduleStatus: detail.scheduleStatus,\n }));\n\n renderDetailActions();\n } else {\n var errorInfo = utils.formatErrorInformation(detail.errors);\n errorInfo.errorType = null;\n errorInfo.ref = 'renderArticleError';\n errorInfo.type = config.errors.en.type.application;\n $('#article').empty().html(detail.template.errorMessage(detail.errors));\n }\n\n updatePageUrl();\n }", "function displayForEdit(){\n\tvar aux = 'forEdit';\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: 'view/GestionarPeriodoView/BuscarCuatriView.php',\n\t\tdata: {restrict:aux},\n\t\tsuccess:function(data){\n\t\t\t$('#render').html(data);\n\t\t}\n\t});\n}", "function fetchArticle(id) {\n fetch('http://localhost:8080/rest-api/articles/' + id)\n .then(function (response) {\n if (response.status == 200) {\n return response.json();\n } else {\n localStorage.errorMessage = 'error fetching article';\n }\n })\n .then(function (article) {\n console.log(\n 'Article.title recieved from fetching article by ID: ',\n article.title\n );\n const authorSpan = document.querySelector('#article-page .author');\n const titleSpan = document.querySelector('#article-page .title');\n const contentSpan = document.querySelector('#article-page .content');\n localStorage.articleTitle = article.title;\n localStorage.articleDescription = article.description;\n localStorage.articleContent = article.content;\n if (TOKEN && localStorage.activeUser == article.username) {\n document.getElementById('deleteBtn').style.display = 'block';\n document.getElementById('editBtn').style.display = 'block';\n console.log('IN IF');\n } else {\n console.log('IN ELSE');\n document.getElementById('deleteBtn').style.display = 'none';\n document.getElementById('editBtn').style.display = 'none';\n }\n\n authorSpan.innerText = article.username;\n titleSpan.innerText = article.title;\n contentSpan.innerText = article.content;\n })\n .catch(function (error) {\n localStorage.errorMessage = error;\n });\n}", "function edit(req, res) {\n Note.findById(req.params.id)\n .then(function (note) {\n res.render('notes/edit', {\n title: `Editing ${note.content}`,\n note,\n recipeId: req.params.recipeId\n })\n })\n .catch(function (err) {\n console.log(err)\n res.redirect('/')\n })\n}", "function writeArticles2Html(startIndex, max, server, articlesElmId, navElmId, footer){\n $.ajax({\n type: 'GET',\n url: \"http://\"+server,\n data: { max: max, offset: startIndex },\n dataType: \"json\",\n success: function (articles) \n {\n $(\"#\"+articlesElmId).html(Mustache.render($(\"#listArtMT\").html(), articles));\n $(\"#\"+navElmId).html(navHtml(startIndex, articles.articles.length,articles.meta.totalCount));\n $(\"#\"+footer).html(displayPages(startIndex, articles.articles.length,articles.meta.totalCount));\n },\n error:function(responseObj,textStatus, errorThrown)\n {\n errorDialog(textStatus+\"(\"+errorThrown+\")\");\n }\n });\n}", "function getArticle(articleId, viewAdd) {\n\t\t\treturn $http.get('http://localhost:4000/articles?articleId=' + articleId + '&viewAdd=' + viewAdd).success(function (res) {\n\t\t\t\treturn res;\n\t\t\t});\n\t\t}", "function loadEdit()\n{\n // emit debugging information\n if (false && debug.toLowerCase() == 'y')\n traceAlert(\"editIndivid.js:loadEdit: \" +\n location.pathname + location.search);\n\n // if this is invoked for a completely new individual the\n // heading is meaningless, set up to update it on the fly\n let titleElement = document.getElementById('title');\n let title = titleElement.innerHTML.trim();\n // if there is only one space prior to the date range then there is\n // no name information and a date range containing only an m-dash\n // is an empty date range\n updateTitle = title.substring(title.length - 3) == \"(\\u2014)\" &&\n (title.match(/ /g)||[]).length <= 1;\n // if updateTitle is true then titlePrefix is whatever text is present\n // preceding the empty date range\n titlePrefix = title.substring(0, title.length - 3);\n\n document.body.onresize = onWindowResize;\n\n let idir = 0;\n let marriagesButton = document.getElementById('Marriages');\n let parentsButton = document.getElementById('Parents');\n\n // loop through arguments passed to script\n for(let key in args)\n { // loop through all arguments\n let value = args[key];\n switch(key.toLowerCase())\n {\n case 'id':\n case 'idir':\n { // request to edit an existing individual\n // note that this requires that elements with names\n // id or idir must precede the element with\n // name parentsIdmr within the invoking request or page\n parmIdir = parseInt(value);\n break;\n } // request to edit an existing individual\n\n case 'idcr':\n { // request to edit an existing child\n if (marriagesButton)\n marriagesButton.disabled = true;\n if (parentsButton)\n parentsButton.disabled = true;\n break;\n } // request to edit an existing child\n\n case 'rowid':\n { // request to edit a spouse\n if (marriagesButton)\n marriagesButton.disabled = true;\n break;\n } // request to edit a spouse\n\n case 'parentsidmr':\n { // request to add a new child\n parentsIdmr = parseInt(value);\n if (marriagesButton)\n marriagesButton.disabled = true;\n if (parentsButton)\n parentsButton.disabled = true;\n break;\n } // request to add a new child\n\n case 'testsubmit':\n case 'debug':\n { // debug by submitting request rather than using AJAX\n if (value.toUpperCase() == 'Y')\n {\n testSubmit = true;\n debug = 'Y';\n alert('editIndivid.js: loadEdit: ' +\n 'testSubmit set to true for ' + key + '=' + value);\n }\n break;\n } // debug by submiting\n } // action depends upon parameter name\n } // loop through parameters\n\n document.body.onkeydown = eiKeyDown;\n\n for (let fi = 0; fi < document.forms.length; fi++)\n { // loop through all forms\n let form = document.forms[fi];\n\n // set action methods for form as a whole\n if (form.name == 'indForm')\n { // main form\n if (!testSubmit)\n {\n form.onsubmit = validateForm;\n }\n else\n console.log('editIndivid.js: loadEdit: 637 testSubmit is true');\n form.onreset = resetForm;\n form.setIdar = setIdar;\n\n // callback from editMarriages.php\n form.marriageUpdated = marriageUpdated;\n form.setIdmrPref = setIdmrPref;\n form.setParentsPref = setParentsPref;\n\n // callback from editEvent.php\n form.eventFeedback = eventFeedback;\n } // main form\n\n // activate the dynamic functionality of form elements\n activateElements(form);\n } // loop through all forms\n\n // set up refresh action\n if (parmIdir === null)\n {\n parmIdir = 0;\n newSearch = \"?idir=\" + idir +\n \"&\" + location.search.substring(1);\n }\n\n if (window.navigator)\n { // navigator object defined\n if (/MSIE (\\d+\\.\\d+);/.test(window.navigator.userAgent))\n { // test for MSIE x.x; \n ie = true;\n ieversion = new Number(RegExp.$1) // capture x.x portion\n if (ieversion < 9)\n alert (\"editIndivid.js: loadEdit: Running under IE version \" +\n ieversion);\n } // test for MSIE x.x; \n } // navigator object defined\n else\n alert (\"editIndivid.js: loadEdit: navigator object not defined\");\n\n hideRightColumn();\n\n}", "function viewEmpTask(projectId,projectResourceId,content_id)\n{\n\t$.ajax({\n\t\turl: base_url + \"/timemanagement/projectresources/viewemptasks/format/html\",\n\t\tdata: 'projectId=' + projectId + '&projectResourceId=' + projectResourceId,\n\t\tdataType: 'html',\n\t\tsuccess: function(response) {\n\t\t\t $('#'+content_id).html(response);\n\t\t}\n\t});\n}", "async function submitEdit() {\n const articleId = this.id.replace('edit-', '');\n\n for (let i = 0; i < addCommentButtons.length; i++)\n addCommentButtons[i].style.display = \"initial\";\n\n const text = tinymce.activeEditor.getContent({format: 'html'});\n tinymce.activeEditor.remove();\n\n let headers = new Headers();\n headers.append('Content-Type', 'text/html');\n await fetch(`./EditArticle?articleId=${articleId}`, {\n method: 'POST',\n headers: headers,\n body: text\n });\n\n document.querySelector(`#content-${articleId}`).classList.remove(\"currentlyEditing\");\n resetButtonsFromEditing(articleId);\n }", "function DataArchiveEditor( data_url, enterer_id, parameters )\n{\n \"use strict\";\n \n if ( data_url.match( /^\\// ) && window.location.origin )\n\tdata_url = window.location.origin + data_url;\n\n var editable_fields = ['title', 'authors', 'description', 'doi', 'is_public'];\n \n var edit_record;\n var archive_id;\n var numeric_id;\n \n // The following function initializes this application controller object. It is exported as\n // a method, so that it can be called once the web page is fully loaded.\n \n function initialize ()\n {\n\tarchive_id = parameters['id'];\n\t\n\tif ( archive_id && /^(dar:)?\\d+$/.test(archive_id) )\n\t{\n\t if ( /^\\d/.test(archive_id) ) archive_id = 'dar:' + archive_id;\n\t \n\t $.ajax( {\n\t\turl: data_url + \"archives/single.json?show=crmod,entname&id=\" + archive_id,\n\t\tdataType: \"json\"\n\t })\n\t\t.success (fillForm)\n\t \t.error (loadError);\n\t}\n\t\n\telse if ( archive_id )\n\t{\n\t setInnerHTML('dar_header', \"Data Archive: invalid parameter '\" + archive_id + \"'\");\n\t clearForm();\n\t}\n\n\telse\n\t{\n\t setInnerHTML('dar_header', \"Data Archive: no archive identifier was specified\");\n\t clearForm();\n\t}\n }\n \n this.initialize = initialize;\n\n // Fill the form with data retrieved from the server.\n\n function fillForm (data) {\n\t\n edit_record = data.records[0];\n\t\n\tarchive_id = edit_record['oid'];\n\tif ( /^\\d/.test(archive_id) ) archive_id = 'dar:' + archive_id;\n\t\n\tnumeric_id = archive_id;\n\tif ( /^dar:/.test(numeric_id) ) numeric_id = numeric_id.substr(4);\n\t\n\tsetInnerHTML('dar_header', \"Data Archive \" + numeric_id);\n\tsetElementValue('dar_id', archive_id);\n\tsetElementValue('dar_title', edit_record['title']);\n\tsetElementValue('dar_description', edit_record['description']);\n\tsetElementValue('dar_authors', edit_record['authors']);\n\tsetElementValue('dar_public', edit_record['is_public']);\n\t\n\tvar archive_uri = edit_record['uri_path'] + \"?\" + edit_record['uri_args'];\n\t\n\tsetElementValue('dar_uri', archive_uri);\n\t\n\tvar doi_content = '';\n\t\n\tif ( edit_record['doi'] )\n\t{\n\t doi_content = '<td><input type=\"text\" name=\"doi\" size=\"60\" value=\"' + edit_record['doi'] + '\" disabled>';\n\t if ( edit_record.prm == 'admin' )\n\t\tdoi_content = doi_content + '&nbsp;<button name=\"change_doi\" type=\"button\" onclick=\"pageapp.enterDOI()\">Change DOI</button>';\n\t disableElement('dar_title', true);\n\t disableElement('dar_authors', true);\n\t disableElement('dar_public', true);\n\t}\n\t\n\telse\n\t{\n\t if ( edit_record.sta == 'pending' || edit_record.status == 'pending' )\n\t {\n\t\tdoi_content = 'DOI has been requested&nbsp;&nbsp;' +\n\t\t \"<button name='cancel_request' type='button' onclick='pageapp.requestDOI(\\\"cancel\\\")'>Cancel request</button>\";\n\t\tif ( edit_record.prm == 'admin' )\n\t\t doi_content = doi_content + \"&nbsp;<button name='enter_doi' type='button' onclick='pageapp.enterDOI()'>Enter DOI</button>\";\n\t }\n\t \n else\n\t {\n\t\tdoi_content = \"<button name='doi_request' type='button' onclick='pageapp.requestDOI(\\\"send\\\")'>Request a DOI for this data archive</button>\";\n }\n\t \n\t disableElement('dar_title', false);\n\t disableElement('dar_authors', false);\n\t disableElement('dar_public', false);\n\t}\n\t\n\tsetInnerHTML('dar_doi', doi_content);\n\t\n\tsetInnerHTML('dar_fetched', edit_record['fetched']);\n\tsetInnerHTML('dar_created', edit_record['dcr']);\n\tsetInnerHTML('dar_modified', edit_record['dmd']);\n\t\n\tif ( edit_record['ent'] )\n\t{\n\t var authent = edit_record['ent'];\n\n\t if ( edit_record['ath'] && edit_record['ath'] != edit_record['ent'] )\n\t\tauthent = authent + ' (' + edit_record['ath'] + ')';\n\t \n\t setInnerHTML('dar_authent', authent);\n\t}\n }\n \n // Respond to an error while trying to load the metadata for the requested archive.\n \n function loadError ( xhr, textStatus, error )\n {\n\t// If the specified archive could not be fetched because the user is not logged in, redirect\n\t// to the login page.\n\t\n\tif ( xhr.status == \"401\" && ! enterer_id )\n\t{\n\t var current_url = document.URL.replace(/^https?:\\/\\/[^\\/]+/, '');\n\n\t if ( current_url.match(/^\\/[a-z]/) )\n\t {\n\t\tvar goto_url = \"/login?redirect_after=\" + encodeURIComponent(current_url);\n\t\tlocation.assign(goto_url);\n\t\treturn;\n\t }\n\t}\n\t\n\t// Otherwise, display the error.\n\t\n\tsetInnerHTML('dar_header', '<span style=\"color: red\">CANNOT EDIT Data Archive ' +\n\t\t archive_id + \": \" + error + '</span>');\n\tclearForm();\n }\n \n function clearForm ( )\n {\n\tsetElementValue('dar_id', '');\n\tsetElementValue('dar_title', '');\n\tsetElementValue('dar_description', '');\n\tsetElementValue('dar_authors', '');\n\tsetElementValue('dar_uri', '');\n\tsetInnerHTML('dar_doi', '');\n\tsetInnerHTML('dar_fetched', '');\n\tsetInnerHTML('dar_created', '');\n\tsetInnerHTML('dar_modified', '');\n\tsetInnerHTML('dar_authent', '');\n }\n \n function doSave ( )\n {\n\tvar params = { };\n\tvar param_count = 0;\n\t\n\tfor ( var field_name of editable_fields )\n\t{\n\t var old_value = edit_record[field_name];\n\t var new_value = getFormValue('dar_edit', field_name);\n\t \n\t if ( new_value != undefined && new_value != old_value )\n\t {\n\t\tparams[field_name] = new_value;\n\t\tparam_count++;\n\t }\n\t}\n\t\n\tif ( param_count )\n\t{\n\t params['oid'] = edit_record['oid'];\n\t}\n\t\n\t$.ajax( {\n\t method: \"POST\",\n\t url: data_url + \"archives/addupdate.json?show=crmod\",\n\t data: params,\n\t dataType: \"json\"\n\t})\n\t .success(function ( data ) {\n\t\tfillForm(data);\n\t\twindow.alert(\"Saved.\");\n\t })\n\t\n\t .error(function(xhr, textStatus, errorString) {\n\t\twindow.alert(\"Failed: \" + xhr.status + \" \" + textStatus);\n\t });\n }\n \n this.doSave = doSave;\n \n function doCancel ( )\n {\n\twindow.history.back();\n }\n\n this.doCancel = doCancel;\n \n function doDownload ( )\n {\n\tif ( numeric_id )\n\t window.open('/archives/retrieve/' + numeric_id);\n\telse\n\t window.alert(\"This archive record does not have a valid numeric ID.\");\n }\n \n this.doDownload = doDownload;\n\n function doRetrieve ( )\n {\n\tvar retrieval_uri = $('#dar_uri').val();\n\t\n\tif ( retrieval_uri && /^[\\/]data/.test(retrieval_uri) )\n\t window.open(retrieval_uri);\n\telse\n\t window.alert(\"This archive record does not contain a valid Data URI.\");\n }\n \n this.doRetrieve = doRetrieve;\n \n // The following function allows for sending or canceling a DOI request.\n \n function requestDOI ( which )\n {\n\tvar request_url;\n\tvar message;\n\t\n\tif ( which == 'send' && window.confirm(\"Do you want to request a DOI for this data archive?\") )\n\t{\n\t request_url = '/classic/requestDOI?id=' + archive_id;\n\t message = \"DOI has been requested.\";\n\t}\n\t\n\telse if ( which == 'cancel' && window.confirm(\"Do you want to cancel the DOI request for this data archive?\") )\n\t{\n\t request_url = '/classic/requestDOI?operation=cancel&id=' + archive_id;\n\t message = \"DOI request has been canceled.\";\n\t}\n\t\n\tif ( request_url )\n\t{\n\t $.ajax( {\n\t\tmethod: \"GET\",\n\t\turl: request_url,\n\t })\n\t\t.success(function ( data ) {\n\t\t window.alert(message);\n\t\t})\n\t \n\t\t.error(function(xhr, textStatus, errorString) {\n\t\t window.alert(\"Failed: \" + xhr.status + \" \" + textStatus);\n\t\t});\n\t}\n }\n\n this.requestDOI = requestDOI;\n\n // The following function allows an administrator to enter or change a DOI.\n \n function enterDOI ( )\n {\n\tvar doi_value = edit_record['doi'] || '';\n\tsetInnerHTML('dar_doi', '<td><input type=\"text\" name=\"doi\" size=\"60\" value=\"' +\n\t\t doi_value + '\">');\n }\n \n this.enterDOI = enterDOI;\n\n // Delete this archive\n\n function doDelete ( )\n {\n\tif ( edit_record['doi'] )\n\t{\n\t window.alert(\"This archive cannot be deleted, because it has been issued a DOI.\");\n\t return;\n\t}\n\n\telse if ( edit_record['sta'] == 'pending' || edit_record['status'] == 'pending' )\n\t{\n\t window.alert(\"This archive cannot be deleted, because a DOI has been requested for it.\");\n\t return;\n\t}\n\t\n\telse if ( window.confirm(\"Do you want to delete this archive? The operation cannot be undone.\") )\n\t{\n\t $.ajax( {\n\t\tmethod: \"GET\",\n\t\turl: data_url + \"archives/delete.json?id=\" + archive_id\n\t })\n\t\t.success(function ( data ) {\n\t\t window.alert(\"Archive was deleted.\");\n\t\t window.open('/app/archive/list', '_self');\n\t\t})\n\t \n\t\t.error(function(xhr, textStatus, errorString) {\n\t\t window.alert(\"Failed: \" + xhr.status + \" \" + textStatus);\n\t\t});\n\t}\n }\n \n this.doDelete = doDelete;\n \n // This function retrieves the DOM object with the specified id, and leaves a reasonable\n // message on the console if the program contains a typo and the requested element does not\n // exist.\n \n function myGetElement ( id )\n {\n\tvar elt = document.getElementById(id);\n\t\n\tif ( elt == undefined )\n\t{\n\t console.log(\"ERROR: unknown element '\" + id + \"'\");\n\t return undefined;\n\t}\n\t\n\telse return elt;\n }\n \n // If the specified DOM object is of type \"checkbox\", then return the value of its 'checked'\n // attribute. Otherwise, return the value of its 'value' attribute.\n \n function getElementValue ( id )\n {\n\tvar elt = myGetElement(id);\n\t\n\tif ( elt && elt.type && elt.type == \"checkbox\" )\n\t return elt.checked;\n\t\n\telse if ( elt )\n\t return elt.value;\n\t\n\telse\n\t return \"\";\n }\n\n // Given the name of a form and the name of an element, return the value.\n \n function getFormValue ( form_name, field_name )\n {\n\tvar elt = document.forms[form_name][field_name];\n\n\tif ( elt && elt.type && elt.type == \"checkbox\" )\n\t return elt.checked;\n\n\telse if ( elt )\n\t return elt.value;\n\n\telse\n\t return \"\";\n }\n \n // Set the 'value' property of the specified element.\n \n function setElementValue ( id, value )\n {\n\tvar elt = myGetElement(id);\n\t\n\tif ( elt && elt.type && elt.type == \"checkbox\" )\n\t{\n\t if ( value && value != \"0\" )\n\t\telt.checked = true;\n\t else\n\t\telt.checked = false;\n\t}\n\t\n\telse if ( elt && typeof(value) == \"string\" )\n\t elt.value = value;\n }\n\n // Set the 'innerHTML' property of the specified element. If the specified content is not a\n // string, then the property is set to the empty string.\n \n function setInnerHTML ( id, content )\n {\n\tvar elt = myGetElement(id);\n\t\n\tif ( elt )\n\t{\n\t if ( typeof(content) != \"string\" )\n\t\telt.innerHTML = \"\";\n\t else\n\t\telt.innerHTML = content;\n\t}\n }\n\n // Disable the specified element if the second argument is true, enable it if false.\n\n function disableElement ( id, disable )\n {\n\tvar elt = myGetElement(id);\n\n\tif ( elt ) elt.disabled = disable;\n }\n}", "function Editclick(obj) {\n var rowID = $(obj).attr('id');\n $.ajax({\n url: `https://localhost:44397/api/patients/ ${rowID}`,\n type: 'GET',\n success: function (response) {\n $.ajax({\n type: \"GET\",\n url: '/Home/CreateorUpdate',\n cache: false,\n data:response,\n dataType: \"html\",\n success: function (responseText) {\n $('#editor-content-container').html(responseText);\n console.log(responseText);\n $('#editor-container').modal('show');\n }\n });\n },\n });\n}", "function updateEditedPost(id){\n var req = new Request.JSON({\n url: 'control.php?action=getSinglePost&id=' + id,\n onSuccess: function(post) { \n var postObject = new PostItem(post.post_id, post.username, post.date_posted, post.comment);\n // Replace the previous post\n postObject.display().replaces($(post.post_id + 'post')); \n }\n }).send(); \n}", "function getDocumentFieldEdit() {\n if ($scope.action == \"Edit\") {\n apiService.get($rootScope.baseUrl + 'api/DocumentFieldDepartment/GetDocFieldDeaprtmentByDocIdAndReceivedDoc?documentId=' + $scope.documentReceived.id + '&receivedDocument=true', null,\n function (result) {\n if (result.data.isSuccess == true) {\n $scope.documentFields = result.data.data;\n\n }\n },\n function () {\n });\n }\n }", "function startEdit(tiddlerTitle, freshTags, freshType) {\n $('#message').fadeOut('slow');\n $('button, input, .inputs').removeAttr('disabled');\n\n $('#editor > h1').text(tiddlerTitle);\n $.ajax({\n dataType: 'json',\n headers: {'Cache-Control': 'max-age=0'},\n url: host + encodeURIComponent(tiddlerTitle),\n success: establishEdit,\n statusCode: {\n 404: function() {\n $('[name=type]')\n .filter('[value=\"default\"]')\n .prop('checked', true);\n $('textarea[name=text]').val('');\n setIcon(false);\n updateContentType(freshType);\n updateTagView(readTagView(freshTags), null);\n }\n }\n });\n}", "function viewforEdit(id) {\n\t// var id = $(this).attr(\"data-id\");\n\t $.ajax({\n url: 'posts/'+id,\n data: {id:id},\n type: 'GET',\n datatype: 'JSON',\n success: function (response) {\n \t$('#exampleModal').modal('show');\n \tconsole.log(response);\n \t// $('#tags_edit').tagsinput('add', 'some tag');\n \t$('#subject_edit').val(response.subject);\n \t$('#description_edit').val(response.description);\n \t$('#id').val(response.id);\n\n \t$(\"#editformcontent\").val(response);\n \tfor (var i = response.posttags.length - 1; i >= 0; i--) {\n \t\t\n \t\t$('#tags_edit').tagsinput('add', response.posttags[i].tags.name);\n \t}\n \t\n \t// $('.tags').tagsinput('add', 'hello');\n \t// location.reload();\n },\n error: function (response) {\n\n }\n });\n}", "function editPost(req,res){\n //edit post\n}", "function recepieInfo( idStr ){ // load and render a specific recepie with idString\n\tif ( !validateUser() ){ return; }\n\t// console.log(\"Get recepie:\", idStr, \"and render in recepieEdit template\");\n\tlet url = `https://cookuniproject-default-rtdb.firebaseio.com/recepies/${idStr}.json`;\n setInfoBox();\n\tfetch(url)\n .then(function (response) {\n if( response.status < 300 ){\n clearInfoBox();\n }\n return response.json();\n })\n .then(function (data) {\n // console.log(\"Recepie Info Data:\", JSON.stringify(data)); // recepie ID\n let src = document.getElementById(\"recepieInfo\").innerHTML;\n let template = Handlebars.compile(src);\n data.recepieID = idStr;\n if( user == data.creator ){\n data.author = true;\n }else{\n data.author = false;\n }\n let context = data;\n let html = template(context);\n // console.log(html);\n render(html);\n return data;\n });\n}", "edit(req, res) {\n\n\t}", "function onedit(req, res) {\n\n const id = req.params.id;\n\n db.collection('profiles').findOne({\n _id: mongo.ObjectID(id),\n }, done);\n\n function done(err, data) {\n if (err) {\n next(err);\n } else {\n res.render('edit-profile.ejs', { \n profile: data //vult de data in die we al hebben\n });\n }\n }\n}", "function editTask(req, res){\n\n\tlet id=req.query.id\n\tTodoList.find({}, function(err,toDoList){\n\t\tif(err){\n\t\t\tconsole.log('Error in editing task');\n\t\t\treturn\n\t\t}\n\t\treturn res.render('home', {\n\t\t\ttitle: \"Home\",\n\t\t\tTask_List: toDoList,\n\t\t\ttaskId: id\n\t\t});\n\t})\n\n}", "function editSrv(\n $http,\n //$q,\n $log,\n //localStorageService,\n\n dataSettings\n ) {\n\n var self = this;\n\n // var for return function data\n self.note = {};\n\n //var baseUrl = \"http://npr.team-player.ru/\";\n self._baseUrl = dataSettings.BaseUrl;\n\n // CREATE => POST\n self._create = function (note) {\n var data = {\n userId: note.userId,\n title: note.title,\n body: note.body,\n publish: note.publish\n };\n\n return $http.post(self._baseUrl + \"api/notes/\", data)\n .then(function (results) {\n return results;\n });\n };\n\n // READ => GET\n self._read = function (id) {\n return $http.get(self._baseUrl + \"api/notes/\" + id)\n .then(function (results) {\n return results;\n });\n };\n\n // UPDATE => PUT\n self._update = function (note) {\n var id = note.id;\n var data = {\n title: note.title,\n body: note.body,\n publish: note.publish\n };\n\n return $http.put(self._baseUrl + \"api/notes/\" + id, data)\n .then(function (results) {\n return results;\n });\n };\n\n // DELETE => DELETE\n self._delete = function (id) {\n return $http.delete(self._baseUrl + \"api/notes/\" + id)\n .then(function (results) {\n return results;\n });\n };\n\n self.note.create = self._create;\n self.note.read = self._read;\n self.note.update = self._update;\n self.note.delete = self._delete;\n\n return self.note;\n }", "putExistingNews(newsId, newsToEdit) {\n return fetch(`http://localhost:8088/news/${newsId}`, {\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify(newsToEdit)\n })\n }", "function editable($el, data) {\n \n $el.data('cms', data);\n\n $el.on('render', function () {\n var $el = $(this);\n var data = $el.data('cms');\n elements[data.type].render($el, data.data);\n $el.trigger('rendered');\n });\n\n //add css edit styles\n $el.addClass('cms-edit-' + data.type);\n\n $el.on('click', function (e) {\n e.preventDefault();\n e.stopPropagation();\n var $el = $(this);\n var data = $el.data('cms');\n elements[data.type].edit($el, data);\n });\n\n }", "function loadArticleDetailById(id, detail) {\n $.ajax({\n url: 'assets/data/latest.json',\n type: 'get',\n dataType : 'json',\n success: function(data) {\n $.each(data, function(key, item) {\n console.log(\"Article ID\"+id);\n if (id == item.id){\n detail.text(item.Description);\n }\n });\n },\n error: function(e) {\n console.log('error message'+e.message);\n }\n });\n}", "function editToDo() {\t\t\n\t\tasync function fetchRequest(path, newData) {\n\t\t\ttry {\n\t\t\t\tconst response = await fetch(`${ AppHelper.API_URL }/users/edit/${ path }/${ id }`, {\n\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\t\tAuthorization: `Bearer ${ token }`\n\t\t\t\t\t},\n\t\t\t\t\tbody: JSON.stringify(newData)\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tconst success = await response.json();\n\t\t\t\t\n\t\t\t\tif (success) {\n\t\t\t\t\t// Clears the form fields when finished\n\t\t\t\t\tclearFields();\n\t\t\t\t\t\n\t\t\t\t\t// Success message\n\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\ticon: 'success',\n\t\t\t\t\t\ttitle: 'Yay!',\n\t\t\t\t\t\ttext: 'Your To Do has been edited.',\n\t\t\t\t\t\tshowConfirmButton: false,\n\t\t\t\t\t\ttimer: 2468\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t// router\n\t\t\t\t\trouter.push('/dashboard');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error(err);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// CONTROL STATEMENTS\n\t\t// If all three fields are filled up\n\t\tif (name !== '' && description !== '' && date !== '') {\n\t\t\tconst editedFields = {\n\t\t\t\tname: name,\n\t\t\t\tdescription: description,\n\t\t\t\ttoDoDate: date\n\t\t\t};\n\t\t\t\n\t\t\tfetchRequest('to-do', editedFields);\n\t\t\t\n\t\t\t// Name field is the only one with content\n\t\t} else if (name !== '') {\n\t\t\tconst editedField = { name: name };\n\t\t\t\n\t\t\tfetchRequest('to-do-name', editedField);\n\t\t\t\n\t\t\t// Description field is the only one with content\n\t\t} else if (description !== '') {\n\t\t\tconst editedField = { description: description };\n\t\t\t\n\t\t\tfetchRequest('to-do-desc', editedField);\n\t\t\t\n\t\t\t// Date field is the only one with content\n\t\t} else if (date !== '') {\n\t\t\tconst editedField = { toDoDate: date };\n\t\t\t\n\t\t\tfetchRequest('to-do-date', editedField);\n\t\t}\n\t}", "function setPreview(article){\n\t// Preview Display\n\t$('#ne-side-title').text(article.data('title'));\n\t$('#ne-side-article').text(article.data('article'));\n\t// Edit Display\n\t$('#ne-title-edit').val(article.data('title'));\n\t$('#ne-intro-edit').val(article.data('intro'));\n\t$('#ne-article-edit').val(article.data('article'));\n\t$('#ne-img-preview').css('background-image', article.data('img-url'));\n\t$('#ne-img-id').val(article.data('img-id'));\n\n\t// Date Formatting\n\tvar start = new Date(article.data('start'));\n\tvar sDate = start.getFullYear() + \"-\" + (\"0\" + (start.getMonth() + 1)).slice(-2) + \"-\" + (\"0\" + start.getDate()).slice(-2);\n\t$('#ne-sdate-edit').val(sDate);\n\tvar end = new Date(article.data('end'));\n\tvar eDate = end.getFullYear() + \"-\" + (\"0\" + (end.getMonth() + 1)).slice(-2) + \"-\" + (\"0\" + end.getDate()).slice(-2);\n\t$('#ne-edate-edit').val(eDate);\n}", "function editImage(edit){\n\tvar imageFilename = edit.imageFilename;\n\tedit.addEventListener(\"click\", function(e){\n\t\te.stopPropagation();\n\t\te.preventDefault();\n\t\t\n\t\t// Stop reload interval\n\t\tisIdle = false;\n\n\t\tvar description = new String();\n\t\t\n\t\t// Check the prompt length\n\t\twhile(description = prompt(\"Edit: \" + imageFilename), description.length > 50){}\n\t\t\n\t\t// Start reload interval\n\t\tisIdle = true;\n\n\t\tvar editRequest = new_request();\n\t\teditRequest.open(\"POST\", \"server.php\", true);\n\t\teditRequest.setRequestHeader('COMMAND', \"Edit\");\n\t\teditRequest.setRequestHeader('FILE_NAME', imageFilename);\n\n\t\teditRequest.setRequestHeader('DESCRIPTION', description);\n\t\teditRequest.send(null);\n\t\t\n\t\teditRequest.onreadystatechange = function () {\n\t\t\tif(editRequest.readyState == 4){\n\t\t\t\tif(editRequest.status != 200)\n\t\t\t\t\talert(\"Error code = \" + new String(editRequest.status));\n\t\t\t\telse{\n\t\t\t\t\t// Get the return object and pares as JSON\n\t\t\t\t\tdatabaseObj = JSON.parse(editRequest.responseText);\n\n\t\t\t\t\tupdateAlbumTable();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t}\n\t, false);\n}", "function renderEdit(context) {\n context.loggedIn = sessionStorage.getItem('authtoken') !== null;\n context.username = sessionStorage.getItem('username');\n\n this.loadPartials({\n header: './templates/common/header.hbs',\n footer: './templates/common/footer.hbs',\n editForm: './templates/edit/editForm.hbs'\n }).then(function (res) {\n this.partial('./templates/edit/editPage.hbs');\n })\n }", "function editOrdenItem(){\n\t\t\t\t\t\t\t\tvar idPoste = this.getAttribute('data-id')\n\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+item._id+'/read/poste/'+idPoste\n\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\tvar item = res.data.service\n\t\t\t\t\t\t\t\t\tvar contentTemplateEditPoste = document.createElement('div')\n\t\t\t\t\t\t\t\t\tcontentTemplateEditPoste.setAttribute('class', 'editPosteModal')\n\t\t\t\t\t\t\t\t\tvar template = `<form action=\"\" id=\"sendEditPoste\" class=\"editPoste\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3>EDITAR REGISTRO DE POSTE</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--content\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Caracteristicas</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Código Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"txt_codigo_poste\" value=\"${item.codigo_poste}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Altura de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"altura_poste\" value=\"${item.altura_poste}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"txt_type_poste\" value=\"${item.type_poste}\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Material</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"txt_type_material\" value=\"${item.type_material}\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de pastoral</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_pastoral\" value=\"${item.type_pastoral}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Luminaria</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_luminaria\" value=\"${item.type_luminaria}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Lampará</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_lampara\" value=\"${item.type_lampara}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Ubicación</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication_item--map\" id=\"mapsEdit\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada X</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"coordenada_X\" value=\"${item.coordenada_X}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada Y</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"coordenada_Y\" value=\"${item.coordenada_Y}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Estado</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_poste\" value=\"${item.estado_poste}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Pastoral</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_pastoral\" value=\"${item.estado_pastoral}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Luminaria</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_luminaria\" value=\"${item.estado_luminaria}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Lampará</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_lampara\" value=\"${item.estado_lampara}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--buttons\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteCancel\">CANCELAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteSave\" type=\"submit\">GUARDAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form>`\n\n\t\t\t\t\t\t\t\t\tcontentTemplateEditPoste.innerHTML = template\n\t\t\t\t\t\t\t\t\t$('.OrderWork').append(contentTemplateEditPoste)\n\n\t\t\t\t\t\t\t\t\tvar url = GMaps.staticMapURL({\n\t\t\t\t\t\t\t\t\t size: [800, 400],\n\t\t\t\t\t\t\t\t\t lat: item.coordenada_X,\n\t\t\t\t\t\t\t\t\t lng: item.coordenada_Y,\n\t\t\t\t\t\t\t\t\t markers: [\n\t\t\t\t\t\t\t\t\t {lat: item.coordenada_X, lng: item.coordenada_Y}\n\t\t\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t$('#mapsEdit').css('background-image', 'url('+url+')')\n\n\t\t\t\t\t\t\t\t\tvar btnCloseEditPoste = $('#editPosteCancel')\n\t\t\t\t\t\t\t\t\tbtnCloseEditPoste.on('click', closeEditPoste)\n\n\t\t\t\t\t\t\t\t\tfunction closeEditPoste(ev){\n\t\t\t\t\t\t\t\t\t\tev.preventDefault()\n\t\t\t\t\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$('#sendEditPoste').submit(function(ev){\n\t\t\t\t\t\t\t\t\t\tev.preventDefault()\n\n\t\t\t\t\t\t\t\t\t\tvar codigo_poste = $('#txt_codigo_poste')\n\t\t\t\t\t\t\t\t\t\tvar type_poste = $('#txt_type_poste')\n\t\t\t\t\t\t\t\t\t\tvar altura_poste = $('#altura_poste')\n\t\t\t\t\t\t\t\t\t\tvar type_material = $('#txt_type_material')\n\t\t\t\t\t\t\t\t\t\tvar type_pastoral = $('#type_pastoral')\n\t\t\t\t\t\t\t\t\t\tvar type_luminaria = $('#type_luminaria')\n\t\t\t\t\t\t\t\t\t\tvar type_lampara = $('#type_lampara')\n\t\t\t\t\t\t\t\t\t\tvar coordenada_X = $('#coordenada_X')\n\t\t\t\t\t\t\t\t\t\tvar coordenada_Y = $('#coordenada_Y')\n\t\t\t\t\t\t\t\t\t\t// var observaciones = $('#observaciones')\n\t\t\t\t\t\t\t\t\t\tvar estado_poste = $('#estado_poste')\n\t\t\t\t\t\t\t\t\t\tvar estado_pastoral = $('#estado_pastoral')\n\t\t\t\t\t\t\t\t\t\tvar estado_luminaria = $('#estado_luminaria')\n\t\t\t\t\t\t\t\t\t\tvar estado_lampara = $('#estado_lampara')\n\n\t\t\t\t\t\t\t\t\t\tconsole.log(altura_poste);\n\n\t\t\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\t\t\tcodigo_poste: codigo_poste.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_poste: type_poste.val(),\n\t\t\t\t\t\t\t\t\t\t\taltura_poste: altura_poste.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_material: type_material.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_pastoral: type_pastoral.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_luminaria: type_luminaria.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_lampara: type_lampara.val(),\n\t\t\t\t\t\t\t\t\t\t\tcoordenada_X: coordenada_X.val(),\n\t\t\t\t\t\t\t\t\t\t\tcoordenada_Y: coordenada_Y.val(),\n\t\t\t\t\t\t\t\t\t\t\t// observaciones:\n\t\t\t\t\t\t\t\t\t\t\testado_poste: estado_poste.val(),\n\t\t\t\t\t\t\t\t\t\t\testado_pastoral: estado_pastoral.val(),\n\t\t\t\t\t\t\t\t\t\t\testado_luminaria: estado_luminaria.val(),\n\t\t\t\t\t\t\t\t\t\t\testado_lampara: estado_lampara.val()\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tconsole.log(data)\n\n\t\t\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+res.data.work_order_id+'/item/poste/'+res.data.service._id+'?_method=put',\n\t\t\t\t\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\t\t\tconsole.log($('[data-content=\"'+res.data.service._id+'\"] .codigo_poste'))\n\t\t\t\t\t\t\t\t\t\t\t$('[data-content=\"'+res.data.service._id+'\"] .codigo_poste').html(res.data.service.codigo_poste)\n\t\t\t\t\t\t\t\t\t\t\t$('[data-content=\"'+res.data.service._id+'\"] .type_material').html(res.data.service.type_material)\n\t\t\t\t\t\t\t\t\t\t\t$('[data-content=\"'+res.data.service._id+'\"] .type_poste').html(res.data.service.type_poste)\n\t\t\t\t\t\t\t\t\t\t\t// location.reload()\n\t\t\t\t\t\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(err)\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}, function(err){\n\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}", "function displayPage(response, user_id, isEditor) {\n\treturn function(error, rows) {\n\t\t\n\t\tvar canEdit = false;\n\t\t\n\t\tif (rows[0]==undefined) {\n\t\t\t//TODO: Throw the error through a template so that the user\n\t\t\t// is redirected to the previous page with the error displayed\n\t\t\tresponse.writeHeader(200, {\"Content-Type\": \"text/html\"});\n\t\t\tresponse.end('<html><body><h1>Database Error</h1></body></html>');\n\t\t}\n\t\telse {\n\t\t\tvar issue = rows[0];\n\t\t\t\n\t\t\t//Check if logged in user is issue creator or an editor\n\t\t\tif ((issue.user_id == user_id) || isEditor)\n\t\t\t\tcanEdit = true;\n\n\t\t\tif (canEdit){\n\t\t\t\t// Get the tags\n\t\t\t\ttags.getTagsString(issue.id, function(tags) {\n\t\t\t\t\tvariables = {\n\t\t\t\t\t\tcanEdit: canEdit,\n\t\t\t\t\t\ttitle: issue.title,\n\t\t\t\t\t\tstatus: issue.status,\n\t\t\t\t\t\tlocation: issue.location,\n\t\t\t\t\t\tdescription: issue.description,\n\t\t\t\t\t\tfile_name: issue.fileLocation,\n\t\t\t\t\t\tfile_link: 'uploads/'+issue.id+'/'+issue.fileLocation,\n\t\t\t\t\t\tlink: issue.link,\n\t\t\t\t\t\ttags: tags,\n\t\t\t\t\t\tissueId: issue.id,\n\t\t\t\t\t\topenSelected: (issue.status == 'open'),\n\t\t\t\t\t\tresolvedSelected: (issue.status == 'resolved')\n\t\t\t\t\t}\n\t\t\t\t\tresponse.render('views/editIssue.html', variables);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvariables = {\n\t\t\t\t\tcanEdit: canEdit,\n\t\t\t\t\tissueId: issue.id\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresponse.render('views/editIssue.html', variables);\n\t\t\t}\n\t\t}\n\t};\n}", "function fnGetEditOS() {\n\t$('#mainContainer').html('<div id=\"EditOSPage\"></div>');\n\tsetLoadImage('EditOSPage');\n\tsendHTMLAjaxRequest(false, 'getView/getEditOSPage.html', null, fnDisplayContent, null,'EditOSPage');\n}", "static edit(req, dynamoDb, callback) {\n if (Login.authenticate(req)) {\n const params = {\n TableName: process.env.POSTS_TABLE,\n Key: {\n postId: req.params.postId\n }\n };\n\n dynamoDb.get(params, (error, result) => {\n if (error) {\n console.error(error);\n callback('render', 'error', {error: 'Could not get post'});\n } else {\n if (result.Item) {\n callback('render', 'posts/edit', {post: result.Item});\n } else {\n callback('render', 'error', {error: 'Post not found'});\n }\n }\n });\n } else {\n callback('redirect', '/login');\n }\n }", "function initializePage_editArticle()\r\n{\r\n page_editArticle.initializeForm(page_editUserArticle);\r\n page_editArticle.initializeButton(page_deleteUserArticle);\r\n}", "function processEdit(req, res) {\n\t// Validate params => https://github.com/ctavan/express-validator\n\treq.checkBody('name', 'Name is required.').notEmpty();\n\treq.checkBody('description', 'Description is required.').notEmpty();\n\n\t// if there are errors, redirect and save errors to flash\n\tconst errors = req.validationErrors();\n\n\tif (errors) {\n\t\tconsole.log(`[data_validation_failured] events.controller.js (processEdit) =>\\n${errors}`);\n\t\treturn res.status(400).redirect(`/events/${req.params.slug}/edit`);\n\t}\n\n\t// finding a current event\n\tlet slug = req.params.slug,\n\t\tupdate = req.body;\n\n\t// function to find the current event\n\tEvent.findOneAndUpdate({ slug: slug }, update, function (err, r_event) {\n\t\t\n\t\tif (err) {\n\t\t\tconsole.log(`[failured_validation_data] events.controller.js (processEdit) =>\\n${errors}`);\n\t\t\treturn res.status(500).send('Oh, an error has been occurred!!');\n\t\t} else {\n\t\t\treturn res.status(301).redirect(`/events/${r_event.slug}/edit`);\n\t\t}\t\n\t});\n}", "function callToEdit()\n{\n\tvar id = $(this).parents('tr').children('td').children('p.editId').attr('editId');\n\t//var id = $(this).children('p.editId').attr('editId');\n\twindow.location.href = HOST_PATH + \"admin/page/editpage/id/\" + id;\n}", "function editPost(event) {\n let postId = event.target.value;\n let postImage = document.getElementById('editImage' + postId);\n let postTitle = document.getElementById('editTitle' + postId);\n let postContent = document.getElementById('editContent' + postId);\n let postAuthor = document.getElementById('editAuthor' + postId);\n\n data = {\n image : postImage.value,\n title : postTitle.value,\n content : postContent.value,\n author : postAuthor.value\n };\n\n fetch(apiRoot + '/' + postId, {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data),\n })\n .then(response=>response.json())\n .then(data=>alert('Success! Your post has been updated.'),history.replaceState(null, '', archive)
\n )\n .catch(err => console.error('Error:', err))\n}", "edit(resource, id, object) {\n const url = `${baseUrl}/${resource}/${id}/`\n return this.fetchFactory(url, \"PATCH\", object)\n }", "async function editPost() {\n\t\tif (!title && !content) return;\n\t\tif (typeof window.ethereum !== 'undefined') {\n\t\t\tawait requestAccount();\n\t\t\tconst provider = new ethers.providers.Web3Provider(window.ethereum);\n\t\t\tconsole.log({ provider });\n\t\t\tconst signer = provider.getSigner();\n\t\t\tconst contract = new ethers.Contract(crudAddress, Crud.abi, signer);\n\t\t\tconst transaction = await contract.editPost(id, title, content);\n\t\t\tconsole.log(id, title, content);\n\t\t\tawait transaction.wait();\n\t\t}\n\t}", "static editReview(formData, editing) {\n return _sw_js__WEBPACK_IMPORTED_MODULE_1__[\"dbPromise\"].then(db => {\n let tx = db.transaction('reviews');\n let store = tx.objectStore('reviews');\n return store.get(editing.id);\n }).then(review => {\n return _sw_js__WEBPACK_IMPORTED_MODULE_1__[\"dbPromise\"].then(db => {\n let tx = db.transaction('reviews', 'readwrite');\n let store = tx.objectStore('reviews');\n let newReview = Object.assign({}, review, formData);\n store.put(newReview);\n return tx.complete;\n });\n });\n }", "function article(artId){\n artId = parseInt(artId) || null;\n fetch('/menuitems', {method : 'get'})\n .then(function(serverResponse){\n if(serverResponse.redirected){\n // Hvis response objectets 'redirected' er true...\n location = serverResponse.url; // ...så send browseren til redirected url'en...\n } \n return serverResponse.json();\n })\n .then(function(jsonData){\n if(jsonData){\n var dropdown = document.createElement(\"select\");\n dropdown.id = \"dd_Art\"\n dropdown.name=\"catId\";\n var option = document.createElement(\"option\");\n option.value = 0;\n option.textContent = \"Vælg kategori\";\n dropdown.appendChild(option);\n jsonData.forEach(function(jd){\n option = document.createElement(\"option\");\n option.value = jd.id;\n option.textContent = jd.name;\n dropdown.appendChild(option);\n });\n var form = document.createElement(\"form\")\n form.id = \"frmArticle\";\n\n var title = document.createElement(\"input\")\n // title.width = 50;\n title.id = \"headline\";\n title.type = \"text\";\n title.name = \"title\";\n title.placeholder = \"Artikel overskrift\";\n var textarea = document.createElement(\"textarea\")\n textarea.id = 'artText';\n textarea.name = \"article\";\n form.appendChild(title);\n form.appendChild(textarea);\n form.appendChild(dropdown);\n\n var btn = document.createElement('button');\n btn.type = \"button\";\n if(artId){\n var articleId = document.createElement('input');\n articleId.type = 'hidden';\n articleId.value = artId;\n articleId.name = 'artid';\n form.appendChild(articleId);\n btn.dataset.cmd = \"articleUpdate\"\n btn.dataset.artid = artId\n btn.innerHTML = \"Update\";\n }\n else{\n btn.dataset.cmd = \"articleAdd\";\n btn.innerHTML = \"Upload\";\n }\n btn.dataset.frm = \"frmArticle\";\n form.appendChild(btn);\n var container = document.createElement(\"div\");\n container.className = \"tbl-container\";\n container.appendChild(form);\n var content = document.querySelector('#content');\n content.innerHTML = '';\n content.appendChild(container);\n }\n })\n .then(function(){\n if(artId){\n fetch(`/article?artid=${artId}`, {method : 'get'})\n .then(function(data){\n return data.json();\n })\n .then(function(jsonData){\n var dd = document.querySelector('#dd_Art');\n dd.value = jsonData[0].category_id;\n var headline = document.querySelector('#headline');\n headline.value = jsonData[0].title\n var txt = document.querySelector('#artText')\n txt.textContent = jsonData[0].content;\n })\n .catch(function(err){\n console.log(err);\n })\n } \n })\n .catch(function(err){\n console.log(err);\n })\n}", "target_article(state, payload){\n Object.assign(state.AdminPanel.articleEdit, payload)\n }", "function editarArt(ruta,opc,codArt){\n\t$(\"#mostrarNoticia\").hide();\n\t$(\"#crearNoticia\").show();\n\t$(\"#codigoArticulo\").val(codArt);\n\t$.get(ruta,{op:opc,cod:codArt},function(data){\n var recepcion=JSON.parse(data);\n\t\t$(\"#titulo\").val(recepcion.titulo);\n\t\ttinyMCE.get('descripcion').setContent(recepcion.descripcion);\t\t\n\t\t//$(\"#descripcion\").text(recepcion.descripcion);\n\t\t\n });\r\n}", "async edit ({ params, response }) {\n /**\n * Finding the page.\n *\n * ref: http://adonisjs.com/docs/4.1/lucid#_findorfail\n */\n const page = await Page.findOrFail(params.id)\n\n return response.status(200).json(page)\n }", "function getEditTemplate() {\r\n\t\t\tvar html =\r\n\t\t\t\t \"<div class='mapsed-container mapsed-address-entry mapsed-edit'>\"\r\n\t\t\t\t+ \"<h1>地点详细信息:</h1>\"\r\n\t\t\t\t+ \"<ul>\"\r\n\t\t\t\t+ \"<li>\"\r\n\t\t\t\t+ \"<label>名称:\"\r\n\t\t\t\t+ \"<input class='mapsed-name' type='text' placeholder='e.g. Bob sandwich shop' value='{NAME}' />\"\r\n\t\t\t\t+ \"</label>\"\r\n\t\t\t\t+ \"</li>\"\r\n\t\t\t\t+ \"<li>\"\r\n\t\t\t\t+ \"<label>地址:\"\r\n\t\t\t\t+ \"<input class='mapsed-street' type='text' placeholder='e.g. 3 Hemington place' value='{STREET}' />\"\r\n\t\t\t\t+ \"</label>\"\r\n\t\t\t\t+ \"</li>\"\r\n\t\t\t\t/*+ \"<li>\"\r\n\t\t\t\t+ \"<label>Town\"\r\n\t\t\t\t+ \"<input class='mapsed-town' type='text' placeholder='e.g. Leeds' value='{TOWN}' />\"\r\n\t\t\t\t+ \"</label>\"\r\n\t\t\t\t+ \"</li>\"\r\n\t\t\t\t+ \"<li>\"\r\n\t\t\t\t+ \"<label>Area\"\r\n\t\t\t\t+ \"<input class='mapsed-area' type='text' placeholder='e.g. West Yorkshire' value='{AREA}' />\"\r\n\t\t\t\t+ \"</label>\"\r\n\t\t\t\t+ \"</li>\"*/\r\n\t\t\t\t+ \"<li>\"\r\n\t\t\t\t+ \"<label>邮编:\"\r\n\t\t\t\t+ \"<input class='mapsed-postCode' type='text' value='{POSTCODE}' />\"\r\n\t\t\t\t+ \"</label>\"\r\n\t\t\t\t+ \"</li>\"\r\n\t\t\t\t+ \"<li>\"\r\n\t\t\t\t+ \"<label>电话:\"\r\n\t\t\t\t+ \"<input class='mapsed-telNo' type='telephone' placeholder='contact telephone number' value='{TELNO}' />\"\r\n\t\t\t\t+ \"</label>\"\r\n\t\t\t\t+ \"</li>\"\r\n\t\t\t\t/*\r\n\t\t\t\t+ \"<li>\"\r\n\t\t\t\t+ \"<label>website\"\r\n\t\t\t\t+ \"<input class='mapsed-website' type='url' placeholder='e.g. https://toepoke.co.uk' value='{WEBSITE}' />\"\r\n\t\t\t\t+ \"</label>\"\r\n\t\t\t\t+ \"</li>\"\r\n\t\t\t\t+ \"<li>\"\r\n\t\t\t\t+ \"<label>g+ url\"\r\n\t\t\t\t+ \"<input class='mapsed-url' type='url' placeholder='e.g. https://plus.google.com/+ToepokeCoUk‎' value='{GPLUS}' />\"\r\n\t\t\t\t+ \"</label>\"\r\n\t\t\t\t+ \"</li>\"*/\r\n\t\t\t\t+ \"</ul>\"\r\n\t\t\t\t+ \"<div class='mapsed-buttons'>\"\r\n\t\t\t\t+ \"<button class='mapsed-save-button'>保存</button>\"\r\n\t\t\t// placeholder for error messages\r\n\t\t\t\t+ \"<span class='mapsed-error'>&nbsp;</span>\"\r\n\t\t\t\t+ \"</div>\"\r\n\t\t\t\t+ \"</div>\" // mapsed-address-entry\r\n\t\t\t;\r\n\r\n\t\t\treturn html;\r\n\r\n\t\t} // getEditTemplate", "function edit() {\n\trow = $(this).closest(\"tr\"); // Table row that contains the experiment data\n\t$(\"#descr\").val($(\"td:eq(0)\", row).html());\n\t$(\"#expid\").val($(\"td:eq(1)\", row).html()); // Experiment id \n\t$(\"#videourl\").val($(\"td:eq(2)\", row).html());\n\t$(\"#controls\").val($(\"td:eq(3)\", row).html());\n\t$(\"#question\").val($(\"td:eq(4)\", row).html());\n\t$(\"#info\").val($(\"td:eq(5)\", row).html());\n\t$(\"#submit\").val(\"Update\"); // Submit button label\n\t$(\"#action\").val(\"1\"); // Action code for an update\n\t$(\"#videoinfo\").overlay().load(); // Open form as an overlay\n\ttoControls($(\"#controls\").val()); // Fill form controls\n}", "function editBlogPost(client, id, object, callBack){\n client.HGET('posts', id, function(error, reply){\n var blogPost = JSON.parse(reply);\n blogPost.title = object.title;\n blogPost.body = object.body;\n client.HSET('posts', id, JSON.stringify(blogPost), callBack)\n })\n}", "function fhArrival_editMode() {\n\n\tjQuery('.fhArrival_viewMode').hide();\n\t\n\tjQuery('.fhArrival_viewField').each(function () {\n\t\tvar editField = jQuery(this).attr('data-view-for');\n\t\tjQuery('#' + editField).val(jQuery(this).html());\n\t})\n\t\n\tjQuery('.fhArrival_editMode').show();\n\t\n\tfhArrival_data.currentMode = \"EDIT\";\n\t\n}", "function showEditPost(){\n var id = this.get('id').toInt();\n var content = $(id +'pComment').get('text'); // Current post text\n if ($(id+'editPostForm') == null) { // If there isn't already a form\n var editForm = new EditPostForm(id, content);\n $(id +'pComment').setStyle('display', 'none'); // Hide the comment\n editForm.display().inject($(id+'pComCont')); // Add the form\n }\n else { // If there is already a form\n $(id+'editPostForm').dispose(); // Remove the form\n $(id +'pComment').setStyle('display', 'block'); // Redisplay the comment\n } \n}", "function getAjaxRetrieveEDIT() {\r\n\t$.ajax({\r\n\t\turl: 'processEdit.php',\r\n\t\ttype: 'POST',\r\n\t\tdata: '',\r\n\t\tsuccess: function(response) {\r\n\r\n\t\t\tif (response === 'index.php?failure=noIDFound') {\r\n\t\t\t\twindow.location.href = 'index.php?failure=noIDFound';\r\n\t\t\t} else {\r\n\t\t\t\tresponse = JSON.parse(response);\r\n\t\t\t\tconsole.log(response);\r\n\r\n\t\t\t\t$('#deleteBtn').val(response[0].id);\r\n\t\t\t\t$('#updateCms').val(response[0].id);\r\n\t\t\t\t$('#evenement').val(response[0].evenement);\r\n\t\t\t\t$('#datum_begin').val(response[0].datum_begin);\r\n\t\t\t\t$('#datum_eind').val(response[0].datum_eind);\r\n\t\t\t\t$('#Prijs').val(response[0].prijs);\r\n\t\t\t\t$('#max_deelname').val(response[0].max_deelnemers);\r\n\t\t\t\t$('#table_name').val(response[0].table_name);\r\n\r\n\t\t\t\tif (response[0].text_extra !== 'd-none') {\r\n\t\t\t\t\t$('#check1').click();\r\n\t\t\t\t\t$('#text_extra').val(response[0].text_extra);\r\n\t\t\t\t} \r\n\r\n\t\t\t\tif (response[0].text_vervoer !== 'd-none') {\r\n\t\t\t\t\t$('#check2').click();\r\n\t\t\t\t\t$('#text_vervoer').val(response[0].text_vervoer);\r\n\t\t\t\t\tgetVervoer(response[0].id);\r\n\t\t\t\t} \r\n\r\n\t\t\t\tif (response[0].vegetarisch !== 'd-none') {\r\n\t\t\t\t\t$('#check3').click();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (response[0].text_editie !== 'd-none') {\r\n\t\t\t\t\t$('#check4').click();\r\n\t\t\t\t\t$('#text_editie').val(response[0].text_editie);\r\n\t\t\t\t\tgetTextEditie(response[0].id);\r\n\t\t\t\t} \r\n\r\n\t\t\t\tif (response[0].text_accomodatie !== 'd-none') {\r\n\t\t\t\t\t$('#check5').click();\r\n\t\t\t\t\t$('#text_accomodatie').val(response[0].text_accomodatie);\r\n\t\t\t\t\tgetAccomodatie(response[0].id);\r\n\t\t\t\t} \r\n\r\n\t\t\t\tif (response[0].annuleringsverzekering !== 'd-none') {\r\n\t\t\t\t\t$('#check6').click();\r\n\t\t\t\t} \r\n\r\n\t\t\t\tif (response[0].text_verhuur !== 'd-none') {\r\n\t\t\t\t\t$('#check7').click();\r\n\t\t\t\t\t$('#text_verhuur').val(response[0].text_verhuur);\r\n\t\t\t\t\tgetVerhuur(response[0].id);\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}", "function renderAddEditEntry(entry = null) {\n return `\n\t\t<div class=\"nav-bar\">\n\t\t<div class=\"nav-1\">\n\t\t\t<div class=\"nav-link\"><a href=\"\" class=\"my-journal-button\">My Profile</a></div>\n\t\t\t<div class=\"nav-link\"><a href=\"\" class=\"js-logout-button\">Log out</a></div>\n\t\t</div>\n\t</div>\n\t\n\t<main role=\"main\" class=\"edit-journal-entry\">\n\t\t<div class=\"dashboard-header\">\n <h2>Edit My Place</h2>\n <hr class=\"style-two hr-2\">\n\t\t</div>\n\t\t<form id=\"js-edit-form\" ${entry ? `data-entryid=\"${entry.id}\"` : \"\"}>\n\t\t<div class=\"save-delete\">\n\t\t\t<button type = \"submit\" class=\"save\" id=\"js-save-button\">Save</button>\n\t\t\t<button class=\"cancel\" id=\"js-cancel-button\">Cancel</button>\n\t\t</div>\n\t\t<section class=\"edit-entry\">\n\t\t\t<div class=\"entry-title\">\n\t\t\t\t<input type=\"text\" name=\"journal-title\" id=\"journal-title\" placeholder=\"Name of place\" maxlength=\"70\" type=\"text\" \n\t\t\t\t${entry ? `value=\"${entry.title}\"` : \"\"} required>\n </div>\n\t\t\t<div class=\"entry-date\">\n\t\t\t\t<input type=\"date\" name=\"travel-date\" id=\"travel-date\" placeholder=\"Date of place\"\n\t\t\t\t${entry ? `value=\"${entry.travelDate}\"` : \"\"}>\n\t\t\t</div>\n <div class=\"entry-photo\" id = \"entry-photo\">\n\t\t\t\t<input type=\"text\" name=\"entry-photo\" id=\"main-image\" ${\n entry\n ? ` value=\"${entry.coverPhoto}\"`\n : `placeholder=\"Paste Image Link\"`\n }>\n\t\t\t</div>\n\t\t</section>\n\t\t</form>\t\n </main>\n <footer class=\"footer\">\n <p>\n Created by: Brian Thomas\n <a href=\"https://github.com/Bjthomas11\" target=\"_blank\"><i class=\"fab fa-github\"></i></a>\n </p>\n </footer>\n\t`;\n}", "loadArticles(request, replace) {\n $.ajax({\n url: '/Vuvuzela/services/article/get_articles.php',\n type: 'GET',\n data: request,\n success: (msg) => {\n if(msg['status'] === 'error') {\n this.showError();\n console.log(msg['errorMsg']);\n } else if(msg['status'] === 'success') {\n let articles = msg['data'];\n if(replace)\n this.setContent(articles, request['type'], request['tag'], request['keyword'])\n else\n this.addContent(articles)\n }\n },\n error: (jqXHR, textStatus, errorThrow) => {\n this.showError();\n console.log(jqXHR.responseText + \"\\n\" + textStatus + \"\\n\" + errorThrow)\n },\n dataType: 'json'\n });\n }", "function updateEditNotePage(urlObj, options) {\n\tvar index = urlObj.hash.replace( /.*index=/, \"\" ),\n\t\tpageSelector = urlObj.hash.replace( /\\?.*$/, \"\" );\n\tvar dataJSON = jQuery.parseJSON(localStorage.getItem(index)),\n\t\t$page = $( pageSelector );\n\tvar textfield = \"<b><label class='label'>Note Title:</label></b>\" +\n\t\t\t\t\t\"<input id='editNoteTitle' type='text' class='textInput' value='\" + \n\t\t\t\t\tdataJSON.title + \"'></input><b><label id='todoLabel' class='label'>\" + \n\t\t\t\t\t\"TODO:</label></b><textarea id='editNoteText' class='textInput'>\" +\n\t\t\t\t\tdataJSON.note + \"</textarea>\";\n\t\n\t$content = $page.children(\":jqmData(role=content)\");\n\t$content.html(textfield);\n\t$page.page();\n\t$(\"input\").textinput();\n\t$(\"textarea\").textinput();\n\t$(\"#editNoteText\").TextAreaResizer();\n\toptions.dataUrl = urlObj.href;\n\t$.mobile.changePage( $page, options );\n\tupdatePageLayout(\"#editNoteContent\", \"#editNoteHeader\", \"#editNoteNavbar\");\n}", "function editManager(){\nvar serviceID=window.location.href;\nvar start = serviceID.indexOf(\"&\");\nvar editor=null;\n\nvar importJSONSink = sessionStorage.getItem(\"jsonSink\");\n\n//PUT - UPDATE SELECTED SERVICE\nif(start != -1){\n\tconsole.log(\"start !=-1\");\n\tvar len = serviceID.length - start - 1;\n\tserviceID = serviceID.substr(start+1, len);\n\tvar starting_value=\"{}\"\n\t$(function() {\n\t\t//findById_apipath\n\t\tvar url = \"http://\"+app_parameters.host_param+\":\"+app_parameters.port_param+\"/\"+app_parameters.findById_apipath+serviceID;\n\t\tconsole.log(\"composed url: \"+url);\n\t\t$.get( url, function( data ) {\n\t\t\tconsole.log(\"STAMPA DI CONTROLLO:\"+data);\n\t\t\tconsole.log(data);\n\t\t\t\n\t\t if(importJSONSink){\n\t\t\tconsole.log(\"inside importJSONSink, valorized\");\n\t\t\tconsole.log(importJSONSink);\n\t\t\tstarting_value = JSON.parse(importJSONSink);\n\t\t }\n\t\t else{\n\t\t\tstarting_value=data;\n\t\t }\n\t\t // Initialize the editor\n\t\t editor = new JSONEditor(document.getElementById('editor_holder'),{\n\t\t\t// Enable fetching schemas via ajax\n\t\t\tajax: true,\n\t\t\t\n\t\t\t// The schema for the editor\n\t\t\tschema: {\n\t\t\t $ref: schemaDir/*,\n\t\t\t format: \"grid\"*/ //no tab version\n\t\t\t},\n\t\t\t\n\t\t\t// Seed the form with a starting value\n\t\t\tstartval: starting_value\n\t\t });\n\t\t \n\t\t if(importJSONSink){\n\t\t\t//Clear the sessionStorage to implement standard behaviour on refreshing page\n\t\t\tsessionStorage.removeItem('jsonSink');\n\t\t }\n\t\t \n\t\t \n\t\t // Hook up the validation indicator to update its status whenever the editor changes\n\t\t editor.on('change',function() {\n\t\t\t// Get an array of errors from the validator\n\t\t\tvar errors = editor.validate();\n\t\t\tvar indicator = document.getElementById('valid_indicator');\n\t\t\t// watcher on concepts fields\n\t\t\tvar watcherCallback = function(path) {\n\t\t\t console.log(\"field with path: [\" + path + \"] changed to [\" + JSON.stringify(this.getEditor(path).getValue()) + \"]\");\n\t\t\t var e=$('select[name=\"' + this.getEditor(path).select2[0].name + '\"]');\n\t\t\t var nameValue = e[0].options[e[0].selectedIndex].text;\n\t\t\t console.log(path.substr(0,path.lastIndexOf(\".\") + 1)+\".name\");\n\t\t\t this.getEditor(path.substr(0,path.lastIndexOf(\".\") + 1)+\"name\").setValue(nameValue);\n\t\t\t \n\t\t\t}\n\t\t\tfor (var key in editor.editors) {\n\t\t\tvar regex = \".conceptId\";\n\n\t\t\t if (editor.editors.hasOwnProperty(key) && key.match(regex)) {\n\t\t\t\teditor.watch(key, watcherCallback.bind(editor, key));\n\t\t\t }\n\t\t\t}\n\t\t });\n\t\t \n\t\t \n\t\t // Hook up the submit button to log to the console\n\t\t document.getElementById('submit').addEventListener('click',function() {\n\n\t\t\tif (confirm('Il servizio verrà modificato, sei sicuro di voler procedere?')){\n\t\t\t\t\n\t\t\t\tvar payload = editor.getValue();\n\t\t\t\t\n\t\t\t\t//console.log(\"UPDATING SERVICE, submitting to CDV: \");\n\t\t\t\t//console.log(payload);\n\t\t\t\t\n\t\t\t\t//PUT - update_apipath\n\t\t\t\tvar url_ = \"http://\"+app_parameters.host_param+\":\"+app_parameters.port_param+\"/\"+app_parameters.update_apipath+serviceID;\n\t\t\t\t//console.log(\"composed url: \"+url_);\n\t\t\t\t$.ajax({\n\t\t\t\t\turl: url_,\n\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\tcontentType: \"application/json\",\n\t\t\t\t\tdata: JSON.stringify(editor.getValue()),\n\t\t\t\t}).done(function(data) {\n\t\t\t\t\t//console.log(\"RIPOSTA PUT MODIFICA NUOVO SERVIZIO: \"+data);\n\t\t\t\t\t//console.log(data);\n\t\t\t\t\t\n\t\t\t\t\tvar nome = payload.publicServiceName.replace(\" \",\"-\");\n\t\t\t\t\twindow.location.href = window.location.origin+\"/service-editor/edit-service.html?\"+nome+\"&\"+payload.publicServiceID;\n\t\t\t\t\n\t\t\t\t}).fail(function() {\n\t\t\t\t alert( \"Errors occurred in service update. Please be careful and try again...\" );\n\t\t\t\t})\n\t\t\t}\n\t\t });\n\t\t \n\t\t // Hook up the Restore to Default button\n\t\t document.getElementById('restore').addEventListener('click',function() {\n\t\t\teditor.setValue(starting_value);\n\t\t });\n\t\t});\n\t });\n}\n//POST - ADDING NEW SERVICE\nelse{\n\t//console.log(\"start -1\");\n\t $('#submit').text(\"Create Service\");\n\t $('#restore').hide();\n\t // Initialize the editor\n\t if(importJSONSink){\n\t\t\t//console.log(\"inside importJSONSink, valorized\");\n\t\t\t//console.log(importJSONSink);\n\t\t\tstarting_value = JSON.parse(importJSONSink);\n\t\t\t\n\t\t\t \n\t\t\teditor = new JSONEditor(document.getElementById('editor_holder'),{\n\t\t\t // Enable fetching schemas via ajax\n\t\t\t ajax: true,\n\t\t\t // The schema for the editor\n\t\t\t schema: {\n\t\t\t\t$ref: schemaDir/*,\n\t\t\t\tformat: \"grid\"*/ //no tab version\n\t\t\t },\n\t\t\t\n\t\t\t // Seed the form with a starting value\n\t\t\t startval: starting_value\n\t\t });\n\t }\n\t else{\n\t\t \n\t\t editor = new JSONEditor(document.getElementById('editor_holder'),{\n\t\t\t// Enable fetching schemas via ajax\n\t\t\tajax: true,\n\t\t\t// The schema for the editor\n\t\t\tschema: {\n\t\t\t $ref: schemaDir/*,\n\t\t\t format: \"grid\"*/ //no tab version\n\t\t\t}\n\t\t });\n\t }\n\t \n\t \n\t // Hook up the validation indicator to update its status whenever the editor changes\n\t\t editor.on('change',function() {\n\t\t\t// Get an array of errors from the validator\n\t\t\tvar errors = editor.validate();\n\t\t\tvar indicator = document.getElementById('valid_indicator');\n\t\t\t// watcher on concepts fields\n\t\t\tvar watcherCallback = function(path) {\n\t\t\t console.log(\"field with path: [\" + path + \"] changed to [\" + JSON.stringify(this.getEditor(path).getValue()) + \"]\");\n\t\t\t var e=$('select[name=\"' + this.getEditor(path).select2[0].name + '\"]');\n\t\t\t var nameValue = e[0].options[e[0].selectedIndex].text;\n\t\t\t this.getEditor(\"root.publicServiceIsDescribedAt.0.dataMapping.0.name\").setValue(nameValue);\n\t\t\t \n\t\t\t}\n\t\t\tfor (var key in editor.editors) {\n\t\t\tvar regex = \".conceptId\";\n\n\t\t\t if (editor.editors.hasOwnProperty(key) && key.match(regex)) {\n\t\t\t\teditor.watch(key, watcherCallback.bind(editor, key));\n\t\t\t }\n\t\t\t}\n\t\t });\n\t \n\t \n\t if(importJSONSink){\n\t\t\t//Clear the sessionStorage to implement standard behaviour on refreshing page\n\t\t\tsessionStorage.removeItem('jsonSink');\n\t }\n\t \n\t // Hook up the submit button to log to the console\n\t document.getElementById('submit').addEventListener('click',function() {\n\n\t\tif (confirm( 'Il servizio verrà creato, sei sicuro di voler procedere?')){ \n\t\t\t\n\t\t\tvar payload = editor.getValue();\n\t\t\t\n\t\t\t//console.log(\"REGISTERING NEW SERVICE, submitting to CDV: \");\n\t\t\t//console.log(payload);\n\t\t\t\n\t\t\t//POST - create_apipath\n\t\t\tvar url_ = \"http://\"+app_parameters.host_param+\":\"+app_parameters.port_param+\n\t\t\t\t\t\t\"/\"+app_parameters.create_apipath;\n\t\t\t$.ajax({\n\t\t\t\turl: url_,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tcontentType: \"application/json\",\n\t\t\t\tdata: JSON.stringify(editor.getValue()),\n\t\t\t}).done(function(data) {\n\t\t\t\t//console.log(\"RIPOSTA POST REGISTRAZIONE NUOVO SERVIZIO: \"+data);\n\t\t\t\t//console.log(data);\n\t\t\t\t\n\t\t\t\tvar nome = payload.publicServiceName.replace(\" \",\"-\");\n\t\t\t\twindow.location.href = window.location.origin+\"/service-editor/edit-service.html?\"+nome+\"&\"+payload.publicServiceID;\n\t\t\t\n\t\t\t}).fail(function() {\n\t\t\t alert( \"Errors occurred in service registration. Please be careful and try again...\" );\n\t\t\t})\n\t\t}\n\t });\n\t \n\t /* Old jsonEditor dummy RESTORE feature\n\t * // Hook up the Restore to Default button\n\t document.getElementById('restore').addEventListener('click',function() {\n\t\teditor.setValue(starting_value);\n\t });*/\n}\n}", "function redir($inputid){\n //get id from jquery search selesctor\n let my_search = ($inputid.val());\n let id = $(\"#articles option[value='\" + my_search + \"']\").attr('data-id');\n // check for valid title, if not don't Submit\n if (badtitle(my_search) || my_search.length <1\n || my_search.length > 50 || id == undefined\n )\n {\n alert(\"Invalid search!!\");\n } else {\n var style;\n $.ajax({\n url: '/indexshoweditsection',\n data: {},\n type: 'POST',\n datatype: 'json',\n success: function(data) {\n console.log(data.type);\n console.log(\"none\" == data);\n if (\"in\" == data) {\n style = \"\";\n } else if (\"out\" == data) {\n style = \"none\";\n }\n }, error: function(error) {\n console.log(error);\n }\n });\n $.ajax({\n url: '/searcharticleredir',\n data: {'id': id},\n type: 'POST',\n datatype: 'json',\n success: function(data) {\n //console.log('received json of: ' + data);\n myObj = JSON.parse(data);\n console.log(data);\n //<button onclick=\\\"bookmarkDiv(this)\\\" type=\\\"button\\\">Bookmark</button>\\\n if (!myObj.articlefound) {\n alert('\"'+ my_search + '\" not in database, please try again');\n }\n else {\n //generate unique id for editing\n let editnum = globaleditcounter.toString();\n globaleditcounter = globaleditcounter + 1;\n //add unique id to datalist\n var div = $(\n \"<div id='adding'\" + \" data-id=\" + myObj.id + \"> \\\n <div class='knowlheader border border-dark'><span class='knowltitle'>\"+myObj.title+\" - Level \"+myObj.level+\"</span>\\\n <button class=\\\"editerB editButton editmode \"+myObj.id+ \" knowl-button \" + \"\\\"type=\\\"button\\\" style='display:\"+\";'>Edit</button>\\\n <button class=\\\" knowl-button \\\" onclick=\\\"removeDiv(this)\\\" type=\\\"button\\\">X</button></div>\\\n <div class='addLinkOptions editmode' style='display: none'>\\\n <span class='editmode'>Add Knowl Link</span>\\\n <input onkeyup='editsuggest(this)' class='editAddLink editmode' list='editlist\" + editnum + \"' name='titlelist' data-editid=\" + editnum + \">\\\n <br><datalist class='editlinkstoadd editmode' id='editlist\" + editnum + \"'></datalist>\\\n <button class=\\\" addLinkButton editmode \\\" style=\\\"\\\" type=\\\"button\\\">Add Link</button>\\\n </div>\\\n <div class =\\\"editbox editmode\\\" style=\\\"display:none;\\\"> <textarea style=\\\"width:100%;height:220px;\\\" class='editContent editmode'></textarea></div>\"\n + `<button class=\"leftbutton button\" data-id=\"\"> < </button>\n <button class=\"rightbutton button\" data-id=\"\"> > </button>`\n + \"<div class='knowlcontent1'>\" + myObj.content + \"</div>\" +\n \"<div class='knowlfooter border border-dark'>\" +\n \"<a href=''>link 1 </a>\" + \"<a href=''>link 2 </a>\" + \"<a href=''>link 3</a>\" +\n \"</div>\"+\n \"</div>\");\n\n //$('#articles-searched').prepend(div.addClass(\"boxed\"));\n $('#entry-content').prepend(div.addClass(\"boxedin\"));\n if (!myObj.cangoleft) {\n $('#adding').children('.leftbutton').hide();\n } else {$('#adding').children('.leftbutton').attr('data-id', myObj.leftid);}\n if (!myObj.cangoright) {\n $('#adding').children('.rightbutton').hide();\n } else {$('#adding').children('.rightbutton').attr('data-id', myObj.rightid);}\n if (myObj.type == \"TextKnowl\") {\n let edittext = $('div#adding div.knowlcontent1 p').html();\n $('div#adding textarea.editContent').html(edittext);\n console.log('Textknowl edittext is: ', edittext);\n } else if (myObj.type == \"Video\") {\n let edittext = $('div#adding iframe').attr('src');\n $('div#adding textarea.editContent').html(edittext);\n console.log('video edittext is: ', edittext);\n } else {\n let edittext = $('div#adding div.knowlcontent1 div').html();\n $('div#adding textarea.editContent').html(edittext);\n console.log('last edittext is: ', edittext);\n }\n //on clientside, process teX equations after submit\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, $('#adding .knowlcontent1').get(0)]);\n //if not signedin (no creation form) then remove edit button\n if ($('.newarticle').length == 0) {\n $('.editerB').hide();\n }\n //remove the marker of nowl we just added\n $('#adding').removeAttr('id');\n }\n },\n error: function(error) {\n console.log(error);\n }\n });\n }\n }", "function loadEditView() {\n app.router.load('contactEdit', {id: contact._id });\n }", "function editBlog()\n{\n alert('to do: editBlog: ' + this.id.substring(6));\n return false;\n}", "function edit_post(req, res) {\n var data = {\n action: req.url\n };\n\n if (req.params.postid) {\n\n console.log(req.method);\n\n if (req.method === 'POST') {\n Posts.findByIdAndUpdate(req.params.postid, {\n title: req.body.title,\n content: req.body.content\n }, {new: true}, function(err, post) {\n if (err) {\n req.flash('error', 'Error!');\n res.redirect('/admin/posts');\n return;\n }\n\n req.flash('success', 'Saved!');\n data.item = post;\n res.render('admin/pages/edit-post', { title: 'Posts', data: data, messages: req.flash() }); \n })\n }\n if (req.method === 'GET') {\n Posts.findById(req.params.postid, function(err, item) {\n if (err) {\n req.flash('error', 'Error!');\n res.redirect('/admin/posts');\n return;\n }\n \n data.item = item;\n res.render('admin/pages/edit-post', { title: 'Posts', data: data, messages: req.flash() }); \n });\n }\n \n\n } else {\n if (req.body.title) {\n\n Posts.create({\n title: req.body.title,\n content: req.body.content\n }, function (err, small) {\n if (err) {\n req.flash('error', 'Not Create Post!');\n resp.redirect('/admin/post/add');\n //res.render('admin/pages/edit-post', { title: 'Posts', options: options, messages: req.flash() }); \n }\n // saved!\n req.flash('success', 'Saved!');\n res.redirect('/admin/post/add');\n });\n\n } else {\n res.render('admin/pages/edit-post', { title: 'Posts', data: data, messages: req.flash() });\n }\n } \n}", "function postEdit(id) {\n updateId = id;\n axios.get(`api/posts/${id}`)\n .then((res)=> {\n editTitle.value = res.data.title;\n editDesc.value = res.data.description;\n })\n .catch(errors=> {\n console.log(errors.response);\n })\n}", "handleEdit(id){\n window.location = '/journalists/edit/' + id\n }", "function edit(type, index) {\n\t\n\t// disable all of screen until the response so that there won't be any collisions\n\t$(\"#menuArea, #viewArea, #officialViewer\").addClass(\"disableButtons\");\n\t\n\t// get correct id to get statCol button element (delete and cancel don't have ids)\n\tvar id_type = (type == 'cancel' || type == 'delete') ? 'stat' : type;\n\t// get correct element\n\tvar elem = $(\"#\" + id_type + \"_\" + index);\n\t// confirm a cancel, which takes immediate effect in removing a definition from staging\n\tif(type == 'cancel' && !confirm(\n\t\t\t\"Are you sure you want to revert all unpublished changes to this entry?\")) {\n\t\t$(\"#menuArea, #viewArea, #officialViewer\").removeClass(\"disableButtons\");\n\t\treturn;\n\t}\n\t\n\t// if published, stat button should have no effect (can't be accepted without a change)\n\tif(type == 'stat' && elem.text() == 'unedited') {\n\t\t$(\"#menuArea, #viewArea, #officialViewer\").removeClass(\"disableButtons\");\n\t\treturn;\n\t}\n\t\n\t// request change\n\t$.post('backend.php', {'loginInfo': {'allowed': true, 'user': 'me'},\n\t\t\t\t\t\t\t'mod': {'wordId': words[index]['wordData']['id'],\n\t\t\t\t\t\t\t\t'field': type, 'new': elem.val(),\n\t\t\t\t\t\t\t\t'deleteToggled': (words[index]['stagingData']['deleted']\n\t\t\t\t\t\t\t\t\t\t\t&& type == \"stat\") || type == 'delete'}},\n\t\t\tfunction(data, status, jqXHR) {\n\t\t\t\t// called on server response\n\t\t\t\tif(data['status']['type'] == 'success') {\n\t\t\t\t\t// don't alert user, since success is assumed, and keep server's change\n\t\t\t\t\twords[index] = data['new'];\n\t\t\t\t\tif(words[index] == true) {\n\t\t\t\t\t\t// the change was a removal (cancel), so reload the page\n\t\t\t\t\t\tsubmitSearch(true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// standard edit.\n\t\t\t\t\t\telem.parent().parent().replaceWith(createTableEntry(words[index],\n\t\t\t\t\t\t\t\tindex));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// alert user of failure and revert change\n\t\t\t\t\telem.parent().parent().replaceWith(createTableEntry(words[index], index));\n\t\t\t\t\talert(\"The change you made to the word \"\n\t\t\t\t\t\t\t+ words[index]['wordData']['word'] + \" (\"\n\t\t\t\t\t\t\t+ words[index]['wordData']['pos'] + \", \"\n\t\t\t\t\t\t\t+ words[index]['wordData']['id'] + \") failed and were reverted.\"\n\t\t\t\t\t\t\t+ \"They were most likely badly formatted\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// unlock screen so the user can continue\n\t\t\t\t$(\"#menuArea, #viewArea, #officialViewer\").removeClass(\"disableButtons\");\n\t\t\t}, 'json');\n}", "function runEdit() {\n $(RUN_EDIT).val($(GITHUB_URL).attr('href'));\n $(RUN_EDIT_FORM).submit();\n }", "function runEdit() {\n $(RUN_EDIT).val($(GITHUB_URL).attr('href'));\n $(RUN_EDIT_FORM).submit();\n }", "editNote(e) {\n e.preventDefault();\n fetch(config.API_ENDPOINT + \"/api/notes/\" + this.state.id, {\n method: \"PATCH\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(this.state),\n })\n .then((res) => {\n if (!res.ok) {\n throw new Error(\"Something went wrong, please try again later.\");\n }\n return res;\n })\n .then((res) => {\n this.context.editNote();\n this.setState({ ...res.body, error: null });\n })\n .catch((err) => {\n this.setState({\n error: \"Unable to edit note. Please try again later.\",\n });\n });\n }", "function setupEditContent() {\n var $wp = $('.write-pages li'); // the list of book pages\n // make sure the index is in bound wrapping at the ends\n if (editIndex < 0) {\n editIndex = $wp.length - 1;\n } else if (editIndex >= $wp.length) {\n editIndex = 0;\n }\n var $page = $($wp.get(editIndex)); // the current page\n var $img = $page.find('img');\n var caption = $page.find('p.thr-caption').html() || '';\n var view = {\n image: {\n url: $img.attr('src'),\n width: $img.attr('data-width'),\n height: $img.attr('data-height')\n },\n caption: caption ? caption : $('.wlClickToEdit').html()\n };\n templates.setImageSizes(view.image); // size the image\n var $content = $(templates.render('bookPage', view)); // render like any book page\n $content.filter('a.thr-home-icon,a.thr-settings-icon').hide(); // remove some unneeded links\n $editDialog.empty().append($('.wEditHelp').html()).append($content); // update dialog body\n var $deleteIcon = $('<img class=\"deleteIcon\" src=\"/theme/images/delete.png\" />');\n $deleteIcon.attr('title', $('.wDeleteThisPage').html());\n $editDialog.append($deleteIcon);\n var $copyIcon = $('<img class=\"copyIcon\" src=\"/theme/images/copy.png\" />');\n $copyIcon.attr('title', $('.wCopyThisPage').html());\n $editDialog.append($copyIcon);\n $editDialog.dialog('option', 'title', ''); // clear the title\n $editDialog.find('p.thr-caption').toggleClass('text-too-long',\n caption.length >= maxCaptionLength);\n }", "function edit_note(note_id, note_name) {\n fetch(`${note_name}/edit/${note_id}`)\n .then(response => response.json())\n .then(notes => {\n Array.prototype.forEach.call(notes.task, note => {\n document.querySelector(`#edit-note-${note.id}`).style.display == 'block'\n document.getElementById(`edit-note-${note.id}`).innerHTML = `<form id=\"edit_note\"> <textarea rows=\"5\" cols=\"45\" id=\"newnote\">${note.note}</textarea> <br> <button class=\"save_edit btn btn-dark\" type=\"submit\"> Save </button></form>`;\n\n document.querySelector('#edit_note').onsubmit = function() {\n fetch(`${note_name}/edit/${note_id}`, {\n method: 'PUT',\n body: JSON.stringify({\n note: document.querySelector('#newnote').value\n })\n })\n }\n })\n })\n }", "function updateEntityPreviewContent() {\r\n if (currentEntity) {\r\n // first get the contentContainer for the entity's preview\r\n var contentContainer = $(\"#\" + currentEntity.id + \" > div\");\r\n // create the contentContainer if it doesn't exist:\r\n if (!contentContainer[0])\r\n contentContainer = createEntityPreview(currentEntity);\r\n \r\n // add/update the appropriate contents\r\n switch(currentEntity.type) {\r\n case \"image\" :\r\n // get the image element in the contentContainer\r\n var image = $(\"#\"+currentEntity.id + \" > img\");\r\n //empty the contentContainer and create a new image contentContainer if one doesn't exist\"\r\n if(!image[0]) {\r\n image = $(\"<img>\");\r\n contentContainer.empty();\r\n contentContainer.append(image);\r\n }\r\n // set the image's source\r\n image.src = currentEntity.content;\r\n break;\r\n case \"textbox\" :\r\n // clear the current content of the contentContainer\r\n contentContainer.empty();\r\n // slice the content along line breaks so <br> tags are not needed\r\n var lines = currentEntity.content.split(/(\\r\\n)|(^\\r\\n)/gm);\r\n // add each entry to the contentContainer seperated by line breaks\r\n for (var i = 0; i < lines.length; ++i)\r\n contentContainer.append(\"\" + lines[i] + \"<br>\");\r\n break;\r\n case \"bulletlist\" :\r\n // get the contentContainer for the entitiy:\r\n var list = contentContainer.children(\"ul\");\r\n // empty the div and create a new list if one does'nt exist:\r\n if(!list[0]) {\r\n contentContainer.empty();\r\n var list = $(\"<ul><ul>\");\r\n contentContainer.append(list);\r\n }\r\n // empty the list:\r\n list.empty();\r\n // slice the content along line breaks to get the list entries:\r\n var entries = currentEntity.content.split(/(\\r\\n|^\\r\\n)/gm);\r\n // add each entry to the list:\r\n for (var i = 0; i < entries.length; ++i)\r\n $(\"<li>\"+entries[i]+\"</li>\").appendTo(list);\r\n }\r\n }\r\n}" ]
[ "0.64214396", "0.6407961", "0.60427153", "0.5922153", "0.573828", "0.55590856", "0.55590856", "0.55590856", "0.55590856", "0.55590856", "0.55590856", "0.55590856", "0.55445784", "0.5543667", "0.5519542", "0.54975885", "0.5430651", "0.53749865", "0.53735715", "0.52708316", "0.5261584", "0.52600175", "0.5249382", "0.5242866", "0.52293724", "0.52187485", "0.52162254", "0.52159303", "0.51933014", "0.51736265", "0.51671827", "0.5160768", "0.51544833", "0.51540905", "0.5151011", "0.5126755", "0.51081544", "0.51075774", "0.51060426", "0.5105854", "0.50807685", "0.50752944", "0.5063959", "0.5062466", "0.5060075", "0.5048368", "0.50431645", "0.50335103", "0.50192136", "0.5016978", "0.5012946", "0.5006854", "0.50039744", "0.50024635", "0.4998985", "0.49888742", "0.49865115", "0.49834335", "0.4966913", "0.49653682", "0.49613118", "0.49584812", "0.49584663", "0.49566272", "0.49473497", "0.49453703", "0.49451676", "0.49417654", "0.49357578", "0.4933704", "0.49322066", "0.49253255", "0.49204317", "0.49094105", "0.49092102", "0.49058774", "0.49045685", "0.49012592", "0.4900185", "0.4897", "0.48959583", "0.48949778", "0.48847985", "0.4877111", "0.4868266", "0.4863835", "0.48558903", "0.48323327", "0.48307016", "0.4830363", "0.48174247", "0.48113278", "0.48093814", "0.48047665", "0.47957444", "0.47957444", "0.47915125", "0.4785048", "0.47799844", "0.47795314" ]
0.6668005
0
ALL the Help Functions: Function that runs when: On loading of the page
function help(){ document.getElementById("body").innerHTML = ` <html lang="en"> <head > <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> <title>Help Page</title> </head> <body> <div class="row"> <div class="col-md-12"> <div class="mx-auto" style="width: 200px;"> <h1>Help Page</h1> <div class="text-justify"> <p>Hi there, please state your <strong>Issue</strong> and preferred <strong>Means of Communication</strong> before clicking the <strong>Next</strong> button.</p> </div> <!--Issue--> <div class="text-justify" id = "text"> <label><p><strong>Issue:</strong></p></label><br> <input type = "radio" name = "Issue" id = "general" value = "General" checked = "checked"/> <label for = "General">General</label><br> <input type = "radio" name = "Issue" id = "password" value = "Password"/> <label for = "password">Password</label><br> <input type = "radio" name = "Issue" id = "others" value = "Others"/> <label for = "Others">Others</label><br> </div> <!--Means of Communication--> <div class="text-left"> <label><p><strong>Means of Communication:</strong></p></label> <input type = "radio" name = "MoC" id = "Chat" value = "Chat" checked = "checked"/> <!-- onclick="checkFunc1()"/>--> <label for = "Chat">Chat</label><br> <input type = "radio" name = "MoC" id = "Call" value = "Call"/> <!-- onclick="checkFunc1()"/>--> <label for = "Call">Call</label><br> </div> <!--Next Button--> <!-- <a href="chat.html">--> <button type="button" id="Next" onclick="checkFunc()" class="btn btn-primary btn-lg btn-block">Next</button> <!-- </a>--> <!--About the Team--> <div class="mt-5"> <h10><small>SUTD ISTD Class of 2021 Cohort 3 Group 5.</small></h10> </div> </div> </div> </div> </body> </html> `; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n // THIS IS THE CODE THAT WILL BE EXECUTED ONCE THE WEBPAGE LOADS\n }", "function homePageLoader() {\n\n pageCreator(\"home-page\");\n navBar(\"home-page\");\n restaurantLogo();\n bookTableBtn(\"home-page\");\n socialMedia();\n}", "onPageReady () {}", "function startatLoad(){\r\n\tloadNavbar(function(){\r\n\t\tgetPT1000XMLData(function(){\r\n\t\t\tshowPT1000values();\r\n\t\t});\r\n\t});\r\n}", "function initialisePage(){\n\t\t\tcurrent_tab = \"about\";\n\t\t\tgenerateNav(register_navevents);\n\t\t\tgenerateFramework(current_tab, generatePage);\n\t\t\t// Enable button again\n\t\t\tbuttonOff();\n\t\t}", "function onPageLoaded() {\n}", "function onPageInit(e){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "function aboutSetup(){\n\n}", "function DisplayInfo(){\n\t$(\"#content\").html('');\n\t\n\t$(\"#content\").append(\"<div class='page-header'><h1>\"+Language[\"Hints\"]+\"</h1></div>\");\n\tif (Debug)\n\t\tAddWarning();\n\t$(\"#content\").append(Language[\"WelcomeText\"]);\n\t$(\"#content\").append(\"<a id='startTestButton' class='btn btn-primary btn-lg' role='button'>\"+Language[\"StartTest\"]+\"</a>\");\n\t$(\"#content\").fadeIn();\n\t$(\"#startTestButton\").click(function(){\n\t\tLoadQuestion(-1);\n\t});\n;}", "function load_report_page() {\n page = 'user_help';\n load_page();\n}", "function showHelp(){\n showListHelp();\n}", "function onPageInit(e){\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "function onPageInit(e){\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "function setupHelp() {\n\tupkeep();\n\tradioButtonEvent();\n\t\n\t// load first step\n\thelp_description.load();\n\t\n\t// See below for the objects\n\t$('#skill_next_btn').click(function() {\n\t\tswitch ( GLOBAL_PAGE ) {\n\t\t\n\t\t\tcase 'HELP_1':\n\t\t\tif ( help_description.save() ) help_min.load();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'HELP_2':\n\t\t\tif ( help_min.save() ) help_skills.load();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'HELP_3':\n\t\t\tif ( help_skills.save() ) help_object.load();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'HELP_4':\n\t\t\tif ( help_object.save() ) help_confirm.load();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'HELP_5':\n\t\t\t\n\t\t\t\t// PUT DATA INTO DATABASE OR SOMETHING\n\t\t\t\tconsole.log(help_description);\n\t\t\t\tconsole.log(help_min);\n\t\t\t\tconsole.log(help_skills);\n\t\t\t\tconsole.log(help_object);\n\t\t\t\t\n\t\t\tbreak;\n\t\t}\n\t});\n\t\n\t$('#skill_back_btn').click(function() {\n\t\tswitch ( GLOBAL_PAGE ) {\n\t\t\tcase 'HELP_2':\n\t\t\thelp_description.load();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'HELP_3':\n\t\t\thelp_min.load();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'HELP_4':\n\t\t\thelp_skills.load();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'HELP_5':\n\t\t\thelp_object.load();\n\t\t\tbreak;\n\t\t}\n\t});\n}", "function initPage() {\n $.get('/api/headlines?saved=false').done((data) => {\n articleContainer.empty();\n if (data && data.length > 0) {\n renderArticles(data);\n\n // Activate tooltips for the action buttons.\n $('[data-toggle=\"tooltip\"]').tooltip();\n } else {\n renderEmpty();\n }\n });\n }", "function initPage() {\n $.get('/api/headlines?saved=true').done((data) => {\n articleContainer.empty();\n\n if (data && data.length > 0) {\n renderArticles(data);\n\n // Activate tooltips for the action buttons.\n $('[data-toggle=\"tooltip\"]').tooltip();\n } else {\n renderEmpty();\n }\n });\n }", "openHelpPage() {}", "function initializePage() {\n handleGlobalEvent();\n handleSideBar();\n handleMessageBar();\n handleCollapsibleController();\n handleResetButton();\n handleDisabledSubmit();\n handleAjaxError();\n handleAjaxSetup();\n }", "function coreInitLoadPage() {\n if (typeof $(\"body\").attr(\"control\") !== \"undefined\")\n WEBUI.MAINPAGE = $(\"body\")[$(\"body\").attr(\"control\").split(\".\")[1]]();\n }", "function onPageInit(e){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "function readyFunctionCalls() {\n\n\tclickToChatCall();\n\tsetUpTypeHead();\n\tjQuery(\".s7LazyLoad\").unveil();\n\tjQuery(\"input[placeholder]\").placeholder();\n\t\n\t $('#e_footercol8 a').attr('target', '_blank');\n}", "function initPage() {\n\tset_hidden_elements();\n}", "function initPage(){\r\n\t\t//add head class\r\n\t\t$(\"#headAssemblyLi\").addClass(\"active\");\r\n\t\t$(\"#leftCarQueryLi\").addClass(\"active\");\r\n\t\tgetSeries();\r\n\t\tfillLineSelect();\r\n\t\t$(\"#carTag\").hide();\r\n\t\t$(\"#resultTable\").hide();\r\n\t\t$(\"#tabTestLine\").hide();\r\n\t}", "function Engange() {\n switch (p.Current) {\n case 'herbIndexPAGE':\n run(func.lazyLoad);\n run(func.searchAllHerbs, 'herbIndexPAGE');\n break;\n case 'herbShowPAGE':\n run(func.lazyLoad);\n run(func.searchAllHerbs, 'herbShowPAGE');\n run(func.showdownINIT);\n run(func.markdown);\n run(func.sectionTOGGLE);\n break;\n case 'aboutPAGE':\n run(func.lazyLoad);\n run(func.searchAllHerbs, 'aboutPAGE');\n break;\n }\n}", "function pagesOnload(){\n var start_hash=location.hash;\n if(!start_hash){ /* the url has no hash . run the callback function of the first page */\n var callback = $(\".fullPage\").eq(0).attr(\"inView\");\n strTofunc(callback);\n\t\t return false;\n }\n /* if the url has hash , locate to the page */\n locateToHash(start_hash);\n }", "function onLoad()\n{}", "function pageLoad(){\n $jQ('body').zIndex(); // jQuery UI Check\n window.onbeforeunload=function(){return '';}; // Hack to prevent any page.reload\n startCSSInfo();\n hackUserAgent();\n hackRemoveAnimations();\n hackDisableSubmit();\n hackActions();\n setNumScripts();\n setTimeStatus();\n setSystemColors();\n setVisibility();\n setUserActions();\n setAllVisibleElementsInfo();\n hackFrameScroll();\n}", "function setUpPage(){\r\n displayHeader();\r\n displayFooter();\r\n displaySideBar();\r\n createEventListeners();\r\n}", "function alwaysRunOnload () {\n\t\n\t}", "function initializePage() {\n\t$('.project a').click(addProjectDetails);\n\n\t$('#colorBtn').click(randomizeColors);\n\n\t$('.spotify .handle').hover(function() {\n\t\tshowSpotify($(this).parent());\n\t});\n}", "function initPage(){\r\n\t\t//add head class\r\n\t\t$(\"#headEfficiencyLi\").addClass(\"active\");\r\n\t\t$(\"#leftNodeSelectLi\").addClass(\"active\");\r\n\t\t\r\n\t\ttoggleVinHint(true);\r\n\r\n\t\t//hide alert\r\n\t\t$(\"#messageAlert\").hide();\r\n\r\n\t\t$(\"#tableList tbody\").text(\"\");\r\n\t\t//set default queue time and get queue\r\n\t\t// $(\"#startTime\").val(window.byd.DateUtil.todayBeginTime);\r\n\t\t$(\"#startTime\").val(byd.DateUtil.firstDayOfTheMonth);\r\n\t\t$(\"#endTime\").val(byd.DateUtil.todayEndTime);\r\n\t\tajaxGetDoneList();\r\n\t\tajaxGetPrintList();\r\n\r\n\t\tresetPage();\r\n\t\tif($(\"#currentNode\").val() == \"subEngine\") {\r\n\t\t\t$(\"#formBarCode\").show();\r\n\t\t}\r\n\r\n\t}", "function startOnLoad() {\n}", "function startOnLoad() {\n}", "function init() {\n\n\t\t// > = greatar than\n\t\t// < = less than\n\t\t\n\n\t\t/* -------------------------------------------------- */\n\t\t/* CACHE\n\t\t/* -------------------------------------------------- */\n\t\t\n\t\tvar page = $('.page').data('page');\n\n\n\t\t/* -------------------------------------------------- */\n\t\t/* HOME\n\t\t/* -------------------------------------------------- */\n\n\t\tif ( page === 'index' ) {\n\t\t\t\n\t\t\tconsole.log('Home Page');\n\t\t\t\n\t\t}\n\t \n\t\t\n\t /* -------------------------------------------------- */\n\t\t/* PRIVACY AND TERMS OF USE\n\t\t/* -------------------------------------------------- */\n\n\t\telse if ( page === 'legal' ) {\n\n\t\t\tconsole.log('Privacy and Terms of Use Page');\n\t\t\t\n\t\t}\n\t \n\t\t\n\t\t/* -------------------------------------------------- */\n\t\t/* ERROR\n\t\t/* -------------------------------------------------- */\n\n\t\telse {\n\n\t\t\tconsole.log('Error Page');\n\t\t\t\n\t\t}\n\n\t}", "function qodeOnWindowLoad() {\n\t qodeInitNewsShortcodesPagination().init();\n }", "function onEverythingLoad() {\n\tviewerId = wave.getViewer().getId();\n\tviewerPO = getThing(\"player_\" + viewerId);\n\tviewerPM = getThing(\"pm_\" + viewerId);\n\n\t// If this is the viewer's first visit, show them the help screen.\n\tif (viewerPO.firstVisit) {\n\t\tdialogBox.openHelp();\n\n\t\t// If the gadget state is empty (there are no cards), create a deck.\n\t\tif (waveStateKeys.length == 0) {\n\t\t\t// blue, 2 jokers, and shuffled\n\t\t\taddDeck(0, 2, true);\n\t\t}\n\t}\n}", "function initPage(){\r\n\t\t//add head class\r\n\t\t$(\"#headGeneralInformationLi\").addClass(\"active\");\r\n\t\tgetSeries();\r\n\t\t$(\"#divLeft,#divHead,#divFoot\").addClass(\"notPrintable\");\r\n\t\t$(\"#startTime\").val(window.byd.DateUtil.lastWorkDate());\r\n\r\n\t\tajaxQueryReplacementCost(\"monthly\");\r\n \tajaxQueryReplacementCost(\"yearly\");\r\n \tajaxQueryCostDistribute();\r\n\t\tresetAll();\r\n\t}", "function initialize(){//init when a new page load\r\n\t $('#info_dom').append('<li id=\"iRoot\"><ul></ul></li>');\r\n\t init_models();\r\n\t // init_interaction_area();\r\n\t //info_window_create();\r\n\t // $('#resource_tabs').tabs();\r\n\t // resources_window_create();\r\n\t init_interaction_actions();\r\n\t init_page_actions();\r\n}", "function onPageInit(e){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "function Start() {\n \n $('.Title').html('Sooooo Like Which One You Gonna Be').ready(function () {\n Q1(); //Me Calling Function Q1\n });\n }", "function initialPages($) {\n\t\t$('.select2').select2();\n\t\tdisabledInput();\n\t\tentityHandler();\n\t\texpiryDateRange('#expiry');\n\t\textendEXpiryDatePicker('#extend_expiry');\n\t\tclickConfirmExtend();\n\t\tclickConfirmTerminate();\n\t\tclickConfirmChangeStatus();\n\t\tclickConfirmChangeGroup();\n\t\tclickConfirmChangePassword();\n\t\tclickConfirmResetPassword();\n\t\tclickModalCloseBtnDone();\n\t}", "function help_init() {\n // Set up the help text logic.\n var message = document.add_new_message.message;\n message.onmouseover = help_show;\n message.onmousemove = help_show;\n message.onmouseout = help_hide;\n message.onkeypress = auto_submit;\n\n var help = document.getElementById('help');\n help.onmouseover = help_show;\n help.onmouseout = help_hide;\n}", "function preRunFunc() {\n\t\tonglets_ui.tabs();\n\t\tgetOngletsChannels();\n\t\tonInputFocus();\n\t\tonInputFocusOut();\n\t\tformSubmit();\n\t\tputButtonsEvents();\n\t}", "function eltdOnWindowLoadHeaderBehaviour() {\n }", "function edgtfOnDocumentReady() {\n edgtfHeaderBehaviour();\n edgtfSideArea();\n edgtfSideAreaScroll();\n edgtfFullscreenMenu();\n edgtfInitMobileNavigation();\n edgtfMobileHeaderBehavior();\n edgtfSetDropDownMenuPosition();\n edgtfDropDownMenu(); \n edgtfSearch();\n }", "function setUpPage(){\r\n displayHeader();\r\n displayFooter();\r\n displaySideBar();\r\n\r\n createEventListeners();\r\n}", "function initializePage() {\n //Event Listeners\n handleQuizStart();\n handleAnswerSubmitted();\n handleNextQuestion();\n handleRestartQuiz();\n\n //Render Function\n render(); \n}", "function main(){\n\t\t//check ob die url/seite die richtige ist\n//\t\tif(checkRightLocation()) {\n\n\t\tcleanPage();\n\t\taddFavoriteTitle();\n\t\taddEmptyTable();\n\t\taddHeader();\n\t\tvar favoritesCall = Utils.getFavorites(addFavorites);\t\t\t\n\t\t\t\t\t\t\n\t//\t} else {\n\t//\t\talert(wrongPageErrorMessage);\n\t//\t}\n\t}", "function onPageLoad() {\n\n}", "function loadHomePage(){\n\tloadNavbar();\n\tloadJumbotron();\n\tgenerateCarousels();\t\n}", "function startatLoad(){\r\n\tloadNavbar(function(){\r\n\t\tsetSelectMenuesValues(function(){\r\n\t\t\t\tgetXMLData(function(){\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n}", "function init() {\r\n\taddListeners();\r\n\t// Polite loading\r\n\tif (Enabler.isPageLoaded()) {\r\n\t\tshow();\r\n\t}\r\n\telse {\r\n\t\tEnabler.addEventListener(studio.events.StudioEvent.PAGE_LOADED, show);\r\n\t\t//Enabler.addEventListener(studio.events.StudioEvent.VISIBLE, show);\r\n\t}\r\n}", "function initializePage() {\n\t// add any functionality and listeners you want here\n\n\t//listener function for the content buttons in the home page.\n\t\n\t\n\t\n\t\n}", "function pageLoaded () {\n\n // Show the introduction modal\n UI.showIntro();\n\n // Show the overlay \n UI.displayOverlay(true);\n\n}", "function documentReadyFunction() {\n onPageLoadOrResize();\n onPageLoad();\n }", "function onPageLoad() {\r\n\t// although jQuery already has an on page load, \r\n\t// this function was added for sake of organization.\r\n\tvar trigger = \"load\";\r\n}", "function initUI() {\n showDataIsLoaded();\n showExplorePage();\n bindSearchHandler();\n}", "function prepPage() {\r\n uriObj = parseURI();\r\n if (uriObj['show'] && uriObj['show'] != 'ep' && !uriObj['eid'] && !uriObj['aid']) return;\r\n\tinitTooltips();\r\n loadData('anime/a'+uriObj['aid']+'.xml',parseData);\r\n}", "function initializePage() {\n\t// Google analytics events\n\t$(\".button-for-inventory\").click(updateLike);\n\n\t// confirmation for delete dialog box\n\t$('.button-for-delete').click(getConfirmation);\n\n\t$('.submit-item').submit(addItem);\n}", "function qodeOnWindowLoad() {\r\n qodeInitelementorListingSimpleSearch();\r\n }", "function onPageLoad() {\n // winResize();\n // winScroll();\n }", "function onInit() {}", "function Start() {\n LoadNavBar();\n LoadPageContent();\n}", "function page_init() {\r\n\talert('page init being called');\t\r\n}", "function initHome() {\n\tgetCurrentUser();\n\tinitializeStudentInfo();\n\tloadCourses(buildCourseContent);\n\tprogressBarFunc();\n\tw3_open(); \n}", "function main() {\n initBurgerMenu();\n setScrollAnimationTargets(); // init homepage nav\n\n if ($('#home').length === 1) {\n initHomepageNav();\n } else {\n console.log('not home');\n } // init lightboxes\n\n\n initVideoLightbox();\n initTCsLightbox();\n}", "function init() {\n loadTheme();\n loadBorderRadius();\n loadBookmarksBar();\n loadStartPage();\n loadHomePage();\n loadSearchEngine();\n loadCache();\n loadWelcome();\n}", "function initializePage() {\n\tconsole.log(\"Javascript connected!\");\n\t//$(\"a.nameClick\").click(replaceName);\n}", "function _page1_page() {\n}", "function init() {\n // Use the plugin on all <h*> elements in the page..\n // $( 'h1,h2,h3,h4,h5,h6' ).widont();\n }", "function initializePage() {\n\t/*$(\"#testjs\").click(function(e) {\n\t\t$('.jumbotron h1').text(\"Javascript is connected\");\n\t\t$(\"#testjs\").text(\"Thanks for clicking me!\");\n\t\t$(\".jumbotron p\").toggleClass(\"active\");\n\t});*/\n\n\t// Add any additional listeners here\n\t// example: $(\"#div-id\").click(functionToCall);\n\t$(\"#submitBtn\").click(addEvent);
\n\t$('#scheduleBtn').click(goBackToSchedule);\n}", "function init() {\n tooltips();\n onePageScroll();\n scrollAnchor();\n}", "function createIntroWindow() {\n pageCollection.showHelp();\n}", "ready() {\r\n\t\t// Override this\r\n\t\tthis.updateTitle();\r\n\t}", "function zselex_title_init()\n{\n// Event.observe('zselex_title', 'change', savedraft);\n// $('zselex_urltitle_details').hide();\n $('zselex_status_info').hide();\n $('zselex_picture_warning').hide();\n \n // not the correct location but for reference later on:\n //new PeriodicalExecuter(savedraft, 30);\n}", "function initPage() {\n\n initHeader();\n\n initForm();\n\n initDatalist();\n}", "function loadAmplifiersPage(){\n\tloadNavbar();\n\tgenerateProductPage(\"amplifier\");\n}", "function pageLoad() {\n setControlValues();\n processHashInstruction();\n\n if (Common.isIE) Common.fixToMaxItemWidth('settings-header', 16, false);\n\n document.getElementById('theme').addEventListener('change', themeSelectChange);\n document.getElementById('defaults').addEventListener('click', defaultsClick);\n document.getElementById('save').addEventListener('click', saveClick);\n document.getElementById('cancel').addEventListener('click', cancelClick);\n\n document.getElementById('offline').style\n .display = (navigator.onLine ? 'none' : 'block');\n window.addEventListener('offline', appOffline);\n window.addEventListener('online', appOnline);\n}", "function onLoaded()\n\t{\n\t\twindow.initExhibitorsList();\n\t\twindow.initFloorPlans();\n\t\twindow.initConciege();\n\t\twindow.initAmenities();\n\t\twindow.initVisas();\n\t}", "function pageInit(subject){\n topOTUBar(subject)\n topOTUBubble(subject)\n demographTable(subject)\n washingGauge(subject)\n}", "function main() {\n landingPageEffects();\n introSlideShow();\n}", "function init() {\r\n\t//Sets the FileName to the one passed by the query parameter\r\n\tinitFileNameFromURL();\r\n\r\n\t//Createing the color set in the Toolbar, so the user can select a color\r\n\tcreateColorset();\r\n\r\n\t//Selects the Pencil after startup, so the user can start drawing after the page has loaded.\r\n\t$('#pencil').attr('class', 'active');\r\n\r\n\t//every wich is clickable will be defined in this function \r\n\tdeclareJqueryOnClickEvents();\r\n\r\n\tloadImageIntoHTML();\r\n}", "function pageLoadFunctions() {\n\thideTableGeneratorButton();\n\thideAddRowButton();\n}", "function initPage()\n\t{\n\t\tinitGlobalVars();\n\t\tinitDOM();\n\t\tinitEvents();\n\t}", "function pageReady(){\n handleUTM();\n legacySupport();\n initModals();\n initScrollMonitor();\n initVideos();\n _window.on('resize', debounce(initVideos, 200))\n initSmartBanner();\n initTeleport();\n initMasks();\n }", "function _init() {\r\n // set page <title>\r\n Metadata.set(home.title);\r\n\r\n // activate controller\r\n _activate();\r\n }", "function init() {\n if ($('.scheduled-page').length > 0) {\n setPageUrl();\n bindEvents();\n renderSwitcher();\n renderActions();\n switchPage(scheduled.currentView);\n }\n }", "function pageLoadHashInit() {\r\n\t\t\t\t\r\n\t\t\t\t\tif ($('body[data-animated-anchors=\"true\"]').length > 0) {\r\n\t\t\t\t\t\tif ($('.nectar-box-roll').length == 0 && $('#nectar_fullscreen_rows').length == 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Inside tabs\r\n\t\t\t\t\t\t\tif (typeof nectarGetQueryParam['tab'] != 'undefined') {\r\n\t\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\t\tpageLoadHash();\r\n\t\t\t\t\t\t\t\t}, 800);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Regular\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tpageLoadHash();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('#nectar_fullscreen_rows[data-mobile-disable=\"on\"]').length > 0 && $('.nectar-box-roll').length == 0 && \r\n\t\t\t\t\t\tnectarDOMInfo.usingMobileBrowser) {\r\n\t\t\t\t\t\t\tpageLoadHash();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function initializePage() {\r\n colorList();\r\n }", "function loadPage() {\n addUserInfo();\n}", "function asiCallOnload(){\n var SDM_noasci = ['meinauto'];\n var asi_p = 'IpZElE,Rdkg7V,NkqpjZ,acWaVx,RmJKxA,BnG7vD,oeu2b6,foY3mB'; //Produktion\n var asiPqTag = false; //Initialisierung, Antwort setzt auf true\n try {\n if ((sdm_vers >= 1) && !SDM_head.isinarray(SDM_noasci, SDM_resource)) {\n fXm_Head.create.twin(escape('//pq-direct.revsci.net/pql?placementIdList=' + asi_p), SDM_head.prep.asigmd, true);\n }\n } catch (ignore) {}\n\n // Audience Science Data Sharing\n if (!SDM_head.isinarray(SDM_noasci, SDM_resource)) {\n fXm_Head.create.script('//js.revsci.net/gateway/gw.js?csid=F09828&auto=t&bpid=Stroer');\n }\n}", "function initializePage() {\n\tconsole.log(\"initializePage\");\n\tclearInputs();\n\ttoggleInterest();\n}", "onLoad() { }", "function onPageLoad() {\r\n genNavBar();\r\n}", "function onReady() {\n\t// TODO\n}", "function helpNav(){\n helpBox.innerHTML = \"<h3 style='color: white; font-style: italic'>This is the navigation bar. It displays links to other basic applications on the site. Authentication is also listed.</h3>\";\n showHelp();\n }", "function initializePage() {\r\n\t$('.deletingTask').click(remove);\r\n $('.notification').click(analytics);\r\n $('.edit').click(editTask);\r\n $('#addTaskk').click(showAdd);\r\n   \r\n\t\r\n\t//$('#colorBtn').click(randomizeColors);\r\n}", "onLoad() {}", "function pageReady() {\n legacySupport();\n\n updateHeaderActiveClass();\n initHeaderScroll();\n\n setLogDefaultState();\n setStepsClasses();\n _window.on('resize', debounce(setStepsClasses, 200))\n\n initMasks();\n initValidations();\n initSelectric();\n initDatepicker();\n\n _window.on('resize', debounce(setBreakpoint, 200))\n }", "function initializePage() {\n // Initialize variables that correspond to\n // DOM objects in the user interface plus\n // $window.\n initializeVariables();\n\n // Check errorMessage\n if (errorMessage.length > 0) {\n Print.print(errorMessage);\n Print.print(instructions);\n return;\n }\n\n // Provide the link behavior for the arrows.\n $backArrow.click(backSlide);\n $nextArrow.click(nextSlide);\n\n // Initialize the slide dropdown menu\n initializeSlideDropdown();\n\n // Provide the behavior for the slide dropdown menu\n slideDropdown.onchange = slideDropdownBehavior;\n \n // Do the initial sizing of the story frame.\n resizeStoryFrame();\n\n // Show the total number of slides\n $slideTotal.text(\"\" + storyLength);\n\n // Initialize by showing slide 0 or show the slide\n // corresponding to the query parameter start=N.\n //\n // Keep in mind that user indexing starts at 1 so\n // we need to adjust here by subtracting 1.\n\n var start = 0;\n\n if (QueryParams.Params[\"start\"]) {\n start = parseInt(QueryParams.Params[\"start\"]);\n\n if (isNaN(start))\n start = 0;\n else\n start--;\n }\n\n showSlide(start);\n\n // Set up auto resize on the story frame.\n window.onresize = resizeStoryFrame;\n}", "function pageFullyLoaded () {}" ]
[ "0.70600224", "0.6906804", "0.67995405", "0.6786683", "0.6742353", "0.67045915", "0.669307", "0.66840845", "0.6661327", "0.6642032", "0.66349006", "0.66313726", "0.66313726", "0.6623615", "0.66232234", "0.6607113", "0.659649", "0.6595121", "0.6592545", "0.6591654", "0.65907633", "0.65848416", "0.6584339", "0.65783703", "0.6577714", "0.65738523", "0.6564848", "0.654986", "0.65469867", "0.65462947", "0.65429306", "0.6530302", "0.6530302", "0.65275466", "0.6513193", "0.6509261", "0.6509116", "0.6506759", "0.6506721", "0.65061283", "0.64931476", "0.648997", "0.648027", "0.6462908", "0.64609915", "0.64579993", "0.645372", "0.64431506", "0.6427197", "0.64240146", "0.64230597", "0.64202416", "0.6411453", "0.6409123", "0.6399363", "0.6397895", "0.63889575", "0.63878256", "0.63845545", "0.63789624", "0.63679373", "0.63605255", "0.6354187", "0.63505983", "0.63473624", "0.6342162", "0.6339338", "0.6327053", "0.6317663", "0.6316683", "0.6316283", "0.63150865", "0.6313434", "0.63119185", "0.6310301", "0.63095766", "0.6305991", "0.6301936", "0.62995607", "0.6299241", "0.62950456", "0.62949795", "0.62845933", "0.6283061", "0.62792355", "0.62791777", "0.62780356", "0.62769705", "0.62763155", "0.6275723", "0.6275215", "0.62729377", "0.62711114", "0.62701213", "0.62635654", "0.6261916", "0.6261547", "0.6259895", "0.62592506", "0.6257198", "0.62563074" ]
0.0
-1
called when the user click next
function checkFunc() { // Prevent multiple clicks document.getElementById("Next").disabled = true; // Wait message alert("Please Wait while we connect you with our Administrators.\nThank you."); console.log("in checkFunc()"); var radios_issue = document.getElementsByName("Issue"); var radios_moc = document.getElementsByName("MoC"); for (var i = 0; i < radios_issue.length; i++) { if (radios_issue[i].checked) { // alert(radios_issue[i].id); issueClicked = radios_issue[i].id; break; } } for (var j = 0; j < radios_moc.length; j++) { if (radios_moc[j].checked) { // alert(radios_moc[i].id); mocClicked = radios_moc[j].id; break; } } // Add user to Firebase Database. socket.emit("addUser", issueClicked); console.log(`issueClick: ${issueClicked}`); socket.emit('Anonymous', issueClicked); console.log("[DEMO] :: Issue Selected: " + issueClicked); console.log("[DEMO] :: MOC Selected: " + mocClicked); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onClickNaviNext(el) {\n curPageNumber = curPageNumber + 1;\n refreshTable();\n debug('Next button clicked. page number : ' + curPageNumber);\n }", "_nextButtonClickHandler() {\n const that = this;\n\n that.next();\n }", "function goNext() {\n //console.log(\"goNext: \" + options.currentPage);\n if (options.currentPage != options.total) {\n var p = options.currentPage + 1;\n loadData(p);\n setCurrentPage(p);\n options.currentPage = p;\n pageInfo();\n }\n }", "function next() {\n if ($scope.options.index < pageCount - 1) {\n $scope.options.index++;\n }\n }", "function onNext() {\n\n\t\tif (step < 3) {\n\t\t\tdispatch(INCREMENT_STEP());\n\t\t}\n\n\t\t// update button state\n\t\tsetBackButtonDisabled(false);\n\t}", "function goNext( event ){\n event.preventDefault();\n go( revOffset - 1 );\n return false;\n }", "function nextClicked() {\n if (currentIndex >= data.length - 1) {\n return;\n }\n currentIndex++;\n setDefinitionPopup();\n}", "function goNext() {\n if (pageNum == pdfDoc.numPages-1)\n {\n \t$(\"#next\").prop(\"disabled\", true);\n \t}\n pageNum++;\n renderPage(pageNum);\n }", "function next() {\n changeSlide($nextel);\n }", "function handleNext() {\n var current = document.getElementsByClassName(\"current\")[0];\n var next = current.getAttribute(\"data-next\");\n\n startLightBox(next);\n }", "function displayNext() {\n $(\"body\").on(\"click\", \".nextButton\", (_e) => {\n state.page++;\n let results = state.records.slice(state.page * 10, state.page * 10 + 10);\n renderItems(results);\n });\n $(\"body\").on(\"click\", \".previousButton\", (_e) => {\n if (state.page === 0) {\n return;\n }\n state.page--;\n let results = state.records.slice(state.page * 10, state.page * 10 + 10);\n renderItems(results);\n });\n}", "next() {\n const that = this;\n\n that.navigateTo(that.pageIndex + 1);\n }", "function next() {\n slide(false, true);\n }", "function handleNext(e){\n if (chapterArray[currentChapterIndex].isAtLastPara()){\n chapterArray[currentChapterIndex].getNextPara();\n nextButtonElem.style.display = 'none';\n formArray[currentChapterIndex].style.display = 'flex';\n }else{\n chapterArray[currentChapterIndex].getNextPara();\n }\n}", "function clickedNext(currentPage, targetSlot) {\n //console.log(\"NEXT FUNCTION ACTIVATED\");\n ++currentPage;\n targetSlot.spawnMenu(currentPage);\n}", "function pfClickedNext(pageNumba, mode){\n //console.log(\"Clicked Next\");\n\tpageNumba++;\n\tspawnPF(mode, pageNumba);\n}", "function nextPage() {\n showPage(currentPage + 1);\n}", "function nextItem() {\r\n hideItems();\r\n currentIndex = currentIndex < slidesLength - 1 ? currentIndex + 1 : 0;\r\n updateIndexes();\r\n showItems();\r\n }", "_goToNextCard() {\n if (this._btnNext.disabled === false) {\n var newCurrentPos = 0;\n newCurrentPos = this._currentPos + 1;\n this._goToCard(newCurrentPos, 'next');\n }\n }", "function my_next(that){\n\t\tthat.hideNextButton(); //schova tlacitko next\n\t\tthat.hidePreviousButton(); //schova tlacitko previous\n\t\t\n\t\tthat.questionclick = function(event, element) {\n\t\t\tif(element.type == \"radio\") {that.clickNextButton();}\n\t\t\t//Pokud nekdo klikne na moznost u multiple choice otazky ,\n\t\t\t//POZOR, pokud by Vam to nefungovalo, ujistete se v inspektoru,ze jsou Vase moznosti HTML elementy typu radio; ruzne sablony to mohou mit ruzne\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}", "function next() {\n setCurrentPage((currentPage) => Math.min(currentPage + 1, maxPage));\n }", "function clickNext() {\n if (isRunning) {\n eventFire(document.querySelector('.stream-next'), 'click');\n nextOnFinish();\n }\n }", "function nextPage(){\n if (page > 0)\n {\n setPage( page +1);\n }\n }", "goToNext () {\n\t\t\tif (this.canGoToNext) {\n\t\t\t\tthis.goTo(this.currentSlide + 1)\n\t\t\t}\n\t\t}", "nextClicked() {\n this.calendar.activeDate = this.calendar.currentView == 'month' ?\n this._dateAdapter.addCalendarMonths(this.calendar.activeDate, 1) :\n this._dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? 1 : yearsPerPage);\n }", "nextClicked() {\n this.calendar.activeDate = this.calendar.currentView == 'month' ?\n this._dateAdapter.addCalendarMonths(this.calendar.activeDate, 1) :\n this._dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? 1 : yearsPerPage);\n }", "next() {\n const { index, showTooltip } = this.state;\n const { steps } = this.props;\n const nextIndex = index + 1;\n\n const shouldDisplay = Boolean(steps[nextIndex]) && showTooltip;\n\n this.logger('joyride:next', ['new index:', nextIndex]);\n this.toggleTooltip(shouldDisplay, nextIndex, 'next');\n }", "function nextItem() {\n\t\tstopSlideshow();\n\t\tchangeItem(current + 1);\n\t}", "function goToNextPage() {\n updateCurrentPage((page) => page + 1);\n }", "function nextPage() {\n\t\tsetCurrentPage((page) => page + 1);\n\t}", "next() {\n\n if (this.currStep < this.slides[this.currSlide].steps.length - 1) {\n\n this.nextStep();\n\n } else {\n\n this.nextSlide();\n\n }\n\n }", "nextHandler() {\n if (this.page < this.totalPage && this.page !== this.totalPage) {\n this.page = this.page + 1; //increase page by 1\n this.displayRecordPerPage(this.page);\n }\n }", "openNextSlide() {\n if (this.animation === true) return;\n this.startAnimation();\n\n this.current_page++;\n this.next_button.blur();\n this.openSlide();\n }", "function next() {\n if (currentContactIndex < (contactArray.length-1)) {\n currentContactIndex++;\n }\n currentContact = contactArray[currentContactIndex];\n viewCurrentContact();\n\n \n // Todo: Disable next button when there is no next item.\n // PJB: I implemented this in the viewCurrentContact() fucntion so that \n // it would work when first loaded.\n \n \n // Todo: Save changed items to contacts array and resort array.\n // PJB: I saved the changed items to the contacts array in the add(), \n // delete(), and update() functions. I didn't resort the array\n // because I didn't sort it in the first place but I do update \n // the table each time one of these functions is called.\n}", "function goToNextPage() {\n setCurrentPageUrl(nextPageUrl)\n }", "next() {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this.steps.length - 1);\n }", "onNextClick() {\n if(this.state.currentPage + 1 <= this.pages) {\n this.changePage(this.state.currentPage + 1);\n }\n }", "nextPage() {\n this.model = this.nextModel;\n this.page = this.page + 1;\n this._userEvent('loadNextPage');\n this.renderProducts();\n }", "function handleNextClick() {\n if(view === 'month') {\n setYear(year + 1);\n return; \n }\n\n if(view === 'year') {\n setYear(year + YEARS_SHOW);\n return;\n }\n\n const previousMont = getNextMonth(month, year);\n setMonth(previousMont.month);\n\n if(previousMont.year === year) return;\n setYear(previousMont.year);\n }", "function handleNext() {\n let tempPage = page + 1;\n if (tempPage > totalPages) {\n tempPage = totalPages\n }\n setPage(tempPage);\n }", "onHeaderNextPress() {\n\t\tthis._currentPickerDOM._showNextPage();\n\t}", "function next($event) {\n $event.preventDefault();\n init();\n return false;\n }", "function next($event) {\n $event.preventDefault();\n init();\n return false;\n }", "function handleNextButton() {\n //when \"next\" button is clicked in HTML container\n $('#container').on('click', '#next-button', function(event) {\n//if the number of the question we're on is the final question\n //then display results page with correct answer score count\n if(questionNumber === 10) {\n renderResultsPage(correctAnswers);\n//if not, go to the next question\n } else {\n iterateQuestion();\n nextQuestion();\n }\n });\n}", "function clickNext() {\n var currentEQ = checkCurrent();\n\n // 01.save next step to local Storage\n if(currentEQ !== $('.slide').length - 1) {\n saveStorage(currentEQ+1);\n }\n // 02.check if end of quiz\n if(currentEQ == $('.slide').length - 1 ) {\n //localStorage.setItem('step','end');\n //$('.slide').eq(currentEQ).removeClass('active');\n }\n // 03.change status of div view\n checkProgress();\n}", "function handleNextButton() {\r\n $('#container').on('click', '#js-next-button', function(event) {\r\n\r\n if(questionNum === 10) {\r\n createResultsPage(correctAnswers);\r\n } else {\r\n iterateQuestion();\r\n nextQuestion();\r\n }\r\n });\r\n}", "function next(){\n\n // if in the last page, then go to the new page needs http request\n if(scope.model.currentIndex === (scope.model.results.length - 1))\n {\n angular.element('button.searchbtnbox').toggleClass('changed');\n angular.element('div.section-refresh-overlay').css('visibility','visible');\n var promise = scope.model.next();\n promise.then(function(response){\n\n scope.model.currentStart += scope.model.results[scope.model.currentIndex - 1].length;\n angular.element('button.searchbtnbox').toggleClass('changed');\n angular.element('div.section-refresh-overlay').css('visibility','hidden');\n $rootScope.$emit('setMarkers',{data:scope.model.data});\n\n },function(error){\n console.log(error);\n });\n }\n else {\n scope.model.currentIndex++;\n scope.model.data = scope.model.results[scope.model.currentIndex];\n scope.model.currentStart += scope.model.results[scope.model.currentIndex - 1].length;\n $rootScope.$emit('setMarkers',{data:scope.model.data});\n }\n }", "function nextQuestion () {\n $('.js-fieldset').on('click', '#next', function() {\n if (STORE.questionNumber < STORE.questions.length) {\n renderFieldsetForm('question', STORE);\n }\n else {\n renderFieldsetForm('end', STORE);\n }\n });\n}", "_setEvent_next(){\n $(this._controlSelectors.next).click(()=>{\n this.next();\n });\n }", "function handleNextButton() {\n $(\".feedBackPage\").on(\"click\", \".next-btn\", function(event) {\n $(\".feedBackPage\").hide();\n if (questionNumber === QUIZ.length - 1) {\n renderResults();\n } else {\n iterateQuestion();\n renderQuestion();\n $(\".form-container\").show();\n }\n });\n console.log(\"handleNextButton() ran\");\n}", "function showNext()\n{\n\tcurPage++;\n\tshowContacts();\n}", "function nextPageEvent() {\r\n $( \"#simple-quiz\").undelegate( '#map', 'click', getClickPosition);\r\n quastionCounter++;\r\n if (quastionCounter < quastions.length) {\r\n renderQuastionPage(quastionPageTmpl, quastions, quastionCounter);\r\n } else {\r\n renderFinalPage(finalnPageTmpl, quastions);\r\n renderBar()\r\n }\r\n $( \"#simple-quiz\").delegate( '#map', 'click', getClickPosition);\r\n }", "function next() {\n var nextButton = gAppState.checkId(\"nextBtnID\", \"nextBtnID2\");\n var prevButton = gAppState.checkId(\"prevBtnID\", \"prevBtnID2\");\n var remainder = tableSize - limit;\n\n if (nextButton.classList.contains('disabled')) { // stop action if button is disabled\n return false;\n }\n\n if (offset < remainder) { // if there is a next page\n offset += parseInt(limit);\n buttonDisplay();\n }\n\n // refresh table\n if (resultMode == \"bn\") {\n bnQueryGen();\n } else if (resultMode == \"query\") {\n queryGen();\n } else {\n updateTable();\n }\n}", "function next() {\n $ctrl.index++;\n\n // Move on if all players have been shown\n if ($ctrl.index === $ctrl.players.length) {\n $state.go('play');\n }\n // Otherwise show next role\n else {\n showRole();\n }\n }", "function pageNext()\n{\n\tif (currentPage<lastPage) {\n\t\tcurrentPage=currentPage + 1;\n\t\tviewPage();\n\t}\n}", "function next() {\n if (currentItemNumber + 1 > data.length) {\n currentItemNumber = 0;\n showPic(currentItemNumber);\n } else {\n currentItemNumber++;\n showPic(currentItemNumber);\n }\n}", "function next_step() {\n\t//just to prevent submission\n\tevent.preventDefault();\n\t//true means it comes as next step\n\tpopup(true);\n}", "function next_slide(ev)\n {\n ev.preventDefault();\n if (current == sync_elts.length - 1) return; // No next element\n activate(current + 1); // Move the \"active\" class\n //console.log(\"next: current = \"+current+\" t -> \"+timecodes[current]);\n seek_video();\n }", "function navigateNext(){\n ++current;\n var $thumb = $('#thumbs_container li:nth-child('+parseInt(current+1)+')').find('img');\n if(!$thumb.length) {\n --current;\n return;\n }\n loadPhoto($thumb);\n }", "function handleNextButtonClicked(questionNum, results) {\n\t$('.js-next').click(event => {\n\t\t$('.js-is_correct').html(``);\n\t\t$('.js-is_not_correct').html(``);\n\t\tif (questionNum < (QUESTIONS.length - 1)) {\n\t\t\treturn [questionNum++, renderQuestionPage(questionNum, results)];\n\t\t}\n\t\trenderResultsPage(results);\n\t});\n}", "function goNext(){\n var childTgrp = tgrp_position - 1;\n dataTabsFrame.selectTab(\"page3-\" + childTgrp);\n}", "nextPage() {\n if (!this.isLastPage) {\n this.currentPageNumber++;\n }\n this.updateData();\n }", "__nextStep() {\n this.openNextStep();\n }", "next() {\n this._followRelService(\"next\", \"List\");\n }", "next() {\n // if we're still navigating within the same step, just update the page number.\n // otherwise, move to the next step.\n const pageIndex = scope.currentStep().currentPageIndex,\n lastPageIndex = scope.currentStep().pages.length - 1;\n if (pageIndex < lastPageIndex) {\n scope.currentStep().currentPageIndex++;\n }\n\n else {\n scope.currentStepIndex++;\n\n // foce start at the beginning of the step.\n scope.currentStep().currentPageIndex = 0;\n }\n }", "onNextButtonPressed_() {\n this.userActed('next');\n }", "function nextPage() {\n page += 1;\n getURL();\n updateButton();\n\n}", "function goto_next_form() {\n context.current++;\n if (context.current >= context.workflow.length) {\n return finish_survey(); //todo: verify that when going Back and clicking Next this doesn't break the flow\n }\n //Store the incremented value of 'current'\n Survana.Storage.Set('current', context.current, function () {\n //load the next form\n window.location.href = context.workflow[context.current];\n }, on_storage_error);\n }", "function callNextSlide() {\r\n\t\t\tvar nextIndex = (currentIndex < itemNum - 1) ? (currentIndex + 1) : 0;\r\n\t\t\tchangeSlide(nextIndex);\r\n\t\t}", "function nextPage() {\n currentPage += 1;\n loadList();\n}", "next () {\n if (this._items.length < 2 || this._isMoving || document.hidden || !this._isOnScreen()) {\n return\n }\n\n var currentIndex = this._items.indexOf(this._current);\n var nextIndex = this._items[currentIndex + 1] !== undefined \n ? currentIndex + 1 : 0;\n var remaining = this._items.length - currentIndex;\n\n if (remaining === this._visible) {\n nextIndex = 0;\n }\n\n this._to(nextIndex);\n }", "function nextImage(){\nbuttonModule.next();\n}", "function goNext() {\n\tif (pageNum >= pdfDoc.numPages)\n\t\treturn;\n\tpageNum++;\n\trenderPage(pageNum);\n}", "function displayNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n\n if (questionCounter < questions.length) {\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value=' + selections[questionCounter] + ']').prop('checked', true);\n }\n\n // Controls display of 'prev' button\n if (questionCounter === 1) {\n $('#prev').show();\n } else if (questionCounter === 0) {\n\n $('#prev').hide();\n $('#next').show();\n }\n } else {\n window.location.href = \"results.html\";\n $('#next').hide();\n $('#prev').hide();\n $('#start').show();\n }\n });\n }", "function handleKeyNext() {\n if (next) {\n window.location = next.href;\n }\n }", "function onNextButtonClick() {\n\tvar i = photosArrayGlobal.indexOf(photoIndexGlobal) + 1; //set i to the index of photoIndexGlobal\n\n\tif(i < photosArrayGlobal.length) {\n\t\tphotoIndexGlobal = photosArrayGlobal[i];\n\t} else {\n\t\tphotoIndexGlobal = photosArrayGlobal[0];\n\t}\n\n\tconsole.log(photoIndexGlobal);\n\tdisplayPhoto(photoIndexGlobal);\n\tdisplayText(photoIndexGlobal);\n}", "function handleNextQuestion() {\r\n $('main').on('click', '#next-btn', function (event) {\r\n event.preventDefault();\r\n console.log('Next question');\r\n nextQuestion();\r\n render();\r\n })\r\n}", "next () {\n\t\tconsole.log(this.currentItem)\n\t\tthis.gotoItem(this.currentItem + this.slidesToScroll) // Appel de la methode gotoItem et parametres : index de l'item + nombres de slide a defiler\n\t}", "function goNext() {\n \t$('.chat__input__text').off('click', $scope.activeConversation.question.action);\n \t$('.chat__input__icon').off('click', $scope.activeConversation.question.action);\n \tupdateNext();\n }", "next() {\n // $(this.parentElement).data(\"obj\").select_fwd();\n $(this.parentElement).data(\"obj\").update_idx(1);\n return false;\n }", "function nextButton () {\n\t\t$(\"<button>\").addClass(\"btn btn-info mt-3 nextButton\").attr(\"type\", \"button\").appendTo($(\".answers\")).text(\"NEXT >\");\n\t}", "function nextQuestionBtn() {\n currentQuestionIndex++;\n setNextQuestion();\n}", "function nextButton() {\n $('#person').fadeOut('fast');\n if(i < 16 ){ //if/else checks if you are at the end of the carousel, and if so jumps to the other end.\n i = next;\n var person = data.people[i];\n stagePerson(person);\n console.log(i);\n next = i + 1;\n prev = i - 1;\n } else {\n i = 0;\n var person = data.people[i];\n stagePerson(person);\n next = i + 1;\n prev = i - 1;\n }\n }", "function nextBtnEvent(){\n\t//Handles the event when the previous button on the modal is clicked. It will find the pokemon whose id is one higher.\n\t//When the id is the highest, it will go back around to the pokemon with the lowest id (acting like a circular buffer).\n\tif(currPokeID != null){\n\t\tvar newID = currPokeID + 1;\n\t\tif(newID > pokemons.length){\n\t\t\tnewID = 1;\n\t\t}\n\t\t//Request to the third party api\n\t\tpokemonRequestData(newID);\n\t}\n\telse{\n\t\terrorModal();\n\t}\t\n}", "clickNextLnk() {\n return this.NextLnk.click();\n }", "function onNextClick() {\n\n\tAlloy.Globals.NAVIGATION_CONTROLLER.openWindow('startScreen');\n\tAlloy.Globals.NAVIGATION_CONTROLLER.closeWindow('welcomeScreen');\n\tAlloy.Globals.NAVIGATION_CONTROLLER.closeWindow('welcomeContentScreen');\n}", "next() {\n const that = this,\n availableItems = that.dataSource.length;\n \n if (that.disabled || availableItems === 0) {\n return;\n }\n\n let nextItem = that._currentIndex;\n\n if(that.loop){\n nextItem = nextItem >= availableItems-1 ? 0 : nextItem + 1;\n }\n else {\n nextItem = nextItem >= availableItems-1 ? nextItem : nextItem + 1;\n }\n\n that._goToItem(nextItem);\n }", "function goToNextQuestion(){\n\n\t// Display question page.\n\tshowSection(questionPage);\n\n\t// Empties out existing answers from previous question.\n\t$( \".answer-choices\" ).empty();\n\n\t// Displays question and possible answers.\n\tdisplayQuestion();\n\n\t// Resets question timer.\n\tresetTimer();\n\n}", "function next() {\n\n if (hasNext()) {\n currentVideo++;\n changeSource(currentVideo);\n tableUIUpdate();\n }\n\n }", "function next() {\n\t\tvar nextStep = steps.next();\n\t\tsetSteps(steps);\n\t\tsetCurrent(nextStep);\n\t}", "function goToNextPage() {\n\t\tif ( canNextPage() ) {\n\t\t\tgoToPage( currentPage() + 1 );\n\t\t}\n\t}", "function nextPage(){\n\t\t\tif($(\".page-\"+(pageNumber+1)+\"#article_\"+article).is(':hidden'))\n\t\t\t{\n\t\t\t\t$(\".page-\"+pageNumber+\"#article_\"+article).hide();\n\t\t\t\tpageNumber++;\n\t\t\t\t$(\".page-\"+pageNumber+\"#article_\"+article).stop(true, true).fadeIn(300);\n\t\t\t\tupdateAfterNav();\n\t\t\t}else if($(\".page.first#article_\"+(article+1)).is(':hidden')){\n\t\t\t\t$(\".page-\"+pageNumber+\"#article_\"+article).hide();\n\t\t\t\tarticle++;\n\t\t\t\tupdateMenu();\n\t\t\t\tpageNumber = 1;\n\t\t\t\t$(\".page.first#article_\"+article).stop(true, true).fadeIn(300);\n\t\t\t\tupdateAfterNav();\n\t\t\t}\n\t\t}", "function NextButtonClicked() {\n playerObject.controls.next();\n}", "function next()\n{\t\n\tnewSlide = sliderint+1;\n\tshowSlide(newSlide);\n}", "function slideShowNext() {\n slideShow((curIndex !== slides.length - 1) ? curIndex + 1 : 0, 'left');\n }", "function hasEnded(){\n $('#next').click();\n }", "_onNextClick() {\n\t\t\t\tthis.collection.nextSlide();\n\t\t\t\tthis.render();\n\t\t\t}", "nextPage () {\n if (this.haveNextPage) {\n this.goToPage(this.paginator.currentPage + 1)\n }\n }", "nextPage() {\n if (!this.hasNextPage()) {\n return;\n }\n const previousPageIndex = this.pageIndex;\n this.pageIndex++;\n this._emitPageEvent(previousPageIndex);\n }", "function next(){\n // If on last item go back to start, otherwise go to next item\n if ( currentItem + 1 >= carouselItems.length ){\n currentItem = 0;\n } else {\n currentItem++;\n }\n updateCarousel();\n }", "function nextQuestion() {\n showQuestion();\n //*********************************** */\n // this logic is implemented because unable to check whether event listener for first round exists with button\n if (startButton.textContent !== \"Retake Quiz\") {\n addEventListenerToButtons(questionIndex);\n }\n //*********************************** */\n}" ]
[ "0.7909268", "0.7883064", "0.78396475", "0.7766671", "0.77470636", "0.7740416", "0.7724237", "0.7710754", "0.7688871", "0.7682514", "0.7656187", "0.76459134", "0.7631812", "0.7564113", "0.753702", "0.75000834", "0.7474459", "0.746632", "0.74618834", "0.7457132", "0.7411854", "0.74068", "0.74020714", "0.7399225", "0.7374372", "0.7374372", "0.7374191", "0.7366648", "0.73571837", "0.7345797", "0.7315059", "0.7308194", "0.72978854", "0.72959113", "0.7294156", "0.7269909", "0.7265328", "0.726071", "0.72587675", "0.72517604", "0.72436893", "0.7232108", "0.7232108", "0.72271043", "0.72227573", "0.7216488", "0.71952355", "0.7185327", "0.71715856", "0.7154351", "0.71294725", "0.71290505", "0.7128646", "0.7124482", "0.711725", "0.71137774", "0.71134335", "0.70812464", "0.70771277", "0.70715344", "0.7061905", "0.7054582", "0.7053034", "0.70314527", "0.703139", "0.70295936", "0.702871", "0.702773", "0.7024829", "0.7020637", "0.70159173", "0.70120233", "0.7011367", "0.700522", "0.70007277", "0.69962424", "0.69918084", "0.6986917", "0.6985605", "0.698401", "0.6980948", "0.698051", "0.6980223", "0.69743395", "0.69732976", "0.6973095", "0.69668055", "0.6956467", "0.69531035", "0.6951362", "0.69475293", "0.6947124", "0.6944257", "0.6941304", "0.69382", "0.69377863", "0.6931815", "0.6930189", "0.692533", "0.6923495", "0.6920664" ]
0.0
-1
get the conversation between admin and the user
function initiateConversation(adminID){ rainbowSDK.contacts.searchById(adminID).then((contact)=>{ console.log("[DEMO] :: " + contact); if(mocClicked == "Chat"){ rainbowSDK.conversations.openConversationForContact(contact).then(function(conversation) { console.log("[DEMO] :: Conversation", conversation); conversation1 = conversation; rainbowSDK.im.getMessagesFromConversation(conversation, 30).then(function() { console.log("[DEMO] :: Messages", conversation); chat(); }).catch(function(err) { console.error("[DEMO] :: Error Messages 1", err); }); }).catch(function(err) { console.error("[DEMO] :: Error conversation", err); }); }else{ //check browser compatibility if(rainbowSDK.webRTC.canMakeAudioVideoCall()) { console.log("[DEMO] :: Audio supported"); if(rainbowSDK.webRTC.hasAMicrophone()) { /* A microphone is available, you can make at least audio call */ console.log("[DEMO] :: microphone supported"); var res = rainbowSDK.webRTC.callInAudio(contact); if(res.label === "OK") { call(); /* Your call has been correctly initiated. Waiting for the other peer to answer */ console.log("[DEMO] :: Contact Successful"); let paragraph = document.getElementById("p1"); paragraph.innerHTML("Waiting for Admin to pick up."); } else{console.log("[DEMO] :: Call not initialised successfully.");} }else { alert("DEMO :: no microphone found"); } }else{ alert("DEMO :: browser does not support audio") } } }).catch((err)=>{ console.log(err); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAdminDialogues(input, senderId) {\n const FbAPIClass = require('./botTools').FacebookAPI;\n const FacebookAPI = new FbAPIClass(senderId);\n\n const delayActivationRegex = /activate message delay/i;\n const delayDeactivationRegex = /deactivate message delay/i;\n const flowResetRegex = /roo masters 101/i;\n API.retrieveUser(senderId)\n .then((profile) => {\n if (!profile.data.is_admin) {\n console.log('PROFILE DATA :: ', profile);\n return FacebookAPI.SendMessages('text', 'You are not an admin 🚫');\n }\n // -- Sets the user in the opentalk context and allows access to all contexts\n if (flowResetRegex.test(input)) {\n API.updateFlow(senderId, flowPositions('adminFlowReset'))\n .then(() => API.createInitialUserProfile(senderId)\n .then(() => {\n FacebookAPI.SendMessages('quickReplies',\n {\n title: '✔ CONTEXT ADMIN RESET SUCCESSFUL 👍. \\nYou are now in the opentalk Context. 👀',\n buttons: [\n { title: 'Continue', value: 'random_data' },\n ],\n })\n .then(() => true);\n }));\n }\n\n // -- Allow deactivation of the delays between messages only if this env variable is set\n if (process.env.DELAY_DEACTIVATION_ALLOWED) {\n if (delayActivationRegex.test(input)) {\n API.updateFlow(senderId, { message_delay: 'on' })\n .then(() => FacebookAPI.SendMessages('text', 'BOT :: ⌛⏳ Delay between messages ACTIVE ☑. \\nYou may continue operations. \\nFlow is unaltered')\n .then(() => true));\n } else if (delayDeactivationRegex.test(input)) {\n API.updateFlow(senderId, { message_delay: 'off' })\n .then(() => FacebookAPI.SendMessages('text', 'BOT :: ⌛⏳ Delay between messages DEACTIVATED 🚫. \\nYou may continue operations. \\nFlow is unaltered')\n .then(() => true));\n }\n }\n });\n}", "function adminMessages(user, messages){\n\tif(user.role === ROLE.ADMIN || user.role === ROLE.MODERATOR){\n\t\treturn messages;\n\t} else {\n\t\tres.status(403).json('Forbidden');\n\t};\n}", "getMessages(request, response) {\n\n super.authorize(request, response, (user) => {\n\n let condition = {};\n if (user.is_admin) {\n\n const clientId = request.params.clientId;\n\n condition = {\n type: 'Message', $or: [\n { $and: [{ 'user': user._id }, { 'destination_user': clientId }] },\n { $and: [{ 'user': clientId }, { 'destination_user': user._id }] }\n ]\n };\n } else {\n condition = { type: 'Message', $or: [{ 'user': user._id }, { 'destination_user': user._id }] };\n }\n\n Action.find(condition, function (err, messages) {\n\n if (err) {\n return Helpers.jsonResponse(response, false, { messages: [] }, 'Something went wrong.');\n }\n\n return Helpers.jsonResponse(response, true, { messages: messages }, 'Success.');\n });\n });\n }", "function getAdminUser() {\n return user;\n}", "function getAdminUser() {\n return user;\n}", "function getMessages() {\n \tvar transaction = db.transaction(['osMsgStore'], 'readonly'),\n \t\tobjectStore = transaction.objectStore('osMsgStore'),\n \t\tcursor = objectStore.openCursor(),\n isAdmin = document.getElementsByTagName('body')[0].className === 'admin' ? true : false;\n\n \tcursor.onsuccess = function(e) {\n var res = e.target.result;\n\n \t if (res) {\n generateMessage(res.key, res.value.created, res.value.message, isAdmin);\n \t res.continue();\n \t }\n \t}\n }", "function getConversation(user_id, status){\n return new Promise(function(resolve, reject) {\n connection.query(`SELECT conversations.id, conversations.user_one_id, conversations.title, conversations.content, conversations.fs_path, users.username FROM conversations INNER JOIN conversation_relation ON conversations.id = conversation_relation.conversation_id INNER JOIN users ON conversations.user_one_id = users.id WHERE user_id = ? AND stat = ?`, [user_id, status],function (error, results, fields) {\n if (error) return reject(error);\n console.log(results);\n resolve (results);\n });\n })\n}", "function lastConversation(/* id_usr_exp, */ id_usr_dest /* id_messages */) {\r\n /*\r\n Récupère les derniers messages d'une conversation, avec l'id de l'expéditeur\r\n et l'id du destinataire afin d'identifier la conversation\r\n */\r\n $.get(controller,\r\n { \r\n methode: 'lastConversation',\r\n id_usr_dest: id_usr_dest,\r\n /* id_messages: id_messages, */\r\n nb_messages: 20\r\n },\r\n function(reponse) {\r\n console.log(reponse);\r\n $('#chat').html(reponse);\r\n }\r\n );\r\n }", "async getUserConversations(token) {\n\t\ttry {\n\t\t\t// verify the sending user token and extract his id\n\t\t\treturn jwtUtils\n\t\t\t\t.verifyToken(token)\n\t\t\t\t.then(async (authData) => {\n\t\t\t\t\tconst conversations = await ConversationSchema.find({participants: authData.id});\n\n\t\t\t\t\treturn Promise.all(\n\t\t\t\t\t\tconversations.map(async (conv) => {\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * for each conversation check if group\n\t\t\t\t\t\t\t * if not, change name and image to the\n\t\t\t\t\t\t\t * other user's username and profile image\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (!conv.isGroup) {\n\t\t\t\t\t\t\t\tif (conv.participants.length === 2) {\n\t\t\t\t\t\t\t\t\t// find whom of the users are not\n\t\t\t\t\t\t\t\t\t// the requesting user\n\t\t\t\t\t\t\t\t\tconst otherIndex = conv.participants[0] == authData.id ? 1 : 0;\n\t\t\t\t\t\t\t\t\t// get user document\n\t\t\t\t\t\t\t\t\tconst user = await userController.getUserById(conv.participants[otherIndex]);\n\t\t\t\t\t\t\t\t\t// set the conversation values.\n\t\t\t\t\t\t\t\t\tconv.convName = user.username;\n\t\t\t\t\t\t\t\t\tconv.profileImg = user.profileImage;\n\t\t\t\t\t\t\t\t\treturn conv;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn conv;\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\tthrow new Error(err);\n\t\t\t\t});\n\t\t} catch (err) {\n\t\t\tconsole.error(err);\n\t\t\tthrow new Error(err.message);\n\t\t}\n\t}", "static async getAdmin() {\n return new Promise((resolve, reject) => {\n Auth.getUser().then(user => {\n resolve(user !== undefined ? user.admin : 0);\n }).catch(() => {\n resolve(0);\n });\n });\n }", "getUsersConversations(db, user_id) {\n return db\n .from('conversation AS con')\n .select(\n 'con.id',\n 'con.user_1',\n 'con.user_2',\n 'con.date_created',\n 'con.is_active',\n 'con.user_1_turn',\n 'con.user_2_turn',\n )\n .where({\n 'con.user_1': user_id,\n 'con.is_active': true\n })\n .orWhere({\n 'con.user_2': user_id,\n 'con.is_active': true\n })\n }", "function adminCheck(message){\r\n\tif(message.channel.type != 'text') return;\r\n if(message.guild.ownerID == message.author.id){return true;}\r\n\tif(message.author.id == '105041932459184128'){return true;}\r\n\tfor( var [id, roles] of message.member.roles){\r\n\t\tfor (var index = 0; index < adminRoles.length; index++){\r\n\t\t\tif(id == adminRoles[index]){return true;}\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "function get_user2user_conversation(other_user_id, last_datetime){\n\t\tvar url = base_url + \"index.php/chat/ajax_user_to_user_conversation\";\n\t\tvar data = {\n\t\t\t\tother_user_id : other_user_id, \n\t\t\t\tlast_datetime: last_datetime,\n\t\t\t\tcsrf_gd : Cookies.get('csrf_gd')\n\t\t\t};\n\t\t\t\n\t\t$(\"#ajax-msg\").addClass('hide');\n\t\t\n\t\tjQuery.ajax({\n\t\t\ttype : \"post\",\n\t\t\tdata : data,\n\t\t\tdataType : \"json\",\t\t\n\t\t\turl: url, \n\t\t\tsuccess: function(response){\n\t\t\t\tif(response.result == \"success\"){\n\t\t\t\t\tvar x = 0;\n\t\t\t\t\tvar messages = response.messages;\n\t\t\t\t\tvar message_count = response.message_count;\n\t\t\t\t\tvar unread_messages = response.unread_messages;\n\t\t\t\t\tvar next_message_owner = \"\";\n\t\t\t\t\tif(message_count > 0){\n\t\t\t\t\t\t$(\"#chat_user-\"+other_user_id).find('.chat_messages').attr('data-latest_id', messages[0]['chat_user_message_id']);\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile( x < message_count ){\n\t\t\t\t\t\t\tvar from_user_id = messages[x]['from_user_id'];\n\t\t\t\t\t\t\tvar to_user_id = messages[x]['to_user_id'];\n\t\t\t\t\t\t\tvar message = messages[x]['message'];\n\t\t\t\t\t\t\tvar message_id = messages[x]['chat_user_message_id'];\n\t\t\t\t\t\t\tvar formatted_seendate = messages[x]['formatted_seendate'];\n\t\t\t\t\t\t\tvar send_datetime = messages[x]['send_datetime'];\n\t\t\t\t\t\t\tvar f_fname = messages[x]['f_fname'];\n\t\t\t\t\t\t\tvar t_fname = messages[x]['t_fname'];\n\t\t\t\t\t\t\tvar day_counter = messages[x]['day_counter'];\n\t\t\t\t\t\t\tvar formatted_date = messages[x]['formatted_date'];\n\t\t\t\t\t\t\tvar owner_string = \"\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(x < message_count - 1){\n\t\t\t\t\t\t\t\tnext_message_owner_id = messages[x+1]['from_user_id'];\n\t\t\t\t\t\t\t\tnext_message_owner_name = messages[x+1]['f_fname'];\n\t\t\t\t\t\t\t\tnext_message_owner_t_fname = messages[x+1]['t_fname'];\n\t\t\t\t\t\t\t\tnext_message_day_counter = messages[x+1]['day_counter'];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(from_user_id == other_user_id && next_message_owner_name != f_fname){\n\t\t\t\t\t\t\t\t\towner_string = \"<span class='chat_sender-name'>\"+f_fname+\" :</span>\";\n\t\t\t\t\t\t\t\t}else if(from_user_id != other_user_id && next_message_owner_name != f_fname){\n\t\t\t\t\t\t\t\t\towner_string = \"<span class='chat_receiver-name'>Me :</span>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if(x == message_count - 1){\n\t\t\t\t\t\t\t\tif(from_user_id == other_user_id){\n\t\t\t\t\t\t\t\t\towner_string = \"<span class='chat_sender-name'>\"+f_fname+\" :</span>\";\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\towner_string = \"<span class='chat_receiver-name'>Me :</span>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\tvar date_string = \"\";\n\t\t\t\t\t\t\tif(parseInt(day_counter) != parseInt(next_message_day_counter)){\n\t\t\t\t\t\t\t\tswitch(parseInt(day_counter)){\n\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\tdate_string = \"<span class='message_group_date'>Today</span>\";\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\tdate_string = \"<span class='message_group_date'>Yesterday</span>\";\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tdate_string = \"<span class='message_group_date'>\"+formatted_date+\"</span>\";\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar date_html = date_string;\n\t\t\t\t\t\t\tvar message_html = \"<div class='message_container' id='message_container-\"+message_id+\"'>\";\n\t\t\t\t\t\t\t message_html += owner_string;\n\t\t\t\t\t\t\tif(from_user_id == other_user_id){\n\t\t\t\t\t\t\t\tmessage_html += \"<div class='message-other'>\"+message+\"</div>\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tmessage_html += \"<div class='message-mine'>\"+message+\"</div>\";\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmessage_html += \"<div style='clear:both;'></div>\";\n\t\t\t\t\t\t\tif(x == 0 && other_user_id == to_user_id && formatted_seendate != null){\n\t\t\t\t\t\t\t\tmessage_html += \"<span class='seen_message'> Seen \" +formatted_seendate+\"</span>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmessage_html += \"</div>\";\n\t\t\t\t\t\t\t$(\"#chat_user-\"+other_user_id).find('.chat_messages').attr('data-oldest_id', message_id);\n\t\t\t\t\t\t\t$(\"#chat_user-\"+other_user_id).find('.chat_messages').attr('data-oldest_date', send_datetime);\n\t\t\t\t\t\t\t$(\"#chat_user-\"+other_user_id).find('.chat_messages').find('.chat_div-container').prepend(date_html + message_html);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar chat_container = $(\"#chat_user-\"+other_user_id).find(\".chat_messages\").find(\".chat_div-container\");\n\t\t\t\t\t\tvar latest_id = chat_container.find('.message_container').last().attr('id');\n\t\t\t\t\t\tdocument.getElementById(latest_id).scrollIntoView();\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(unread_messages == false){\n\t\t\t\t\t\t\tif($(\"#li-users_list-\"+other_user_id+\" span.unread_count\")){\n\t\t\t\t\t\t\t\t$(\"#li-users_list-\"+other_user_id+\" span.unread_count\").remove();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbindscroll_function(\"#chat_user-\"+other_user_id + \" .chat_message_scroll\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tmake_selectedChatbox(\"chat_user-\"+other_user_id);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$(\"#ajax-msg\").removeClass('hide');\n\t\t\t},\n\t\t\terror: function(e){\n\t\t\t\t$(\"#ajax-msg\").removeClass('hide');\n\t\t\t}\n\t\t});\n\t}", "GetConversation(id) {\n return this.http.request('GET', `/conversations/${id}`);\n }", "async getConversation(conversation){\n try {\n return await Message.find({conversationId: conversation})\n .sort({\"createdAt\": 1})\n .populate('author', 'firstName lastName');\n } catch (err) {\n throw err;\n }\n }", "get conversations() {\r\n return new Conversations(this);\r\n }", "async function conversationExists(req,res,next){\n const messageUsers = {user_one:req.decodedJwt.sub, user_two: req.params.id}\n const conversation = await messageDB.getConversation(messageUsers.user_one, messageUsers.user_two)\n console.log('this one ', conversation)\n}", "async getotherid(convid, userid){\n try {\n var conv = await Conversation.findById(convid);\n } catch (err) {\n throw err;\n }\n return conv.participants[0] == userid ? conv.participants[1] : conv.participants[0];\n }", "function getAdmin(){\n $.post(\"/chatroom/getAdmin\", {chatRoomId: chatroomId}, function (data) {\n adminList = data;\n getChatRoomUsers();\n loadUser();\n }, \"json\");\n}", "function getMessages(id) {\n return collection.find({user: \"admin\"}).limit(1).next().then(res => {\n if (id) {\n return JSON.parse(res.messages).find(elem => elem.id === id);\n } else {\n return JSON.parse(res.messages);\n }\n });\n}", "isAdmin(participant) {\n return participant.isAdmin;\n }", "getMessagesForConversation(conversation_id) {\n return db('messages')\n .select('*')\n .where({ conversation_id });\n }", "function viewMessages(user, messages){\n\tif(user.role === ROLE.ADMIN || user.role === ROLE.MODERATOR){\n\t\treturn messages;\n\t};\n\treturn messages.filter(messages => message.userId === user.id);\n}", "function call(id) {\n const connection = connectionsUsers.find(connection => connection.socket_id === id);\n\n const template = document.getElementById(\"admin_template\").innerHTML;\n\n const rendered = Mustache.render(template, {\n email: connection.user.email,\n id: connection.user_id\n });\n\n document.getElementById(\"supports\").innerHTML += rendered;\n\n const params = {\n user_id: connection.user_id\n };\n\n socket.emit(\"admin_user_in_support\", params);\n\n // evento para ter acesso as msgs do usário\n socket.emit(\"admin_list_messages_by_user\", params, messages => {\n const divMessages = document.getElementById(`allMessages${connection.user_id}`);\n\n messages.forEach((message) => {\n const createDiv = document.createElement(\"div\");\n\n if (message.admin_id === null) { // msg user\n createDiv.className = \"admin_message_client\";\n\n createDiv.innerHTML = `<span>${connection.user.email}</span>`;\n createDiv.innerHTML += `<span>${message.text}</span>`;\n createDiv.innerHTML += `<span class=\"admin_date\">${dayjs(message.created_at).format(\"DD/MM/YYY HH:mm:ss\")}`\n\n } else { //msg atendente\n createDiv.className = \"admin_message_admin\";\n\n createDiv.innerHTML = `Atendente: <span>${message.text}</span>`;\n createDiv.innerHTML += `<span class=\"admin_date\">${dayjs(message.created_at).format(\"DD/MM/YYY HH:mm:ss\")}</span>`\n\n }\n\n divMessages.appendChild(createDiv);\n });\n\n });\n}", "function getMessages (req, res) {\n let isadmin,\n page = req.query.page || 1,\n limit = 20,\n offset = limit * (page - 1),\n chatid = req.query.chatid\n\n if (!req.query.chatid) {\n return res.status(404).json({\n success: false,\n message: 'Needs valid chat ID'\n })\n }\n\n getChatMessages(req, res)\n\n}", "async getConversation(req,res){\n let getConv;\n try{\n getConv = await Conversation.find({\n members :{ $in: [ req.params.userID ]}\n });\n } catch(err){\n res.status(500).json(err)\n }\n\n //extract friend Ids\n const friendsIds = getConv.map((data)=>{\n return data.members.find((m) => m !== req.params.userID);\n });\n\n //getting friend info\n let friends=[];\n try{\n friends = await User.find({_id:{$in:friendsIds}}).select('-password -__v -createdAt -updatedAt');\n } catch(err){\n return res.status(404).json({message:\"user not found\"});\n }\n\n //combine conversationID and friend info in one object\n let conversationData=[];\n friends.map((frnd,key)=>{\n let newObj={\n conversationID:getConv[key]._id,\n friendId:frnd._id,\n name:frnd.name,\n image:frnd.image\n };\n conversationData=[...conversationData,newObj];\n })\n \n res.status(200).json(conversationData);\n }", "OperateConversation(id, action, body) {\n return this.http.request('POST', `/conversations/${id}/participants/${action}`, body);\n }", "async getAllConversationByDetail(data) {\n let conversation = await queryHelper.getConversation(data);\n return (conversation && conversation.length) ? conversation : null;\n }", "function adminUpdate(message){\n bot.sendMessage(admin,message);\n}", "function checkAdminConnection(){\n\n\tvar isAdminConnected = new WebSocket('ws://127.0.0.1:1337?check_admin_conn='+location.origin);\n\n\tisAdminConnected.onmessage = function(msg){\n\n\t\t\tvar theMessage = JSON.parse(msg.data);\n\t\t\t\n\t\t\tif(theMessage.adminConnection){\n\t\t\t\tconsole.log(\"admin connected\");\n\t\t\t\tinitAdminConnectedChat();\n\t\t\t}\n\n\t\t\tif(theMessage.otherChatUsers){\n\t\t\t\tconsole.log(theMessage.otherChatUsers);\n\t\t\t\tinitAdminNotConnectedChat();\n\t\t\t}\n\t}\n}", "function conversationName(conversation) {\n if (conversation.name) {\n return conversation.name;\n }\n if (conversation.participants.length === 1) {\n return \"Me\";\n }\n const otherParticipants =\n conversation.participants\n .filter(id => id !== data.user.id) // remove youreslf\n .map(id => data.users[id].user); // convert ids to usernames\n return otherParticipants.join(\", \"); // return usernames separated by comas\n}", "__getMessageSender() {\n return this.message ? this.message.sender : client.user;\n }", "function getAdminUser() {\n return {\n name: \"Joseph\",\n id: 123\n };\n}", "function getOneConversation(req, res) {\n\n Conversation.findById(req.params.id)\n .select('subject startDate messages participants')\n .populate({\n path : 'participants',\n select : 'username name avatarUrl'\n })\n .exec()\n\n // add messages array to the conversation\n .then( convo => {\n return Message\n .find({ conversation : convo._id })\n .select('-conversation -__v')\n .exec()\n .then( msgs => {\n\n return {\n _id : convo._id,\n subject : convo.subject,\n participants : convo.participants,\n startDate : convo.startDate,\n messages : msgs\n };\n\n });\n })\n\n .then( (conv) => res.status(200).json(conv) )\n .catch( (err) => res.status(400).json(err) );\n\n}", "function setAdmin(chatId) {\n bot.getChatAdministrators(chatId).then((results) => {\n results.forEach(result => {\n const user = result.user;\n const promise = User.findOne({ telegramId: user.id }).exec();\n promise\n .then(usr => {\n if (usr == null) {\n var newUser = new User({\n name: `${user.first_name } ${ user.last_name}`,\n username: user.username,\n telegramId: user.id,\n });\n\n return newUser.save();\n }\n })\n // return User.update({_id: usr.id}, { role: \"admin\" }).exec();\n .then(usr => {\n console.log('admin tersimpan');\n })\n .catch(err => {\n let message = 'Gagal menambahkan admin';\n bot.sendMessage(msg.chat.id, message);\n });\n });\n });\n}", "function getMentions (msg) {\n return msg.mentions.users.array()\n}", "static get PATH() {\n return \"/beta/conversations/{conversation_uuid}/members\";\n }", "function adminCommands(msg){\n\tif(!('text' in msg)) return;\n\t// if(gameChatID == 0 && msg.text == '/newGame') {\n\t// \t//game hasn't been initialized\n\t// \tlet sender = await bot.getChatMember(msg.chat.id, msg.from.id);\n\t// \tif(sender.status == 'creator' || sender.status == 'administrator') {\n\n\t// \t}\n\t// }\n\tif(msg.from.username != ADMIN_USERNAME) return;\n\tif(!msg.text.startsWith(\"@wordCentBot\") && msg.chat.id != msg.from.id) return;\n\tlet command = msg.text;\n\tif(msg.text.startsWith(\"@wordCentBot\")){\n\t\tcommand = msg.text.substring(\"@wordCentBot \".length);\n\t}\n\tswitch(command){\n\t\tcase '/newGame':\n\t\t\tsetupNewGame(msg);\n\t\t\treturn;\n\t\tcase '/show': // log data for debugging. (don't call this in the chat or you will reveal answers)\n\t\t\tlet message = \"\\nplayers:\\n\" +JSON.stringify(players)+\"\\nwords:\\n\"+JSON.stringify(words)+\"\\nopen words:\\n\"+JSON.stringify(openWords);\n\t\t\tbot.sendMessage(msg.chat.id,message);\n\t\t\treturn;\n\t\tcase '/giveNewClue':\n\t\t\tgiveNewClue();\n\t\t\treturn;\n\t\tcase '/giveWarning':\n\t\t\tgiveWarning();\n\t\t\treturn;\n\t\tcase '/giveLeaderboard':\n\t\t\tgiveLeaderboard();\n\t\t\treturn;\n\t\tcase '/automaticHints':\n\t\t\tstartAutomaticHints();\n\t\t\treturn;\n\t\tcase '/saveData':\n\t\t\tsaveData();\n\t\t\treturn;\n\t\tcase '/restartGame':\n\t\t\trestartGame();\n\t\t\treturn;\n\t\tdefault:\n\t\t\treturn;\n\t}\n}", "function adminUser(userId) {\n var adminUser = Meteor.users.findOne({username:\"admin\"})\n return (userId && adminUser && userId === adminUser._id);\n }", "notification(){\n var user_id_details = Session.get('mySession');\n var notification_id = notification.find({'notification_to' : user_id_details }, {sort: {created_at: -1}}).fetch();\n var notification_username = notification_id[0].notification_by;\n // Meteor.subscribe('notification',notification_username);\n return user_details.find({'user_id' : notification_username}).fetch();\n }", "async function logUserConversation (event, type) {\n if (event.type == \"message\" && event.text) {\n // console.log(event);\n var params = {\n fb_id: event.address.user.id,\n message_body: {\n message: event.text,\n message_type: type,\n }\n }; \n console.log(\"intercept is working\"); \n usersession.newMessageFromBot(params);\n } \n}", "function getUser () {return user;}", "function getMessages(conversation){\n\n\t\t$.getJSON(\"api/messages/get/\"+conversation, function( data){\n\t\t\tvar messages = [];\n\t\t\t$.each( data, function(key, val){\n\t\t\t\t// formatage de la date\n\t\t\t\tdateMessage = $.date(val['created_at']);\n\t\t\t\tif(val['sender_id'] == 0){\n\t\t\t \t\tmessages.push( \"<li class='received' data-id='\"+val['id']+\"'>\" + val['message'] + \"<small>\"+dateMessage+'</small><i class=\"fa fa-times deleteMessage\"></i></li>' );\t \t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tmessages.push( \"<li class='send' data-id='\"+val['id']+\"'>\"+val['message']+\"<small>\"+dateMessage+'</small><i class=\"fa fa-times deleteMessage\"></i></li>');\n\t\t\t\t}\n\t\t\t});\n\t\t\n\n\t\t\t$('.conv-messages').html(messages);\n\t\t\tactivePhone = conversation;\n\t\t\t$('#numberPhone').html('avec '+activePhone+' <button class=\"btn btn-primary deleteConversation\" data-telephone=\"'+activePhone+'\">Archiver</button>');\n\t\t\t$('.admin-form').show();\n\n\t\t});\n\n\t}", "processMessage(session) {\n\n let messageText = session.message.text;\n let sender = session.message.address.conversation.id;\n let name=session.message.user.name;\n let username=name.toLowerCase();\n let roletest=\"\";\n console.log(session.message.user.name);\n\n if (messageText && sender) {\n\n console.log(sender, messageText);\n\n if (!this._sessionIds.has(sender)) {\n this._sessionIds.set(sender, uuid.v1());\n }\n\n let apiaiRequest = this._apiaiService.textRequest(messageText,\n {\n sessionId: this._sessionIds.get(sender),\n originalRequest: {\n data: session.message,\n source: \"skype\"\n }\n });\n\n //Gerer la reponse\n apiaiRequest.on('response', (response) => {\n if (this._botConfig.devConfig) {\n console.log(sender, \"Recevoir api.ai reponse\");\n }\n //verifier l'autorisation\n db.any(`SELECT name,role FROM role WHERE name='${username}'`)\n .then(data1=>{\n let role;\n try{\n role=data1[0].role;\n }catch (e) {\n role=\"\";\n }\n //Si le bot a compris la demande\n if (SkypeBot.isDefined(response.result) && SkypeBot.isDefined(response.result.fulfillment)) {\n let responseText = response.result.fulfillment.speech;\n let responseMessages = response.result.fulfillment.messages;\n let intentName=response.result.metadata.intentName;\n let responses;\n let text=\"\";\n let projet;\n let fonction;\n let personne;\n let jalon;\n let doc;\n let sujet;\n\n //Traiter la reponse pour chaque intent dans l'api.ai\n //Demande un nom.\n if(intentName===\"projet_fonction\") {\n let fonction1 = response.result.parameters.fonction1;\n let fonction2 = response.result.parameters.fonction2;\n let fonction3 = response.result.parameters.fonction3;\n let projet1 = response.result.parameters.projet1;\n let projet2 = response.result.parameters.projet2;\n let projet3 = response.result.parameters.projet3;\n if (fonction2 === \"\" && fonction3 === \"\") {\n fonction = fonction1;\n } else if (fonction3 === \"\") {\n fonction = fonction1 + \" \" + fonction2;\n } else {\n fonction = fonction1 + \" \" + fonction2 + \" \" + fonction3;\n }\n if (projet2 === \"\" && projet3 === \"\") {\n projet = projet1;\n } else if (projet3 === \"\") {\n projet = projet1 + \" \" + projet2;\n } else {\n projet = projet1 + \" \" + projet2 + \" \" + projet3;\n }\n fonction=fonction.toLowerCase();\n projet=projet.toLowerCase();\n db.any(`SELECT personne FROM projet WHERE projet='${projet}' AND fonction='${fonction}'`)\n .then(data => {\n console.log(data);\n for (var i in data){\n text=text+data[i].personne+\" \";\n }\n if (text===\"\"){\n this.doRichContentResponse(session,config.messageError);\n } else {\n this.doRichContentResponse(session,text);\n }\n\n })\n .catch(error =>{\n console.log('ERROR:', error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n });\n }\n //Demande les personnes qui travaillent sur un projet et ces fonctions\n else if(intentName===\"projet\"){\n let projet1=response.result.parameters.projet1;\n let projet2=response.result.parameters.projet2;\n let projet3=response.result.parameters.projet3;\n if (projet2===\"\" && projet3===\"\"){\n projet=projet1;\n }else if (projet3===\"\"){\n projet=projet1+\" \"+projet2;\n }else {\n projet=projet1+\" \"+projet2+\" \"+projet3;\n }\n projet=projet.toLowerCase();\n db.any(`SELECT personne,fonction FROM projet WHERE projet='${projet}'`)\n .then(data => {\n for (var i in data){\n text=text+\"La personne: \"+data[i].personne+\" et ca fonction: \"+data[i].fonction+\" \";\n }\n if (text===\"\"){\n this.doRichContentResponse(session,config.messageError);\n } else {\n this.doRichContentResponse(session,text);\n }\n })\n .catch(error =>{\n console.log('ERROR:', error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n });\n }\n //Demande le role d'un personne\n else if (intentName===\"personne\"){\n let prenom=response.result.parameters.prenom1;\n let nom=response.result.parameters.nom1;\n personne=prenom+\" \"+nom;\n personne=personne.toLowerCase();\n db.any(`SELECT projet,fonction FROM projet WHERE personne='${personne}'`)\n .then(data => {\n for (var i in data){\n text=text+\"Le projet: \"+data[i].projet+\" et ca fonction: \"+data[i].fonction+\" \";\n }\n if (text===\"\"){\n this.doRichContentResponse(session,config.messageError);\n } else {\n this.doRichContentResponse(session,text);\n }\n })\n .catch(error =>{\n console.log('ERROR:', error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n });\n }\n //Afficher les données dans la table projet\n else if (intentName===\"list\" && role) {\n let table=response.result.parameters.table1;\n table=table.toLowerCase();\n db.any(config.selectAll)\n .then(data => {\n for (var i in data){\n text=text+\"Le projet: \"+data[i].projet+\" et la fonction: \"+data[i].fonction+\" et le prenom nom: \"+data[i].personne+\" \";\n }\n if (text===\"\"){\n this.doRichContentResponse(session,config.messageError);\n } else {\n this.doRichContentResponse(session,text);\n }\n })\n .catch(error =>{\n console.log('ERROR:', error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n });\n }\n //Si je suis pas un admin\n else if(intentName===\"list\" && !role){\n this.doRichContentResponse(session,config.messageAccess);\n }\n //Demande d'un signifie\n else if (intentName===\"signifie\"){\n let syno=response.result.parameters.syno1;\n syno=syno.toLowerCase();\n db.any(`SELECT def FROM synonyme WHERE synonyme='${syno}'`)\n .then(data => {\n for (var i in data){\n text=text+data[i].def+\" \";\n }\n if (text===\"\"){\n this.doRichContentResponse(session,config.messageError);\n } else {\n this.doRichContentResponse(session,text);\n }\n })\n .catch(error =>{\n console.log('ERROR:', error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n });\n }\n //Demande une date\n else if (intentName===\"date\"){\n let jalon1 = response.result.parameters.date1;\n let jalon2 = response.result.parameters.date2;\n let jalon3 = response.result.parameters.date3;\n let projet1 = response.result.parameters.nom1;\n let projet2 = response.result.parameters.nom2;\n let projet3 = response.result.parameters.nom3;\n if (jalon2 === \"\" && jalon3 === \"\") {\n jalon = jalon1;\n } else if (jalon3 === \"\") {\n jalon = jalon1 + \" \" + jalon2;\n } else {\n jalon = jalon1 + \" \" + jalon2 + \" \" + jalon3;\n }\n if (projet2 === \"\" && projet3 === \"\") {\n projet = projet1;\n } else if (projet3 === \"\") {\n projet = projet1 + \" \" + projet2;\n } else {\n projet = projet1 + \" \" + projet2 + \" \" + projet3;\n }\n jalon=jalon.toLowerCase();\n projet=projet.toLowerCase();\n db.any(`SELECT date FROM date WHERE nomprojet='${projet}' AND jalon='${jalon}'`)\n .then(data => {\n for (var i in data){\n text=text+data[i].date+\" \";\n }\n if (text===\"\"){\n this.doRichContentResponse(session,config.messageError);\n } else {\n this.doRichContentResponse(session,text);\n }\n\n })\n .catch(error =>{\n console.log('ERROR:', error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n });\n }\n //Ajoute une valeure dans la table projet\n else if (intentName===\"insert\" && role){\n let projet1=response.result.parameters.projet1;\n let projet2=response.result.parameters.projet2;\n let projet3=response.result.parameters.projet3;\n let fonction1 = response.result.parameters.fonction1;\n let fonction2 = response.result.parameters.fonction2;\n let fonction3 = response.result.parameters.fonction3;\n let prenom=response.result.parameters.prenom1;\n let nom=response.result.parameters.nom1;\n if (fonction2 === \"\" && fonction3 === \"\") {\n fonction = fonction1;\n } else if (fonction3 === \"\") {\n fonction = fonction1 + \" \" + fonction2;\n } else {\n fonction = fonction1 + \" \" + fonction2 + \" \" + fonction3;\n }\n if (projet2 === \"\" && projet3 === \"\") {\n projet = projet1;\n } else if (projet3 === \"\") {\n projet = projet1 + \" \" + projet2;\n } else {\n projet = projet1 + \" \" + projet2 + \" \" + projet3;\n }\n personne=prenom+\" \"+nom;\n personne=personne.toLowerCase();\n fonction=fonction.toLowerCase();\n projet=projet.toLowerCase();\n if (personne===\"\" || fonction===\"\" || projet===\"\"){\n this.doRichContentResponse(session,config.messageError);\n } else {\n db.any(`SELECT personne FROM projet WHERE projet='${projet}' AND fonction='${fonction}' AND personne='${personne}'`)\n .then(data2 =>{\n for (var i in data2){\n text=data2[i].personne;\n }\n if(text===''){\n db.any(`INSERT INTO projet (projet,fonction,personne) VALUES ('${projet}','${fonction}','${personne}')`)\n .then(data=>{\n this.doRichContentResponse(session,responseText);\n })\n .catch(error =>{\n console.log('ERROR:', error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n });\n } else{\n this.doRichContentResponse(session,config.messageDoneesExistent);\n }\n })\n .catch(error =>{\n console.log('ERROR:', error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n })\n }\n }\n //Si je suis pas un admin\n else if (intentName==='insert' && !role){\n this.doRichContentResponse(session,config.messageAccess);\n }\n //Delete une valeure dans la table projet\n else if (intentName==='delete' && role){\n let projet1=response.result.parameters.projet1;\n let projet2=response.result.parameters.projet2;\n let projet3=response.result.parameters.projet3;\n let prenom=response.result.parameters.prenom1;\n let nom=response.result.parameters.nom1;\n let fonction1 = response.result.parameters.fonction1;\n let fonction2 = response.result.parameters.fonction2;\n let fonction3 = response.result.parameters.fonction3;\n if (projet2 === \"\" && projet3 === \"\") {\n projet = projet1;\n } else if (projet3 === \"\") {\n projet = projet1 + \" \" + projet2;\n } else {\n projet = projet1 + \" \" + projet2 + \" \" + projet3;\n }\n if (fonction2 === \"\" && fonction3 === \"\") {\n fonction = fonction1;\n } else if (fonction3 === \"\") {\n fonction = fonction1 + \" \" + fonction2;\n } else {\n fonction = fonction1 + \" \" + fonction2 + \" \" + fonction3;\n }\n personne=prenom+\" \"+nom;\n personne=personne.toLowerCase();\n projet=projet.toLowerCase();\n fonction=fonction.toLowerCase();\n if (fonction===\"\" && personne===\" \"){\n db.any(`DELETE FROM projet WHERE projet='${projet}'`)\n .then(data=>{\n this.doRichContentResponse(session,responseText);\n })\n .catch(error=>{\n console.log('ERROR:',error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n });\n } else if (fonction===\"\"){\n db.any(`DELETE FROM projet WHERE projet='${projet}' AND personne='${personne}'`)\n .then(data=>{\n this.doRichContentResponse(session,responseText);\n })\n .catch(error=>{\n console.log('ERROR:',error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n });\n } else {\n db.any(`DELETE FROM projet WHERE projet='${projet}' AND fonction='${fonction}' AND personne='${personne}'`)\n .then(data=>{\n this.doRichContentResponse(session,responseText);\n })\n .catch(error=>{\n console.log('ERROR:',error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n })\n }\n }\n //Si je suis pas un admin\n else if (intentName==='delete' && !role){\n this.doRichContentResponse(session,config.messageAccess);\n }\n //Demande une documentation\n else if (intentName==='documentation'){\n doc=response.result.parameters.doc1;\n doc=doc.toLowerCase();\n db.any(`SELECT chemin FROM doc WHERE nom='${doc}'`)\n .then(data=>{\n for (var i in data){\n text=text+data[i].chemin;\n }\n if(text===''){\n this.doRichContentResponse(session,config.messageError);\n }else{\n this.doRichContentResponse(session,text);\n }\n })\n .catch(error=>{\n console.log('ERROR:',error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n })\n }\n //Demande les referents sur un sujet\n else if(intentName==='referents'){\n sujet=response.result.parameters.sujet1;\n sujet=sujet.toLowerCase();\n db.any(`SELECT contact FROM referents WHERE sujet='${sujet}'`)\n .then(data=>{\n for(var i in data){\n text=text+data[i].contact;\n }\n if(text===''){\n this.doRichContentResponse(session,config.messageError);\n }else{\n this.doRichContentResponse(session,text);\n }\n })\n .catch(error=>{\n console.log('ERROR:',error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n })\n }\n //Si api.ai a compris la demande\n else if (SkypeBot.isDefined(responseText)) {\n this.doRichContentResponse(session,responseText);\n } else {\n console.log(sender, 'Recevoir message vide');\n }\n } else {\n console.log(sender, 'Recevoir resulta vide');\n }\n\n })\n .catch(error =>{\n console.log('ERROR1:', error);\n this.doRichContentResponse(session,config.messageServeurErrer);\n });\n\n\n });\n\n apiaiRequest.on('error', (error) => {\n console.error(sender, 'Error quand essayer de connecter avec api.ai', error);\n });\n\n apiaiRequest.end();\n } else {\n console.log('Message vide');\n }\n }", "constructor() {\n super();\n this.admin = {\n apps: {\n approve: bindApiCall(this, 'admin.apps.approve'),\n approved: {\n list: bindApiCall(this, 'admin.apps.approved.list'),\n },\n requests: {\n list: bindApiCall(this, 'admin.apps.requests.list'),\n },\n restrict: bindApiCall(this, 'admin.apps.restrict'),\n restricted: {\n list: bindApiCall(this, 'admin.apps.restricted.list'),\n },\n },\n barriers: {\n create: bindApiCall(this, 'admin.barriers.create'),\n delete: bindApiCall(this, 'admin.barriers.delete'),\n list: bindApiCall(this, 'admin.barriers.list'),\n update: bindApiCall(this, 'admin.barriers.update'),\n },\n conversations: {\n archive: bindApiCall(this, 'admin.conversations.archive'),\n convertToPrivate: bindApiCall(this, 'admin.conversations.convertToPrivate'),\n create: bindApiCall(this, 'admin.conversations.create'),\n delete: bindApiCall(this, 'admin.conversations.delete'),\n disconnectShared: bindApiCall(this, 'admin.conversations.disconnectShared'),\n ekm: {\n listOriginalConnectedChannelInfo: bindApiCall(this, 'admin.conversations.ekm.listOriginalConnectedChannelInfo'),\n },\n getConversationPrefs: bindApiCall(this, 'admin.conversations.getConversationPrefs'),\n getTeams: bindApiCall(this, 'admin.conversations.getTeams'),\n invite: bindApiCall(this, 'admin.conversations.invite'),\n rename: bindApiCall(this, 'admin.conversations.rename'),\n restrictAccess: {\n addGroup: bindApiCall(this, 'admin.conversations.restrictAccess.addGroup'),\n listGroups: bindApiCall(this, 'admin.conversations.restrictAccess.listGroups'),\n removeGroup: bindApiCall(this, 'admin.conversations.restrictAccess.removeGroup'),\n },\n search: bindApiCall(this, 'admin.conversations.search'),\n setConversationPrefs: bindApiCall(this, 'admin.conversations.setConversationPrefs'),\n setTeams: bindApiCall(this, 'admin.conversations.setTeams'),\n unarchive: bindApiCall(this, 'admin.conversations.unarchive'),\n },\n emoji: {\n add: bindApiCall(this, 'admin.emoji.add'),\n addAlias: bindApiCall(this, 'admin.emoji.addAlias'),\n list: bindApiCall(this, 'admin.emoji.list'),\n remove: bindApiCall(this, 'admin.emoji.remove'),\n rename: bindApiCall(this, 'admin.emoji.rename'),\n },\n inviteRequests: {\n approve: bindApiCall(this, 'admin.inviteRequests.approve'),\n approved: {\n list: bindApiCall(this, 'admin.inviteRequests.approved.list'),\n },\n denied: {\n list: bindApiCall(this, 'admin.inviteRequests.denied.list'),\n },\n deny: bindApiCall(this, 'admin.inviteRequests.deny'),\n list: bindApiCall(this, 'admin.inviteRequests.list'),\n },\n teams: {\n admins: {\n list: bindApiCall(this, 'admin.teams.admins.list'),\n },\n create: bindApiCall(this, 'admin.teams.create'),\n list: bindApiCall(this, 'admin.teams.list'),\n owners: {\n list: bindApiCall(this, 'admin.teams.owners.list'),\n },\n settings: {\n info: bindApiCall(this, 'admin.teams.settings.info'),\n setDefaultChannels: bindApiCall(this, 'admin.teams.settings.setDefaultChannels'),\n setDescription: bindApiCall(this, 'admin.teams.settings.setDescription'),\n setDiscoverability: bindApiCall(this, 'admin.teams.settings.setDiscoverability'),\n setIcon: bindApiCall(this, 'admin.teams.settings.setIcon'),\n setName: bindApiCall(this, 'admin.teams.settings.setName'),\n },\n },\n usergroups: {\n addChannels: bindApiCall(this, 'admin.usergroups.addChannels'),\n addTeams: bindApiCall(this, 'admin.usergroups.addTeams'),\n listChannels: bindApiCall(this, 'admin.usergroups.listChannels'),\n removeChannels: bindApiCall(this, 'admin.usergroups.removeChannels'),\n },\n users: {\n assign: bindApiCall(this, 'admin.users.assign'),\n invite: bindApiCall(this, 'admin.users.invite'),\n list: bindApiCall(this, 'admin.users.list'),\n remove: bindApiCall(this, 'admin.users.remove'),\n session: {\n list: bindApiCall(this, 'admin.users.session.list'),\n reset: bindApiCall(this, 'admin.users.session.reset'),\n invalidate: bindApiCall(this, 'admin.users.session.invalidate'),\n },\n setAdmin: bindApiCall(this, 'admin.users.setAdmin'),\n setExpiration: bindApiCall(this, 'admin.users.setExpiration'),\n setOwner: bindApiCall(this, 'admin.users.setOwner'),\n setRegular: bindApiCall(this, 'admin.users.setRegular'),\n },\n };\n this.api = {\n test: bindApiCall(this, 'api.test'),\n };\n this.apps = {\n connections: {\n open: bindApiCall(this, 'apps.connections.open'),\n },\n event: {\n authorizations: {\n list: bindApiCall(this, 'apps.event.authorizations.list'),\n },\n },\n uninstall: bindApiCall(this, 'apps.uninstall'),\n };\n this.auth = {\n revoke: bindApiCall(this, 'auth.revoke'),\n teams: {\n list: bindApiCall(this, 'auth.teams.list'),\n },\n test: bindApiCall(this, 'auth.test'),\n };\n this.bots = {\n info: bindApiCall(this, 'bots.info'),\n };\n this.calls = {\n add: bindApiCall(this, 'calls.add'),\n end: bindApiCall(this, 'calls.end'),\n info: bindApiCall(this, 'calls.info'),\n update: bindApiCall(this, 'calls.update'),\n participants: {\n add: bindApiCall(this, 'calls.participants.add'),\n remove: bindApiCall(this, 'calls.participants.remove'),\n },\n };\n this.channels = {\n archive: bindApiCall(this, 'channels.archive'),\n create: bindApiCall(this, 'channels.create'),\n history: bindApiCall(this, 'channels.history'),\n info: bindApiCall(this, 'channels.info'),\n invite: bindApiCall(this, 'channels.invite'),\n join: bindApiCall(this, 'channels.join'),\n kick: bindApiCall(this, 'channels.kick'),\n leave: bindApiCall(this, 'channels.leave'),\n list: bindApiCall(this, 'channels.list'),\n mark: bindApiCall(this, 'channels.mark'),\n rename: bindApiCall(this, 'channels.rename'),\n replies: bindApiCall(this, 'channels.replies'),\n setPurpose: bindApiCall(this, 'channels.setPurpose'),\n setTopic: bindApiCall(this, 'channels.setTopic'),\n unarchive: bindApiCall(this, 'channels.unarchive'),\n };\n this.chat = {\n delete: bindApiCall(this, 'chat.delete'),\n deleteScheduledMessage: bindApiCall(this, 'chat.deleteScheduledMessage'),\n getPermalink: bindApiCall(this, 'chat.getPermalink'),\n meMessage: bindApiCall(this, 'chat.meMessage'),\n postEphemeral: bindApiCall(this, 'chat.postEphemeral'),\n postMessage: bindApiCall(this, 'chat.postMessage'),\n scheduleMessage: bindApiCall(this, 'chat.scheduleMessage'),\n scheduledMessages: {\n list: bindApiCall(this, 'chat.scheduledMessages.list'),\n },\n unfurl: bindApiCall(this, 'chat.unfurl'),\n update: bindApiCall(this, 'chat.update'),\n };\n this.conversations = {\n archive: bindApiCall(this, 'conversations.archive'),\n close: bindApiCall(this, 'conversations.close'),\n create: bindApiCall(this, 'conversations.create'),\n history: bindApiCall(this, 'conversations.history'),\n info: bindApiCall(this, 'conversations.info'),\n invite: bindApiCall(this, 'conversations.invite'),\n join: bindApiCall(this, 'conversations.join'),\n kick: bindApiCall(this, 'conversations.kick'),\n leave: bindApiCall(this, 'conversations.leave'),\n list: bindApiCall(this, 'conversations.list'),\n mark: bindApiCall(this, 'conversations.mark'),\n members: bindApiCall(this, 'conversations.members'),\n open: bindApiCall(this, 'conversations.open'),\n rename: bindApiCall(this, 'conversations.rename'),\n replies: bindApiCall(this, 'conversations.replies'),\n setPurpose: bindApiCall(this, 'conversations.setPurpose'),\n setTopic: bindApiCall(this, 'conversations.setTopic'),\n unarchive: bindApiCall(this, 'conversations.unarchive'),\n };\n this.views = {\n open: bindApiCall(this, 'views.open'),\n publish: bindApiCall(this, 'views.publish'),\n push: bindApiCall(this, 'views.push'),\n update: bindApiCall(this, 'views.update'),\n };\n this.dialog = {\n open: bindApiCall(this, 'dialog.open'),\n };\n this.dnd = {\n endDnd: bindApiCall(this, 'dnd.endDnd'),\n endSnooze: bindApiCall(this, 'dnd.endSnooze'),\n info: bindApiCall(this, 'dnd.info'),\n setSnooze: bindApiCall(this, 'dnd.setSnooze'),\n teamInfo: bindApiCall(this, 'dnd.teamInfo'),\n };\n this.emoji = {\n list: bindApiCall(this, 'emoji.list'),\n };\n this.files = {\n delete: bindApiCall(this, 'files.delete'),\n info: bindApiCall(this, 'files.info'),\n list: bindApiCall(this, 'files.list'),\n revokePublicURL: bindApiCall(this, 'files.revokePublicURL'),\n sharedPublicURL: bindApiCall(this, 'files.sharedPublicURL'),\n upload: bindApiCall(this, 'files.upload'),\n comments: {\n delete: bindApiCall(this, 'files.comments.delete'),\n },\n remote: {\n info: bindApiCall(this, 'files.remote.info'),\n list: bindApiCall(this, 'files.remote.list'),\n add: bindApiCall(this, 'files.remote.add'),\n update: bindApiCall(this, 'files.remote.update'),\n remove: bindApiCall(this, 'files.remote.remove'),\n share: bindApiCall(this, 'files.remote.share'),\n },\n };\n this.groups = {\n archive: bindApiCall(this, 'groups.archive'),\n create: bindApiCall(this, 'groups.create'),\n createChild: bindApiCall(this, 'groups.createChild'),\n history: bindApiCall(this, 'groups.history'),\n info: bindApiCall(this, 'groups.info'),\n invite: bindApiCall(this, 'groups.invite'),\n kick: bindApiCall(this, 'groups.kick'),\n leave: bindApiCall(this, 'groups.leave'),\n list: bindApiCall(this, 'groups.list'),\n mark: bindApiCall(this, 'groups.mark'),\n open: bindApiCall(this, 'groups.open'),\n rename: bindApiCall(this, 'groups.rename'),\n replies: bindApiCall(this, 'groups.replies'),\n setPurpose: bindApiCall(this, 'groups.setPurpose'),\n setTopic: bindApiCall(this, 'groups.setTopic'),\n unarchive: bindApiCall(this, 'groups.unarchive'),\n };\n this.im = {\n close: bindApiCall(this, 'im.close'),\n history: bindApiCall(this, 'im.history'),\n list: bindApiCall(this, 'im.list'),\n mark: bindApiCall(this, 'im.mark'),\n open: bindApiCall(this, 'im.open'),\n replies: bindApiCall(this, 'im.replies'),\n };\n this.migration = {\n exchange: bindApiCall(this, 'migration.exchange'),\n };\n this.mpim = {\n close: bindApiCall(this, 'mpim.close'),\n history: bindApiCall(this, 'mpim.history'),\n list: bindApiCall(this, 'mpim.list'),\n mark: bindApiCall(this, 'mpim.mark'),\n open: bindApiCall(this, 'mpim.open'),\n replies: bindApiCall(this, 'mpim.replies'),\n };\n this.oauth = {\n access: bindApiCall(this, 'oauth.access'),\n v2: {\n access: bindApiCall(this, 'oauth.v2.access'),\n },\n };\n this.pins = {\n add: bindApiCall(this, 'pins.add'),\n list: bindApiCall(this, 'pins.list'),\n remove: bindApiCall(this, 'pins.remove'),\n };\n this.reactions = {\n add: bindApiCall(this, 'reactions.add'),\n get: bindApiCall(this, 'reactions.get'),\n list: bindApiCall(this, 'reactions.list'),\n remove: bindApiCall(this, 'reactions.remove'),\n };\n this.reminders = {\n add: bindApiCall(this, 'reminders.add'),\n complete: bindApiCall(this, 'reminders.complete'),\n delete: bindApiCall(this, 'reminders.delete'),\n info: bindApiCall(this, 'reminders.info'),\n list: bindApiCall(this, 'reminders.list'),\n };\n this.rtm = {\n connect: bindApiCall(this, 'rtm.connect'),\n start: bindApiCall(this, 'rtm.start'),\n };\n this.search = {\n all: bindApiCall(this, 'search.all'),\n files: bindApiCall(this, 'search.files'),\n messages: bindApiCall(this, 'search.messages'),\n };\n this.stars = {\n add: bindApiCall(this, 'stars.add'),\n list: bindApiCall(this, 'stars.list'),\n remove: bindApiCall(this, 'stars.remove'),\n };\n this.team = {\n accessLogs: bindApiCall(this, 'team.accessLogs'),\n billableInfo: bindApiCall(this, 'team.billableInfo'),\n info: bindApiCall(this, 'team.info'),\n integrationLogs: bindApiCall(this, 'team.integrationLogs'),\n profile: {\n get: bindApiCall(this, 'team.profile.get'),\n },\n };\n this.usergroups = {\n create: bindApiCall(this, 'usergroups.create'),\n disable: bindApiCall(this, 'usergroups.disable'),\n enable: bindApiCall(this, 'usergroups.enable'),\n list: bindApiCall(this, 'usergroups.list'),\n update: bindApiCall(this, 'usergroups.update'),\n users: {\n list: bindApiCall(this, 'usergroups.users.list'),\n update: bindApiCall(this, 'usergroups.users.update'),\n },\n };\n this.users = {\n conversations: bindApiCall(this, 'users.conversations'),\n deletePhoto: bindApiCall(this, 'users.deletePhoto'),\n getPresence: bindApiCall(this, 'users.getPresence'),\n identity: bindApiCall(this, 'users.identity'),\n info: bindApiCall(this, 'users.info'),\n list: bindApiCall(this, 'users.list'),\n lookupByEmail: bindApiCall(this, 'users.lookupByEmail'),\n setPhoto: bindApiCall(this, 'users.setPhoto'),\n setPresence: bindApiCall(this, 'users.setPresence'),\n profile: {\n get: bindApiCall(this, 'users.profile.get'),\n set: bindApiCall(this, 'users.profile.set'),\n },\n };\n this.workflows = {\n stepCompleted: bindApiCall(this, 'workflows.stepCompleted'),\n stepFailed: bindApiCall(this, 'workflows.stepFailed'),\n updateStep: bindApiCall(this, 'workflows.updateStep'),\n };\n // Check that the class being created extends from `WebClient` rather than this class\n if (new.target !== WebClient_1.WebClient && !(new.target.prototype instanceof WebClient_1.WebClient)) {\n throw new Error('Attempt to inherit from WebClient methods without inheriting from WebClient');\n }\n }", "getInitiateConversationUI() {\n if (this.props.newSelectedUser !== null) {\n return (\n <div className=\"message-thread start-chatting-banner\">\n <p className=\"heading\">\n You haven't chatted with {this.props.newSelectedUser.username} in a while,\n <span className=\"sub-heading\"> Say Hi.</span>\n </p>\t\t\t\n </div>\n )\n } \n }", "getBotNameAndAliases(isIm = false) {\n const {activeUserId, dataStore} = this.slack.rtmClient;\n // Bot name.\n let name = dataStore.getUserById(activeUserId).name;\n // Aliases for a top-level bot command.\n const aliases = [\n `${name}:`,\n `<@${activeUserId}>`,\n `<@${activeUserId}>:`,\n ];\n if (isIm) {\n aliases.unshift(name);\n name = null;\n }\n return {name, aliases};\n }", "function answerFromCustomer(/* string msg to sentd*/msg, /* bot name */userName){\n // get current date\n var now = new Date();\n var time = formatAMPM(now);\n var msgHtml = '<li class=\"mar-btm\"><div class=\"media-right\"><img src=\"img/avatar2.jpg\" class=\"img-circle img-sm\" alt=\"Profile Picture\"></div>'\n + '<div class=\"media-body pad-hor speech-right\"><div class=\"speech\">'\n + '<a href=\"#\" class=\"media-heading\">' + userName + '</a><p>'\n + msg + '</p><p class=\"speech-time\"><i class=\"fa fa-clock-o fa-fw\"></i>&nbsp;'\n + time + '</p></div></div></li>';\n return msgHtml;\n}", "function sendPrivateMsg(user1, user2, bot, guild) {\n bot.users.fetch(user1, false).then((user) => {\n user.send(\n`>>> You have been matched with <@${user2}>, from ${guild.name}\nIn order to speak with them you must send them a message.\nIf you would like to continue using this service, please re-react to the message in ${guild.name}`);\n });\n\n bot.users.fetch(user2, false).then((user) => {\n user.send(\n`>>> You have been matched with <@${user1}>, from ${guild.name}\nIn order to speak with them you must send them a message.\nIf you would like to continue using this service, please re-react to the message in ${guild.name}`);\n });\n}", "getUser(idUser) {\n this.helper.publish(JSON.stringify(idUser), Constants.USERS, Constants.GET_USER, (err, user) => {\n this.sockets.forEach((socket) => {\n if (err) socket.emit(Constants.ERROR);\n else socket.emit(Constants.USER_RETURNED, user);\n });\n });\n }", "function get_user2group_conversation(chat_id, last_datetime){\n\t\tvar url = base_url + \"index.php/chat/ajax_user_to_group_conversation\";\n\t\tvar data = {\n\t\t\t\tchat_id : chat_id, \n\t\t\t\tlast_datetime: last_datetime,\n\t\t\t\tcsrf_gd : Cookies.get('csrf_gd')\n\t\t\t};\n\t\t\t\n\t\t$(\"#ajax-msg\").addClass('hide');\n\t\t\n\t\tjQuery.ajax({\n\t\t\ttype : \"post\",\n\t\t\tdata : data,\n\t\t\tdataType : \"json\",\t\t\n\t\t\turl: url, \n\t\t\tsuccess: function(response){\n\t\t\t\tif(response.result == \"success\"){\n\t\t\t\t\tvar x = 0;\n\t\t\t\t\tvar messages = response.messages;\n\t\t\t\t\tvar message_count = response.message_count;\n\t\t\t\t\tvar unread_messages = response.unread_messages;\n\t\t\t\t\tvar next_message_owner = \"\";\n\t\t\t\t\tif(message_count > 0){\n\t\t\t\t\t\t$(\"#chat_group-\"+chat_id).find('.chat_messages').attr('data-latest_id', messages[0]['chat_user_message_id']);\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile( x < message_count ){\n\t\t\t\t\t\t\tvar from_user_id = messages[x]['from_user_id'];\n\t\t\t\t\t\t\tvar owner = messages[x]['owner'];\n\t\t\t\t\t\t\tvar message = messages[x]['message'];\n\t\t\t\t\t\t\tvar message_id = messages[x]['chat_group_message_id'];\n\t\t\t\t\t\t\tvar send_datetime = messages[x]['send_datetime'];\n\t\t\t\t\t\t\tvar first_name = messages[x]['first_name'];\n\t\t\t\t\t\t\tvar last_name = messages[x]['last_name'];\n\t\t\t\t\t\t\tvar day_counter = messages[x]['day_counter'];\n\t\t\t\t\t\t\tvar formatted_date = messages[x]['formatted_date'];\n\t\t\t\t\t\t\tvar owner_string = \"\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(x < message_count - 1){\n\t\t\t\t\t\t\t\tnext_message_owner = messages[x+1]['owner'];\n\t\t\t\t\t\t\t\tnext_message_owner_id = messages[x+1]['from_user_id'];\n\t\t\t\t\t\t\t\tnext_message_owner_first_name = messages[x+1]['first_name'];\n\t\t\t\t\t\t\t\tnext_message_day_counter = messages[x+1]['day_counter'];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(next_message_owner == \"me\" && owner == \"others\"){\n\t\t\t\t\t\t\t\t\towner_string = \"<span class='chat_sender-name'>\"+first_name+\" :</span>\";\n\t\t\t\t\t\t\t\t}else if(next_message_owner == \"others\" && owner == \"me\"){\n\t\t\t\t\t\t\t\t\towner_string = \"<span class='chat_receiver-name'>Me :</span>\";\n\t\t\t\t\t\t\t\t}else if(next_message_owner == \"others\" && owner == \"others\" && from_user_id != next_message_owner_id){\n\t\t\t\t\t\t\t\t\towner_string = \"<span class='chat_sender-name'>\"+first_name+\" :</span>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if(x == message_count - 1){\n\t\t\t\t\t\t\t\tif(owner == \"others\"){\n\t\t\t\t\t\t\t\t\towner_string = \"<span class='chat_sender-name'>\"+first_name+\" :</span>\";\n\t\t\t\t\t\t\t\t}else if( owner == \"me\"){\n\t\t\t\t\t\t\t\t\towner_string = \"<span class='chat_receiver-name'>Me :</span>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar date_string = \"\";\n\t\t\t\t\t\t\tif(parseInt(day_counter) != parseInt(next_message_day_counter)){\n\t\t\t\t\t\t\t\tswitch(parseInt(day_counter)){\n\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\tdate_string = \"<span class='message_group_date'>Today</span>\";\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\tdate_string = \"<span class='message_group_date'>Yesterday</span>\";\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tdate_string = \"<span class='message_group_date'>\"+formatted_date+\"</span>\";\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar date_html = date_string;\n\t\t\t\t\t\t\tvar message_html = \"<div class='message_container' id='message_container-\"+message_id+\"' data-id='\"+from_user_id+\"'>\";\n\t\t\t\t\t\t\t message_html += owner_string;\n\t\t\t\t\t\t\tif(owner == \"others\"){\n\t\t\t\t\t\t\t\tmessage_html += \"<div class='message-other'>\"+message+\"</div>\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tmessage_html += \"<div class='message-mine'>\"+message+\"</div>\";\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmessage_html += \"<div style='clear:both;'></div>\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmessage_html += \"</div>\";\n\t\t\t\t\t\t\t$(\"#chat_group-\"+chat_id).find('.chat_messages').attr('data-oldest_id', message_id);\n\t\t\t\t\t\t\t$(\"#chat_group-\"+chat_id).find('.chat_messages').attr('data-oldest_date', send_datetime);\n\t\t\t\t\t\t\t$(\"#chat_group-\"+chat_id).find('.chat_messages').find('.chat_div-container').prepend(date_html + message_html);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar chat_container = $(\"#chat_group-\"+chat_id).find(\".chat_messages\").find(\".chat_div-container\");\n\t\t\t\t\t\tvar latest_id = chat_container.find('.message_container').last().attr('id');\n\t\t\t\t\t\tdocument.getElementById(latest_id).scrollIntoView();\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(unread_messages == false){\n\t\t\t\t\t\t\tif($(\"#li-groups_list-\"+chat_id+\" span.unread_count\")){\n\t\t\t\t\t\t\t\t$(\"#li-groups_list-\"+chat_id+\" span.unread_count\").remove();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbindscroll_function(\"#chat_group-\"+chat_id + \" .chat_message_scroll\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tmake_selectedChatbox(\"chat_group-\"+chat_id);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$(\"#ajax-msg\").removeClass('hide');\n\t\t\t},\n\t\t\terror: function(e){\n\t\t\t\t$(\"#ajax-msg\").removeClass('hide');\n\t\t\t}\n\t\t});\n\t}", "fetchConversations() {\r\n kandy.fetchConversations();\r\n }", "function selectConciergeFromList(){\n var parentUl = $('.user-content').children('ul');\n var users = parentUl.children('li');\n var user = users.get(0);\n\n // Clear message contents..\n $('#messages').html('');\n\n // Set user to select..\n for(var i = 0; i < users.length; i++) {\n user = users.get(i);\n user.setAttribute(\"style\", \"\");\n }\n users.get(0).setAttribute(\"style\", \"background-color: #eee;\");\n selectedIndex = 0;\n\n disableActionButton();\n var oneUser = {\n id : \"CONCIERGE\",\n contact_id: \"Concierge_\" + userSelf.email,\n username : \"Concierge\",\n email : \"CONCIERGE EMAIL\",\n img : \"/images/concierge.png\"\n };\n\n selectFlag = \"CON\";\n userSelected = oneUser;\n\n showUserInfo(oneUser);\n\n curConvId = \"Concierge_\" + userSelf.email;\n // Load conversation content of this user..\n var msgObj = {\n from: userSelf.email,\n contact_id: \"Concierge_\" + userSelf.email\n };\n socket.emit('loadConv', msgObj);\n}", "sendMessageToUser(userId, message) {\n web.conversations\n .list({ exclude_archived: true, types: \"im\" })\n .then(res => {\n const foundUser = res.channels.find(u => u.user === userId);\n if (foundUser) {\n rtm\n .sendMessage(message, foundUser.id)\n .then(msg =>\n console.log(\n `Message sent to user ${foundUser.user} with ts:${msg.ts}`\n )\n )\n .catch(console.error);\n } else {\n console.log(\"User doesnt exist or is the bot user!\");\n }\n });\n }", "explainSender(message) {\n\t\tif (message.sender == this.AuthorizationService.user.id) {\n\t\t\treturn {\n\t\t\t\t\"me\": true\n\t\t\t};\n\t\t} else if (message.sender != this.AuthorizationService.user.id) {\n\t\t\treturn {\n\t\t\t\t\"recipient\": true\n\t\t\t};\n\t\t}\n\t}", "info_user_to(){\n var username = this;\n var user_to = username.assigned_to;\n Meteor.subscribe('assigned_to_user_name', user_to);\n return user_details.find({\"user_id\" : user_to }).fetch();\n }", "function checkConversationPossibility(){\n var obj = {};\n obj = getMessageObj();\n // console.log(\"obj >>\", obj);\n obj[\"job_id\"] = jobId;\n obj[\"name\"] = userName;\n obj[\"resume_id\"] = resumeId;\n obj[\"user_id\"] = user_id;\n obj[\"user_type\"] = user_type;\n obj[\"cid\"] = candidateId;\n obj[\"sll\"] = sll;\n obj[\"all_vars\"] = all_vars;\n socket.emit(\"checkIsConversationPossible\", obj);\n }", "function getChatsForAUser() {\n\n // Send GET request to mongoDB to get all chats associated with a specific userId\n chatFactory.getChatsForAUser(vm.userId).then(\n\n function(response) {\n \n // Zero out the # of channels and direct messages\n $rootScope.numberOfChannels = 0;\n $rootScope.numberOfDirectMessages = 0;\n\n // Display chatgroup names on the view \n $rootScope.chatGroups = response;\n \n // Determine how many chat channels and direct messages the user is subscribed to\n for (var i = 0; i < response.length; i++) {\n if (response[i].groupType !== \"direct\") {\n $rootScope.numberOfChannels++;\n } else {\n $rootScope.numberOfDirectMessages++;\n }\n }\n\n // Send socket.io server the full list of chat rooms the user is subscribed to\n chatFactory.emit('add user', {chatGroups: $rootScope.chatGroups, userid: vm.userId});\n\n // Jump to calendar state\n $state.go('main.calendar');\n },\n\n function(error) {\n\n // Jump to calendar state\n $state.go('main.calendar'); \n\n });\n\n }", "ADD_USER_CONVERSATION (state, user) {\n state.userConversation = user\n }", "listen(message, user, conversation) {\n if (conversation === this.currentConversation) {\n this.log(user + \": \" + message);\n }\n else {\n this.log('#' + conversation.name + '@' + user + \": \" + message);\n }\n }", "get voiceChannel() {\n\t\treturn this.guild.me.voiceChannel;\n\t}", "function getUser(){\n return user;\n }", "getUser() {\n APIManager.getUserById(this.props.currentUser).then(user => {\n this.getCollectorLevel(user);\n });\n }", "getPrivateConversationDataId(context) {\n assert(context.conversationId && context.userId);\n return `conversation:${context.conversationId}/user:${context.userId}`;\n }", "function admin(user) {\n if (user.admin === true) {\n admins.push(user.name);\n } else {\n noAdmins.push(user.name);\n }\n}", "handleOnUserMessage(user, message){\n\n // Message in JSON-Objekt umwandeln für Datenzugriff\n var data = JSON.parse(message);\n // Spiel-Logik hat hier nichts zu suchen, kommt dann im GameRoom noch ...\n if (data.dataType === GAME_LOGIC) return;\n\n // Chat-Nachricht\n if (data.dataType === CHAT_MESSAGE) {\n\t\t\t// Absender ergänzen, die anderen wollen ja wissen, vom wem die Nachricht war\n\t\t\tdata.sender = user.Username;\n }\n // Es hat eine Nachricht drin\n if (typeof data.message !== 'undefined'){\n /*\n * Diverse mögliche Kommando abarbeiten\n */\n //UserName soll geändert werden\n if(data.message.startsWith(\"/nick \")) {\n console.log(\"Kommando: /nick\");\n // Username überschreiben und alle User informieren\n user.setUsername(data.message.replace(\"/nick \", \"\"));\n user.room.sendDetails();\n\n // zusätzlich eine Nachricht an alle vorbereiten\n data = {\n dataType: CHAT_MESSAGE,\n sender: \"Server\",\n message: \"User [\"+data.sender + \"] heisst neu [\"+user.Username+\"]\"\n };\n }\n // Kommando /play wechselt dem Raum bei Erfolg\n else if(data.message.startsWith(\"/play \")) {\n // mit wem will aktueller User spielen?\n let otherName = data.message.replace(\"/play \", \"\");\n let otherIdx = user.room.users.findIndex(e => e.Username.trim() == otherName );\n\n console.log(\"/playResult: \" + otherIdx);\n\n // Gibt es den überhaupt?\n if(otherIdx == -1){\n //nein, nachricht vorbereiten\n data = {\n dataType: CHAT_MESSAGE,\n sender: \"Server\",\n message: \"User [\"+otherName + \"] nicht gefunden\"\n };\n // ja, es gibt ihn\n }else {\n let other = user.room.users[otherIdx];\n\n // aktuellen User und Spielpartner aus aktuellem Raum entfernen\n user.room.removeUser(user);\n user.room.removeUser(other);\n\n // neuen Raum eröffnen und beide darin zuordnen\n user.setRoom(new GameRoom(user.Username + \" vs. \" + otherName));\n other.setRoom(user.room);\n user.room.addUser(user);\n user.room.addUser(other);\n //--> Die User werden im addUser noch über die neuen Raum-Details informiert\n }\n\n\n }\n // Raum verlassen und in Lobby zurückkehren\n else if(data.message.startsWith(\"/quit\")) {\n\n console.log(\"/quit: \" + user.Username);\n //info vorbereiten und senden\n data = {\n dataType: CHAT_MESSAGE,\n sender: \"Server\",\n message: \"User [\"+user.Username + \"] quitted\"\n };\n user.room.sendAll(JSON.stringify(data));\n // user entfernen\n user.room.removeUser(user);\n // .. und an Lobby zuweisen\n user.room = user.lobby;\n user.lobby.addUser(user); // in addUser werden wieder alle informiert\n\n // Nachricht vorbereiten\n data = {\n dataType: CHAT_MESSAGE,\n sender: \"Server\",\n message: \"User [\"+user.Username + \"] joined\"\n };\n\n }\n // alles andere müssten nun Chat-Nachrichten sein\n else {\n // Aus Sicherheitsgründen werden sämtliche Zeichen durch den Code ersetzt\n // dadruch bleiben auch alle <>/*[]\" erhalten und es kann nichts \"eingeschleust\" werden\n data.message = data.message.replace(/[\\u00A0-\\u9999<>\\&]/gim, function(i) {\n return '&#'+i.charCodeAt(0)+';';\n });\n\n }\n }//message ist gesetzt\n\n // vorbereitete Nachricht an alle senden\n user.room.sendAll(JSON.stringify(data));\n\n}", "user() {\n return Member.findOne({_id: Meteor.userId()});\n\t}", "get user() { return this.args.user }", "getMessages() {\n\t\tMessage.find().then((res) => {\n\t\t\tlet messages = res;\n\t\t\tlet promises = [];\n\n\t\t\tfor(let i=0;i < messages.length;i++) {\n\t\t\t\tpromises.push(User.findOne({ _id : messages[i].userId }));\n\t\t\t}\n\n\t\t\tQ.all(promises).then((res) => {\n\t\t\t\tfor(let i=0;i<messages.length;i++) {\n\t\t\t\t\tmessages[i].user = res[i];\n\t\t\t\t}\n\n\t\t\t\tthis.socket.emit('message', messages);\n\t\t\t});\n\t\t});\n\t}", "fetchMessages(username, chatId){\n this.sendMessage({\n command: 'fetch_messages',\n username: username,\n chatId: chatId\n });\n console.log(chatId);\n console.log(username);\n }", "function channelsMine(req, res) {\n res.json(req.user.myChannels);\n}", "function _getAdminById(req,res,next){\n\tCommon.ensureUserInSession(req, res, function(caller) {\n\t\tvar adminId = req.query.adminId;\t\n\t\tADMIN_COLLECTION.find({_id: new ObjectID(adminId)},function(err, admin){\n\t\t\tif(err){\n\t\t\t\tconsole.log('Error in Getting amdin by Id : ' + err);\n\t\t\t\tres.send(err);\n\t\t\t}else{\n\t\t\t\tres.send(admin);\n\t\t\t}\n\t\t});\n\t});\n}", "async getBroadcaster() {\n return (await this._client.helix.users.getUserById(this._data.broadcaster_user_id));\n }", "async getBroadcaster() {\n return (await this._client.helix.users.getUserById(this._data.broadcaster_user_id));\n }", "async getBroadcaster() {\n return (await this._client.helix.users.getUserById(this._data.broadcaster_user_id));\n }", "function getLeaderboard() {\n var user = \"\";\n send(json_get_leaderboard_message(user));\n}", "function getAllConversations(req,res){\n\tasync.waterfall([\n\t\tfunction(callback) {\n\t\t\tvar usuarios = [];\n\t\t\tvar query = \"SELECT a.conversacion_id,\" +\n\t\t\t\t\t\t\"b.user_id as user_1, b.nombres as nombres_1, b.apellidos as apellidos_1, b.foto_perfil as foto_1,\" +\n\t\t\t\t\t\t\"c.user_id as user_2, c.nombres as nombres_2, c.apellidos as apellidos_2, c.foto_perfil as foto_2 \" +\n\t\t\t\t\t\t\"FROM conversaciones a \" +\n\t\t\t\t\t\t\"INNER JOIN usuarios b ON a.user_1_id=b.user_id \" +\n\t\t\t\t\t\t\"INNER JOIN usuarios c ON a.user_2_id=c.user_id \" +\n\t\t\t\t\t\t\"WHERE user_1_id=? OR user_2_id=? \" +\n\t\t\t\t\t\t\"GROUP BY a.conversacion_id \";\n\t\t\tconnection.query(query,[req.user.user_id,req.user.user_id], function(err,conversaciones) {\n\t\t\t\tif(err) res.sendStatus(404);\n\t\t\t\tfor (var i = conversaciones.length - 1; i >= 0; i--) {\n\t\t\t\t\tif(conversaciones[i].user_1 === req.user.user_id){\n\t\t\t\t\t\tvar usuario={\n\t\t\t\t\t\t\tconversacion_id:conversaciones[i].conversacion_id,\n\t\t\t\t\t\t\tuser_id:conversaciones[i].user_2,\n\t\t\t\t\t\t\tnombres:conversaciones[i].nombres_2,\n\t\t\t\t\t\t\tapellidos:conversaciones[i].apellidos_2,\n\t\t\t\t\t\t\tfoto_perfil:conversaciones[i].foto_2,\n\t\t\t\t\t\t\tno_leidos:0\n\t\t\t\t\t\t}\n\t\t\t\t\t\tusuarios.push(usuario);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar usuario={\n\t\t\t\t\t\t\tconversacion_id:conversaciones[i].conversacion_id,\n\t\t\t\t\t\t\tuser_id:conversaciones[i].user_1,\n\t\t\t\t\t\t\tnombres:conversaciones[i].nombres_1,\n\t\t\t\t\t\t\tapellidos:conversaciones[i].apellidos_1,\n\t\t\t\t\t\t\tfoto_perfil:conversaciones[i].foto_1,\n\t\t\t\t\t\t\tno_leidos:0\n\t\t\t\t\t\t}\n\t\t\t\t\t\tusuarios.push(usuario);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tcallback(err, usuarios);\n\t\t\t});\n\t\t},\n\t\tfunction(usuarios, callback) {\n\t\t\tvar query = \"SELECT a.conversacion_id,\" +\n\t\t\t\t\t\t\"SUM(m.leido) as no_leidos \" +\n\t\t\t\t\t\t\"FROM conversaciones a \" +\n\t\t\t\t\t\t\"INNER JOIN usuarios b ON a.user_1_id=b.user_id \" +\n\t\t\t\t\t\t\"INNER JOIN usuarios c ON a.user_2_id=c.user_id \" +\n\t\t\t\t\t\t\"INNER JOIN mensajes m ON m.conversacion_id=a.conversacion_id \" +\n\t\t\t\t\t\t\"WHERE user_1_id=? OR user_2_id=? \" +\n\t\t\t\t\t\t\"GROUP BY a.conversacion_id\";\n\t\t\tconnection.query(query,[req.user.user_id,req.user.user_id], function(err, conversaciones) {\n\t\t\t\tif(err) res.sendStatus(404);\n\t\t\t\tfor (var i = usuarios.length - 1; i >= 0; i--) {\n\t\t\t\t\tfor (var j = conversaciones.length - 1; j >= 0; j--) {\n\t\t\t\t\t\tif(usuarios[i].conversacion_id === conversaciones[j].conversacion_id){\n\t\t\t\t\t\t\tusuarios[i].no_leidos = conversaciones[j].no_leidos;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\tres.send(usuarios);\n\t\t\t});\n\t\t}\n\t], function(err) {\n\t\tif(err) console.log(err);\n\t\tres.redirect(\"/app/#/app\");\n\t});\n}", "function receive_messages() {\n\n\tvar current_admin = 0;\n\tvar current_guest = 0;\n\t\n\t$.ajax({\n\t\ttype: \"GET\",\n\t\tcache: false,\n\t\tdataType: \"json\",\n\t\turl: sts_base_url + \"/simple/livechat_receive/\",\n\t\tsuccess: function(data){\n\t\t\tif (data !== null) {\n\t\t\t\tif (data.success) {\n\t\t\t\t\tif (data.messages.length > 0) {\n\t\t\t\t\n\t\t\t\t\t\t//html = '<ul>';\n\t\t\t\t\t\thtml = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.each(\n\t\t\t\t\t\t\tdata.messages,\n\t\t\t\t\t\t\tfunction (index, value) {\n\t\t\t\t\t\t\t\tif (value.guest == 1) {\n\t\t\t\t\t\t\t\t\tcurrent_guest++;\n\t\t\t\t\t\t\t\t\thtml += '<p>' + nl2br($('<div/>').text(value.message).html()) + ' <br /><div class=\"message-name\">' + $('<div/>').text(value.name).html() + ' - ' + $('<div/>').text(value.time_ago).html() + '</div><div class=\"clearfix\"></div><hr /></p>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tcurrent_admin++;\n\t\t\t\t\t\t\t\t\thtml += '<p>' + nl2br($('<div/>').text(value.message).html()) + ' <br /><div class=\"message-name\">' + $('<div/>').text(value.user_name).html() + ' - ' + $('<div/>').text(value.time_ago).html() + '</div><div class=\"clearfix\"></div><hr /></p>';\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//html += '</ul>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$('#lcs_receive').html(html);\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (data.messages.length > lcs_current_messages) {\n\t\t\t\t\t\t\t$('#lcs_receive').scrollTop($('#lcs_receive').prop(\"scrollHeight\"));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (current_admin > lcs_current_admin_messages) {\n\t\t\t\t\t\t\tvar audio = new Audio(sts_base_url + '/user/plugins/livechat/audio/alert1.wav');\n\t\t\t\t\t\t\taudio.play();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tlcs_current_messages = data.messages.length;\n\t\t\t\t\t\tlcs_current_admin_messages = current_admin;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\thtml = '<p>No Messages<hr /></p>';\n\n\t\t\t\t\t\t$('#lcs_receive').html(html);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$('#lcs_receive').html(data.message);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\t \n\tsetTimeout(function() {\n\t\treceive_messages()\n\t}, 3000);\n}", "function getChatUserLeftMessage(userId) {\n return userId + \" joined the chat room.\";\n}", "function getToRelay() {\n\t\tvar accts = api.byType.userAccounts.items;\n\t\tif (!accts || !accts.length || currAction=='use') return \"\";\n\t\t\n\t\tvar sign = currAction=='transfer' ? currResource.sign : -1*currResource.sign;\t\t\n\t\t\n\t\tfor(var i=0; i<accts.length; i++) {\n\t\t\tvar acct = accts[i];\n\t\t\t\n\t\t\tif (acct.account_id != currResource.account_id && acct.sign == sign) {\n\t\t\t\tif (acct.relayDefault.token) return acct.relayDefault.token\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn \"\";\n\t}", "function getUser() {\n return user;\n }", "get messages() {\n\t\treturn Message.collection.find({ chatId: this._id }).fetch();\n\t}", "async function getAllConversations(req, res) {\n try {\n let requesterId = req.session.requesterId;\n const conversations = await getAllConversationsGeneric(requesterId);\n res.send(conversations);\n } catch (error) {\n res.status(400).end();\n }\n}", "sendMessage(content_message)\n {\n\n let recipient = this.props.participants.get(this.props.currentUser);\n let sender = this.props.participants.get(recipient)\n\n let message = {\n content : content_message,\n recipient : recipient,\n sender: sender,\n fkConversation : this.props.conversation,\n date:Date.now()\n }\n this.client.send('/EZChat/'+message.fkConversation.id+'/private',{},JSON.stringify(message))\n }", "async getLatest (userid) {\n try {\n return await Conversation.find({ participants: userid }).sort({\"updatedAt\": -1}).populate({path: 'participants latestMessage'});\n } catch (err) {\n throw err;\n }\n }", "findBotUser() {\n this.getUsers()\n .then(users => {\n const botUsers = users.members.filter(isBot);\n this.user = botUsers.find(user => isUserBot(user, this.name));\n let welcomeText;\n if (!this.user) {\n welcomeText = `:negative_squared_cross_mark: Cannot find bot user : ${this\n .name}!\\n_I cannot respond to messages until this is resolved_`;\n } else {\n welcomeText = `:tada: ${this.user\n .real_name} is reporting for duty!`;\n }\n\n const welcomeMessage = smb()\n .text(welcomeText)\n .json();\n this.respondInChannel('general', welcomeMessage);\n })\n .catch(error => {\n console.log(error);\n });\n }", "get client() { return this.bot.client; }", "getChatId() {\n return this.chat_id;\n }", "function getUserId(msg) {\n return msg.message.user.id;\n}", "function getDialogMessages(dialog_id) {\n return pool.query('SELECT m.message_id as id, u.alias as sender, m.text as text, m.date_time as mes_time \\\n FROM messages as m \\\n INNER JOIN users u ON m.sender_id = u.user_id \\\n WHERE m.message_id IN (SELECT message_id FROM dialog_messages WHERE dialog_id=$1)', [dialog_id]);\n}", "function loginInitiateConversation(bot, identity) {\n\n\tvar SlackUserId = identity.user_id;\n\tvar botToken = bot.config.token;\n\tbot = _controllers.bots[botToken];\n\n\t_models2.default.User.find({\n\t\twhere: { SlackUserId: SlackUserId }\n\t}).then(function (user) {\n\t\tvar scopes = user.scopes;\n\t\tvar accessToken = user.accessToken;\n\n\n\t\tbot.startPrivateConversation({ user: SlackUserId }, function (err, convo) {\n\n\t\t\t/**\n * \t\tINITIATE CONVERSATION WITH LOGIN\n */\n\t\t\tconvo.say('Awesome!');\n\t\t\tconvo.say('Let\\'s win this day now. Let me know when you want to `/focus`');\n\t\t});\n\t});\n}", "function checkIfAdmin(msg) {\n let user = msg.guild.members.find((data, key) => key == msg.author.id)\n if (user.hasPermission(\"ADMINISTRATOR\")) {\n return true\n } else {\n return msg.channel.send(wrap(`You need to be admin to do this.`))\n }\n}", "function get_messages() {\n\n fct_MyLearn_API_Client.query({ type: 'Mensajes', extension1: 'Trabajo', extension2: $routeParams.IdTrabajo }).$promise.then(function (data) {\n $scope.ls_msjs = data;\n });\n\n }", "async getBroadcaster() {\n return (await this._client.helix.users.getUserById(this._data.broadcaster_id));\n }", "getUserMessages(id) {\n let mensajes;\n let messages = JSON.parse(localStorage.getItem('mensajes')) || [];\n for (let i = 0; i < messages.length; i++) {\n const me = messages[i][id];\n if (me) {\n mensajes = me;\n }\n }\n this.setState({\n update: false\n });\n return mensajes;\n }", "menu(botCtx) {\n const menu = [];\n\n if (this.ctx.isAdmin(botCtx)) menu.push([new SendSpam(this.ctx, this)]);\n\n return menu;\n }", "async getBroadcaster() {\n return (await this._client.helix.users.getUserById(this._eventData.event_data.broadcaster_id));\n }", "function getFeedMessage(obj){\n\tvar currentLanguage = LANGUAGE_ENGLISH;\n\tvar msg = 'default feed';\n\t\n\tif(obj.Feed.type_id == FEED_NEW_WALK){\n\t\tmsg = obj.Feed.user_from_name + ' went for a walk with ' + obj.Feed.target_dog_name;\n\t} else if(obj.Feed.type_id == FEED_NEW_DOG){\n\t\tmsg = obj.Feed.user_from_name + ' added dog ' + obj.Feed.target_dog_name;\n\t} else if(obj.Feed.type_id == FEED_FRIEND_NEW_FOLLOWER){\n\t\tmsg = obj.Feed.user_from_name + ' is now following ' + obj.Feed.target_user_name;\n\t} else if(obj.Feed.type_id == FEED_FRIEND_LIKE_DOG){\n\t\tmsg = obj.Feed.user_from_name + ' likes ' + obj.Feed.target_dog_name;\n\t} else if(obj.Feed.type_id == FEED_DOG_LOST){\n\t\t//Add 's to the target name if needed\n\t\tvar targetUser = obj.Feed.user_from_name;\n\t\tif(!stringEndsWith(targetUser, 's')){\n\t\t\ttargetUser += '\\'s';\n\t\t}\n\t\t\n\t\tmsg = 'Oh no! ' + targetUser + ' dog ' + obj.Feed.target_dog_name +' is now missing! Can you help?';\n\t} else if(obj.Feed.type_id == FEED_DOG_FOUND){\n\t\t//Add 's to the target name if needed\n\t\tvar targetUser = obj.Feed.user_from_name;\n\t\tif(!stringEndsWith(targetUser, 's')){\n\t\t\ttargetUser += '\\'s';\n\t\t}\n\t\t\n\t\tmsg = 'Yay! ' + targetUser + ' dog ' + obj.Feed.target_dog_name +' has been found!';\n\t} else if(obj.Feed.type_id == FEED_FRIEND_LIKE_ACTIVITY){\n\t\t//Add 's to the target name if needed\n\t\tvar targetUser = obj.Feed.target_user_name;\n\t\tif(!stringEndsWith(targetUser, 's')){\n\t\t\ttargetUser += '\\'s';\n\t\t}\n\t\t\n\t\tmsg = obj.Feed.user_from_name + ' likes '+targetUser+ ' activity';\n\t} else if(obj.Feed.type_id == FEED_FRIEND_COMMENT_ACTIVITY){\n\t\t//Add 's to the target name if needed\n\t\tvar targetUser = obj.Feed.target_user_name;\n\t\tif(!stringEndsWith(targetUser, 's')){\n\t\t\ttargetUser += '\\'s';\n\t\t}\n\t\t\n\t\tmsg = obj.Feed.user_from_name + ' commented on '+targetUser+' activity';\n\t} else if(obj.Feed.type_id == FEED_CHECKIN){\n\t\tmsg = obj.Feed.user_from_name + ' at ' + obj.Feed.target_place_name;\n\t} else if(obj.Feed.type_id == FEED_NEW_PLACE){\n\t\tmsg = obj.Feed.user_from_name + ' added ' + obj.Feed.target_place_name;\n\t}\n\t\n\treturn msg;\n}", "function getManager(req, res){\r\n User.find({roles:'admin'}).exec((err, users) => {\r\n if(err){\r\n res.status(500).send({message:'Se ha producido un error en la peticion'});\r\n }else{\r\n if(!users){\r\n res.status(404).send({message:'No se ha encontrado lista de administracion'});\r\n }else{\r\n res.status(200).send({users});\r\n }\r\n }\r\n });\r\n}", "function adminUser(userId) {\n var adminUser = Meteor.users.findOne({username:\"admin\"});\n return (userId && adminUser && (userId === adminUser._id));\n}" ]
[ "0.6354686", "0.6277512", "0.6079163", "0.60776937", "0.60776937", "0.6044221", "0.57802457", "0.5732491", "0.5732471", "0.5614711", "0.5571742", "0.55638456", "0.5551505", "0.5523197", "0.5522247", "0.55134344", "0.54886407", "0.54707086", "0.54594404", "0.5439639", "0.53805935", "0.5376028", "0.5341235", "0.53390515", "0.5338677", "0.53378487", "0.5333076", "0.53216636", "0.531793", "0.5317192", "0.53150654", "0.53059447", "0.5303502", "0.5260978", "0.5257719", "0.52434915", "0.5239204", "0.52359957", "0.52305365", "0.51956093", "0.518994", "0.5188391", "0.51882243", "0.51746684", "0.5166083", "0.51606387", "0.5148108", "0.514188", "0.5136612", "0.5130844", "0.5114523", "0.51046526", "0.5097779", "0.5097256", "0.50927275", "0.5092306", "0.5086303", "0.50847965", "0.50840104", "0.508214", "0.50773895", "0.50648206", "0.50612915", "0.50568575", "0.505529", "0.50543696", "0.5038236", "0.50356984", "0.50321794", "0.5027342", "0.50243473", "0.50220245", "0.5017355", "0.5017355", "0.5017355", "0.5016859", "0.5013435", "0.5008762", "0.50021297", "0.49969074", "0.4994933", "0.49912608", "0.49876308", "0.49866346", "0.4986029", "0.49859437", "0.49835342", "0.4981828", "0.49768305", "0.49703184", "0.49682304", "0.4960883", "0.4956398", "0.4955018", "0.49546525", "0.49509633", "0.49458498", "0.49435267", "0.49426538", "0.49412382" ]
0.52724326
33
chat Template that organises the Json String into HTML
function chatTemplate(chat_json) { return ` <div class = "${chat.class}" style = "display: flex; flex-flow: row wrap; align-items: flex-start; margin-bottom: 10px;"> <div class="user-photo" style = "width: 60px; height: 60px; background: #ccc; border-radius: 50%; overflow: hidden;"> <img src=${chat_json.image} style = "width: 100%"> </div> <p class="chat-message" style = "width: 80%; padding: 15px; margin: 5px 10px 0; border-radius: 10px; color: #fff; font-size: 20px; ${chat_json.background}${chat_json.order}"> ${chat_json.message} </p> </div> `; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render(data){\n var html = data.map(function(message,index){\n return(`\n <div class=\"message\">\n <strong>${message.nickname}</strong>\n <p>${message.text}</p>\n </div>\n `);\n }).join(' ');\n\n document.getElementById('messages').innerHTML = html;\n}", "function render(data) {\n // Recorrer el array de objetos y obtener la info\n // El contenido que recoge lo guarda en message y el índice en index\n var html = data.map(function (message, index) {\n return (`\n <div class=\"message\">\n <strong>${message.nickname}</strong> dice:\n <p>${message.texto}</p>\n </div>\n `);\n }).join(' ');\n\n var div_msgs = document.getElementById('messages');\n div_msgs.innerHTML = html;\n div_msgs.scrollTop = div_msgs.scrollHeight;\n}", "function jsonToHTML (data) {\n \n var html;\n \n \n \n return html;\n}", "function jsonToHTMLBody(json) {\n return `<div id=\"json\">${valueToHTML(json, '<root>')}</div>`;\n }", "function jsonHtml ( data ) {\n //!-bringVar:\n var ObjKeys = Object.keys\n var tagtxt = \"\"\n var postTag = []\n if ( typeof data[ 0 ] == 'object'){ jsonHtmlcore( data[ 0 ] ) }\n for ( var i = 1; i < data.length; i++ ){\n if ( data[ i ] instanceof Array ) { tagtxt += jsonHtml ( data[ i ] ); continue }\n jsonHtmlcore( data[ i ] )\n }\n return tagtxt + postTag.reverse().toString().replace( /,/g , '')\n //______ jsonHtmlore ___________//\n function jsonHtmlcore ( data ) {\n if ( data || data == '' ) {\n if ( typeof data == \"object\" ){ \n var dataObjKeys = ObjKeys( data ) \n var tagName = dataObjKeys[ 0 ]\n var content = data[ tagName ]\n var objclass = content \n var cls = \"\"\n /// gestion class \\\\\\\n if ( typeof content == 'object' ) { \n cls= \"class='\"\n while ( typeof ( cls += ObjKeys( content )[0] + \" \", content = content[ObjKeys( content )[0]] ) == 'object' ){}\n cls += \"' \"\n }\n content = cls + content\n /// gestion id \\\\\\\n // if ( ObjKeys( data )[ 1 ] == 'id' ) { id = \"id='\"+data[ ObjKeys( data )[ 1 ] ] + \"'\" }\n for ( var i = 1; i < dataObjKeys.length; i++){\n content = dataObjKeys[i]+ \"='\"+data[ dataObjKeys[i]] + \"' \" + content }\n tagtxt += '<'+tagName+ ( content? ' '+content+'' : '') + '>' \n postTag.push('</'+tagName+'>')\n return jsonHtmlcore\n }\n tagtxt += data // texte dans inner\n return jsonHtmlcore\n }\n /// <br /> \\\\\\ \n tagtxt += '<br />' // br dans inner\n return jsonHtmlcore\n }\n }", "function renderDbValuesToHtml(jsonObj){\n\n\n\n // pentru tab-ul \"Your details\"\n\n var output = Mustache.render(\"<h5>First name: <span> {{first_name}}</span></h5>\\n\" +\n \" <h5>Last name: <span> {{last_name}}</span></h5>\\n\" +\n \" <h5>Country: <span> {{country}}</span></h5>\\n\" +\n \" <h5>Registered at: <span> {{created_at}}</span></h5>\\n\"\n\n , jsonObj );\n\n document.getElementById('user-info').innerHTML = output;\n\n\n // Pentru numele de sub poza de profil din header\n document.getElementById('header-name').innerHTML = Mustache.render(\"{{first_name}} {{last_name}}\",jsonObj);\n\n\n // pentru culoarea nivelului (kimono + titlu) vom apela functia din level-of-belt-action.js\n setLevelColorForKimonoAndTitle(jsonObj.stats.level.color);\n\n // pentru header si poza de profil\n\n document.getElementById('photo_bg').setAttribute('src',jsonObj.photo_url);\n document.getElementById('pht_avtr').setAttribute('src',jsonObj.photo_url);\n\n}", "function html(data) {\n if (data.type == \"heading\") {\n $(\"div\")\n .add(\"<h1>\" + data.model.text + \"</h1>\")\n .appendTo(document.getElementById(\"one\"));\n } else if (data.type == \"paragraph\") {\n $(\"div\")\n .add(\"<p>\" + data.model.text + \"</p>\")\n .appendTo(document.getElementById(\"one\"));\n } else if (data.type == \"image\") {\n $(\"div\")\n .add(\n \"<img src=\" +\n data.model.url +\n \" alt=\" +\n data.model.altText +\n \" height=\" +\n data.model.height +\n \" width=\" +\n data.model.width +\n \"/>\"\n )\n .appendTo(document.getElementById(\"one\"));\n } else if (data.type == \"list\") {\n if (data.model.type == \"unordered\") {\n $(\"div\")\n .add(\"<ul>\")\n .appendTo(document.getElementById(\"one\"));\n $.each(data.model.items, function(i, dat) {\n $(\"div\")\n .add(\"<li>\" + dat + \"</li>\")\n .appendTo(document.getElementById(\"one\"));\n });\n $(\"div\")\n .add(\"</ul>\")\n .appendTo(document.getElementById(\"one\"));\n } else {\n //works if the json file contains ordered lists\n $(\"div\")\n .add(\"<ol>\")\n .appendTo(document.getElementById(\"one\"));\n $.each(data.model.items, function(i, dat) {\n $(\"div\")\n .add(\"<li>\" + dat + \"</li>\")\n .appendTo(document.getElementById(\"one\"));\n });\n $(\"div\")\n .add(\"</ol>\")\n .appendTo(document.getElementById(\"one\"));\n }\n }\n}", "function messageTemplate(msg) {\n let _date = moment(msg.createdAt);\n let formatedDate = _date.format(\"DD/MM/YYYY\")\n let formatedTime = _date.format(\"HH:MM:SS\")\n const tmpl = `<div class=\"chat-msg-wrapper\">\n <p class=\"chat-msg\">${msg.message}</p>\n <section class=\"msg-meta-info\">\n <span class=\"msg-username\" title=\"User\">${msg.username}</span>\n <span class=\"msg-time\" title=\"${formatedDate}\">${formatedTime}</span>\n </section>\n </div>`\n $chatList.append(tmpl);\n }", "function messageTemplate(msg) {\n var _date = moment(msg.createdAt);\n var formatedDate = _date.format(\"DD/MM/YYYY\");\n var formatedTime = _date.format(\"HH:MM:SS\");\n var tmpl = \"<div class=\\\"chat-msg-wrapper\\\">\\n <p class=\\\"chat-msg\\\">\" + msg.message + \"</p>\\n <section class=\\\"msg-meta-info\\\">\\n <span class=\\\"msg-username\\\" title=\\\"User\\\">\" + msg.username + \"</span>\\n <span class=\\\"msg-time\\\" title=\\\"\" + formatedDate + \"\\\">\" + formatedTime + \"</span>\\n </section>\\n </div>\";\n $chatList.append(tmpl);\n }", "function renderChat() {\n try {\n var html = userfiltered.map(function (element) {\n return (\"<div class=\\\"chat\\\">\\n <div class=\\\"chat-header\\\" onclick=\\\"redirectBack()\\\">\\n <div class=\\\"profile\\\">\\n <div class=\\\"left\\\">\\n <img src=\\\"../Img_whatsapp/arrow.png\\\" class=\\\"arrow\\\">\\n <img src=\\\"\" + element.picture + \"\\\" class=\\\"pp\\\">\\n <h2>\" + element.name + \"</h2>\\n <span>Phone Number: \" + element.number + \"</span>\\n </div>\\n <div class=\\\"right\\\">\\n <img src=\\\"../Img_whatsapp/video.png\\\" class=\\\"icon\\\">\\n <img src=\\\"../Img_whatsapp/phone.png\\\" class=\\\"icon\\\">\\n </div>\\n </div>\\n </div>\\n <div class=\\\"chat-box\\\">\\n <div class=\\\"chat-r\\\">\\n <div class=\\\"sp\\\"></div>\\n <div class=\\\"mess mess-r\\\">\\n <p>\\n Sup bro?\\n </p>\\n \\n </div>\\n </div>\\n </div></div>\\n <div class=\\\"chat-footer\\\">\\n \\n <img src=\\\"../Img_whatsapp/emo.png\\\" class=\\\"emo\\\" id=\\\"emoji-button\\\">\\n <input type=\\\"text\\\" placeholder=\\\"Type a message\\\" id=\\\"input\\\"></input>\\n <div class=\\\"icons\\\">\\n <img src=\\\"../Img_whatsapp/attach file.png\\\">\\n <img src=\\\"../Img_whatsapp/camera.png\\\" id=\\\"buttonCam\\\">\\n </div>\\n \\n <img src=\\\"https://img.icons8.com/material-outlined/50/000000/send-comment.png\\\"/ id=\\\"sendButton\\\">\\n </div>\\n </div>\");\n }).join('');\n if (!html)\n throw new Error('An error happens when you want to render the user chat!');\n root.innerHTML = html;\n }\n catch (error) {\n console.error(error);\n }\n ;\n}", "renderJSON() {\n if (!this.hasSetupRender()) {\n return;\n }\n\n // Finaly show parsed jSON in a textarea\n const textArea = document.createElement('textarea');\n textArea.className = `${this.classNamespace}__textarea`;\n textArea.value = JSON.stringify(this.parsedData);\n this.containerEl.appendChild(textArea);\n }", "chatTemplate(messageObj) {\n const message = messageObj.core.body.message;\n this.mappedObject.data = {\n \"type\": \"event\",\n \"id\": this.mapInternalMessage(messageObj),\n \"attributes\":{\n \"meeting\":{\n \"internal-meeting-id\": messageObj.envelope.routing.meetingId,\n \"external-meeting-id\": IDMapping.getExternalMeetingID(messageObj.envelope.routing.meetingId)\n },\n \"chat-message\":{\n \"message\": message.message,\n \"sender\":{\n \"internal-user-id\": message.fromUserId,\n \"external-user-id\": message.fromUsername,\n \"timezone-offset\": message.fromTimezoneOffset,\n \"time\": message.fromTime\n }\n }\n },\n \"event\":{\n \"ts\": Date.now()\n }\n };\n if (messageObj.envelope.name.indexOf(\"Private\") !== -1) {\n this.mappedObject.data.attributes[\"chat-message\"].receiver = {\n \"internal-user-id\": message.toUserId,\n \"external-user-id\": message.toUsername\n };\n }\n this.mappedMessage = JSON.stringify(this.mappedObject);\n Logger.info(\"[MessageMapping] Mapped message:\", this.mappedMessage);\n }", "function writer(data){\n\n\t//Var to customize messages\n\tvar my_nickname = $('#name_user').val();\n\tvar my_messages = '';\n\tvar my_color = 'blue-grey darken-1';\n\n\n\tvar html = data.map(function(message, index){\n\t\tif (message.nickname == my_nickname) {\n\t\t\tmy_messages = 'offset-s4 offset-m4 offset-l4';\n\t\t\tmy_color = 'green darken-4';\n\t\t} else {\n\t\t\tmy_messages = '';\n\t\t\tmy_color = 'blue-grey darken-1';\n\t\t}\n\n\t\treturn (`\n\t\t\t<div class=\"col s8 m8 l8 ${my_messages}\">\n\t\t\t\t<div class=\"card ${my_color}\">\n\t\t\t\t\t<div class=\"card-content white-text\">\n\t\t\t\t\t\t<span class=\"card-title\"> ${message.nickname}</span>\n\t\t\t\t\t\t<p>${message.text}</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div> \n\t\t\t`);\n\t});\n\t$(\"#messages\").html(html);\n\tdocument.getElementById('messages').scrollTop = document.getElementById('messages').scrollHeight;\n\n}", "getMessageTemplate(msg){\n var self = this;\n\n var html;\n\n // prepare variables to insert\n var date = message.formatDate(msg.messageTime);\n var handledMessageText = '';\n var userName = msg.userName;\n var userPhoto = user.getPhoto(msg.userPhoto, userName);\n\n // delete button - check if user registered and has author or admin privileges\n var deleteBtn = '';\n\n if (msg.type === 'text'){\n handledMessageText = message.parseMessages(msg.messageText);\n } else if (msg.type === 'sticker'){\n handledMessageText = '<img data-src=\"' + msg.link + '\" alt=\"sticker-msg\" contenteditable=\"false\">';\n } else {\n handledMessageText = message.parseMessages(msg.messageText);\n }\n\n if (msg.userId === self.userId && user.isAuthorOrAdmin(msg.userId)) {\n if (msg.messageRead) {\n deleteBtn = '<div class=\"delete-button readed\"></div>';\n } else {\n deleteBtn = '<div class=\"delete-button sended\"></div>';\n }\n } else {\n deleteBtn = '<div class=\"delete-button\"></div>';\n }\n\n // highlight new messages from another user\n var highLightMessage = msg.userId != self.userId ? 'filled-bg' : '';\n\n // check if one of user send two or more messages in a row\n if (self.isMessageFromSameUser(msg.userId)) {\n html =\n '<li class=\"chat-single-block co-message ' + highLightMessage + '\" data-message-id=\"' + msg.messageId + '\">\\\n <div class=\"user-data-wrapper\">\\\n <figure class=\"user-avatar\" title=\"\">\\\n ' + userPhoto + '\\\n </figure>\\\n <div class=\"user-message flexcol\">\\\n <div class=\"nick-message\">\\\n <div class=\"message-text\">\\\n ' + handledMessageText + '\\\n </div>\\\n </div>\\\n ' + deleteBtn + '\\\n </div>\\\n </div>\\\n </li>';\n } else {\n // full html message\n html =\n '<li class=\"chat-single-block main-message ' + highLightMessage + '\" data-message-id=\"' + msg.messageId + '\">\\\n <div class=\"user-data-wrapper\">\\\n <figure class=\"user-avatar\" title=\"\">\\\n ' + userPhoto + '\\\n </figure>\\\n <div class=\"user-message flexcol\">\\\n <div class=\"nick-message\">\\\n <div class=\"nick-time-holder\">\\\n <a class=\"user-nickname\" href=\"/#page=profile&id=' + msg.userId + '\" target=\"_blank\">@' + userName + '</a>\\\n <time class=\"comment-time\" title=\"Comment time\">' + date.day + lang.lCommAtText + date.time + '</time>\\\n </div>\\\n <div class=\"message-text\">\\\n ' + handledMessageText + '\\\n </div>\\\n </div>\\\n ' + deleteBtn + '\\\n </div>\\\n </div>\\\n </li>';\n }\n\n return html;\n }", "function render(data){\n //Map: crea un nuevo arreglo, y por cada elemento devuelve un string, se junta en un string grande(pero queda muy desprolijo y feo), entonces para eso se usa join\n let html = data.map(mje =>{\n return (`\n <p> \n <strong class= \"autor_txt\">${mje.autor}</strong> :\n <span class=\"txt_contenido\">${mje.texto}</span>\n </p>\n `)\n }).join(' '); //Join = lo junta los elemetnos del arreglo y lo convierte en un string, separado por espacio ' ' que en si baja un elemento tras otro .\n\n //Agarra el elemento del archivo index.html y le incrusta/inyecta lo que trae de la funcion render.\n document.getElementById(\"mensajes\").innerHTML = html\n}", "function chat(){\ndocument.getElementById(\"body\").innerHTML = `\n<html>\n <head>\n <link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css\" integrity=\"sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh\" crossorigin=\"anonymous\">\n <link rel=\"stylesheet\" type=\"text/css\" href=\"chat.css\">\n <title>Chat</title>\n </head>\n\n <body id = \"body\">\n <div class = \"row\">\n <div class =\"col-md-12\">\n <div class=\"mx-auto\" style=\"width: 200px;\">\n <div class=\"mb-5\">\n <h1 class=\"text-center\" >Chat</h1>\n </div>\n </div>\n </div>\n\n <div class =\"col-md-6\">\n <div class=\"mx-auto\" style=\"width: 200px;\">\n <div class=\"chatbox\">\n <div class=\"chatlogs\" id=\"chatlogs\">\n ${chat_json.map(chatTemplate).join(\"\")}\n </div>\n <div class=\"chat-form\">\n <textarea class=\"form-control\" id=\"sendBox\" rows= \"1\"></textarea>\n <button type=\"button\" id=\"sendButton\" onclick=\"sendFunc()\">Send</button>\n <button type=\"button\" id=\"endButton\" style = \"color: #ff0000;\" onclick=\"endFunc()\">End</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n </body>\n</html>\n`;\n}", "function template(data) {\n return `\n <div>\n <h1>${data.header}</h1>\n <p>${data.subheader}</p>\n <div id=\"progressBarOuter\">\n <input id=\"username\" placeholder=\"Usuario\" ></input>\n <h>\n <input id=\"password\" placeholder=\"Constraseña\"></input>\n </div>\n <Button type=\"submit\" >Entrar</Button>\n </div>\n `;\n}", "function renderArticle(json) {\n //console.log(json.articles.length);\n for (let i = 0; i < json.articles.length; i++) {\n let li = document.createElement(\"li\");\n li.innerHTML = ` <p> Title=${json.articles[i].title} </p>\n <p> description=${json.articles[i].description} </p>\n <p> username=${json.articles[i].author.username} </p>\n <p> body=${json.articles[i].body} </p>\n <p> createdAt:${salam(json.articles[i].createdAt)}</p>`;\n ul.appendChild(li);\n }\n}", "function createList(e) {\n for (var i = 0; i < data.messages.length; i++) {\n chattyContent += `<li><button class=\"delete\">Delete</button>\n ${data.messages[i].name}: ${data.messages[i].message}<br></li>`\n document.getElementById(\"putHtmlHere\").innerHTML = chattyContent;\n }\n}", "function _render(){\n\t\tinfo = {\n\t\t\t\tpublishers_array: publishers_array\n\t\t}\n\t\t$element.html(Mustache.render(template, info))\n\t}", "function render(data){ \n var htmlcolor = `<div><strong>${data.color}</strong></div>`;\n var message = \"message\" + data.player;\n var player = \"player\" + data.player;\n document.getElementById(message).innerHTML = htmlcolor;\n document.getElementById(player).style.backgroundColor = data.color;\n}", "function createChats(data){\n if (checkObject(data)) {\n history_found = true;\n for(var i=0; i< data.length; i++){\n \n //create bot message\n if(checkObject(data[i].answers)){\n for(var j=0; j< data[i].answers.length; j++){\n var botMsg = {};\n \n if(data[i].answers[j].answer != null){\n // preserve newlines, etc - use valid JSON\n var ans = data[i].answers[j].answer.replace(/\\\\n/g, \"\\\\n\")\n .replace(/\\\\'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\\\\\"')\n .replace(/\\\\&/g, \"\\\\&\")\n .replace(/\\\\r/g, \"\\\\r\")\n .replace(/\\\\t/g, \"\\\\t\")\n .replace(/\\\\b/g, \"\\\\b\")\n .replace(/\\\\%/g, \" \")\n .replace(/\\\\f/g, \"\\\\f\");\n // remove non-printable and other non-valid JSON chars\n ans = ans.replace(/[\\u0000-\\u0019]+/g,\"\");\n } else {\n var ans = data[i].answers[j].answer;\n }\n \n \n \n //get answer object\n var answerObj = {};\n try {\n answerObj = JSON.parse(ans);\n } catch(e) {\n // error in the above string (in this case, yes)!\n }\n \n // console.log('answerObj',answerObj);\n \n //create form\n if(answerObj && answerObj.form_data){\n botMsg['form_data'] = answerObj.form_data;\n }\n \n if(answerObj && answerObj.doc_name){\n botMsg['doc_name'] = answerObj.doc_name;\n }\n \n if(answerObj && answerObj.doc_html){\n botMsg['doc_html'] = answerObj.doc_html;\n }\n \n if(answerObj && answerObj.url_list){\n botMsg['url_list'] = answerObj.url_list;\n }\n \n //create buttons\n if (answerObj && answerObj.buttons.length) {\n botMsg['buttons'] = answerObj.buttons;\n }\n \n // botMsg['text'] = data[i].answers[j].answer;\n botMsg['text'] = (answerObj != null && answerObj.answer) ? answerObj.answer : \"\";\n botMsg['time'] = data[i].time;\n \n chatBuildRecieved(botMsg);\n \n }\n }\n \n \n \n //get query object\n var queryObj = {};\n //create user message\n var userMsg = {};\n try {\n queryObj = JSON.parse(data[i].query);\n } catch(e) {\n // error in the above string (in this case, yes)!\n }\n \n if(queryObj.query){\n userMsg['text'] = queryObj.query;\n // userMsg['text'] = data[i].query;\n userMsg['time'] = data[i].time;\n chatBuildSent(userMsg);\n }\n \n }\n if(jQuery('.div-pos-bot').length) {\n \n setTimeout(function(){\n \n jQuery(jQuery('#bot-content')).animate({\n scrollTop: jQuery('.div-pos-bot').offset().top\n }, 1, function(){\n jQuery('.div-pos-bot').removeClass('div-pos-bot');\n jQuery('#bot-content').children('.message-wrapper.me').first().addClass(\"div-pos-bot\");\n \n } );\n \n });\n } else {\n \n jQuery('#bot-content').children('.message-wrapper.me').first().addClass(\"div-pos-bot\");\n scrollBottom();\n }\n \n //disabled all input fields of form\n // jQuery(\".bot-section-div .form_card :input\").prop(\"disabled\", true);\n // jQuery(\".bot-section-div .form_container .btn\").prop(\"disabled\", true);\n // jQuery(\".bot-section-div .form_container .btn\").addClass(\"disabled\");\n \n //disable read more url\n jQuery('#bot-content').children('.message-wrapper.them').find('.readMoreBtnUrl').prop(\"disabled\", true).addClass(\"disabled\");\n \n //disable rating emoji\n jQuery('.emoji-rating').css('cursor', 'default');\n jQuery('.emoji-rating').css('pointer-events', 'none');\n \n //disable calendar\n jQuery('.common-button-sec').addClass('disabled');\n jQuery('.custom-time-button').addClass('disabled');\n jQuery('.calendar-div').addClass('disabled');\n \n // console.log(\"activate\", activate_form);\n \n //disable carousel cell\n // jQuery('#bot-content').find(\".carousel-cell\").not(\".selected-slide\").css('opacity', '0.5');\n \n if(activate_form){\n //activate primary buttons\n jQuery('#bot-content').children().last().find(\".inital-buttons-aiexpert\").css('cursor', 'pointer');\n jQuery('#bot-content').children().last().find(\".inital-buttons-aiexpert\").css('pointer-events', 'all');\n jQuery('#bot-content').children().last().find(\".inital-buttons-aiexpert\").removeClass(\"disabled\");\n \n \n jQuery('#bot-content').children().last().find(\".btn\").prop(\"disabled\", false).removeClass(\"disabled\");\n \n //disabled all input fields of form\n jQuery('#bot-content').children().last().find(\".form_card :input\").prop(\"disabled\", false);\n jQuery('#bot-content').children().last().find(\".form_container .btn\").prop(\"disabled\", false);\n jQuery('#bot-content').children().last().find(\".form_container .btn\").removeClass(\"disabled\");\n \n //disable read more url\n jQuery('#bot-content').children('.message-wrapper.them').last().find('.readMoreBtnUrl').prop(\"disabled\", false).removeClass(\"disabled\");\n \n //disable rating emoji\n jQuery('#bot-content').children().last().find('.emoji-rating').css('cursor', 'pointer');\n jQuery('#bot-content').children().last().find('.emoji-rating').css('pointer-events', 'all');\n \n //disable calendar\n jQuery('#bot-content').children().last().find('.common-button-sec').removeClass('disabled');\n jQuery('#bot-content').children().last().find('.custom-time-button').removeClass('disabled');\n jQuery('#bot-content').children().last().find('.calendar-div').removeClass('disabled');\n \n //to enable edit form if last div contains confirm\n var checkConfirmPresent = jQuery('#bot-content').children().last().find('confirm-button');\n if(checkObject(checkConfirmPresent)){\n jQuery(\".message-wrapper:nth-last-child(2)\").find('input').prop('disabled',false);\n jQuery(\".message-wrapper:nth-last-child(2)\").find('select').prop('disabled',false);\n }\n \n //enable confirm button is last\n jQuery('#bot-content').children().last().find('.confirm-submit-button').css('opacity', '1');\n jQuery('#bot-content').children().last().find('.confirm-submit-button').css('pointer-events', 'all');\n jQuery('#bot-content').children().last().find('input[type=\"checkbox\"]').removeAttr('checked');\n jQuery('#bot-content').children().last().find('.checkmark').show();\n }\n } else { history_found = false; }\n scroll_flag = true;\n }", "function fullHTML(fullMsg){\n return (`<li>\n <div class=\"user-image\">\n <img src=${fullMsg.avatar} />\n </div>\n <div class=\"user-message\">\n <div class=\"user-name-time\">${fullMsg.username} <span>${new Date(fullMsg.timestamp).toLocaleString()}</span></div>\n <div class=\"message-text\">${fullMsg.text}</div>\n </div>\n </li>`);\n}", "function radlibs_render(json, update_form) {\n\n var rval = '';\n var template;\n\n template =\n \"TECHNIQUE:\\n\" +\n \"Multiple {{ te.mo }}{{# te.mo }} {{/te.mo}}images of the pelvis were obtained{{#te.cn}} after the intravenous administration of {{#te.vc}}{{ te.vc }} mL of {{/te.vc}}{{ te.cn }} contrast{{ #te.rc }} at {{ te.rc }} mL/sec{{/te.rc}}{{/te.cn}}. {{ te.co }}\\n\" +\n \"Image quality was {{te.qu}}{{^te.qu}}adequate{{/te.qu}}.\\n\" +\n \"\\n\" +\n \"FINDINGS:\\n\" +\n \"Tumor location:\\n\";\n \n rval += Mustache.to_html(template,json);\n \n if (radlibs_has_path(json,'lo.SphincDist') ) {\n json.lo['SphincDist_helper'] = (parseInt(json.lo.SphincDist) > 0) ? 'The tumor involves the anal sphincter complex.' : 'Distance from the lowest extent of the tumor to top of anal sphincter (i.e. puborectalis): ' + json.lo.SphincDist + ' cm.'; \n }\n \n template = \n \"Distance from the lowest extent of the tumor to anal verge: {{lo.VergDist}} cm.\\n\" +\n \"{{SphincDist_helper}}\\n\" +\n \"Relationship to peritoneal reflection: {{lo.PerRef}}.\\n\\n\";\n \n rval += Mustache.to_html(template,json); \n \n template = \n \"Tumor size and characteristics:\\n\" +\n \"Craniocaudal extent: {{ch.CCsize}} cm.\\n\" +\n \"{{CircExFrom_helper}}\\n\";\n \n if (radlibs_has_path(json,'ch.CircExFrom') && radlibs_has_path(json,'ch.CircExTo') ) {\n if (json.ch.CircExFrom == \"circ\" || json.ch.CircExTo==\"circ\") {\n json.CircExFrom[\"CircExFrom_helper\"] = 'The tumor extends circumferentially.\\n';\n } else {\n json.CircExFrom[\"CircExFrom_helper\"] = \"Circumferential extent: \" + json.ch.CircExFrom + \" o'clock to \" + json.ch.CircExTo + \" o'clock.\\n\";\n }\n\t}\n\n rval += Mustache.to_html(template,json); \n return rval;\n\n} // radlibs_render", "render() {\n\n return this.data()\n .then(data => {\n return { \"text\": mustache.render(this.text, data), ...this.properties }\n })\n }", "render(data, template) {\n var html = template.innerHTML;\n\n // Attempts\n // to compile the tmplate.\n for (var key in data) {\n var placeholder = '{{' + key +'}}';\n\n if (html.search(placeholder) !== -1) {\n html = html.replace(placeholder, data[key]);\n }\n }\n\n this.el.innerHTML = html;\n }", "function structureMessage(reponse) {\n var ajouter = '';\n var tmp = JSON.parse(reponse.data.message);\n if (null !== tmp) {\n null !== tmp.destinataire ? tmp.destinataire = JSON.parse(tmp.destinataire) : tmp.destinataire;\n null !== tmp.emetteur ? tmp.emetteur = JSON.parse(tmp.emetteur) : tmp.emetteur;\n null !== tmp.parent ? tmp.parent = JSON.parse(tmp.parent) : tmp.parent;\n null !== tmp.post ? tmp.post = JSON.parse(tmp.post) : tmp.post;\n ajouter = \"<div class='well'>\"\n + \"<div class='row'>\"\n + \"<div class='col-md-2 hidden-xs'>\"\n + tools.structureAvatar(tmp.emetteur.avatar, 100)\n + \"</div>\"\n + \"<div class='col-md-10 col-xs-12'>\"\n + \"<span class='full-name'>\"\n + \"<a href='?action=profil&id=\" + tmp.emetteur.id + \"'\"\n + \"title='vers profil de \" + tmp.emetteur.prenom + ' ' + tmp.emetteur.nom + \"'>\"\n + tmp.emetteur.prenom + ' ' + tmp.emetteur.nom\n + \"</a>\"\n + \"</span>\"\n + \"<span class='date'>\" + tmp.post.date.date + \"</span>\";\n if (null !== tmp.destinataire && tmp.destinataire.id !== tmp.emetteur.id) {\n ajouter += \"<span class='destination'>Sur le mur de \"\n + \"<a href='?action=profil&id=\" + tmp.destinataire.id + \"'\"\n + \"title='vers profil de \" + tmp.destinataire.prenom + ' ' + tmp.destinataire.nom + \"'>\"\n + tmp.destinataire.prenom + ' ' + tmp.destinataire.nom\n + \"</a>\"\n + \"</span>\";\n }\n if (null !== tmp.parent) {\n ajouter += \"<span class='partage-de'>A partagé(e) de \"\n + \"<a href='?action=profil&id=\" + tmp.parent.id + \"'\"\n + \"title='vers profil de \" + tmp.parent.prenom + ' ' + tmp.parent.nom + \"'>\"\n + tmp.parent.prenom + ' ' + tmp.parent.nom\n + \"</a>\"\n + \"</span>\";\n }\n ajouter += \"<p class='flow-text'>\" + tmp.post.texte.sanitize() + \"</p>\";\n\n if (null !== tools.structureImgPost(tmp.post.image)) {\n ajouter += tools.structureImgPost(tmp.post.image);\n }\n ajouter += \"<span id='like-\" + tmp.post.id + \"' class='like'>\"\n + tmp.aime + \" \"\n + \"<i class='fa fa-heart' aria-hidden='true'></i>\"\n + \"</span>\"\n + \"<span id='partage-\" + tmp.post.id + \"' class='partage'>\"\n + \"<i class='fa fa-share' aria-hidden='true'></i>\"\n + \"Partager\" + \" \"\n + \"</span>\"\n + \"</div>\"\n + \"</div>\"\n + \"</div>\";\n\n $('#receive-ajax-message').prepend(ajouter);\n }\n }", "function showJsonAsHtml(persons) {\n // A for...of loop loops through an array\n // tip: Name you arrays in plural (persons)\n // and your loop variable same name but in singular (person)\n for (let person of persons) {\n // Create a div as an jquery object\n let $person = $('<div class=\"person\"></div>');\n // A for...in loop loops through the properties/keys \n // of an object \n for (let key in person) {\n let value = person[key];\n if (key === 'hobbies') { value = value.join(', '); }\n $person.append('<div><span>' + key + ':</span>' + value + '</div>');\n }\n $('body').append($person);\n }\n}", "createLine(data) {\n let styling = (partner_id == data[\"message\"][\"user_id\"])? \"them\" : \"me\";\n \n return `\n <div class=\"message rounded shadow-sm px-2 py-1 m-2 ${styling}\">\n <div class=\"text\">\n <div class=\"meta-info\">\n <p class=\"datetime text-muted m-0\">${\"a few seconds ago\"}</p>\n </div>\n <p class=\"msg\">${data[\"message\"][\"message\"]}</p>\n </div>\n </div>\n `\n }", "function renderChat(data) {\n let div = document.createElement(\"div\");\n div.dataset.message_id = data.message_id;\n div.dataset.user_id = data.user_id;\n div.classList.add(\"message\");\n div.addEventListener('click', function() {\n selectMessage(div);\n });\n if (data.user_id == id) {\n highlightFromSource(div);\n }\n\n //div.addEventListener('mouseout', function() {\n // clearAllHighlights();\n // defaultHighlight();\n //});\n //div.addEventListener('mouseover', function() {\n // clearAllHighlights();\n // highlightFromSource(div);\n //});\n\n let title = document.createElement(\"div\");\n title.classList.add(\"message-title\");\n\n let title_message_id = document.createElement(\"span\");\n title_message_id.textContent = data.message_id;\n let title_user_id = document.createElement(\"span\");\n title_user_id.style.fontStyle = 'italic';\n title_user_id.style.paddingRight = '5px';\n title_user_id.textContent = data.user_id;\n let title_reply_id = document.createElement(\"span\");\n title_reply_id.style.float = 'left';\n title_reply_id.classList.add('title-reply');\n title_reply_id.style.paddingLeft = '5px';\n\n title.appendChild(title_user_id);\n title.appendChild(title_message_id);\n title.appendChild(title_reply_id);\n\n let body = document.createElement(\"div\");\n body.classList.add(\"message-body\");\n body.textContent = data.message;\n\n div.appendChild(title);\n div.appendChild(body);\n\n return div;\n}", "function showMessage(messageIn) {\n\n\n $(\"#myBody\").load(\"./public/templates/\" + messageIn.template, function () {\n $.each(messageIn.text, function (key, value) {\n $(\"ul#txt\").append('<li>' + value + '</li>');\n\n });\n\n $.each(messageIn.images, function (key, value) {\n $(\"ul#images\").append('<img width=\"250\" height=\"200\" src=\"' + value + '\"/>');\n\n })\n\n\n });\n}", "function generateTemplate(data){\n return `<div id=\"picture\">\n <img src=\"${data.Poster}\" alt=\"${data.Title}\">\n <p><strong>${data.Title}</strong>, ${data.Year}</p>\n </div>`;\n}", "function setChatView(data) {\n $('#chat-msgs').empty();\n document.getElementById(\"chat\").style.display = \"block\";\n data.chat.forEach((chatlog) => {\n if ((chatlog.auth.localeCompare(\"Valutatore\")) != 0) {\n $('#chat-msgs').append('<div class=\"row msg_container base_sent\"><div class=\"col-md-10 col-xs-10\"><div class=\"messages sent-msgs msg_sent\"><p>' +\n chatlog.text + '</p><time>Tu - ' + chatlog.hour + ':' + chatlog.mins + '</time></div></div></div>');\n } else {\n $('#chat-msgs').append('<div class=\"row msg_container base_receive\"> <div class=\"col-md-10 col-xs-10\"><div class=\"messages msg_receive\"><p>' +\n chatlog.text + '</p> <time> Valutatore - ' + chatlog.hour + ':' + chatlog.mins + '</time></div></div></div>');\n }\n });\n}", "function render(tpl, data, toString) {\n\t var pattern = /\\{\\{([^\\}]+)\\}\\}/g,\n\t code = 'var arr = [];\\n',\n\t pointer = 0,\n\t match = [];\n\t var addCode = function addCode(line, isJS) {\n\t if (line === '') {\n\t return;\n\t }\n\t // console.log(line)\n\t if (isJS) {\n\t if (line.match(/^ ?else/g)) {\n\t // else --> } else {\n\t code += '} ' + line + ' {\\n';\n\t } else if (line.match(/\\/(if|for|switch)/g)) {\n\t // /if --> }\n\t code += '}\\n';\n\t } else if (line.match(/^ ?if|for|switch/g)) {\n\t // if (age) --> if (this.age) {\n\t code += line + ' {\\n';\n\t } else if (line.match(/^ ?(break|continue) ?$/g)) {\n\t // break --> break;\n\t code += line + ';\\n';\n\t } else if (line.match(/^ ?(case|default)/g)) {\n\t // case (1) --> case (1):\n\t code += line + ':\\n';\n\t } else {\n\t // name --> name\n\t code += 'arr.push(' + line + ');\\n';\n\t }\n\t } else {\n\t // plain text\n\t code += 'arr.push(\"' + line.replace(/\"/g, '\\\\\"') + '\");\\n';\n\t }\n\t };\n\t // remove spaces after switch\n\t tpl = tpl.replace(/(\\{\\{ ?switch(.+?)\\}\\})[\\r\\n\\t ]+\\{\\{/g, '$1{{');\n\t // line breaks\n\t tpl = tpl.replace(/^\\n/, '').replace(/\\n/g, '\\\\\\n');\n\t // extract {{code}}\n\t while (match = pattern.exec(tpl)) {\n\t addCode(tpl.slice(pointer, match.index), false);\n\t addCode(match[1], true);\n\t pointer = match.index + match[0].length;\n\t }\n\t addCode(tpl.substr(pointer, tpl.length - pointer), false);\n\t code += 'return arr.join(\"\");';\n\t code = 'with (this) {\\n' + code + '\\n}';\n\t // console.log(\"code:\\n\"+code);\n\t var dom = new Function(code).apply(data);\n\t if (!toString) {\n\t var e = document.createElement('div');\n\t e.innerHTML = dom;\n\t dom = e.children[0];\n\t }\n\t return dom;\n\t}", "function addMessage(message) {\n console.log(message);\n const chatMessage = JSON.parse(message.data);\n let chat = document.getElementById(\"chat\");\n chat.innerHTML +=\n \"<b>\" +\n chatMessage[\"username\"] +\n \"</b>: \" +\n chatMessage[\"comment\"] +\n \"<br/>\";\n}", "function renderHTML(data) {\n var htmlString = \"\";\n\n for (i = 0; i < data.length; i++) {\n htmlString += \"<p>\" +data[i].name + \" is \" + data[i].age + \" years old.\" + \"</p>\";\n\n }\n infoContainer.insertAdjacentHTML('beforeend', htmlString);\n}", "function createTemplate (data) {\n var htmlTemplate = `\n <!DOCTYPE html>\n <html>\n <head>\n <title>Authors</title>\n </head>\n <body>\n ${data}\n </body>\n </html>\n `;\n return htmlTemplate;\n}", "function outputMessage(message) {\n const div = document.createElement(\"div\");\n div.innerHTML = ` <div class=\"incoming_msg\">\n <div class=\"incoming_msg_img\"> <img src=\"https://ptetutorials.com/images/user-profile.png\" alt=\"sunil\">\n </div>\n <div class=\"received_msg\">\n <div class=\"received_withd_msg\"> \n <p>${message.text}</p>\n \n <span class=\"time_date\"> ${message.username} at ${message.time}</span>\n </div>\n </div>\n </div>\n `;\n document.querySelector(\".chat-messages\").appendChild(div);\n}", "render(data) {\r\n const when = dateFns.distanceInWordsToNow(data.time.toDate(), { addSuffix: true });\r\n const html = `\r\n <li style=\"background-color:#717171;\" \"class=\"list-group-item\">\r\n <span class=\"author\">${data.author}</span> <span class=\"time\">${when}</span><br>\r\n <span class=\"message\">${data.message}</span>\r\n \r\n </li>\r\n `;\r\n this.list.innerHTML += html;\r\n //console.log(\"success\");\r\n }", "template(data) {\n return `${data}`\n }", "template(data) {\n return `${data}`\n }", "function printMessage(text) {\r\n // Compilo il template\r\n var source = $('#message-template').html();\r\n var template = Handlebars.compile(source);\r\n\r\n var context = { message: text }\r\n var html = template(context);\r\n\r\n // Appendo il template compilato nel container apposito\r\n $('.show-results .container').append(html)\r\n}", "function getTemplate() {\n return `\n <div class='neo-widget__content'>\n <div class='neo-widget__header'>\n <div class='neo-widget__header-left'>\n <span class=\"neo-icon-chat-outbound\"></span>\n <h4>UWF Events</h4>\n </div>\n </div>\n <div class='neo-empty-state'>\n <p class='neo-icon-auto-answer' id='routeDisplay'></p>\n <p id='additionalPropertiesDisplay'></p>\n </div>\n <div class='neo-widget__footer'>\n Routes\n </div>\n </div>`;\n}", "async sendInfoToChat() {\n const token = this.actor.token;\n const item = this.data;\n const actorData = this.actor ? this.actor.data.data : {};\n const itemData = item.data;\n const confirmSend = game.settings.get(\"urbanjungle\", \"confirmItemInfo\");\n\n let contents = `<div class=\"urbanjungle\"><header class=\"chat-item flexrow\">\n <img class=\"item-image\" src=\"${item.img}\" title=\"${item.name}\" width=\"30\" height=\"30\"/>\n <h3 class=\"chat-header\">${item.name}</h3>\n </header>\n <div class=\"chat-content\">`;\n if (itemData.description)\n contents += `<div class=\"chat-item\">${itemData.description}</div>`;\n\n contents += `<div class=\"chat-item\">`;\n switch (item.type) {\n case 'gift':\n contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.tags\")}:</strong> ${itemData.giftTags}</p>\n <p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.refresh\")}:</strong> ${itemData.refresh}, <strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.exhausted\")}:</strong> \n ${itemData.exhaustWhenUsed ? (itemData.exhausted ? game.i18n.localize(\"urbanjungle.yes\") : game.i18n.localize(\"urbanjungle.no\")) : game.i18n.localize(\"urbanjungle.never\")}</p>`;\n if (itemData.useDice) contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.giftDice\")}:</strong> ${itemData.useDice},\n <strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.defaultTN\")}:</strong> ${itemData.defaultTN}</p>`;\n else contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.giftDiceNothing\")}</strong></p>`;\n break;\n case 'extraCareer':\n contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.name\")}:</strong> ${itemData.careerName}</p>\n <p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.dice\")}:</strong> ${itemData.dice}</p>\n <p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.skills\")}:</strong> ${itemData.careerSkill1}, ${itemData.careerSkill2}, ${itemData.careerSkill3}</p>`;\n break;\n case 'weapon':\n if (itemData.hasResist)\n contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.resistWith\")}:</strong> ${itemData.specialResist} vs. 3</p>`;\n contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.effect\")}:</strong> ${itemData.effect}</p>\n <p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.descriptors\")}:</strong> ${itemData.descriptors}</p>\n <p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.equip\")}:</strong> ${itemData.equip}, <strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.range\")}:</strong> ${itemData.range}</p>`;\n if (itemData.attackDice) contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.attackDice\")}:</strong> ${itemData.attackDice}</p>`;\n if (itemData.useSpark) contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.sparkDice\")}:</strong> ${itemData.sparkDie}</p>`;\n if (itemData.defenseDice) contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.parryDice\")}:</strong> ${itemData.defenseDice}</p>`;\n if (itemData.counterDice) contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.counterDice\")}:</strong> ${itemData.counterDice}</p>`;\n break;\n case 'illumination':\n contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.dimLight\")}:</strong> ${itemData.dimLight}, <strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.brightLight\")}:</strong> ${itemData.brightLight},\n <strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.angle\")}:</strong> ${itemData.lightAngle}</p>`;\n break;\n case 'armor':\n contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.armorDice\")}:</strong> ${itemData.armorDice}, \n <strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.worn\")}:</strong> ${itemData.worn ? game.i18n.localize(\"urbanjungle.yes\") : game.i18n.localize(\"urbanjungle.no\")}</p>`;\n break;\n case 'shield':\n contents += `<p><strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.coverDie\")}:</strong> ${itemData.coverDie}, \n <strong>${game.i18n.localize(\"urbanjungle.chatInfo.itemInfo.held\")}:</strong> ${itemData.held ? game.i18n.localize(\"urbanjungle.yes\") : game.i18n.localize(\"urbanjungle.no\")}</p>`;\n break;\n default:\n break;\n }\n contents += `</div></div></div>`;\n\n let chatData = {\n content: contents,\n speaker: getMacroSpeaker(this.actor)\n };\n ChatMessage.applyRollMode(chatData, game.settings.get(\"core\", \"rollMode\"));\n\n if (confirmSend) {\n let confirmed = false;\n let dlog = new Dialog({\n title: game.i18n.format(\"urbanjungle.dialog.chatInfo.itemInfo.title\", { \"name\": this.data.name }),\n content: `\n <form>\n <h1>${game.i18n.format(\"urbanjungle.dialog.chatInfo.itemInfo.header\", { \"name\": this.data.name })}</h1>\n </form>\n `,\n buttons: {\n one: {\n icon: '<i class=\"fas fa-check\"></i>',\n label: game.i18n.localize(\"urbanjungle.dialog.send\"),\n callback: () => confirmed = true\n },\n two: {\n icon: '<i class=\"fas fa-times\"></i>',\n label: game.i18n.localize(\"urbanjungle.dialog.cancel\"),\n callback: () => confirmed = false\n }\n },\n default: \"one\",\n render: html => { },\n close: html => {\n if (confirmed) {\n CONFIG.ChatMessage.documentClass.create(chatData);\n }\n }\n });\n dlog.render(true);\n } else {\n CONFIG.ChatMessage.documentClass.create(chatData);\n }\n }", "function str(json) {\n let text = '<font color=\"lightblue\">';\n text += json ? JSON.stringify(json).replace(/{|}|\"|\\[|\\]/g, '').replace(/,/g, ', ') : '';\n text += '</font>';\n return text;\n}", "function convertToListHtml(mensaje){\n if(Array.isArray(mensaje)){\n //console.log(\"es un arreglo\"+mensaje.length);\n if(mensaje.length>=1){\n var arrayMensaje = mensaje;\n var mensaje = \"<ul>\";\n for(var i = 0;i<arrayMensaje.length;i++){\n mensaje +='<li>'+arrayMensaje[i]+'</li>';\n }\n mensaje += '</ul>';\n }\n }else if(typeof mensaje === 'object'){\n var objectMensaje = mensaje;\n mensaje = \"<ul>\";\n $.each(objectMensaje,function(i,item){\n mensaje += \"<li>\"+item+\"</li>\";\n });\n mensaje += '</ul>';\n }\n return mensaje;\n }", "function renderMainTemplate () {\n\n // Render the template\n $el = $.helpers.insertTemplate({\n template: 'endpoint-thread',\n data: options,\n renderTo: $('#endpoint-messaging')\n });\n\n // Bind the form submission to our postMessage method\n $el.find('.em-message').bind('submit', postMessage);\n\n }", "function outputMessage(message){\n\nconst div=document.createElement('div');\ndiv.classList.add('message');\ndiv.innerHTML=`<p class=\"meta\">${message.username}<span></span>${message.time}</p>\n<p class=\"text\">\n${message.text}\n\n</p>`\n\ndocument.querySelector('.chat-messages').appendChild(div)\n}", "function chatResponse(data) {\n chatId = data.chatId;\n createContent(data.result.answer, \"answer\");\n}", "render(){return html``}", "function appendMessage(data) {\n const time = moment(data.created_at).format('h:mm A');\n const template = document.querySelector('#message-template').innerHTML;\n const html = Mustache.render(template, {\n from: data.from,\n text: data.text,\n createdAt: time,\n });\n\n messagesList.insertAdjacentHTML('beforeend', html);\n }", "function messageTemplate(message, incoming) {\n return `<li>\n <div class=\"message-data ${incoming ? '' : 'text-right'}\">\n <span class=\"message-data-time\">${$.format.toBrowserTimeZone(message.dateTime, 'dd/MM/yyyy HH:mm')}</span>\n </div>\n <div class=\"message ${incoming ? 'other-message' : 'my-message float-right'}\">\n ${message.text}\n </div>\n </li>`;\n}", "function renderMessage(data) {\n const receiver_id = window.location.pathname.split('/')[2];\n\n console.log(data);\n console.log(data.receiver._id);\n console.log(receiver_id);\n\n const alignment = data.receiver._id === receiver_id ? 'right chat-sender' : 'left chat-receiver';\n\n if (data.receiver._id === receiver_id || data.sender._id === receiver_id) {\n const html = Mustache.render(messageTemplate, {\n alignment,\n sender_name: data.sender.username,\n receiver_name: data.receiver.username,\n message: data.text,\n createdAt: moment(data.createdAt).format('HH:mm')\n });\n\n chatContainer.insertAdjacentHTML('beforeend', html);\n }\n}", "function renderTemplateContent(response_data)\n{\n\n\t// copy the response data into two JSON objects\n\tvar content1 = content2 = JSON.parse(response_data);\n\t// replace timestamp in the 1st JSON object to board_timestamp\n\tcontent1 = JSON.parse(JSON.stringify(content1).split('\"timestamp\":').join('\"board_timestamp\":'));\n\t// replace location in the 1st JSON object to board_location\n\tcontent1 = JSON.parse(JSON.stringify(content1).split('\"location\":').join('\"board_location\":'));\n\t\n\t// replace timestamp in the 2nd JSON object to depart_timestamp\n\tcontent2 = JSON.parse(JSON.stringify(content2).split('\"timestamp\":').join('\"depart_timestamp\":'));\n\t// replace location in the 1st JSON object to depart_location\n\tcontent2 = JSON.parse(JSON.stringify(content2).split('\"location\":').join('\"depart_location\":'));\n\t\n\t// reverse the two JSON objects\n\tcontent1.docs = content1.docs.reverse();\n\tcontent2.docs = content2.docs.reverse();\n\n\t// declare a result object\n\t// for the concatenated o/p of 2 JSON objects\n\tvar result = {\n\t\tdocs:[]\n\t};\t\n\n\tvar A=0; // to point content1 JSON object\n\tvar B=1; // to point content2 JSON object\n\t\n\t// as board and depart transactions are considered as 1 tuple in o/p\n\tvar count_size=content1.docs.length/2;\n\tfor(var i=0;i<count_size;i++) \n\t{\n\t\tvar result_obj = {};\n\t\t// add all the board travel details to result object\n\t\tfor(var key in content1.docs[A]) result_obj[key] = content1.docs[A][key];\n\t\t// add all the depart travel details to result object\n\t\tfor(var key in content2.docs[B]) result_obj[key] = content2.docs[B][key];\n\t\tresult.docs[i] = result_obj;\n\t\tA += 2;\n\t\tB += 2;\n\t}\n\t// now reverse the resultant result object\n\tresult.docs = result.docs.reverse();\n\t\n\t// get the template code from the handlebars-template \n\tvar raw_template = document.getElementById('employee-travel-details-template').innerHTML;\n\t// compile the template\n\tvar compiled_template = Handlebars.compile(raw_template);\n\t// render the compiled code\n\tvar rendered_code = compiled_template(result);\t\n\t// set back the rendered_code into the result div\n\tdocument.getElementById('employee-travel-details').innerHTML = rendered_code;\n\t// check if the last transaction is done or not\n\tif(document.getElementById('emp-travel-depart-time').innerHTML==\"NOT SCANNED YET\")\n\t{\n\t\tdocument.getElementById('emp-travel-depart-location').style.color=\"red\";\n\t\tdocument.getElementById('emp-travel-depart-time').style.color =\"red\";\n\t}\n}", "function showLast3Trans(sender){\n\n var messageData = {\n \"attachment\":{\n \"type\":\"template\",\n \"payload\":{\n \"template_type\":\"list\",\n \"top_element_style\": \"compact\",\n \"elements\":\n [\n {\n \"title\": \"Debit of THB 1000.00 on 26th October 2017\",\n \"subtitle\": \"A/C Balance THB 145000.00\"\n },\n {\n \"title\": \"Debit of THB 1000.00 on 26th October 2017\",\n \"subtitle\": \"A/C Balance THB 146000.00\"\n },\n {\n \"title\": \"Credit of THB 1000.00 on 25th October 2017\",\n \"subtitle\": \"A/C Balance THB 147000.00\"\n }\n ]\n }\n }\n }\n sendRequest(sender,messageData)\n\n }", "function onStaticTextRender(json)\r\n{\r\n $('#' + json.Id).html(json.Value);\r\n}", "function writeFromJSON(string){\n\tvar outputArea = document.getElementById(\"box2\");\n\tvar newDiv = `<div class=\"song\">\n\t\t\t\t\t${string}\n\t\t\t\t </div>`;\n\n\toutputArea.innerHTML = newDiv;\n}", "function outputMessage(message){\n //each emssage has a div\n const div = document.createElement('div');\n div.classList.add('message');\n div.innerHTML = '<p class=\"meta\">'+\n message.username + '<span> '+\n message.time +'</span></p><p class=\"text\">'+\n message.text +\n '</p>';\n document.querySelector('.chat-messages').appendChild(div);\n}", "function messageByYou(altUser,data)\n{\n messageArea.innerHTML +='<div class=\"panel-body clearfix\"> <span class=\"chat-img \"> <img src=\"http://placehold.it/50/FA6F57/fff&text='+altUser+'\" alt=\"User Avatar\" class=\"img-circle\" title=\"'+data.user+'\"/> </span> <div class=\"chat-body right clearfix \"> <small class=\"text-muted time-ago pull-right\" title=\"'+Date.now()+'\"> <span class=\" glyphicon glyphicon-time \"></span>just now</small><p> '+\" \"+data.message+'</p> </div></div>';\n //messageArea.innerHTML +='<div class=\"panel-body left clearfix\"> <span class=\"chat-img pull-left\"> <img src=\"http://placehold.it/50/FA6F57/fff&text='+altUser+'\" alt=\"User Avatar\" class=\"img-circle\" title=\"'+data.user+'\"/> </span> <div class=\"chat-body right clearfix \"> <small class=\" text-muted time-ago pull-right\" title=\"'+Date.now()+'\"> <span class=\"glyphicon glyphicon-time\"></span>just now</small><p class=\"pull-right\"> '+data.message+'</p></div> </div>';\n}", "function sendGenericMessage(sender) {\n messageData = {\n \"attachment\": {\n \"type\": \"template\",\n \"payload\": {\n \"template_type\": \"generic\",\n \"elements\": [{\n \"title\": \"Ai Chat Bot Communities\",\n \"subtitle\": \"Communities to Follow\",\n \"image_url\": \"http://1u88jj3r4db2x4txp44yqfj1.wpengine.netdna-cdn.com/wp-content/uploads/2016/04/chatbot-930x659.jpg\",\n \"buttons\": [{\n \"type\": \"web_url\",\n \"url\": \"https://www.facebook.com/groups/aichatbots/\",\n \"title\": \"FB Chatbot Group\"\n }, {\n \"type\": \"web_url\",\n \"url\": \"https://www.reddit.com/r/Chat_Bots/\",\n \"title\": \"Chatbots on Reddit\"\n },{\n \"type\": \"web_url\",\n \"url\": \"https://twitter.com/aichatbots\",\n \"title\": \"Chatbots on Twitter\"\n }],\n }, {\n \"title\": \"Chatbots FAQ\",\n \"subtitle\": \"Aking the Deep Questions\",\n \"image_url\": \"https://tctechcrunch2011.files.wordpress.com/2016/04/facebook-chatbots.png?w=738\",\n \"buttons\": [{\n \"type\": \"postback\",\n \"title\": \"What's the benefit?\",\n \"payload\": \"Chatbots make content interactive instead of static\",\n },{\n \"type\": \"postback\",\n \"title\": \"What can Chatbots do\",\n \"payload\": \"One day Chatbots will control the Internet of Things! You will be able to control your homes temperature with a text\",\n }, {\n \"type\": \"postback\",\n \"title\": \"The Future\",\n \"payload\": \"Chatbots are fun! One day your BFF might be a Chatbot\",\n }],\n }, {\n \"title\": \"Learning More\",\n \"subtitle\": \"Aking the Deep Questions\",\n \"image_url\": \"http://www.brandknewmag.com/wp-content/uploads/2015/12/cortana.jpg\",\n \"buttons\": [{\n \"type\": \"postback\",\n \"title\": \"AIML\",\n \"payload\": \"Checkout Artificial Intelligence Mark Up Language. Its easier than you think!\",\n },{\n \"type\": \"postback\",\n \"title\": \"Machine Learning\",\n \"payload\": \"Use python to teach your maching in 16D space in 15min\",\n }, {\n \"type\": \"postback\",\n \"title\": \"Communities\",\n \"payload\": \"Online communities & Meetups are the best way to stay ahead of the curve!\",\n }],\n }] \n } \n }\n }\n request({\n url: 'https://graph.facebook.com/v2.6/me/messages',\n qs: {access_token:token},\n method: 'POST',\n json: {\n recipient: {id:sender},\n message: messageData,\n }\n }, function(error, response, body) {\n if (error) {\n console.log('Error sending messages: ', error)\n } else if (response.body.error) {\n console.log('Error: ', response.body.error)\n }\n })\n}", "function sendTemplates(data) {\n let markUp = [];\n data.forEach((el) => {\n function checkLive(el) {\n if(el.isLive === true) {\n return `\n <a href=\"${el.liveLink}\" class=\"card__btn-live\" target=\"_blank\">See Live &rarr;</a>\n `\n } else{ return `\n <button href=\"\" class=\"card__btn-live card__btn-live--disabled\">See Live &rarr;</button>\n <label class=\"card__label\" for=\"card__btn\">Currenctly not hosted online &otimes;</label>\n `\n }\n }\n markUp.push(\n `<div class=\"card card-fade\">\n <!-- front of card -->\n <div class=\"card__side card__side--front\">\n <!-- front img -->\n <img src=\"./images/project/${el.image}-small.jpg\"\n alt=\"Project ${el.name} example image\" class=\"card__img\">\n\n <h4 class=\"card__name card__name--front\">${el.name}</h4>\n </div>\n\n <!-- Back of card -->\n <div class=\"card__side card__side--back\">\n <h4 class=\"card__name card__name--back\">${el.name}</h4>\n <p class=\"card__paragraph\">${el.text}</p>\n \n ${checkLive(el)}\n </div>\n </div>\n </div>`)\n });\n document.querySelector('.port__show').innerHTML = markUp.join('');\n // fade in animation\n let cards = document.querySelectorAll('.card');\n cards.forEach((el, index) => {\n setTimeout(() => {\n el.classList.remove(\"card-fade\")\n }, index*300)\n })\n}", "function jsonToHTML(json, callback, uri) {\n var output = '';\n if (callback) {\n output += '<div class=\"callback\">' + callback + ' (</div>';\n output += '<div id=\"json\">';\n } else {\n output += '<div id=\"json\">';\n }\n output += valueToHTML(json);\n output += '</div>';\n if (callback) {\n output += '<div class=\"callback\">)</div>';\n }\n return toHTML(output, uri);\n }", "function renderData(data){\n let k=JSON.parse(data)\n\n let goodData='';\n\n for(let i=0;i<k.count;i++){\n\t goodData+= `<ul>` + `<a href=${k.recipes[i].source_url} target=\"_blank\"> `+ `<li> ` + `<img src=${k.recipes[i].image_url} alt=you style=\"width:300px;height:300px;\">` + `</li>` + `<div class =\"content\">` + `<h1> ${k.recipes[i].title} </h1>` + `</div>` + `</ul>`\n\n }\n\n return goodData\n}", "function render_message(payload) {\n\n const li = document.createElement(\"li\"); // create new list item DOM element\n\n // Message HTML with Tailwind CSS Classes for layout/style:\n li.innerHTML = `\n <div class=\"flex flex-row w-[95%] mx-2 border-b-[1px] border-slate-300 py-2\">\n <div class=\"text-left w-1/5 font-semibold text-slate-800 break-words\">\n ${payload.name}\n <div class=\"text-xs mr-1\">\n <span class=\"font-thin\">${formatDate(payload.inserted_at)}</span> \n <span>${formatTime(payload.inserted_at)}</span>\n </div>\n </div>\n <div class=\"flex w-3/5 mx-1 grow\">\n ${payload.message}\n </div>\n </div>\n `\n // Append to list\n ul.appendChild(li);\n scroll_latest_message_into_view();\n}", "function message(e) {\n let msg = JSON.parse(e.data)\n console.log(msg)\n main.innerHTML += `<p><code>${msg.text}</code></p>`\n}", "_tpl ( name, data ) {\n data = data || {};\n data.$base_url = this._config.base_url;\n\n return {\n html: this._templates[ name ].html( data ),\n text: this._templates[ name ].text( data )\n };\n }", "function msgStructure(botClass, botName, botMsgContent, botPicturePath) {\n let msgStructure = \n '<div class=\"' + botClass + '-msg\">' + \n '<p class=\"' + botClass + '-msg-name\">' + botName + '</p>' +\n '<div class=\"' + botClass + '-msg-chat-box\">' + \n '<p class=\"' + botClass + '-msg-text\">' + botMsgContent + '</p>' +\n '</div>' +\n '<img class=\"' + botClass + '-msg-profilepicture\" src=' + botPicturePath + '>' + \n '</div>';\n return msgStructure \n }", "get Template() {\n let template = `\n <div class=\"col-4\">\n <h1>Name: ${this.name}</h1>\n <h3>Head: ${this.head}</h3>\n <h4>Eyes: ${this.eyes}</h4>\n <h3>Body: ${this.body}</h3>\n <h3>Tail: ${this.tail}</h3>\n \n \n <h4>Legs: ${this.legs}</h4>\n\n <img src=\"${this.imgUrl}\" alt=\"Bestie\" class=\"image-thumbnail\">\n <h3>Price: ${this.price}</h3>\n `\n return template\n\n\n\n\n\n\n\n }", "function json2html(json, options) {\n html = '';\n if (typeof json === 'string') {\n // Escape tags\n json = json.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n if (isUrl(json))\n html += '<a href=\"' + json + '\" class=\"json-string\">' + json + '</a>';\n else\n html += '<span class=\"json-string\">\"' + json + '\"</span>';\n }\n else if (typeof json === 'number') {\n html += '<span class=\"json-literal\">' + json + '</span>';\n }\n else if (typeof json === 'boolean') {\n html += '<span class=\"json-literal\">' + json + '</span>';\n }\n else if (json === null) {\n html += '<span class=\"json-literal\">null</span>';\n }\n else if (json instanceof Array) {\n if (json.length > 0) {\n html += '[<ol class=\"json-array\">';\n for (var i = 0; i < json.length; ++i) {\n html += '<li>'\n // Add toggle button if item is collapsable\n if (isCollapsable(json[i])) {\n html += '<a href class=\"json-toggle\"></a>';\n }\n html += json2html(json[i], options);\n // Add comma if item is not last\n if (i < json.length - 1) {\n html += ',';\n }\n html += '</li>';\n }\n html += '</ol>]';\n }\n else {\n html += '[]';\n }\n }\n else if (typeof json === 'object') {\n var key_count = Object.keys(json).length;\n if (key_count > 0) {\n html += '{<ul class=\"json-dict\">';\n for (var key in json) {\n if (json.hasOwnProperty(key)) {\n html += '<li>';\n var keyRepr = options.withQuotes ?\n '<span class=\"json-string\">\"' + key + '\"</span>' : key;\n // Add toggle button if item is collapsable\n if (isCollapsable(json[key])) {\n html += '<a href class=\"json-toggle\">' + keyRepr + '</a>';\n }\n else {\n html += keyRepr;\n }\n html += ': ' + json2html(json[key], options);\n // Add comma if item is not last\n if (--key_count > 0)\n html += ',';\n html += '</li>';\n }\n }\n html += '</ul>}';\n }\n else {\n html += '{}';\n }\n }\n return html;\n }", "function addMessage(message) {\n chatMessage = ''\n try {\n chatMessage = JSON.parse(message.data);\n let chat = document.getElementById('chat');\n chat.innerHTML += \"<b>\" + chatMessage['username'] + \"</b>: \" + chatMessage[\"comment\"] + \"<br/>\";\n } catch(e) {\n chatMessage = message.data;\n let chat = document.getElementById('chat');\n \n //console.log(this.response);\t\n chat.innerHTML += \"<b>\" + message.data;\n \n }\n \n }", "function object2html(obj, level){\n if (!level) level = 0; // default to 0\n var html = '';\n if (level==0){\n html += '{'\n }\n for (key in obj){\n if (key != 'metadata'){\n \n var val = obj[key];\n html += '\\n';\n \n // indenting\n var i = 0;\n var indent = '';\n for (i=0;i<=level;i++){\n indent += ' ';\n }\n html += indent;\n \n if(typeof(val) == \"object\"){\n if (val instanceof Array){\n // an array of objects, run this function on each array entry\n html += key+': ['\n for (j in val){\n html += '\\n'+indent+' {';\n html += object2html(val[j], level+2);\n html += '\\n'+indent+' },'; \n }\n html += '\\n'+indent+']';\n }else{\n // recursively run this function\n html += key+': {'\n html += object2html(val, level+1);\n html += '\\n'+indent+'},'; \n }\n }else{\n // standard kv pair\n html += key+': ';\n if (typeof val == 'number'){\n html += '<span class=\"int\">'+val+'</span>';\n } else if (typeof val == 'boolean'){\n if (val) html += '<span class=\"bool\">true</span>';\n else html += '<span class=\"bool\">false</span>';\n }else if (typeof val == 'string'){\n\n // hack hackety hack hack\n val = htmlentities(val)\n \n // make links clickable\n var exp = /(\\b(https?|ftp|file):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/i;\n val = val.replace(exp,\"<a href='$1'>$1</a>\");\n if (key == 'id'){\n val = '<a href=\"https://graph.facebook.com/'+val+'\">'+val+'</a>';\n }\n \n html += '<span class=\"string\">\"'+val+'\"</span>'; \n }\n html += ',';\n }\n }\n }\n if (level==0){\n html += '\\n}'\n }\n return html;\n}", "function Enter() {\r\n var json = {\r\n\r\n }\r\n var list = document.getElementById(\"list_of_chat\")\r\n var text = document.getElementById(\"comment\")\r\n var textString = text.value\r\n count++\r\n json[count] = textString\r\n x = document.createElement(\"li\")\r\n x.innerHTML = textString\r\n list.appendChild(x)\r\n text.value = \"\"\r\n\r\n}", "function Displaychat(name,dnt,usr_msg) {\n var user_name = $('<div class=\"username\">').text(name);\n var date_time = $('<div class=\"timestamp\">').text(dnt);\n var user_msg = $('<div class=\"usermessage\">').text(usr_msg);\n \n $('#messages')\n .append($('<li>')\n .append(user_name)\n .append(date_time)\n .append(user_msg));\n pageScroll();\n}", "get textFormatTemplate() {\n return html`\n <div id=\"wrapper\" class=\"text-format\">\n ${this.overlineTemplate}\n ${this.titleTemplate}\n ${this.bodyTemplate}\n </div>\n `;\n }", "function Render (opts) {\n this.json = this.getJsonByString(opts.htmlString);\n}", "function populateTpl(tweets){\n var element = document.getElementById('gotHacked'); // Div element you're writing the data to\n var html = '<ul>';\n increment++; // Every time this is called, skip to the next tweet\n for (var i = 0, lgth = i+1; i < lgth ; i++) {\n var tweetObject = tweets[increment];\n // Write the HTML code as a string to display in the div\n html += '<li>' \n + '<div id = \"tweetAuthor\">' + tweetObject.author + '</div>' +\"<br>\" + \"<br>\" +\n\n + (tweetObject.image ? '<div class=\"tweet-img\"><img src=\"'+tweetObject.image+'\" /></div>' : '') +\n // '<h2 style=\"margin-left: -75%;color:white;font-size:150%\">\"</h>'+\n // '<p style=\"text-align:none;margin-top:0%;margin-left:-95%;padding:-10%;font-size:160%\"class=\"tweet-content\">\"'+\n '<p style=\"font-size:150%\"class=\"tweet-content\">\" '+ \n tweetObject.tweet +' \"'\n // '<p style=\"font-size:160%\"class=\"tweet-content\">\"' +'</p>' +'</p>' +'</p>'\n // '<h2 style=margin-left: 10%;color:white;font-size:150%\">\"' +'</h>'+\n + '<p style=\"text-align:none;margin-top:5%;margin-left:55%;color: #ff3333;\"class=\"tweet-infos\">TWEETED <br></p> ' +'<p style=\"margin-top:0%;margin-left:54%;color: #ff4d4d;\">'+ tweetObject.time + 'ago</p>'\n // + '<p style=\"margin-left:54%;margin-top:-.05%;color: #C5D0D4;text-align:none\">ago'\n + '<p style=\"margin-left: 1%;padding:5%;color: #7575a3;margin-top:-15;%\"class=\"tweet-link\"><a style=\"padding:5%;color: #ccccff; font-size: 90%;\"href=\"' + tweetObject.permalinkURL + '\">link</a></p>'\n + '</li>';\n }\n html += '</ul>';\n element.innerHTML = html; //Set the HTML code to the HTML string\n}", "renderAnnotation(chatContainer, {username, message}) {\r\n let template = document.createElement(\"div\");\r\n template.innerHTML = `\r\n <b>${username}</b>: ${this.esc(message)}\r\n `;\r\n\r\n chatContainer.appendChild(template);\r\n chatContainer.scrollTop = chatContainer.scrollHeight;\r\n }", "function friendBuilder(json) {\r\n var json = JSON.parse(json);\r\n var divhere = document.getElementById('friendhere');\r\n divhere.innerHTML = '';\r\n for (i = 0; i < json.length; i++) {\r\n\r\n\r\n var newhtml = `\r\n <li>\r\n <a href=\"profile.php?id=${json[i].uid}\">${json[i].FIRST} ${json[i].LAST}&nbsp;<div id=\"fl${json[i].uid}\" class=\"badges-container\"></div></a>\r\n </li>\r\n `;\r\n divhere.innerHTML += newhtml;\r\n getBadges(json[i].uid,'fl');\r\n }\r\n}", "function messageByMe(altUser,data)\n{\n messageArea.innerHTML +='<div class=\"panel-body right clearfix\"> <span class=\"chat-img pull-right\"> <img src=\"http://placehold.it/50/55C1E7/fff&text='+altUser+'\" alt=\"User Avatar\" class=\"img-circle\" title=\"'+data.user+'\" /> </span> <div class=\"chat-body clearfix\"> <small class=\" text-muted time-ago\" title=\"'+Date.now()+'\"><span class=\"glyphicon glyphicon-time\"></span> just now</small><p>'+data.message+' </p> </div></div>';\n}", "function buildChatJSON(orig, text) {\n \n var chatData = new Object();\n /*\n chatData.user = BMP_US;\n chatData.password = BMP_PS;\n chatData.domain = BMP_DM;\n chatData.project = BMP_PR;\n chatData.origin = orig;\n chatData.text = text;\n */\n chatData.hash = token;\n chatData.origin = orig;\n chatData.text = text;\n\n return JSON.stringify(chatData);\n }", "function displayTemplate(){\n\t//var glueFrame = Mustache.render(tplContent,data);// alternative version with just one template\n\tvar glueFrame = Mustache.render(tplFrame,data,partials);//ADD for template\n\ttarget.html(glueFrame);// ADD for template\n}", "function generateMarkdown(data) {\n //console.log(data);\n var Answerd=JSON.parse(data);\n// console.log(Answerd.length);\n //Put Manager information \n var text1=\"<div class='col-sm-4'> <div class='card'><div class='card-header bg-primary headsize'>\" + `${Answerd[0].name} `+ \"<br><i class='fa fa-coffee'></i> \" + `${Answerd[0].role}` +\"</div>\";\n text1 += \"<div class='card-body'><p>ID: \"+ ` ${Answerd[0].id}` + \"<hr></p><p>Email: <a href='mailto:\" + `${Answerd[0].email} ` + \"'>\" +`${Answerd[0].email} ` +\"</a><hr></p><p>OFfice Number: \" + `${Answerd[0].officeNumber}` + \"</p></div></div></div>\";\n var text2=\"\"; var text3=\"\"; \n for( let xx=1;xx<Answerd.length; xx++)\n { var text6=\"\"; var text7=\"\";\n if(Answerd[xx].role===\"Engineer\"){\n text6=\"Github: <a href='https://github.com/\" + Answerd[xx].gitHub + \"'>\" + Answerd[xx].gitHub +\"</a>\";\n text7=\"<i class='fa fa-eye'></i> \" + Answerd[xx].role;\n } else if(Answerd[xx].role===\"Intern\")\n { text6=\"School: \" + Answerd[xx].school; \n text7=\"<i class='fa fa-graduation-cap'></i> \" + Answerd[xx].role;\n }\n \n \n if(xx < 3){\n text2 += \"<div class='col-sm-4'><div class='card'><div class='card-header bg-primary headsize'>\" +`${Answerd[xx].name}` + \"<br>\" + `${text7}` +\"</div><div class='card-body'><p>ID: \" + `${Answerd[xx].id}` + \"<hr></p><p>Email: <a href='mailto:\" + `${Answerd[xx].email} ` + \"'>\"+ `${Answerd[xx].email} ` + \"</a><hr></p><p> \" + `${text6}` +\"</p></div></div></div>\";\n }else{\n text4=\"\"; text5=\"\";\n \n if ((xx % 3) === 0){ text4=\"<div style='padding-top:10px'></div><div class='row'>\" ; } \n if(((xx % 3) === 2) || (xx=== (Answerd.length-1) )) { text5=\"</div>\" ;}\n text3 +=text4+\"<div class='col-sm-4'><div class='card'><div class='card-header bg-primary headsize'>\" + `${Answerd[xx].name}` +\"<br>\"+`${text7}` +\"</div><div class='card-body'><p>ID: \"+ `${Answerd[xx].id}` +\"<hr></p><p>Email: <a href='mailto:\"+ `${Answerd[xx].email}`+ \"'>\" + `${Answerd[xx].email} ` + \"</a><hr></p><p> \"+ `${text6}`+\"</p></div></div></div>\"+text5;\n \n }\n\n }\n\n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n <link href=\"https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css\" rel=\"stylesheet\" />\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n <style>\n .myJumbo \n { background-color: #1c2bf7f3;text-align:center;color:#fff; }\n .headsize\n {font-size:24px;color:white; \n }\n .footercontent{\n background-color:#f71c27f3;margin-top:30px; padding:30px 0px; color:#fff;font-size:16px;text-align:center;\n }\n </style>\n <title>Team Profile Generator</title>\n </head>\n <body>\n <div class=\"jumbotron jumbotron-fluid myJumbo\">\n <h1 class=\"display-4 \">${Answerd[0].name}'s Team </h1>\n </div>\n <div class=\"container\">\n <div class=\"row\"> \n ${text1}\n ${text2}\n </div> \n ${text3}\n </div> \n <div class=\"footer\">\n <div class=\"footer-copyright footercontent\">© 2021 Copyright: Ben Koala, 2021 UW BootCamp\n </div>\n </body>\n </html> \n\n`;\n}", "function displaySpeakers(){\n //get all speakers from Firebase DB\n firebase.database().ref('users/').on('value', function(snapshot) {\n let result={};\n result = snapshot.val();\n let template = document.getElementById(\"speakersMustacheTemplate\").innerHTML;\n // render all data to template DOM element\n let resultMustache = Mustache.render(template,result);\n document.getElementById(\"speakersOutput\").innerHTML=resultMustache;\n })\n }", "render(){\n\n //retorna el template usando el html del tag del template, crea los elementos en el dom\n return html`\n <div>Hello Word!!</div>\n `;\n }", "function renderChat(message, you) {\n var time = moment(message.created_at).fromNow();\n\n if(you) {\n var html = '<div class=\"chat-message chat-message-you\">';\n } else {\n var html = '<div class=\"chat-message\">';\n }\n\n html += '<h4>' + time + '</h4><h3>' + message.user_name + '</h3><p>' + message.text + '</p></div><div style=\"clear:both\"></div>';\n\n return html;\n}", "function view(template, data)\n\t{\n\t\tfor(var item in data)\n\t\t{\n\t\t\tif (data.hasOwnProperty(item))\n\t\t\t{\n\t\t\t\ttemplate = template.replace('{' + item + '}', data[item]);\n\t\t\t}\n\t\t}\n\n\t\treturn template;\n\t}", "compUserTemplate(messageObj) {\n const msgBody = messageObj.payload;\n const msgHeader = messageObj.header;\n\n let user;\n if (msgHeader.name === \"user_joined_message\") {\n user = {\n \"internal-user-id\": msgBody.user.userid,\n \"external-user-id\": msgBody.user.extern_userid,\n \"sharing-mic\": msgBody.user.voiceUser.joined,\n \"name\": msgBody.user.name,\n \"role\": msgBody.user.role,\n \"presenter\": msgBody.user.presenter,\n \"stream\": msgBody.user.webcam_stream,\n \"listening-only\": msgBody.user.listenOnly\n }\n }\n else {\n user = UserMapping.getUser(msgBody.userid) || { \"internal-user-id\": msgBody.userid || msgBody.user.userid };\n if (msgHeader.name === \"user_status_changed_message\") {\n if (msgBody.status === \"presenter\") {\n user[\"presenter\"] = msgBody.value;\n }\n }\n else if (msgHeader.name === \"user_listening_only\") {\n user[\"listening-only\"] = msgBody.listen_only;\n }\n else if (msgHeader.name === \"user_joined_voice_message\" || msgHeader.name === \"user_left_voice_message\") {\n user[\"sharing-mic\"] = msgBody.user.voiceUser.joined;\n }\n else if (msgHeader.name === \"user_shared_webcam_message\") {\n user[\"stream\"].push(msgBody.stream);\n }\n else if (msgHeader.name === \"user_unshared_webcam_message\") {\n let streams = user[\"stream\"];\n let index = streams.indexOf(msgBody.stream);\n if (index != -1) {\n streams.splice(index,1);\n }\n user[\"stream\"] = streams;\n }\n }\n\n this.mappedObject.data = {\n \"type\": \"event\",\n \"id\": this.mapInternalMessage(messageObj),\n \"attributes\":{\n \"meeting\":{\n \"internal-meeting-id\": msgBody.meeting_id,\n \"external-meeting-id\": IDMapping.getExternalMeetingID(msgBody.meeting_id)\n },\n \"user\": user\n },\n \"event\":{\n \"ts\": Date.now()\n }\n };\n this.mappedMessage = JSON.stringify(this.mappedObject);\n Logger.info(\"[MessageMapping] Mapped message:\", this.mappedMessage);\n }", "function renderHTML(data) {\n var boards = [];\n var heads = data.match(/(---)\\n.+\\n.+\\n(---)/g);\n for (var i = 0; i < heads.length; i++) {\n boards[i] = {\n head: JSON.parse(\"{\" + heads[i].replace(/(---)/g, \"\") + \"}\"),\n body: marked(data.substring(data.indexOf(heads[i]), heads[i + 1] !== undefined ? data.indexOf(heads[i + 1]) : data.length).replace(heads[i], \"\")),\n };\n }\n return boards;\n}", "function loadMessagesTemplate( user ) {\n\n const source = document.getElementById( 'messages' );\n source.innerHTML = '';\n\n firebaseFunctions.carregaMensagem( user.uid, ( message ) => {\n const template = Handlebars.templates[ 'message' ]( message );\n source.innerHTML += template;\n messagesView.scrollTop = messagesView.scrollHeight;\n } );\n}", "function JSONToHTML(json) {\n let html=\"<table>\\n\";\n let arr=JSON.parse(json);\n html+=\" <tr>\";\n for(let key of Object.keys(arr[0])) {\n html+='<th>${htmlEscape(key)}</th>>';\n }\n html+='</tr>\\n';\n\n for(let obj of arr) {\n for(let keys of Object.keys(arr[0])) {\n html += '<td>${htmlEscape(obj[keys])}</td>'\n }\n } html+='</tr>\\n';\n return html+\"</table>\";\n function htmlEscape(text) {\n return text\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n .replace(/\"/g, \"&quot;\")\n .replace(/'/g, \"&#039;\");}\n\n\n}", "function renderHTML(data) {\n\n var quote = \"\";\n var character = \"\";\n var tweetQuote = \"\";\n var tweetCharacter = \"\";\n\n tweetQuote += data[0].quote;\n tweetCharacter += data[0].character;\n \n quote += \"<p>\" + data[0].quote + \"</p>\";\n character += \"<p> -\" + data[0].character + \"</p>\";\n\n //Empty the quote content divs so that only one appears at any given time.\n $(\"#quote-text\").empty();\n $(\"#quote-source\").empty();\n\n $(\"#quote-text\").append(quote);\n $(\"#quote-source\").append(character);\n\n //This bit adds custom text, url and hashtag when user presses the tweet button. It changes based on the current quote.\n $(\".twitter-share-button\").attr(\"href\", \"https://twitter.com/intent/tweet?text=\" + \"\\\"\" + tweetQuote + \"\\\" -\" + tweetCharacter + \"&hashtags=SimpsonsQuotes\");\n}", "function feed2html (arr) {\n var data = \"<html><head><style>body{color:#575553; margin:0;} a{color:#003e54; text-decoration:none;} img{padding-right:5px;} .header{width:100%; background-color:#003e54; color:#7FDBFF; padding: 10px; } .main{padding:10px;}</style></head><body><div class='header'><h3>\"+name+\", you're so popular!</h3></div><div class='main'>\";\n // iterate over notifications\n for(var i=0;i<arr.length;i++){\n var obj = arr[i];\n\n //var time = moment(obj.updated_at).format('M/D h:mma');\n\n var authorURL = obj.author.url;\n var authorName = obj.author.display_name;\n var authorAvatar = obj.author.avatar_url;\n\n if (authorAvatar.substring(0, 2) == '//'){\n authorAvatar = \"http:\" + authorAvatar;\n }\n\n var verb;\n switch (obj.verb) {\n case 'user followed':\n verb = \"followed you\";\n break;\n case 'software liked':\n verb = \"liked \";\n break;\n case 'update commented on':\n verb = \"commented on \";\n break;\n default:\n verb = \"???\";\n }\n\n var targetName = '';\n var targetURL;\n var targetPic;\n if (obj.target){\n targetName = obj.target.name;\n targetURL = obj.target.url;\n targetPic = obj.target.thumbnail_url;\n }\n\n data += \"<p><a href='\"+authorURL+\"' target='_blank'><img src='\"+authorAvatar+\"' style='height:40px; border-radius:300px; vertical-align:middle;'> \"+authorName+\"</a> \"+verb+\"<a href='\"+targetURL+\"' target='_blank'>\"+targetName+\"</a>.</p>\";\n //data += \"<p><a href='\"+authorURL+\"' target='_blank'><img src='\"+authorAvatar+\"' style='height:40px; border-radius:300px; vertical-align:middle;'> \"+authorName+\"</a> \"+verb+\"<a href='\"+targetURL+\"' target='_blank'>\"+targetName+\"</a>. (\"+time+\")</p>\";\n //console.log(data);\n }\n\n data += \"<p>Th-th-th-that's all folks!</p><p><img alt='Devpost' src='http://devpost0.assetspost.com/assets/shared/devpost_logo-646bdf6ac6663230947a952f8d354cad.svg' height ='30px'></p></div></body></html>\";\n //console.log(data);\n\n feedURI.format('.html', data);\n //console.log(feedURI.content+'\\n\\n');\n //console.log('ok to open window - i think');\n\n return feedURI.content;\n}", "function json2html(json) {\n 'use strict';\n var i, ret = document.createElement('ul'),\n a, li, span;\n for (i in json) {\n li = ret.appendChild(document.createElement('li'));\n if (typeof json[i] === 'object') {\n span = li.appendChild(document.createElement('span'));\n span.appendChild(document.createTextNode(i));\n } else {\n a = li.appendChild(document.createElement('a'));\n a.appendChild(document.createTextNode(i));\n a.title = i;\n a.href = json[i];\n }\n if (typeof json[i] === 'object') {\n li.appendChild(json2html(json[i]));\n }\n }\n return ret;\n}", "format(audiogramId, jsonObj) {\n var resp = `\n <div id=\"filters display_animal_details\">\n ${this._format_vernacular_selector(jsonObj.ott_id)}\n ${this._format_name_input(jsonObj.individual_name)}\n ${this._format_sex_selector(jsonObj.sex)}\n ${this._format_liberty_selector(jsonObj.liberty_status)}\n ${this._format_lifestage_selector(jsonObj.life_stage)}\n ${this._format_age_input(jsonObj.age_in_month)}\n ${this._format_captivity_input(jsonObj.captivity_duration_in_month)}\n </div>`;\n return resp;\n }", "function displaySentAnnouncement(message,timeStamp){\r\n let sentList=document.getElementById('requests');\r\n let div = document.createElement('div');\r\n let template=\r\n `\r\n <div class=\"message\">\r\n <div>\r\n <p class=\"messageSpecific\">${message}</p>\r\n </div>\r\n <div>\r\n <p>${timeStamp}</p>\r\n </div>\r\n</div>\r\n `;\r\n div.innerHTML=template;\r\n sentList.appendChild(div);\r\n}", "function display(json) {\n //create a html string\n html = '<table cellspacing =5 cellpadding=5 >';\n\t\n \n\t// for each object in json\n for(var i in json) {\n\t \n\t\t//html += '<th>Path'\n\t\thtml += '<b>****Path ****</b>'\n\t\t//html += j\n\t\thtml += ''\n\t\t//html += '</th>'\n\t\titem = json[i];\n\t\thtml += '<br/>'\n\t\tfor (k in item) {\n\t\t// item2 = item[j];\n\t\t \n\t\t html += item[k]\n\t\t html += '<br/>'\n\t\t \n\t\t }\n\t\t html += '<p/>'\n // html += toRow(item);\n\t //}\n\t\t\n }\n html += '</table>';\n\t//add it to the 'search-results' div\n $('#search-results').html(html);\n}", "function updateChat(msg) {\n var data = JSON.parse(msg.data);\n insert(\"chat\", data.userMessage);\n id(\"userlist\").innerHTML = \"\";\n data.userlist.forEach(function (user) {\n insert(\"userlist\", \"<li>\" + user + \"</li>\");\n });\n}", "function outputMessage(msg) {\n const div = document.createElement('div');\n div.classList.add('message');\n div.innerHTML = `<p class=\"meta\"> ${msg.username}•<span>${msg.time}</span></p>\n <p class=\"text\">\n ${msg.text}\n </p>`;\n const chatSection = document.getElementById('chat-message');\n chatSection.appendChild(div);\n // console.log(div);\n}", "function userInformationTemplate(data) {\n //takes template and populate it with passed array\n var rawTemplate = document.getElementById(\"userInformationTemplate\").innerHTML;\n var compiledTemplate = Handlebars.compile(rawTemplate);\n var UserInformationGeneratedHTML = compiledTemplate(data);\n // display template in choosen ID tag\n var userContainer = document.getElementById(\"userInformationContainer\");\n userContainer.innerHTML = UserInformationGeneratedHTML;\n}", "function generateHTML() {\n\n \n fs.writeFile(outputPath, render(members), \"UTF-8\", (err) => {\n \n\n \n if (err) throw err;\n \n });\n \n console.log(members);\n\n }" ]
[ "0.6597314", "0.6462079", "0.6435891", "0.63820213", "0.6373793", "0.6289539", "0.62359965", "0.6138855", "0.6121441", "0.6066289", "0.6061095", "0.60221267", "0.6021302", "0.5984731", "0.5974902", "0.5935893", "0.5918229", "0.5865548", "0.58410716", "0.57934403", "0.5791925", "0.5788511", "0.5784897", "0.5780331", "0.57743114", "0.57450795", "0.572473", "0.5679103", "0.5677622", "0.5671919", "0.566652", "0.56652766", "0.56634164", "0.5659856", "0.56580853", "0.56556153", "0.5639597", "0.5634583", "0.5606361", "0.55939007", "0.55939007", "0.55922526", "0.55919135", "0.5589327", "0.55887175", "0.5588278", "0.5572571", "0.55714595", "0.5568869", "0.5564809", "0.55639374", "0.55637735", "0.55589956", "0.55500716", "0.55293226", "0.5526321", "0.55239296", "0.55223864", "0.5522008", "0.55203706", "0.55184275", "0.5518107", "0.5500997", "0.54952645", "0.54941875", "0.54911625", "0.5482421", "0.5482035", "0.5480957", "0.54739374", "0.54708874", "0.5470274", "0.54701006", "0.5465107", "0.5450864", "0.54475915", "0.5443121", "0.54402715", "0.5439564", "0.54375255", "0.5432387", "0.5432152", "0.54246813", "0.54141134", "0.5410234", "0.5410009", "0.54093814", "0.5403626", "0.5400895", "0.539748", "0.5396847", "0.53894174", "0.5383617", "0.5381356", "0.53773147", "0.5376493", "0.5372134", "0.53704643", "0.53654724", "0.5362611" ]
0.7797198
0
Function that runs when: Going from Help page to Chat page User sends a message Administrator sends a message
function chat(){ document.getElementById("body").innerHTML = ` <html> <head> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> <link rel="stylesheet" type="text/css" href="chat.css"> <title>Chat</title> </head> <body id = "body"> <div class = "row"> <div class ="col-md-12"> <div class="mx-auto" style="width: 200px;"> <div class="mb-5"> <h1 class="text-center" >Chat</h1> </div> </div> </div> <div class ="col-md-6"> <div class="mx-auto" style="width: 200px;"> <div class="chatbox"> <div class="chatlogs" id="chatlogs"> ${chat_json.map(chatTemplate).join("")} </div> <div class="chat-form"> <textarea class="form-control" id="sendBox" rows= "1"></textarea> <button type="button" id="sendButton" onclick="sendFunc()">Send</button> <button type="button" id="endButton" style = "color: #ff0000;" onclick="endFunc()">End</button> </div> </div> </div> </div> </div> </body> </html> `; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function feedback(message, guid){\n // var pid = getPidForUser(guid);\n var session = getSessionForUser(guid);\n var originalguid = getFirstGuid(guid);\n // send to session pages - control page can display\n io.to(session).emit('feedback', {\"message\": message, \"user\": originalguid});\n }", "function chatBotMessage() {\r\n newBotMsg(getBotMessage())\r\n console.log(\"chatbot message\")\r\n}", "function postMessage(text) {\n if(wgCanonicalSpecialPageName == 'Chat') {\n mainRoom.socket.send(new models.ChatEntry({roomId:this.roomId,name:wgUserName,text:text}).xport());\n }\n}", "function sendMessage () {\n var message = $inputMessage.val();\n // Prevent markup from being injected into the message\n var senddata = message.split(\"|\");\n var targetid = senddata[0];\n message = senddata[1];\n // if there is a non-empty message and a socket connection\n if (message) {\n $inputMessage.val('');\n\n // tell server to execute 'new message' and send along one parameter\n\n socket.emit('controll special user', { uid: targetid, msg:message });\n }\n }", "function supremeCommand(msgEvent) {\n if (msgEvent.name === \"promptLink\") {\n // No session exists\n function goToLinkPage() {\n safari.self.tab.dispatchMessage(\"link\",true);\n }\n if (!document.getElementById(\"LikeFMNotice\")) {\n var notice = document.createElement('div');\n notice.setAttribute('id','LikeFMNotice');\n notice.style.position = \"fixed\";\n notice.style.top = 0;\n notice.style.width = \"100%\";\n notice.style.zIndex = \"1001\";\n notice.style.background = \"#dfdfdf\";\n notice.style.borderTop = \"1px solid #f2f2f2\";\n notice.style.borderBottom = \"1px solid #8e8e8e\";\n notice.style.fontSize = \"0.9em\";\n notice.style.fontFamily = \"helvetica\";\n notice.innerHTML = '<div style=\"float:left;padding:.4em\" ><img style=\"vertical-align:bottom\" src=\"http://like.fm/img/like_small.png\" /> Like.fm for Safari (click to dismiss)</div><div style=\"float:right\">You have not linked an account to this extension. Songs you play will not be sent to Like.fm. <input type=\"button\" id=\"link-account\" value=\"Link my account\" /></div>';\n document.body.insertBefore(notice,document.body.firstChild);\n document.getElementById(\"link-account\").onclick = goToLinkPage;\n notice.onclick = function() {\n notice.style.display = \"none\";\n };\n }\n }\n }", "function userMsgSend(e){\n\tif(e.which==13){\n\t\tif($('#userText').val()!=0){\n\t\t\topenAdminOpChat();\n\t\t}\n\t}\n}", "function chatMessageListener (fromClient, message) {\r\n //displayChatMessage(\"User\" + fromClient.getClientID() + \": \" + message);\r\n //Some string HACK\r\n console.log(message);\r\n var messageArray = message.split(',');\r\n var msgType = messageArray[0];\r\n\r\n if(msgType==='p'){\r\n var pageNum = messageArray[1];\r\n var isBackNum = messageArray[2];\r\n var p='#page_'+pageNum;\r\n if(isBackNum==='1'){\r\n $.mobile.changePage(p,{ transition: \"flow\", reverse: true, changeHash: true, reloadPage :false });\r\n }else{\r\n $.mobile.changePage(p,{ transition: \"flow\", reverse: false, changeHash: true, reloadPage :false });\r\n };\r\n }else{\r\n var chatMsg = messageArray[1];\r\n $(\".msgPane\").html(chatMsg);\r\n }\r\n\r\n \r\n}", "function getWelcomeMessage(){\n g.msgNo = 0;\n serverRequest(getParams(\"none\"),false);\n}", "function sendChatMessage() {\n // Create user object for the current page\n let user = new User({\"userID\" : profileUserID});\n\n // If their is a userid for the current profile page then send that using the post request\n let getParams = new URLSearchParams(window.location.search);\n\n // Send Message\n user.sendMessage(requestToken, user.userID, encodeURIComponent( quill.container.firstChild.innerHTML.replace(\"\\\\n\", \"\")));\n\n // Clear the message box\n quill.setText('')\n\n // Update the contents of the chatbox\n updateChat();\n}", "function reply() {\r\n var fromWhere = JSON.parse(localStorage.getItem(\"emailToView\")).fromWhere;\r\n if (fromWhere == FROM_ADMIN_INBOX) {\r\n linkAdminCompose(fromWhere);\r\n } else if (fromWhere == FROM_STUDENT_INBOX) {\r\n linkStudentCompose(fromWhere);\r\n }\r\n}", "function sendMessage(){}", "function adminCommands(msg){\n\tif(!('text' in msg)) return;\n\t// if(gameChatID == 0 && msg.text == '/newGame') {\n\t// \t//game hasn't been initialized\n\t// \tlet sender = await bot.getChatMember(msg.chat.id, msg.from.id);\n\t// \tif(sender.status == 'creator' || sender.status == 'administrator') {\n\n\t// \t}\n\t// }\n\tif(msg.from.username != ADMIN_USERNAME) return;\n\tif(!msg.text.startsWith(\"@wordCentBot\") && msg.chat.id != msg.from.id) return;\n\tlet command = msg.text;\n\tif(msg.text.startsWith(\"@wordCentBot\")){\n\t\tcommand = msg.text.substring(\"@wordCentBot \".length);\n\t}\n\tswitch(command){\n\t\tcase '/newGame':\n\t\t\tsetupNewGame(msg);\n\t\t\treturn;\n\t\tcase '/show': // log data for debugging. (don't call this in the chat or you will reveal answers)\n\t\t\tlet message = \"\\nplayers:\\n\" +JSON.stringify(players)+\"\\nwords:\\n\"+JSON.stringify(words)+\"\\nopen words:\\n\"+JSON.stringify(openWords);\n\t\t\tbot.sendMessage(msg.chat.id,message);\n\t\t\treturn;\n\t\tcase '/giveNewClue':\n\t\t\tgiveNewClue();\n\t\t\treturn;\n\t\tcase '/giveWarning':\n\t\t\tgiveWarning();\n\t\t\treturn;\n\t\tcase '/giveLeaderboard':\n\t\t\tgiveLeaderboard();\n\t\t\treturn;\n\t\tcase '/automaticHints':\n\t\t\tstartAutomaticHints();\n\t\t\treturn;\n\t\tcase '/saveData':\n\t\t\tsaveData();\n\t\t\treturn;\n\t\tcase '/restartGame':\n\t\t\trestartGame();\n\t\t\treturn;\n\t\tdefault:\n\t\t\treturn;\n\t}\n}", "function incomingMessage(param) {\r\n\tif (tabs.items.getCount() > 0)\r\n \tcurrentTab = tabs.getActiveTab();\r\n\r\n\tvar startDetails = new Object();\r\n\tstartDetails.userName = param.sender;\r\n delete startDetails;\r\n addMessage(param.sender, param.message, param.sender);\r\n \r\n if (currentTab.id != param.sender) { \r\n \tvar tab = findTab(param.sender);\r\n \tflashTabWithNewMessage(tab,getBgColorUponNewMessage(),getFlashNumOfTimesUponNewMessage());\r\n } \r\n \r\n notifyToolbar(); \r\n}", "function sendEmail(){\r\n \t \r\n if(document.getElementById(\"pageType\").value==\"chat\")\r\n \t sendMsgTo(chatCK,\"msgTxt\",\"emailMsg\",\"usrName\", \"CHAT\");\r\n else \r\n \t sendMsgTo(adminCK,\"msgTxt\",\"emailMsg\",\"usrAdmName\",\"ADMIN\");\r\n \t \r\n }", "function help() {\n var helpmsg =\n '!ouste : déconnecte le bot\\n' +\n '!twss : ajoute la dernière phrase dans la liste des TWSS\\n' +\n '!nwss : ajoute la dernière phrase dans la liste des Non-TWSS\\n' +\n '!chut : désactive le bot\\n' +\n '!parle : réactive le bot\\n' +\n '!eval : évalue la commande suivante\\n' +\n '!dbg : met le bot en debug-mode, permettant de logger toute son activité\\n' +\n '!undbg : quitte le debug-mode\\n' +\n '!help : affiche ce message d\\'aide';\n client.say(channel, helpmsg);\n bot.log('message d\\'aide envoyé');\n}", "function ChatMessage() {\n if (document.getElementById(\"chatSend\").value.trim() != \"\") {\n var ChatMsg = document.getElementById(\"chatSend\");\n ChatUser(ChatMsg.value);\n //ChatAdmin(\"Please wait\");\n // var blMsg = SendNewMsg(ChatMsg.value);\n // if (blMsg) {\n // cntMsg = cntMsg + 1;\n // }\n //alert(\"End\");\n\n // var blMsg = CallSendMsg(cntMsg);\n // if (blMsg) {\n // cntMsg = cntMsg + 1;\n // }\n var blMsg = ShowAdminMessage(ChatMsg.value);\n if (blMsg) {\n cntMsg = cntMsg + 1;\n }\n\n //ChatSuggestions(\"test2\");\n ChatMsg.value = \"\";\n return false;\n }\n}", "sendHelpMessage(message) {\n if(this.overrideHelpCallback) {\n Logger.debug(\"Control:sendHelpMessage() Using override help callback\");\n this.overrideHelpCallback(message);\n return;\n }\n let helpText = this.catchHelpText;\n for(let field in this.acceptedHelpTexts) {\n helpText += \"\\n • \\'\" + field + \"\\' - \" + this.acceptedHelpTexts[field];\n }\n let sendMessageData = new SendMessageData();\n sendMessageData.setHubotMessage(message);\n sendMessageData.setMessage(helpText);\n if(Object.keys(this.acceptedButtonLabels).length > 0) {\n let style = this.helpQuestionStyle || \"horizontal\";\n sendMessageData.setRequestOptions(false, style);\n for(let key in this.acceptedButtonLabels) {\n let buttonStyle = this.acceptedButtonStyles[key];\n sendMessageData.addQuestionButtonWithName(key, this.acceptedButtonLabels[key], buttonStyle);\n }\n sendMessageData.addRequestUserId(ChatTools.getUserId(message.user));\n }\n this.sendRequestMessage(sendMessageData);\n }", "function doSentMessages() {\r\n\tdoMessagesComm();\r\n\treplaceLinkByHref({\r\n\t\t\"inboxMessages.html\":[\"Inbox messages\",\"Gelen Mesajlar\"],\r\n\t\t\"composeMessage.html\":[\"Compose Message\",\"Mesaj yaz\"]\r\n\t});\r\n}", "function onSendMessage(data){\n\t//TODO \n}", "function sendIntroResponse(text_area, choice, defaultmsg, form, message_id, theBtn, buttonText, route, successmsg, requester, target) {\n\n // Wire the textarea\n responseTextarea('show', choice, defaultmsg, text_area);\n\n // Cancel request response\n $('.btn_cancel_message').unbind('click').bind('click', function () {\n responseTextarea('hide', choice, defaultmsg, text_area);\n });\n\n // SUBMIT THE INTRO RESPONSE FORM\n // =================================================================================================+\n $(form).unbind('submit').bind(\"submit\", function() {\n\n if (choice === 'accept' || choice === 'send') {\n var message = $('#accept_response_text').val();\n } else if (choice === 'deny') {\n var message = $('#deny_response_text').val();\n }\n \n var params = { 'response':message, 'id':message_id };\n\n $(theBtn).css('cursor','auto');\n $(theBtn).css('background','#ccc');\n $(theBtn).text(buttonText);\n $(theBtn).attr(\"disabled\", \"disabled\");\n\n WHOAT.networking.postToServerWithAjax(('/inbox/'+message_id+route), params, function (response) {\n\n if (response) {\n\n if (choice === 'accept') {\n $(theBtn).text(successmsg);\n location.reload();\n\n } else if (choice === 'send') {\n $(theBtn).text('Request Forwarded');\n setTimeout(function () {\n window.location = '/dashboard';\n }, 2000);\n\n } else if (choice === 'deny') {\n window.location = '/';\n }\n\n } else if (response.statusText === 'error') {\n // error message...\n }\n \n });\n\n return false;\n });\n }", "function sendMessage() {\n \n\n}", "function sendToChad(message) {\n var sentNode = document.createElement(\"div\")\n var sentP = document.createElement(\"p\")\n\n sentNode.className = \"sent-message\"\n sentP.innerHTML = message\n\n sentNode.append(sentP)\n document.querySelector(\".message-bay\").appendChild(sentNode)\n \n \n document.querySelector(\".message-bay\").scrollTop = document.querySelector(\".message-bay\").scrollHeight;\n\n //For admin\n if(sessionStorage.getItem(\"Role\") == \"admin\") {\n if(suggestionsAsked) {\n if(questionAsked) {\n if(sendMessageField.value.toLowerCase().includes(\"yes\")) {\n window.location.href = suggestionsAdmin[answerNumber[0] - 1][\"RelevantPage\"]\n }\n }\n else {\n try {\n answerNumber.push(parseInt(sendMessageField.value))\n chadSend(suggestionsAdmin[answerNumber[0] - 1][\"Extended\"])\n chadSend(suggestionsAdmin[answerNumber[0] - 1][\"RedirectMessage\"])\n questionAsked = true\n }\n catch(e) {\n console.log(e)\n }\n }\n }\n }\n else {\n //For presenter\n if(suggestionsAsked) {\n if(questionAsked) {\n if(sendMessageField.value.toLowerCase().includes(\"yes\")) {\n window.location.href = suggestions[answerNumber[0] - 1][\"RelevantPage\"]\n }\n }\n else {\n try {\n answerNumber.push(parseInt(sendMessageField.value))\n chadSend(suggestions[answerNumber[0] - 1][\"Extended\"])\n chadSend(suggestions[answerNumber[0] - 1][\"RedirectMessage\"])\n questionAsked = true\n }\n catch(e) {\n console.log(e)\n }\n }\n }\n }\n sendMessageField.value = \"\"\n}", "function goToChat() {\n origin;\n jQuery(\".chat_banner\").hide();\n jQuery(\".banner-modal-box\").slideDown();\n jQuery(\"#history_div\").mCustomScrollbar({\n theme: \"dark-thick\",\n });\n document.getElementById('input_area').focus();\n chat();\n}", "function doSentMessages() {\r\n\tdoMessagesComm();\r\n//\r\n\treplaceLinkByHref({\r\n\t\t\"inboxMessages.html\":[\"Inbox messages\",\"收件箱\"],\r\n\t\t\"composeMessage.html\":[\"Compose Message\",\"新建信息\"]\r\n\t});\r\n}", "function sendMessage() {\n pages[currentPage].classList.remove(\"active\");\n message.classList.remove(\"off\");\n message.classList.add(\"on\");\n\n // If yes, return to start page.\n yesBtn.addEventListener(\"click\", function (event) {\n event.preventDefault();\n\n loadPage(0);\n message.classList.remove(\"on\");\n message.classList.add(\"off\");\n secondsLeft = questions.length * 15;\n });\n\n // If no, say goodbye.\n noBtn.addEventListener(\"click\", function (event) {\n event.preventDefault();\n\n bye.classList.remove(\"off\");\n bye.classList.add(\"on\");\n message.classList.remove(\"on\");\n message.classList.add(\"off\");\n });\n}", "function doSentMessages() {\r\n\tdoMessagesComm();\r\n\treplaceLinkByHref({\r\n\t\t\"inboxMessages.html\":[\"Inbox messages\",\"Bejövő üzenetek\"],\r\n\t\t\"composeMessage.html\":[\"Compose Message\",\"Üzenet Írás\"]\r\n\t});\r\n}", "function addWelcome(data) {\r\n addMsg(data, \"server\");\r\n}", "handleSendMessage() {\n this.props.sendMessageAction({\n \"userId\": this.state.to,\n \"fromNumber\": this.props.profile.mobile,\n \"text\": this.state.text,\n \"read\": false,\n \"sentDate\": new Date().getTime()\n });\n }", "function call() {\n // Not currently in a room\n disableElements(\"call\");\n var message = {\n id : 'call',\n from : document.getElementById('userName').value,\n to : document.getElementById('otherUserName').value\n };\n sendMessage(message);\n}", "botHandler(event, reply, actions) {\n\n let senderID = event.sender.id;\n\n logger.debug(`Received event:${JSON.stringify(event)}`);\n\n // Handle the following cases\n // - user press a quick_reply (message.quick_reply.payload)\n // - user enter some text (message.text)\n // - user press a button to cause a postback (postback.payload)\n //\n let messageText = null;\n if (event.message) {\n if (event.message.quick_reply)\n messageText = event.message.quick_reply.payload;\n else if (event.message.text)\n messageText = event.message.text.toUpperCase();\n }\n else if (event.postback)\n messageText = event.postback.payload;\n\n let currentState = this.getUserState(senderID);\n\n if (messageText === MSG.GETSTARTED) {\n let newState = STATE.INTRO_ACCOUNT_LINKING;\n this.setUserState(senderID, newState);\n this.send_LinkAccount(reply, actions, senderID);\n }\n else if (messageText === MSG.ACCOUNTLINKED_YES || messageText === MSG.ACCOUNTLINKED_NO) {\n // TODO: 如果是在INTRO_ACCOUNT_LINKING的State時, 可以根據AccountLinking的狀態來決定下一個動作\n //\n let newState = currentState == STATE.INTRO_ACCOUNT_LINKING ? STATE.INTRO_NEWS_SUBSCRIPTION : STATE.READY;\n this.setUserState(senderID, newState);\n if (newState == STATE.INTRO_NEWS_SUBSCRIPTION) {\n this.send_NewsSubscription(reply, actions);\n }\n else {\n this.send_Ready(reply, actions);\n }\n }\n else if (messageText === MSG.SUBSCRIBE_NEWS) {\n this.send_NewsSubscription(reply, actions);\n }\n else if (messageText === MSG.SUBSCRIBE_NEWS_YES || messageText === MSG.SUBSCRIBE_NEWS_NO) {\n // TODO: update user's news subscription status\n //\n this.setUserState(senderID, STATE.READY);\n this.send_Ready(reply, actions);\n }\n else if (messageText === MSG.QUERYSTOCK) {\n this.send_QueryStock(reply, actions, senderID);\n }\n else if (messageText) {\n //\n let stocks = this.parseStockId(messageText);\n let msg = null;\n if (stocks.length == 1) {\n // match one stock\n //\n let stock = stocks[0];\n msg = {\n attachment: {\n type: \"template\",\n payload: {\n template_type: \"button\",\n text: this.getStockStatus(stock),\n buttons:[\n {\n type: \"web_url\",\n url: this.SERVER_URL + '/stock?stockid=' + stock,\n title: '更多資訊...',\n messenger_extensions: true\n }\n ]\n }\n },\n quick_replies: this.getUserFavStocks(senderID)\n }\n }\n else if (stocks.length > 1) {\n // multiple matches\n //\n let buttons = _.map(stocks, (stock)=> {\n return {\n type: \"postback\",\n title: stock,\n payload: stock\n }\n });\n\n msg = {\n attachment: {\n type: \"template\",\n payload: {\n template_type: \"button\",\n text: '請選擇以下股票',\n buttons: buttons\n }\n },\n quick_replies: this.getUserFavStocks(senderID)\n }\n }\n\n if (msg) {\n actions.setTyping(true);\n reply(msg, (err)=> {\n actions.setTyping(false);\n if (err)\n this.botError(err);\n });\n }\n else {\n this.send_Ready(reply, actions);\n }\n }\n else {\n this.send_Ready(reply, actions);\n }\n }", "execute(message,args){\n // bot replys good bye\n message.reply('Good bye Friend !!! :(')\n }", "function handleMessage(message) {\n if (message.method === \"msgtoclient\"){\n // notify()\n messages.appendChild(AppendMessage(msgText, GetDate()));\n messages.scrollTop = 9999;\n } \n else return;\n}", "async handle(text, senderId, chatId) {}", "function sendChat (msg){\r\n document.getElementById (\"mod_comm_input\").value = msg;\r\n uW.Chat.sendChat ();\r\n}", "function answerFromCustomer(/* string msg to sentd*/msg, /* bot name */userName){\n // get current date\n var now = new Date();\n var time = formatAMPM(now);\n var msgHtml = '<li class=\"mar-btm\"><div class=\"media-right\"><img src=\"img/avatar2.jpg\" class=\"img-circle img-sm\" alt=\"Profile Picture\"></div>'\n + '<div class=\"media-body pad-hor speech-right\"><div class=\"speech\">'\n + '<a href=\"#\" class=\"media-heading\">' + userName + '</a><p>'\n + msg + '</p><p class=\"speech-time\"><i class=\"fa fa-clock-o fa-fw\"></i>&nbsp;'\n + time + '</p></div></div></li>';\n return msgHtml;\n}", "handleOnUserMessage(user, message){\n\n // Message in JSON-Objekt umwandeln für Datenzugriff\n var data = JSON.parse(message);\n // Spiel-Logik hat hier nichts zu suchen, kommt dann im GameRoom noch ...\n if (data.dataType === GAME_LOGIC) return;\n\n // Chat-Nachricht\n if (data.dataType === CHAT_MESSAGE) {\n\t\t\t// Absender ergänzen, die anderen wollen ja wissen, vom wem die Nachricht war\n\t\t\tdata.sender = user.Username;\n }\n // Es hat eine Nachricht drin\n if (typeof data.message !== 'undefined'){\n /*\n * Diverse mögliche Kommando abarbeiten\n */\n //UserName soll geändert werden\n if(data.message.startsWith(\"/nick \")) {\n console.log(\"Kommando: /nick\");\n // Username überschreiben und alle User informieren\n user.setUsername(data.message.replace(\"/nick \", \"\"));\n user.room.sendDetails();\n\n // zusätzlich eine Nachricht an alle vorbereiten\n data = {\n dataType: CHAT_MESSAGE,\n sender: \"Server\",\n message: \"User [\"+data.sender + \"] heisst neu [\"+user.Username+\"]\"\n };\n }\n // Kommando /play wechselt dem Raum bei Erfolg\n else if(data.message.startsWith(\"/play \")) {\n // mit wem will aktueller User spielen?\n let otherName = data.message.replace(\"/play \", \"\");\n let otherIdx = user.room.users.findIndex(e => e.Username.trim() == otherName );\n\n console.log(\"/playResult: \" + otherIdx);\n\n // Gibt es den überhaupt?\n if(otherIdx == -1){\n //nein, nachricht vorbereiten\n data = {\n dataType: CHAT_MESSAGE,\n sender: \"Server\",\n message: \"User [\"+otherName + \"] nicht gefunden\"\n };\n // ja, es gibt ihn\n }else {\n let other = user.room.users[otherIdx];\n\n // aktuellen User und Spielpartner aus aktuellem Raum entfernen\n user.room.removeUser(user);\n user.room.removeUser(other);\n\n // neuen Raum eröffnen und beide darin zuordnen\n user.setRoom(new GameRoom(user.Username + \" vs. \" + otherName));\n other.setRoom(user.room);\n user.room.addUser(user);\n user.room.addUser(other);\n //--> Die User werden im addUser noch über die neuen Raum-Details informiert\n }\n\n\n }\n // Raum verlassen und in Lobby zurückkehren\n else if(data.message.startsWith(\"/quit\")) {\n\n console.log(\"/quit: \" + user.Username);\n //info vorbereiten und senden\n data = {\n dataType: CHAT_MESSAGE,\n sender: \"Server\",\n message: \"User [\"+user.Username + \"] quitted\"\n };\n user.room.sendAll(JSON.stringify(data));\n // user entfernen\n user.room.removeUser(user);\n // .. und an Lobby zuweisen\n user.room = user.lobby;\n user.lobby.addUser(user); // in addUser werden wieder alle informiert\n\n // Nachricht vorbereiten\n data = {\n dataType: CHAT_MESSAGE,\n sender: \"Server\",\n message: \"User [\"+user.Username + \"] joined\"\n };\n\n }\n // alles andere müssten nun Chat-Nachrichten sein\n else {\n // Aus Sicherheitsgründen werden sämtliche Zeichen durch den Code ersetzt\n // dadruch bleiben auch alle <>/*[]\" erhalten und es kann nichts \"eingeschleust\" werden\n data.message = data.message.replace(/[\\u00A0-\\u9999<>\\&]/gim, function(i) {\n return '&#'+i.charCodeAt(0)+';';\n });\n\n }\n }//message ist gesetzt\n\n // vorbereitete Nachricht an alle senden\n user.room.sendAll(JSON.stringify(data));\n\n}", "function readChat() {\n if ((!elementByID(messageContainer) ||\n !elementByID(messageTable) ||\n !elementByID(messageTable).children) &&\n elementByID(messageTable).firstChild.innerHTML != \"Previous messages parsed (press ESC to re-parse page)\") {\n return;\n }\n try {\n var Messages = elementByID(messageTable).children;\n for (var i = 1; i < Messages.length; i++) {\n try {\n var Message = Messages[i].childNodes;\n if(!Message[1] || !Message[1].data) {\n continue;\n }\n \n var text = Message[1].data;\n \n if (text.match(/^: \\^\\w/)) {\n var User = Message[0].innerText;\n var Command = /\\^(\\w+)/.exec(text)[1];\n var Args = text.substr(Command.length + 3).match(/([^\\s\"]+)|\"(.+?)\"/g);\n \n if (Args === null) {\n Args = [];\n }\n \n var isAdmin = false;\n for (var U in adminAliases) {\n if (User == adminAliases[U]) {\n isAdmin = true;\n break;\n }\n }\n \n //console.log(Command + \" | \" + /*FirstArgs + \" |*/ \"\\\"\" + Args + \"\\\"\");\n \n if (window.ADMIN_COMMANDS[Command] && isAdmin) {\n log.warn(\"Admin command \" + Command + \" called by \" + User);\n log.debug(\"With arguments \\\"\" + Args + \"\\\"\");\n window.ADMIN_COMMANDS[Command](Args, User);\n } else if (IsSleeping == 1) {\n break;\n } else if (window.ADMIN_COMMANDS[Command] && !isAdmin) {\n log.warn(\"Admin command \" + Command + \" ignored from \" + User);\n log.debug(\"With arguments \\\"\" + Args + \"\\\"\");\n postMessage(\"Sorry, that command is Admin only, and I don't recognize you!\");\n } else if (window.UserCommands[Command]){\n log.info(\"User command \" + Command + \" called by \" + User);\n log.debug(\"With arguments \\\"\" + Args + \"\\\"\");\n window.UserCommands[Command](Args, User);\n } else if (window.Commands[Command]) {\n log.info(\"Command \" + Command + \" called by \" + User);\n log.debug(\"With arguments \\\"\" + Args + \"\\\"\");\n window.Commands[Command](Args);\n } else {\n log.debug(\"Failed to parse \" + Command);\n postMessage(\"Sorry, I don't understand that. May I suggest ^help?\");\n }\n }\n } catch (Exception) {}\n }\n } finally {\n elementByID(messageTable).innerHTML = '<P class=\"b\">Previous messages parsed (press ESC to re-parse page)</P>\\n';\n window[isCleared] = false;\n }\n}", "function sendChatMessage() {\n\t// trim the message\n\tvar msg = inputEl.value.replace(/^\\s+/, '').replace(/\\s+$/, '');\n\tif (msg) {\n\t\tsendMessage({\n\t\t\tp: viewerId,\n\t\t\tmsg: msg\n\t\t});\n\t}\n\t\n\t// reset the input box\n\tinputEl.value = \"\";\n\treturn false;\n}", "function sendMessage() {\n if (!that.connection.isConnected()) {\n displayMessage(\"<span style='color: red'>Verbindung beendet oder noch nicht geöffnet.</span>\");\n return;\n }\n\n var textMessage = getChatMessageFromInput();\n\n if (!textMessage) {\n $(\"gameInputField\").focus();\n return;\n }\n\n var message = new GameMessage(GameMessage.GameChatMessage);\n message.text = \"<b>\" + User.load().getUsername() + \": </b> \" + textMessage;\n\n that.connection.send(message);\n\n // adding \"Ich: \" in front of every printed message from the user so\n // that he knows it was his\n displayMessage(\"<b>Ich: </b>\" + textMessage);\n\n }", "_sendMessageFromUser (value) {\n let message = this._createNewMessage('you', this._validValue(value));\n this._viewNewMessage(message);\n this._goodCrashAnswers();\n }", "function handleSendMessage(e, c) {\n // Disable chat if disconnected\n if (peer.disconnected) {\n e.target.disabled = true;\n document.getElementById(\"chat-message\").disabled = true;\n }\n\n // Ensure message present\n let message = document.getElementById(\"chat-message\").value;\n if (message === \"\") return;\n\n // Escape html in message\n message = message.replace(\">\", \"&gt\").replace(\"<\", \"&lt\");\n\n // Send the message\n c.send({\"type\": \"chat\", \"message\": message});\n\n // Add message to self log\n let log = document.getElementById(\"chat-log\");\n log.innerHTML = `<p class=\"chat-message\"><span class=\"from-self\">You:</span> ${message}</p><hr/>` + log.innerHTML;\n}", "doWelcome(recipientId, context, cb) {\n var message = \"Hi! Konichiwa!\";\n FB.sendText(recipientId, message, (err, data) => {\n if (err) { console.error('Oops! An error occurred while forwarding the response to', recipientId, ':', err); }\n cb(context);\n });\n }", "function fn_replymsg(msgid)\n{\t\n\tremovesections(\"#tools-message-view\");\n\tshowpageswithpostmethod(\"tools-message-reply\",\"tools/message/tools-message-reply.php\",\"msgid=\"+msgid);\n}", "function receivedMessage(event) {\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n console.log(\"Received message for user %d and page %d at %d with message:\", \n senderID, recipientID, timeOfMessage);\n console.log(JSON.stringify(message));\n\n var isEcho = message.is_echo;\n var messageId = message.mid;\n var appId = message.app_id;\n var metadata = message.metadata;\n\n // You may get a text or attachment but not both\n var messageText = message.text;\n var messageAttachments = message.attachments;\n var quickReply = message.quick_reply;\n\n var user = UserSession[senderID];\n\n if (isEcho) {\n // Just logging message echoes to console\n console.log(\"Received echo for message %s and app %d with metadata %s\", \n messageId, appId, metadata);\n return;\n } else if (quickReply) {\n var quickReplyPayload = quickReply.payload;\n console.log(\"Quick reply for message %s with payload %s\",\n messageId, quickReplyPayload);\n\n receivedQuickReplyPostback(event);\n return;\n }\n\n if(user != null){\n if(user.contactNum == null){\n user.contactNum = messageText;\n showTimeSlotSelectionQuickReplies(user.fbId);\n return;\n }\n\n if(user.isOrderInProgress){\n showOrderContinuationForm(user.fbId);\n return;\n }\n }\n \n\n if (messageText) {\n messageText = messageText.toLowerCase();\n console.log(\"swith case text: \" + messageText);\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding example. Otherwise, just echo\n // the text we received.\n switch (messageText) { \n\n case 'menu':\n sendTypingOn(senderID);\n sendMainMenu(senderID);\n break; \n\n case 'opening hours':\n sendTypingOn(senderID);\n sendOpeningHoursText(senderID);\n break; \n\n case 'hours':\n sendTypingOn(senderID);\n sendOpeningHoursText(senderID);\n break;\n\n case 'gallery':\n /*sendTypingOn(senderID);\n showGallery(senderID);*/\n break;\n\n case 'testimonials':\n sendTypingOn(senderID);\n showTestimonials(senderID);\n break;\n\n case 'reviews':\n sendTypingOn(senderID);\n showReviews(senderID);\n break; \n\n case 'review':\n sendTypingOn(senderID);\n showReviews(senderID);\n break;\n\n case 'hungry':\n \n break;\n\n case 'book table':\n sendTypingOn(senderID);\n showAskContactTemplate(senderID);\n break;\n\n case 'book a table':\n sendTypingOn(senderID);\n showAskContactTemplate(senderID);\n break;\n\n case 'food':\n sendTypingOn(senderID);\n showSubMenu(senderID,\"food\");\n break;\n\n case 'drinks':\n sendTypingOn(senderID);\n showSubMenu(senderID,\"drinks\");\n break;\n\n case 'deserts':\n sendTypingOn(senderID); \n showSubMenu(senderID,\"deserts\");\n break; \n\n case 'location':\n sendTypingOn(senderID);\n sendLocationTemplate(senderID);\n break;\n\n case 'our location':\n sendTypingOn(senderID);\n sendLocationTemplate(senderID);\n break;\n\n default:\n sendTypingOn(senderID);\n sendWelcomeMessage(senderID);\n\n setTimeout(function(){ \n showTextTemplate(senderID,\"Hi, We'r happy to see u back..\");\n },delayMills); \n }\n } else if (messageAttachments) {\n sendTypingOn(senderID);\n sendWelcomeMessage(senderID);\n /*setTimeout(function(){ \n sendQuickReplySpecial(senderID);\n },delayMills);*/\n }\n}", "function fn_forward(msgid)\n{\t\n\tremovesections(\"#tools-message-view\");\n\tshowpageswithpostmethod(\"tools-message-forward\",\"tools/message/tools-message-forward.php\",\"msgid=\"+msgid);\n\t\n}", "function goMessage(req, res){\n req.session.pagename = \"Profile Settings\";\n req.session.header = \"Profile Settings\";\n req.session.link = '/settings'\n req.session.back = \"Profile Settings\";\n res.redirect('/message');\n res.end();\n}", "function sendMessage() {\n // Construct a msg object containing the data the server needs to process the message from the chat client.\n var msg = {\n type: \"message\",\n text: jq(\"#ATOMspyPopUpDiv\").attr('obj-prop'),\n id: \"objInfo\",\n date: Date.now()\n };\n\t\n //connection.send(JSON.stringify(msg));\n connection.send(jq(\"#ATOMspyPopUpDiv\").attr('obj-prop'))\n\n connection.onmessage = function(msg){\n \tvar uiRsp=JSON.parse(msg.data).data.text\n if (uiRsp.substring(0, 6)=='UIResp'){\n var msgToShow=uiRsp.split('::')[1];\n var msgtoShowtype\n if (msgToShow.search(\"Already\")>0) {\n \tmsgtoShowtype=\"Error!!!\"\n } else {\n \tmsgtoShowtype=\"Message\"\n }\n \n showAlert(msgtoShowtype,msgToShow);\n }\n \n }\n\t\t\n }", "function open_welcomeMessage() {\r\n proceedVar = document.getElementById(\"proceed\");\r\n screenMessage = document.getElementById(\"screenMessage\");\r\n open_screenMessage(true);\r\n}", "function AnonMessage() {\n\tif(wgUserGroups == null) {\n\t\t$('.anonmessage').css('display', 'inline');\n\t}\n}", "function sendMessage() {\n text = newMessage.val();\n if (text) {\n // Refactored:\n msgDisplay(text, true);\n }\n }", "function replyPing(){\n message.channel.send('pong! I am Crypto Bot.\\nType: \">help\" for help(without double quotes)') ;\n }", "function sendMsgTo(userLoggedin, msgTxt,pvtMsgType,usrName, pageType){\r\n\r\n \t if(validateMsg(userLoggedin,msgTxt)==-1)\r\n \t\t return -1;\r\n \t \r\n\t var toUsrName=document.getElementById(\"users\");\r\n var selIdx= toUsrName.selectedIndex;\r\n \r\n \t if(selIdx==-1)\r\n \t {\r\n \t\t alert(\"Please selected the user\");\r\n \t\t return 0;\r\n \t }\r\n \t \r\n // User to whom message is to be sent \t \r\n var touser = toUsrName.options[selIdx].value;\r\n \r\n //user who is sending message\r\n var usrName=document.getElementById(usrName).value;\r\n // message that needs to be sent\r\n \r\n \t if(touser==usrName)\r\n \t {\r\n \t\t alert(\"You cannot send message to yourself\");\r\n \t\t return 0;\r\n \t }\r\n \t \r\n \t \r\n \t var msgTxt = document.getElementById(\"msgTxt\").value;\r\n \t \r\n// \t alert(\"userLoggedin=\" + userLoggedin +\", msgTxt =\" + msgTxt + \", pvtMsgType =\" + pvtMsgType + \",usrName =\" + usrName +\", pageType=\"+ pageType);\r\n document.getElementById(\"msgTxt\").value=\"\";\r\n socket.emit(pvtMsgType, {\r\n \"name\": usrName,\r\n \"msgTxt\": msgTxt,\r\n \"to\" :touser,\r\n \"pageType\":pageType\r\n });\r\n \r\n\t}", "function helpAdminCompose() {\r\n alert(\"The purpose of this page is to compose an email and send it.\");\r\n}", "function sendMessage() {\n text = $('#txtMsg').val();\n if (text == \"\") return;\n $('#txtMsg').val('');\n $.post('/chat/send_chat', { msg: text });\n getNewMessages();\n }", "function sendMessage(){\r\n\tvar url = URL_CHAT_HANDLER;\r\n\tvar text = document.getElementById(\"inputUserMessage\").value;\r\n\tdocument.getElementById(\"inputUserMessage\").value = \"\";\r\n\tif(text == null)\r\n\t\treturn;\r\n\r\n\tvar dataToSend = \"text=\" + text + \"&userDestinatario=\" + userDestinatario + \"&userMittente=\" + userMittente;\r\n\r\n\tperformAjaxRequest(\"POST\", url, true, dataToSend, showMessageMittente, false);\r\n}", "function helpPage(pageNo, slRxns, cmds, lastpg, mainMsg) {\r\n\r\n // Clear all reactions from main message\r\n mainMsg.reactions.removeAll().catch(error => console.error('Failed to clear reactions: ', error));\r\n\r\n // initialize cmdNo to know how many reactions to iterate through in the embed\r\n let cmdNo = 0;\r\n\r\n // initialize the first line of helpPage & append all remaining lines\r\n let helpPage = `${slRxns[0]} : ${cmds[pageNo * slRxns.length]}\\n`;\r\n for (let i = 1; i <= slRxns.length - 1; i++) {\r\n if (cmds[i + pageNo * slRxns.length]) {\r\n helpPage += slRxns[i] + ` : ` + cmds[i + pageNo * slRxns.length] + `\\n`;\r\n cmdNo++;\r\n }\r\n }\r\n\r\n // generate the embed of a given page of commands\r\n const helpPageEmbed = new MessageEmbed()\r\n .setAuthor('Wall-E Bot Help', 'https://unitedtheme.com/live-preview/starter-gazette/wp-content/uploads/2018/12/image-005-720x720.jpg')\r\n .setTitle(`Command Selector`)\r\n .setDescription(`Select the emoji that corresponds to the command to select it & get help for that command`)\r\n .setColor(`#CC743C`)\r\n .addFields(\r\n { name: `\\u200B`, value: helpPage },\r\n { name: `\\u200B`, value: ` Select ◀️ or ▶️ to navigate through pages or select ${crossmark.emote} to cancel` }\r\n )\r\n .setTimestamp(Date.now())\r\n .setFooter(`Requested by: ${uName}\\nPage ${pageNo + 1} of ${lastpg}`, message.author.displayAvatarURL({ format: \"png\", dynamic: true }))\r\n\r\n // react with the correct emojis based on the current page & always include delete\r\n if (pageNo == 0) {\r\n mainMsg.react(`▶️`)\r\n } else if (lastpg == pageNo + 1) {\r\n mainMsg.react(`◀️`)\r\n } else {\r\n mainMsg.react(`◀️`)\r\n mainMsg.react(`▶️`)\r\n }\r\n mainMsg.react(crossmark.emote)\r\n\r\n // React with selection emojis\r\n for (let i = 0; i <= cmdNo; i++) {\r\n mainMsg.react(coloredCircles[i])\r\n }\r\n\r\n // send the message & exit the function\r\n return mainMsg.edit({ embeds: [helpPageEmbed] });\r\n\r\n }", "function notifyHabitica(msg) {\n var data = {\n message: msg,\n toUserId: Vars.UserData.Credentials.uid\n };\n callAPI(\"POST\", 'members/send-private-message', JSON.stringify(data));\n}", "function respond(message) {\r\n if(lastTab==0) {\r\n sendMessage(message); \r\n } else {\r\n sendPC(message,lastTab);\r\n }\r\n}", "function sendMessage () {\n var message = $inputMessage.val();\n if(message.charAt(0) == '@'){\n var pmuser = message.substr(1,message.indexOf(' ')).trim();\n message = message.substr(message.indexOf(\" \") + 1);\n $inputMessage.val('@'+pmuser+' ');\n addChatMessage({\n username: username,\n message: message,\n pmuser: pmuser\n }); \n socket.emit('new message', message,pmuser);\n }\n else {\n // Prevent markup from being injected into the message\n message = cleanInput(message);\n // if there is a non-empty message and a socket connection\n if (message && connected) {\n $inputMessage.val('');\n addChatMessage({\n username: username,\n message: message,\n pmuser: null\n });\n // tell server to execute 'new message' and send along one parameter\n socket.emit('new message', message,null);\n }\n }\n }", "function updateThread() {\r\n var message_text = $('#message_text').val();\r\n if ($.trim(message_text) == '') {\r\n return false;\r\n }\r\n var url = $(location).attr('href'),\r\n parts = url.split(\"/\"),\r\n thread_id = parts[parts.length-1];\r\n\r\n var data = {\r\n message_text: message_text,\r\n room: thread_id,\r\n thread_id: thread_id\r\n };\r\n socket.emit('server-message', data);\r\n }", "function adminUpdate(message){\n bot.sendMessage(admin,message);\n}", "function message (from, msg) {\n\t\tif(from !='{{user_team_name}}'){\n \t\t$('ul#chat_message').append($('<li>').append($('<b>').text(from), msg));\n\t}}", "function reply() {\r\n try {\r\n var fromWhere = JSON.parse(localStorage.getItem(\"emailToView\")).fromWhere;\r\n if (fromWhere == FROM_ADMIN_INBOX) {\r\n linkAdminCompose(fromWhere);\r\n } else if (fromWhere == FROM_STUDENT_INBOX) {\r\n linkStudentCompose(fromWhere);\r\n }\r\n } catch(e) {\r\n alert(e.name + \"\\n\" + e.message);\r\n }\r\n}", "onShowContactChat() {\n App.bus.trigger(OPEN_CONTACT_CHAT);\n }", "function sendMessage(message)\r\n { \r\n try\r\n {\r\n ChatWindow.SendMessage(getMyWebID(),getOtherWebID(), escape(getMyNick()), escape( message ) ,sendMessage_CallBack);\r\n }\r\n catch(ex)\r\n { \r\n \r\n }\r\n }", "function log_in_user() {\n sendPage('/login');\n YW.logged_in = function () {\n return 'true';\n };\n YW.LISTENER = setInterval(function () {\n checkMessage();\n }, 10000);\n getkeyVal();\n maximize(YW.CHATSCREEN() + YW.MODAL(), function () {\n //Fetch Friends from Server\n checkForWPass();\n getFriends();\n sendPage('/home');\n //Focus the messege enter bar\n $('#typemsg').focus();\n $('#icons').html(YW.LOGGED_IN_H());\n $('#icons').css(\"top\", \"10%\");\n $('#icons').css(\"right\", \"0%\");\n setSearchContainerHeight();\n //Set up profile name and picture\n randomPicGen($('#profilepic'), YW.NAME);\n $(\"#profilename\").html(YW.NAME);\n $(\"#feedback\").css(\"display\", \"block\");\n //Slide User selection out\n $('#puller-btn').click(openContacts);\n //Slide user selection in\n $('#pusher-btn').click(openMessages);\n $('#typemsg').keypress(function (e) {\n // Enter pressed?\n if (e.keyCode == 10 || e.keyCode == 13) {\n sendMyMsg($(\"#typemsg\").val());\n }\n });\n });\n}", "function followReply (eventMsg){\n\tvar userName = eventMsg.source.screen_name; //Grabs the follower's username\n const {screen_name, name} = eventMsg.source;\n \n if (userName != myUsername){\n \tconst tyMsg = 'Hi ' + screen_name + '!' + '\\n\\nThanks for following me! \\n\\nThis message was generated with a twitter bot I made using node.js! If you\\'d like to see how I did it, then follow this GitHub link! https://github.com/brad4au57/twitter-bot-project';\n\n \tconst obj = {\n \t\tscreen_name,\n \t\ttext: tyMsg \n \t}\n \t\n\t T.post('direct_messages/new', obj);\n\n /* console.log('Message sent!'); */ //Used to test that my message was sent to the new follower\n } \n}", "function sendMessage() {\n}", "function onmessage(evt) {\n //add text to text area for message log from peer\n if(evt.data.msgcontent!=null ){\n console.log(evt.data.msgcontent);\n //addMessageLog('Other',evt.data.msgcontent);\n //$('#MessageHistoryBox').text( $('#MessageHistoryBox').text() +'\\n'+ 'other : '+ evt.data.msgcontent );\n //texttospeech(evt.data.msgcontent);\n //call translator \n //append the result in messahelanghistory box\n if(mylang!='' && peerlang!=''){\n translator(evt.data.msgcontent,mylang,peerlang); \n }\n else{\n console.log(\" langugae is not set \");\n translator(evt.data.msgcontent,'en','en'); \n }\n \n }else if(evt.data.lang!=null ){\n // set the peer langugae parameter\n peerlang=evt.data.lang;\n console.log(\" language received from peer \"+ peerlang);\n }\n}", "sendUserMessage(text) {\n this.state.currentUser.sendMessage({\n text,\n roomId: this.state.currentRoom.id\n });\n }", "function send_messenger(){\n var text_messenger = $('#text_messenger').val();\n doGetBotResponse(text_messenger, false);\n }", "handleBotMessage(message) {\n console.log('Mensaje desde TelegramBot: ' + message);\n if (message === 'estado'){\n this.verificarEstado();\n return;\n }\n serverClient.publish('Espino/commands', message);\n }", "function Message(value : String) {\n\tif (value == \"Join\") {\n\t\tJoinGame();\n\t} else if (value == \"Host\") {\n\t\tHostGame();\n\t} else if (value == \"Back\") {\n\t\tmainMenuController.GetComponent(MainMenu).MainMenu();\n\t} else {\n\t\tprint(\"ERROR: The message: \" + value + \" is not recognized. See the Message function in Multiplayer.js\");\n\t}\n}", "function sendWelcomeMessage(data){\n data.message = \"Hello, I can help you with searching hotels near your city of interest\";\n }", "function onmessage(evt) {\n //add text to text area for message log from peer\n if(evt.data.msgcontent!=null ){\n console.log(evt.data.msgcontent);\n addMessageLog('Other',evt.data.msgcontent);\n //$('#MessageHistoryBox').text( $('#MessageHistoryBox').text() +'\\n'+ 'other : '+ evt.data.msgcontent );\n //texttospeech(evt.data.msgcontent);\n //call translator \n //append the rsult in messahelanghistory box\n translator(evt.data.msgcontent,mylang,peerlang); \n \n }else if(evt.data.lang!=null ){\n // set the peer langugae parameter\n peerlang=evt.data.lang;\n console.log(\" language received from peer \"+ peerlang);\n }\n}", "function openChat(userID){\n if(page_type=='profile'){\n if($('#TenTimes-Modal .modal-title').text().search('Mutual')>-1){\n $('#TenTimes-Modal').modal('hide');\n }\n }\n showloading();\n channelChat.push(function() {\n channelizeUI.openChatBox(userID);\n });\n channelizeInit.callChannelize();\n}", "function sendMessage() {\n sendNewMessage({ dsText: valueInput.trim(), usuario: getUsuarioLogado() });\n setValueInput('');\n }", "function activateChat() {\n $('#helpandchatimg').attr('alt', 'Chat');\n $('#helpandchatimg').attr('src', '/sites/all/themes/corvusbie/images/comment-discussion.svg');\n $('#helpandchattext').text('Ask a Librarian');\n $('#helpandchatlink').attr('href', '#');\n $('#helpandchatlink').click(function( event ) {\n event.preventDefault();\n window.open(\"https://ca.libraryh3lp.com/chat/[email protected]?skin=15653\", \"AskUs\", \"resizable=1,width=375,height=350\");\n });\n }", "function onSendClicked() {\n var target=vw.getPeerName();// NOT from mc.userParams.targetUsername, so that you can chat and speak with different users \n if ( ! target) {\n //vw.showAlert(\"Peer user name required\");\n alert(\"Peer user name required\");\n return false;\n }\n var msg = {\n text: vw.getTextInp(),\n type: \"message\",\n id: up.clientID,\n date: Date.now(),\n user: up.user,\n }; \n //alert(target);\n if (target) msg.target=target;\n signallingConnection.sendRelay(msg);\n vw.clearTextInp();\n}", "function handleChat (chat) {\n\n // Return disabled chat types\n if (tagpro.settings.ui) {\n if ( !tagpro.settings.ui.allChat && chat.to == \"all\" && chat.from ) return;\n if ( !tagpro.settings.ui.teamChat && chat.to == \"team\" ) return;\n if ( !tagpro.settings.ui.groupChat && chat.to == \"group\" ) return;\n if ( chat.to == \"all\" && !chat.from ) {\n if (!tagpro.settings.ui.systemChat) return;\n if (hide_system && chat.message in system_messages) {\n chat.message = system_messages[chat.message];\n if (!chat.message) return;\n }\n }\n }\n\n\n // Create the message div\n var message = document.createElement('div');\n\n var message_span = document.createElement('span');\n message_span.className = 'message';\n\n if (chat.from) {\n\n var name_span = document.createElement('span');\n name_span.className = 'name';\n\n if ( typeof chat.from == \"number\" ) {\n var player = tagpro.players[chat.from];\n\n if (player.auth) message.classList.add('auth');\n\n if (player.team == 1) message.classList.add('red');\n else if (player.team == 2) message.classList.add('blue');\n\n name_span.innerText = player.name;\n } else name_span.innerText = chat.from;\n\n message.appendChild(name_span);\n\n } else {\n message.classList.add('system');\n }\n\n if ( chat.to == \"group\" ) {\n name_span.innerText = chat.from;\n message.classList.add('group');\n }\n\n if ( chat.from == \"ADMIN_GLOBAL_BROADCAST\" ) {\n message.classList.add('announcement');\n name_span.innerText = \"ANNOUNCEMENT\";\n }\n\n if ( chat.mod ) {\n message.classList.add('mod');\n }\n\n\n if( chat.to == \"team\") {\n message.classList.add(\"team\");\n }\n\n message_span.innerText = chat.message;\n message_span.innerHTML = autolinker.link( message_span.innerHTML );\n\n // Linkify the message, and append it\n message.appendChild(message_span);\n\n if ( chat.c ) message_span.style.color = chat.c;\n\n // Append the message and scroll the chat\n chats.appendChild(message);\n chats.scrollTop = chats.scrollHeight;\n\n chats.classList.add('shown');\n\n clearTimeout(timeout); // Remove any existing timeout\n\n timeout = setTimeout(()=>chats.classList.remove('shown'),show_time*1e3); // Set a timeout to hide the chats\n\n // Set volume according to the awesome Volume Slider®\n chat_sound.volume = left_sound.volume = join_sound.volume = 1 * tagpro.volumeCoefficient || 1;\n\n // Play a sound\n if (chat.from && sound_on_chat) chat_sound.play();\n else if (chat.message.includes(' has left ') && sound_on_left)\n left_sound.play();\n else if (chat.message.includes(' has joined ') && sound_on_join)\n join_sound.play();\n else if (sound_on_chat) chat_sound.play();\n }", "function sendMessage() {\n //message content listener\n var text = document.getElementById('sendMessageText').value;\n if (text.replace(/\\s/g, \"\").length === 0) { // Don't send just whitespace\n return;\n }\n\n //data to send\n var data = {\n type: \"message\",\n id: generateMessageId(getUserId(), text),\n author: selfEasyrtcid,\n date: getDate(),\n parentMessageId: getSelectedNodeId(),//getParentMessageId(),// makes it dynamic.\n content: text\n };\n\n //sends data to server\n sendData(\"message\", data);\n\n //will generate message node on client\n addToRoom(\"message\", JSON.stringify(data));\n\n //saves message to db\n addMessagetoDB(data);\n\n //empties text field\n document.getElementById('sendMessageText').value = \"\";\n}", "function replyAssignment(e) {\n // firstly we get current person id\n var personId = currentActiveDiscussionId,\n // then we pull text from chat texarea\n messageText = $(chatEventsMainCont).find(simpleMsgInput).val();\n // and get \"send message\" btn\n var currentButton = e.target;\n // then we check whether user entered a text or not\n if (messageText.trim()) {\n // if yes we add progress class to pressed btn\n $(currentButton).addClass(\"in-progress\");\n // and send AJAX request to the server\n $.post('/jobs/' + jobId + '/reply', {\n message: {\n text: messageText,\n person_id: personId\n }\n // if server has successfully receive simple msg text\n }).success(function(response) {\n // we get desctop notification text from response\n var desktopNotification = response.notice;\n // get new event for updating view and mutating main data\n var chatEvent = response.event;\n // get subscriber of this assignment chat\n var chat_subscriber = response.chat_subscriber;\n // and get job from response\n // TODO: What is this job???\n var job = response.job;\n // then we show desctop notification for subscribed user\n websocketsInteractionModule.publish_desktop_notification(desktopNotification);\n // and send him happened event\n websocketsInteractionModule.chat_publisher(chatEvent, job, chat_subscriber);\n // then we mutate our main data\n saveNewData(chatEvent);\n // and remove progress state from send msg btn\n $(currentButton).removeClass(\"in-progress\");\n\n // if we get some error as a response\n }).error(function(response) {\n // we properly show this error to user\n var main_error = response.responseJSON.message;\n if (main_error) {\n showErrorsModule.showMessage([main_error], \"main-error\");\n }\n $(currentButton).removeClass(\"in-progress\");\n });\n\n // if user clicked send msg btn without text in textarea\n } else {\n // we simply make textarea empty\n $(chatEventsMainCont).find(simpleMsgInput).val(\"\");\n };\n }", "function sendMessage() {\n \t\tvar message = data.value;\n\t\tdata.value = \"\";\n\t\t// tell server to execute 'sendchat' and send along one parameter\n\t\tsocket.emit('sendchat', message);\n\t}", "function sendMessage() {\r\n\tvar input = tabs.getActiveTab().getComponent(tabs.getActiveTab().title + 'inputField');\r\n\tvar msg = input.getValue();\r\n if(msg != '') {\r\n \tmsg = cleanMessage(msg);\r\n addMessage(currentUserName, msg, tabs.getActiveTab().title);\r\n\r\n conn.request({\r\n url: CONTACT_LIST_JSON_URL,\r\n method: 'POST',\r\n params: { method: \"sendMessage\", recipient:tabs.getActiveTab().title, message:msg},\r\n\t\t success: function(responseObject) {\r\n input.reset();\r\n },\r\n failure: function() {\r\n\t Ext.Msg.alert(getLocalizationValue('application.javascript.messagingWindow.alert.errorTitle'), getLocalizationValue('application.javascript.messagingWindow.alert.errorMsg'));\r\n }\r\n });\r\n\r\n input.focus();\r\n }\r\n}", "function sentMsgConsole(messageChatched) {\n console.log(\"inviato \", messageChatched);\n}", "function onMessageHandler (target, context, msg, self) {\n\n\n if (self) { return; } // Ignore messages from the bot\n \n info(target, \"Hola gente! Para saber los comandos !comandos\");\n \n var destacado = false;\n if (context['msg-id'] == 'highlighted-message') {\n destacado = true;\n }\n\n\n // Remove whitespace from chat message\n const commandName = msg.trim().split(' ')[0];\n var success = true;\n if (commandName.charAt(0)==='!') {\n if (ready || commandName == '!comandos' || destacado) {\n const sound = commandName.substring(1);\n switch (sound) { \n case \"hypnosapo\":\n client.say(target, \"Alabemos todos al gran hypnosapo!\");\n playSound(sound); \n break;\n case \"samatao\":\n client.say(target, \"Sa matao Paco!!!\");\n playSound(sound); \n break;\n case \"cuidao\":\n client.say(target, \"Cuidaooooo!!!\");\n playSound(sound); \n break;\n case \"siuuu\":\n client.say(target, \"Siuuuuuuu!!!\");\n playSound(sound); \n break;\n case \"jurasico\":\n client.say(target, \"Tiriri ri ri, tiri ri ri ri, tiririiiiii!!!\");\n playSound(sound); \n break;\n case \"alcuerno\":\n client.say(target, \"Al cuerno todo!!!\");\n playSound(sound); \n break;\n case \"ranita\":\n client.say(target, \"Una ranita iba paseando!!!\");\n playSound(sound); \n break;\n case \"expulsion\":\n client.say(target, \"No me jodas Rafa!!\");\n playSound(sound); \n break;\n case \"lee\":\n readTextUser(msg, context['username'])\n break;\n case \"chiste\":\n tellJoke();\n break;\n case \"eugenio\":\n randomJoke();\n break;\n case \"comandos\":\n client.say(target, \"Comandos: !lee <texto>, !chiste, !hypnosapo, !samatao, !cuidao, !siuuu, !jurasico, !alcuerno, !expulsion, !ranita, !eugenio.\" +\n \"\\nTienen un timeout de 60 segundos, si quieres saltartelo, mandalo como destacado\");\n success = false;\n break;\n default:\n client.say(target, `${commandName}? Pero que dises?!`);\n console.log(`* Unknown command ${commandName}`);\n success = false;\n\n\n }\n\n\n if (success && !destacado) {\n resetTimeout()\n }\n } else {\n client.say(target, \"Tranquilito que hay un timeout global de 60 segundos\");\n }\n \n\n }\n \n\nfunction tellJoke() {\n rp({url: 'http://www.chistes.com/ChisteAlAzar.asp?n=3', encoding: 'latin1'})\n .then(function(html){\n //success!\n var text = \"\";\n\n $('.chiste', html)[0].children.forEach(function(element) {\n if(element.data) {\n\n text += element.data + ' '\n }\n });\n readText(text);\n\n })\n .catch(function(err){\n //handle error\n });\n}\n\nfunction randomJoke() {\n fs.readdir('jokes', (err, files) => {\n const randomElement = files[Math.floor(Math.random() * files.length)];\n console.log(randomElement);\n child_process.exec(`mplayer -slave \"jokes/${randomElement}\"`);\n });\n \n\n}\n\n}", "function answerFromBot(/* string msg to sentd*/msg, /* bot name */botName){\n // get current date\n var now = new Date();\n var time = formatAMPM(now);\n var msgHtml = '<li class=\"mar-btm\"><div class=\"media-left\"><img src=\"img/avatar1.jpg\" class=\"img-circle img-sm\" alt=\"Profile Picture\">'\n + '</div> <div class=\"media-body pad-hor speech-left2\"><div class=\"speech\" style=\"padding:20px 10px;\"><a href=\"#\" class=\"media-heading\">'\n + botName + '</a><p>' + msg + '</p><p class=\"speech-time\"><i class=\"fa fa-clock-o fa-fw\"></i>&nbsp;'\n + time + '</p></div></div></li>';\n return msgHtml;\n}", "function sendMessage() {\n\n channel.push('shout', { \n name: name.value || \"guest\", // get value of \"name\" of person sending the message. Set guest as default\n message: msg.value, // get message text (value) from msg input field.\n inserted_at: new Date() // date + time of when the message was sent\n });\n\n msg.value = ''; // reset the message input field for next message.\n}", "function statusMessage(message, privatem) {\n\tvar chatRef = databaseRef.child('chat');\n\tvar sentBy = $('#playerName').val();\n\tvar recipient = \"none\";\n\tvar speaker = \"<div style='background-color:DarkSeaGreen;display:inline-block;border-bottom:2px solid DarkSlateGray;width:100%;padding-top:10px;padding-bottom:10px;'>Auto-Update\";\n\tvar pm = privatem;\n\tvar timestamp = (((($.now()/1000)/60)/60)/24);\n\tif (privatem == \"Yes\") {\n\t\t// recipient = document.getElementById('playerName');\n\t\trecipient = playerName.value;\n\t}\n\tmessage = message+\"</div><br>\";\n\tchatRef.push({sentBy:sentBy, speaker:speaker, message:message, pm:pm, recipient:recipient, timestamp:timestamp});\n\t$('#message').val('');\n\t//$.get(\"../php/postMessage.php\", {'speaker': speaker, 'message': message, 'private': pm, 'recipient': recipient});\n\t//getMessages();\n}", "function sendChat (msg){\r\n document.getElementById (\"mod_comm_input\").value = msg;\r\n unsafeWindow.Chat.sendChat ();\r\n}", "function chatClickHandler(evt) {\n\t\tlet recvUid = evt.target.dataset.id;\n\t\tevt.preventDefault();\n\t\tlet friendsLi = document.querySelectorAll('#chat-sidebar #friends-list li');\n\t\t// for all others remove active class\n\t\tfriendsLi.forEach(function (friendNode) {\n\t\t\tfriendNode.classList.remove('active');\n\t\t});\n\t\tevt.target.parentNode.classList.add('active');\n\n\t\t// apply off() for previous rcvs\n\t\tthis.unloadMessages(recvUid);\n\t\t// retrieve messages for friend\n\t\tthis.loadMessages(recvUid);\n\t\tlet messageBox = document.querySelector('#message-box');\n\t\tlet sendButton = document.querySelector('.texter #send-btn');\n\t\tsendButton.removeEventListener('click', sendMsgHandler.bind(this));\n\t\tsendButton.addEventListener('click', sendMsgHandler.bind(this));\n\t\t///////// send message handler\n\t\tfunction sendMsgHandler(evt) {\n\t\t\tevt.preventDefault();\n\t\t\t//todo:filter user msg content by escaping chars\n\t\t\tif (messageBox.value != '') {\n\t\t\t\tthis.sendMessage(recvUid, messageBox.value);\n\t\t\t\tmessageBox.value = '';\n\t\t\t}\n\t\t}\n\n\t}", "function sendAI(message, username)\n {\n var reply;\n var msg = message.toLowerCase().split(\" \");\n username = username.replace(/<[^>]*>?/g, '');\n \n if(msg.indexOf(\"hi\") >= 0 || msg.indexOf(\"hello\") >= 0) {\n var replyData = [\"Hello, \" + username + \"!\", \"Hi, there!\", \"Hi, I'm the bot for the CBG Chat!\", \"What's up, \" + username + \"?\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(msg.indexOf(\"how\") >= 0 && msg.indexOf(\"are\") >= 0) {\n var replyData = [\"I am good, \" + username + \". Thanks for asking me.\", \"Good, what about you?\", \"What are you asking?\", \"Just chilling, \" + username + \".\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(msg.indexOf(\"whats\") >= 0 && msg.indexOf(\"up\") >= 0) {\n var replyData = [\"I am good, \" + username + \". Thanks for asking me.\", \"Good, what about you?\", \"What are you asking?\", \"Just chilling, \" + username + \".\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(/\\d/.test(msg.join(' ')) && /[a-z]/i.test(msg.join(' ')) == false) {\n var math = msg.join(\" \").replace(/[^\\d.+*/-]/g, '');\n if(math == \"+\" || math == \"-\" || math == \"*\" || math == \"/\"){\n reply = \"You think I can add letters?\";\n } else {\n reply = eval(math);\n }\n return reply;\n } else if(msg.indexOf(\"fortnite\") >= 0 && msg.indexOf(\"best\") >= 0) {\n var replyData = [\"Fortnite has the big gay.\", \"Gay!!\", \"You have the big gay!\", \"Did you know Fortnite is gay?\", \"Please understand \" + username + \", Fortnite is the big gay.\", \"99% gay!\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(msg.indexOf(\"fortnite\") >= 0 && msg.indexOf(\"good\") >= 0) {\n var replyData = [\"Fortnite has the big gay.\", \"Gay!!\", \"You have the big gay!\", \"Did you know Fortnite is gay?\", \"Please understand \" + username + \", Fortnite is the big gay.\", \"99% gay!\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(msg.indexOf(\"fortnite\") >= 0 && msg.indexOf(\"gay\") >= 0) {\n var replyData = [\"Yes, Fagnite has the big gey.\", \"Gaynite is gay!\", \"Fagnite is faggot gay.\", \"Fortnite is gay!\", \"Yes!!!\", \"PUBG gay to.\", \"99% gay!\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(msg.indexOf(\"fortnite\") >= 0) {\n var replyData = [\"Fortnite has the big gay.\", \"Gay!!\", \"You have the big gay!\", \"Did you know Fortnite is gay?\", \"Please understand \" + username + \", Fortnite is the big gay.\", \"99% gay!\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(msg.indexOf(\"you\") >= 0 && msg.indexOf(\"gay\") >= 0) {\n var replyData = [\"Ha, you're gayer!\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(msg.indexOf(\"you\") >= 0 && msg.indexOf(\"gey\") >= 0) {\n var replyData = [\"Ha, you're gayer!\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(msg.indexOf(\"u\") >= 0 && msg.indexOf(\"gey\") >= 0) {\n var replyData = [\"Ha, you're gayer!\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(msg.indexOf(\"u\") >= 0 && msg.indexOf(\"gay\") >= 0) {\n var replyData = [\"Ha, you're gayer!\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(msg.indexOf(\"school\") >= 0 && msg.indexOf(\"gay\") >= 0) {\n var replyData = [\"School has the big gay.\", \"Gay!!\", \"School have the big gay!\", \"Did you know School is gay?\", \"Please understand \" + username + \", School is the big gay.\", \"100% gay!\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(msg.join(' ').replace('/[a-z]/i', '').split(' ').slice(-1)[0] == '?') {\n var replyData = [\"Sure?\", \"Maybe.\", \"I might agree.\", \"Yes!\", \"No!\", \"I'm having a hard time trying to understand that question..\", \"I think.\", \"Maybe, yes?\", \"Maybe, no..\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else if(msg.indexOf(\"what\") >= 0 && msg.indexOf(\"name\") >= 0) {\n var replyData = [\"Hello! I'm the CBG Bot!\", \"CBG Bot\", \"It's CBG Bot!\", \"...I forgot\", \"Please understand \" + username + \", I forgot my name.\", \"Ok, it's CBG bot.\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n } else {\n var replyData = [\"What are you asking, \" + username + \"?\", \"Hmm, ok?\", \"I don't understand...\", \"Huh?\", \"Explain to me, \" + username + \".\", \"I can't understand what you said, \" + username + \".\", \"???\", \"What?\"];\n reply = replyData[Math.floor(Math.random() * replyData.length)];\n return reply;\n }\n \n }", "function letsGo() {\r\n\t\tjq(\"div.reply\").each(function()\r\n\t\t{\r\n\t\t\tvar div = jq(this);\r\n\t\t\tif (/^[^Ответ]/.test(div.html()))\r\n\t\t\t{\r\n\t\t\t\tdiv.append(\"[<a class='lor-report-msg' href='javascript:{/*Сообщить модератору (страница не будет перезагружена)*/}'>Сообщить модератору</a>]\");\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tjq(\"a.lor-report-msg\").click(function() {\r\n\t\t\t// hack: why .unbind() doesn't work\r\n\t\t if (jq(this).html() == \"Просмотреть\") { return true; }\r\n\t\t\t//\r\n\t\t var comment = prompt(\"Please provide a comment about this message\", \"Нацпол\");\r\n\t\t if (comment === null) { return false; }\r\n\t\t // Constructing message for posting\r\n\t\t var msgtext = null;\r\n\t\t var reportlink = jq(this);\r\n\t\t var url1 = reportlink.parent().parent().parent().parent().find(\"div.msg_body h1 a:first\");\r\n\t\t if (url1.length == 0) {\r\n\t\t\t url1 = reportlink.parent().find(\"li:nth-child(2) a:first\");\r\n\t\t }\r\n\r\n\t\t if (!msgtext) {\r\n\t\t\t msgtext = comment + \" : \" + url1.get(0).href;\r\n\t\t }\r\n\r\n\t\t var message = {\r\n\t\t\t\tcsrf: /CSRF_TOKEN=\"(.+)\"/.exec(document.cookie)[1],\r\n\t\t\t\ttopic: jq.GMReport.topicnum,\r\n\t\t\t\ttitle: \"\",\r\n\t\t\t\tmsg: msgtext\r\n\t\t }\r\n\t\t jq.post(location.protocol + \"//www.linux.org.ru/add_comment.jsp\", message, function(data) {\r\n\t\t var allmsgs = jq(data).find(\"article.msg\");\r\n\t\t var reportnum = /\\d+/.exec(allmsgs.eq(allmsgs.length - 1).attr(\"id\"))[0];\r\n\t\t reportlink.unbind().attr(\"href\", location.protocol + \"//www.linux.org.ru/jump-message.jsp?msgid=\" + jq.GMReport.topicnum + \"&cid=\" + reportnum).html(\"Просмотреть\");\r\n\t\t })\r\n\t });\r\n\t}", "function sendMessage (msg) {\r\n /*\r\n var outgoing = document.getElementById(\"outgoing\");\r\n if (outgoing.value.length > 0) {\r\n chatRoom.sendMessage(\"CHAT_MESSAGE\", \"true\", null, outgoing.value);\r\n outgoing.value = \"\";\r\n // Focus text field again after submission (required for IE8 only)\r\n setTimeout(function () {outgoing.focus();}, 10);\r\n }\r\n */\r\n chatRoom.sendMessage(\"CHAT_MESSAGE\", \"true\", null, msg);\r\n}", "function sendMessage() {\n if ($('#receive_message_users').val() == null) {\n showError('receive_message_users', true);\n return ;\n }\n var text = $(tinyMCE.get('message_content').getContent()).text();\n text = text.replace(' ', '');\n if (text.length == 0) {\n showError('message_content', true);\n return ;\n }\n $.post('/inbox', {\n users : $('#receive_message_users').val(),\n content : tinyMCE.get('message_content').getContent(),\n can_reply : $('#message_can_reply').is(':checked') ? 1 : 0\n }, function(results) {\n if (results.error) {\n $('#receive_message_users_error').html(results.error);\n } else {\n window.location.replace(results.location);\n }\n });\n}", "_startDialogue () {\n this.app.DOM.messengerBtn.onclick = () => {\n let value = this.app.DOM.messengerInput.value;\n\n if (value != '') this._sendMessageFromUser(value);\n this.app.DOM.messengerInput.value = '';\n }\n }", "function onClickSendPrivateMessage(e) {\n\n // Get the button that was pressed\n var button = e.currentTarget;\n\n // Get the ID of the user we want to send to\n var recipientId = button.id.split('-')[2];\n\n // Get the message to send\n var message = $('#private-message-'+recipientId).val();\n $('#private-message-'+recipientId).val(\"\");\n\n // Add this message to the room\n addMessageToConversation(window.me.id, recipientId, message);\n\n // Send the message\n io.socket.post('/chatm/private', {to: recipientId, msg: message});\n\n}", "messagesNavLink() {\n _messages.default.createMessageBoard();\n\n console.log(\"working\");\n\n _friends.default.buildFriendSearchBar();\n }", "function onClickButton() {\n if (inputRef.current.value !== 0) {\n const message = inputRef.current.value;\n // If your own client sends a message, we add it to the list of messages to\n // render it on the UI.\n setMessages((prevMessages) => [\n ...prevMessages,\n `${activeLoggedUser}: ${message}`,\n ]);\n socket.emit('chat', { message: `${activeLoggedUser}: ${message}` });\n }\n }", "sendMessage(userID, message) {\n Dispatcher.handleViewAction({\n type: ActionTypes.SEND_MESSAGE,\n userID: userID,\n message: message,\n timestamp: +new Date(),\n })\n }", "function welcome(agent){\n agent.add(getTelegramButtons(\"Welcome to Big Brother! I'm responsible for taking care of your apps! Here's what you can do with me:\", actions));\n}" ]
[ "0.68943954", "0.663146", "0.64962876", "0.64781797", "0.64682126", "0.6455366", "0.64182127", "0.6410737", "0.6405171", "0.6360514", "0.63242185", "0.6313633", "0.628098", "0.6277013", "0.6270637", "0.6266897", "0.62662286", "0.6255746", "0.6236719", "0.62313753", "0.6227387", "0.62134254", "0.6209532", "0.61968434", "0.6194951", "0.61856663", "0.61762685", "0.6168878", "0.61682814", "0.6159147", "0.6155199", "0.61549807", "0.61520386", "0.6151988", "0.6144866", "0.61377245", "0.61285394", "0.6120241", "0.61165005", "0.6110389", "0.6107581", "0.6102632", "0.61002725", "0.60994816", "0.60977256", "0.6095494", "0.6094849", "0.6090709", "0.60858166", "0.6083986", "0.60756624", "0.60686433", "0.60684866", "0.60652894", "0.6062932", "0.6060077", "0.6049169", "0.60473925", "0.60451865", "0.6040492", "0.60337156", "0.6027092", "0.6021278", "0.6020605", "0.60202193", "0.6020018", "0.60158306", "0.60100466", "0.6004419", "0.6002209", "0.59963995", "0.5996238", "0.59897316", "0.598837", "0.59848696", "0.59841007", "0.598212", "0.59798497", "0.5979246", "0.59771925", "0.59742653", "0.5972391", "0.5958854", "0.59566313", "0.59480137", "0.59469396", "0.5945517", "0.59272", "0.5925236", "0.59190786", "0.59181726", "0.5918056", "0.5909328", "0.59072316", "0.59055173", "0.59033996", "0.59029055", "0.5900376", "0.59000695", "0.5899831", "0.5899568" ]
0.0
-1
ALL the Call Functions:
function call(){ document.getElementById("body").innerHTML = ` <html> <head> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> <link rel="stylesheet" type="text/css" href="chat.css"> <title>Call</title> </head> <body id = "body"> <div class = "row"> <div class="mx-auto" style="width: 200px;"> <div class="mb-5"> <h1 class="text-center" >Call Page</h1><br> <p class="text-center" > Please speak into your mic to talk to our Administrator.</p> <p class="text-center" id = "status" > Status: </p> <p class="text-center" id = "p1"></p> <audio id="globalAudioTag" autoplay style="display:none;"></audio> <div class="text-center"> <button type="button" id="endButton" style = "color: #ff0000;" onclick="endFunc()">End Call</button> </div> </div> </div> </div> </body> </html> `; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getClientCalls() {\n\n }", "function main() {\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.POST) {\n\t\t\tif (gvMethod === \"MAP\") {\n\t\t\t\t//Perform The Mapping between In and Out\n\t\t\t\ttry {\n\t\t\t\t\t_mapInToOut();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvStatus = \"Error during mapping IN to OUT:\" + errorObj.message;\n\t\t\t\t\t$.response.status = 200;\n\t\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\t\tmessage: \"API Called\",\n\t\t\t\t\t\tresult: gvErrorMessage,\n\t\t\t\t\t\tstatus: gvStatus,\n\t\t\t\t\t\ttableUpdates: gvTableUpdate\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// \t\t} else if ($.request.method === $.net.http.GET) {\n\t\t// \t\t\t//Read Entries from the Table\n\t\t// \t\t\ttry {\n\t\t// \t\t\t\t_getEntries();\n\t\t// \t\t\t} catch (errorObj) {\n\t\t// \t\t\t\t$.response.status = 200;\n\t\t// \t\t\t\t$.response.setBody(JSON.stringify({\n\t\t// \t\t\t\t\tmessage: \"API Called\",\n\t\t// \t\t\t\t\tresult: gvErrorMessage\n\t\t// \t\t\t\t}));\n\t\t// \t\t\t}\n\t\t// \t\t}\n\t}", "function apiCalls(){\n\tswitch (switcher) {\n\t\tcase \"my-tweets\":\n\t\tconsole.log(\"you are in tweets switch\");\n\t\tmy_tweets();\n\t\tbreak;\n\n\t\tcase \"spotify-this-song\":\n\t\tconsole.log(\"you're in spotify the input val is \" + userinput);\n\t\tspotify_this_song();\n\t\tbreak;\n\n\t\tcase \"movie-this\":\n\t\tconsole.log(\"you're in movie the input val is \" + userinput);\n\t\tmovie_this();\n\t\tbreak;\n\t}\n}", "function startNewCall() {\n\n}", "function createCurrentCallObject() {\n\n}", "function userinfo_dispatcher_routines() {\n\n\n}", "Run() {\n\n }", "private public function m246() {}", "function _____SHARED_functions_____(){}", "function ElstrServerRpcCallsAdmin (){}", "function Scdr() {\r\n}", "function readyFunctionCalls() {\n\n\tclickToChatCall();\n\tsetUpTypeHead();\n\tjQuery(\".s7LazyLoad\").unveil();\n\tjQuery(\"input[placeholder]\").placeholder();\n\t\n\t $('#e_footercol8 a').attr('target', '_blank');\n}", "static fetchAll(callBack){\n getProductsFromFile(callBack);\n }", "function main() {\n getIpLocation();\n setHandlers();\n }", "function gather() {\n base();\n hootsuite();\n socialpilot();\n socialoomph();\n agorapulse();\n communit();\n crowdfire();\n loomly();\n planable();\n missinglettr();\n viraltag();\n}", "static private internal function m121() {}", "function wa(){}", "function main() {\n\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.POST) {\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tresult: \"POST is not supported, perform a GET to schedule the alert job\"\n\t\t\t}));\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tif (gvMethod === \"Create\" || gvMethod === \"CREATE\") {\n\t\t\t\t\tDeleteJob();\n\t\t\t\t\tScheduleJob();\n\n\t\t\t\t\t$.response.status = 200;\n\t\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\t\tmessage: \"API Called, schedule created\"\n\t\t\t\t\t}));\n\t\t\t\t} else if (gvMethod === \"DELETE\" || gvMethod === \"Delete\") {\n\t\t\t\t\tDeleteJob();\n\n\t\t\t\t\t$.response.status = 200;\n\t\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\t\tmessage: \"API Called, schedule deleted\"\n\t\t\t\t\t}));\n\t\t\t\t} else {\n\t\t\t\t\t$.response.status = 200;\n\t\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\t\tmessage: \"API Called, but no action taken, method was not supplied\"\n\t\t\t\t\t}));\n\t\t\t\t}\n\n\t\t\t} catch (err) {\n\t\t\t\t$.trace.error(JSON.stringify({\n\t\t\t\t\tmessage: err.message\n\t\t\t\t}));\n\t\t\t\t$.response.status = 200;\n\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\tmessage: \"API Called\",\n\t\t\t\t\terror: err.message\n\t\t\t\t}));\n\t\t\t}\n\n\t\t}\n\t}", "function main() {\n\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.POST) {\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tresult: \"POST is not supported, perform a GET to read the Account Type Amounts by Company Code\"\n\t\t\t}));\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t//Calculate Values\n\t\t\t\tvar records = getEntries();\n\n\t\t\t\t$.response.status = 200;\n\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\tmessage: \"API Called\",\n\t\t\t\t\tdata: records\n\t\t\t\t}));\n\n\t\t\t} catch (err) {\n\t\t\t\t$.trace.error(JSON.stringify({\n\t\t\t\t\tmessage: err.message\n\t\t\t\t}));\n\t\t\t\t$.response.status = 200;\n\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\tmessage: \"API Called\",\n\t\t\t\t\terror: err.message\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}", "function userinfo_requester_routines() {\n\n}", "function rc(){}", "function run() {\n\n }", "function main() {\n\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.POST) {\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tresult: \"POST is not supported, perform a GET to send out all relevant daily notifications\"\n\t\t\t}));\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t//Get the Routing Entries from the table\n\t\t\t\tvar oRoutes = getRoutes();\n\n\t\t\t\t//Perform Counts and Trigger Notifications\n\t\t\t\t_countAndSend(oRoutes);\n\n\t\t\t\t//Write to the trace\n\t\t\t\t$.trace.info(JSON.stringify({\n\t\t\t\t\tRequestedNotifications: gvRequestedProcessing,\n\t\t\t\t\tProcessedNotifications: gvProcessingCount\n\t\t\t\t}));\n\t\t\t} catch (err) {\n\t\t\t\t$.trace.error(JSON.stringify({\n\t\t\t\t\tmessage: err.message\n\t\t\t\t}));\n\t\t\t\tgvError = err.message;\n\t\t\t}\n\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tError: gvError\n\t\t\t}));\n\t\t}\n\t}", "function AdaHeads_Take_Call_Button_Click() {\n // Create a new call object, not implemented\n AdaHeads.Alice.Get_Next_Call({\n 200 : function (data) {\n $(\"#Current_Call\").addClass(\"disconnected\").show();\n\n AdaHeads.Status_Console.Log(\"Reserved call\"); \n },\n \n 404 : function (data) {\n AdaHeads.Status_Console.Log(\"Call not found\"); \n },\n \n 204 : function (data) {\n AdaHeads.Status_Console.Log(\"Pickup: No call available\"); \n console.log (data); \n\n },\n 400 : function (data) {\n AdaHeads.Status_Console.Log(\"Pickup: Bad request\");\n },\n \n 500 : function (data) {\n AdaHeads.Status_Console.Log(\"Pickup: Server error\");\n }\n }); \n \n// UI Changes\n// Disable the take call button and enable the end call button\n\n}", "function main() {\n\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.GET) {\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tresult: \"GET is not supported, perform a POST to add Entries\"\n\t\t\t}));\n\t\t} else {\n\t\t\t//Perform Table Entry to be created in Table\n\t\t\ttry {\n\t\t\t\tif (gvGuid) {\n\t\t\t\t\t_createEntries();\n\t\t\t\t}\n\t\t\t} catch (errorObj) {\n\t\t\t\tgvTableUpdate = \"Error during table insert:\" + errorObj.message;\n\t\t\t}\n\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tTableUpdateStatus: gvTableUpdate\n\t\t\t}));\n\t\t}\n\t}", "function getvals(mot) {\n// let v = mot.call('stat',null, (data, opt) => { console.log(\"call: \",JSON.stringify(data),typeof opt==='undefined'?\"\":opt); });\nlet v1 = mot.stat((data) => { \n //console.log(\"stat: \",JSON.stringify(data)); \n});\nlet v2 = mot.pos((data) => { \n //console.log(\"stat: \",JSON.stringify(data)); \n});\n}", "function callFunctions(){\n addition(10, 20);\n subtraction(30, 10);\n}", "function callback(){}", "function run() {}", "function firstCall()\r\n{\r\n loadUSNavy();\r\n}", "function doThis(){\n\tcommand.readFile(\"random.txt\", \"utf8\", function(error, data) {\n\t\tif(error){\n\t\t\tconsole.log(error);\n\t\t}\n\t\telse {\n\t\t\targList = data.split(',');\n\t\t\tfunctionCalled = argList[0];\n\t\t\tparameter = argList[1];\n\t\t\t\n\t\t\tif (functionCalled == \"my-tweets\"){\n \t\tretrieveTweets();\n\t\t\t}\n\t\t\t\n\t\t\tif (functionCalled == \"spotify-this-song\"){\n\t\t\t\tsongName = parameter;\n\t\t\t\tspotifyThis(songName);\n\t\t\t}\n\n\t\t\tif (functionCalled == \"movie-this\"){ \n\t\t\t\tmovie = parameter;\n\t\t\t\tmovieThis(movie);\n \t\t}\n\t\t}\n\t});\n}", "function main() {\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.POST) {\n\t\t\tif (gvMethod === \"DELETE\") {\n\t\t\t\t//Perform Table Entry to be deleted from Table\n\t\t\t\ttry {\n\t\t\t\t\t_deleteEntry();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table entry deletion:\" + errorObj.message;\n\t\t\t\t}\n\t\t\t} else if (gvMethod === \"UPDATE\") {\n\t\t\t\ttry {\n\t\t\t\t\t_updateEntry();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table update:\" + errorObj.message;\n\t\t\t\t}\n\t\t\t} else if (gvMethod === \"CREATE\") {\n\t\t\t\t//Perform Table Entry to be created\n\t\t\t\ttry {\n\t\t\t\t\t_createEntry();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table insert:\" + errorObj.message;\n\t\t\t\t}\n\t\t\t} else if (gvMethod === \"ADD\") {\n\t\t\t\t//Perform Table Entry to be created\n\t\t\t\ttry {\n\t\t\t\t\t_addEntries();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table insert:\" + errorObj.message;\n\t\t\t\t}\n\t\t\t} else if (gvMethod === \"DELETE_CONDITION\") {\n\t\t\t\t//Perform Table Entries to be deleted Table\n\t\t\t\ttry {\n\t\t\t\t\t_deleteAll();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table entry deletion:\" + errorObj.message;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tTableUpdateStatus: gvTableUpdate,\n\t\t\t\tStatus: gvStatus,\n\t\t\t\tCONDITION_ID: gvConditionId\n\t\t\t}));\n\n\t\t} else if ($.request.method === $.net.http.GET) {\n\t\t\t//Read Entries from the Table\n\t\t\ttry {\n\t\t\t\t_getEntries();\n\t\t\t} catch (errorObj) {\n\t\t\t\t$.response.status = 200;\n\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\tmessage: \"API Called\",\n\t\t\t\t\tresult: gvErrorMessage,\n\t\t\t\t\tStatus: gvStatus\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}", "function _main() {\n try {\n // the modules own main routine\n //_logCalls();\n\n // enable a global accessability from window\n window.tools = {} || window.tools;\n window.tools._log = _log;\n window.tools._addNavigation = _addNavigation;\n } catch (error) {\n console.log(error);\n }\n\n }", "function Main()\n {\n \n }", "start() {// [3]\n }", "function main(){\n\t\t//check ob die url/seite die richtige ist\n//\t\tif(checkRightLocation()) {\n\n\t\tcleanPage();\n\t\taddFavoriteTitle();\n\t\taddEmptyTable();\n\t\taddHeader();\n\t\tvar favoritesCall = Utils.getFavorites(addFavorites);\t\t\t\n\t\t\t\t\t\t\n\t//\t} else {\n\t//\t\talert(wrongPageErrorMessage);\n\t//\t}\n\t}", "function Cnds() {}", "async request() {\n if (this.isTest()) { console.log(\"in getAllCalls\"); }\n // GET first page (and number of pages)\n await this.getCallsPage();\n \n if (this.isTest()) { console.log(`getLastPage = ` + this.getLastPage()); }\n // GET the remaining pages\n for (let pageNum = 2; pageNum <= this.getLastPage(); pageNum++) {\n await Util.throttle(this.#config.throttle);\n await this.getCallsPage(pageNum);\n }\n }", "function fm(){}", "run() {\n\t\tthis.boats.forEach( (boat) => {\n this.navigateShip(parseInt(boat[0]), parseInt(boat[1]), boat[2], boat[3])\n })\n\n console.log(this.output)\n\t}", "static getAll(cb){\n getMentorsFromFile(cb)\n }", "function run () {\n\n // //Test Case 1\n address = \"809 Thomas Ave, San Diego, CA 92109\"\n var frmtAddr = addressSearch(address);\n var frmtName = formatInput(\"The Local\");\n dbAddr = formatInput(address);\n\n // Test Case 2\n // address =\"8970 University Center Ln, San Diego, CA 92122\";\n // var frmtAddr = addressSearch(address);\n // var frmtName = formatInput(\"Fleming's\");\n // dbAddr = formatInput(address);\n \n\n //Make API calls\n yelpAPIcall(frmtName,frmtAddr,ratingsobjectarray,zomatoAPIcall);\n\n // .then(zomatoAPIcall(frmtName,frmtAddr))\n // .then(googleAPIcall(frmtName,frmtAddr))\n // .then(dbfind(frmtName,dbAddr,callbacklog))\n // .then(dbrating(dbAddr)); \n // runwhendone(yelprating,zomatorating,googlerating,internalrating);\n}", "function CommonSetHandler( results )\n{\n\tStandardCallback( results, 'infoOutput' );\n}", "function accessesingData2() {\n\n}", "function accessesingData2() {\n\n}", "function main(param1,param2,callBack){ \n console.log(param1, param2) \n callBack() \n }", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "work() {\n\n }", "function da(){}", "function da(){}", "function da(){}", "function callAllFunctions (){\n for (var i = 0; i < allStores.length; i++){\n allStores[i].hourlySalesCalculator();\n allStores[i].render();\n }\n}", "function Main(){\n \n getLiveGames();\n \n}", "function StaticCall()\r\n {\r\n web3.tera.StaticCall({From:0, To:209, Method:\"MiningList\", Params:{}},function (Data)//223295\r\n {\r\n if(Data.result)\r\n idResult.value=\"OK, MiningList=\"+Data.RetValue.length;\r\n });\r\n }", "private internal function m248() {}", "static private protected internal function m118() {}", "function run() {\n }", "function run() {\n\n}", "function RequestLoadGeneralData() {\n\n}", "function main()\n{\n\t// Fetch all stats that exist already\n\tvar fetchAllUrl = baseUrl + \"/apps/fetchstats/\" + appId;\n\tconsole.log(\"Fetching all stats...\");\n\tAppsAjaxRequest(fetchAllUrl, {}, function(results){\n\t\tconsole.log(\"Retrieved results!\");\n\t\texistingStats = results;\n\t\tParseExistingStats();\n\t});\n}", "function callOnMe() { return 'called' }", "async execute(){\n\t\tawait this.processRequest();\n\t\tawait this.formatRequest();\n\t\tawait this.processData();\n\t\tawait this.formatResponse();\n\t\tawait this.processResponse();\n\t}", "refresher() {\n let any = this;\n binanceDepthLoader();\n bittrexDepthLoader();\n\n binanceCandlestickLoader(any);\n bittrexCandlestickLoader(any);\n\n binance24hrInfo();\n bittrex24hrInfo();\n }", "_reflow() {\n this._init();\n }", "_serveBall() {\r\n\r\n }", "function redactInfo (obj) {\n \n}// CODE HERE", "function miFuncion (){}", "Get_Exchnages_Accepted()\n{\n\n}", "function callHooks(currentView,arr){for(var i=0;i<arr.length;i+=2){arr[i+1].call(currentView[arr[i]]);}}", "function selcall() {\r\n let i = comboSel.value;\r\n if (i == -1) return;\r\n\r\n let obj = apitool.comboList[i];\r\n let fn = obj.fn;\r\n apitool[fn]();\r\n console.log(\"fn \" + fn);\r\n }", "function init() {\n\t \t\n\t }", "function callTest(data){\n var call_array=data.tests[data.actual_name]; //array\n if (call_array)\n for (var n=0;n<call_array.length;n++){\n var params=call_array[n];\n console.log(\"- con params: \",JSON.stringify(params.slice(0,2)),\"callback: \",typeof params[2]);\n data.obj_to_test[data.actual_name](params[0],params[1],params[2]); //call fn con los params - params[3] es una callbackfn\n }\n}", "function accessesingData1() {\n\n}", "function accessesingData1() {\n\n}", "function inception() {\n \tinception();\n }", "function main() {\n\n /*\n * Example template callback\n *\n * callback = function(message) {\n * if (message) console.log(message);\n * }\n *\n */\n\n /*\n * Example usage of connect and disconnect\n *\n * connect().then(callback, callback);\n * disconnect().then(callback, callback);\n */\n\n /*\n * Example usage of User routines\n *\n * addUser(\"user1\", \"token1\").then(callback, callback);\n * getUser(\"token1\").then(callback, callback);\n */\n\n /*\n * Example usage of TopTrack routines\n *\n * features = {[ACOUSTICNESS]: 0.3, [DANCEABILITY]: 0.5, \n * [ENERGY]: 0.8, [TEMPO]: 113.4, [VALENCE]: 0.8};\n * addTopTrack(\"user1\", \"uri1\", features).then(callback, callback);\n */\n\n /*\n * Example usage of Playlist routines\n *\n * addPlaylist(\"user1\", \"uri2\").then(disconnectCB, disconnectCB);\n * getPlaylistId(\"uri1\").then(disconnectCB, disconnectCB);\n * getUserPlaylists(\"user1\").then(disconnectCB, disconnectCB);\n * getPlaylistUri(\"15\").then(disconnectCB, disconnectCB);\n */\n\n}", "function runProgram(){\nwhatToBuy();\ngetProducts();\n}", "function init() {\n getData({}, mapDrawing);\n getPlaylist({}, loadPlaylist);\n\n console.log(\"Init functie\");\n}", "function callTourGeneration(){\n\t\tdisableButtons();\n\t\tclearAll();\n\n\t\tvar parameters = Parameters.getAllParameters();\n\t\tvar callUri = Parameters.getUrlForTourGenerationRequest(serverUri, parameters);\n\t\t$.get(callUri, handleTourResult)\n\t\t.fail(function(xhr, status, error) {clearAll()\n\t\t\t$(\"#displayedMessage\").html('<span class=\"message_error\">Error when trying to call server.</span>');\n\t\t\tenableButtons();\n\t\t});\n\t}", "function callFunctions(first, second) {\r\n closeOther(first);\r\n toggleCurrent(second);\r\n updateParentHeight(second);\r\n }", "function _CallReadyList(){\r\n\t\t\r\n\t\tfor(var i=0,l=_ReadyList.length; i<l; ++i){\r\n\t\t\t_ReadyList[i].call(this);\r\n\t\t}\r\n\t\t\r\n\t}", "function process()\r\n{\r\n\ttry\r\n\t{\r\n\t\tgetItems();\t\t\t\t\t\t\t\t//calling getItems function\r\n\t\t\r\n\t\tgetShippingDestinations();\t\t\t\t//calling getShippingDestinations function\r\n\t\t\r\n\t\tgetAndSetSellingPriceforEachItem();\t\t//calling getAndSetSellingPriceforEachItem function\r\n\t}\r\n\tcatch(e)\r\n\t{\r\n\r\n\t\terrorHandler(\"process : \" , e);\r\n\t} \r\n\r\n\r\n}", "transient protected internal function m189() {}", "function ______MA_Query() {}", "constructor() {\n this.TAG = 'Call';\n this.MAP = [\n 'timeStamp',\n 'typeCall',\n 'profile_image',\n 'targetName',\n 'keepAlive',\n 'isLeader',\n 'name',\n 'id_user',\n 'sessionId',\n 'deviceCallId',\n 'target',\n 'videoHours',\n 'agoraIoSupport',\n 'agoraIoSupportReturn',\n ];\n\n this.isIncomingCall = this.isIncomingCall.bind(this);\n }", "function functionDelegator() {\n colorCalc();\n showColors();\n displayHex();\n displayRGB();\n displayHSL();\n}", "myBestMethod(){\n\n }", "function testingMSGS(){\n \n}", "loadData() {\n\n }", "function main() {\n getAllDancers()\n getSingleDancer(1).then(renderDancer)\n likeUnlike()\n feedbackForm()\n}", "function main() {\n addEventListeners();\n fetchListOfCurrencies();\n }", "function main(){\n\n\n}", "function wdCall() {\n this.requestStatus();\n }", "CallbackHell()\n {\n\n }", "function main() {\n doCbaam()\n doEcb()\n updateGraphFile()\n}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}" ]
[ "0.6387829", "0.6243718", "0.61963904", "0.60801286", "0.6041381", "0.6028061", "0.5999504", "0.5951649", "0.5945321", "0.59081453", "0.59010345", "0.58895284", "0.58113235", "0.5805655", "0.5796284", "0.5785626", "0.5783551", "0.5757754", "0.57479", "0.57309294", "0.5724948", "0.57059646", "0.56905085", "0.5670466", "0.5669772", "0.56696916", "0.5664877", "0.56619835", "0.5644218", "0.5640285", "0.5637039", "0.563567", "0.5625973", "0.56200397", "0.56182736", "0.56176704", "0.55980396", "0.55910766", "0.559024", "0.5581084", "0.5564463", "0.55579275", "0.5555497", "0.5550235", "0.5550235", "0.5549671", "0.5548293", "0.5548293", "0.5548293", "0.5541673", "0.5536446", "0.5536446", "0.5536446", "0.55341196", "0.55273736", "0.55234396", "0.5516663", "0.55062747", "0.5503518", "0.550154", "0.5499368", "0.5495289", "0.5487742", "0.5486953", "0.54799443", "0.5471662", "0.54693496", "0.5458426", "0.54578984", "0.54564625", "0.54554975", "0.54543126", "0.5450029", "0.54497004", "0.54494834", "0.54494834", "0.5442562", "0.5439717", "0.54280764", "0.5420805", "0.5420343", "0.54187983", "0.5418653", "0.54171956", "0.54134357", "0.54100376", "0.5390723", "0.53857046", "0.5382535", "0.5382061", "0.5381493", "0.5377035", "0.5376816", "0.53724015", "0.53713876", "0.5371299", "0.53708005", "0.5366568", "0.5366568", "0.5366568", "0.5366568" ]
0.0
-1
ALL the End Functions: when user clicked end button
function endFunc(){ var result = confirm("Are you sure you want to exit the chat?"); if(result){ endConversation(); document.getElementById("body").innerHTML = ` <html> <head> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> <link rel="stylesheet" type="text/css" href="chat.css"> <title>Thank You</title> </head> <body id = "body"> <div class = "row"> <div class="mx-auto" style="width: 200px;"> <div class="mb-5"> <h1 class="text-center" >Thank You!</h1><br> <p class="text-center" > We hope that we have been of assistance to you!</p> </div> </div> </div> </body> `; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endEvent(){}", "end(event) {\n\n }", "end(){\n this.request({\"component\":this.component,\"method\":\"end\",\"args\":[\"\"]})\n this.running = false\n }", "function endEarlyButton() {\n endEarlyDetails();\n}", "function handleEnd(){\n if ((tracksBtn.value === 'playing') && !unpause){\n tracksBtn.value = 'paused';\n tracksBtn.innerHTML = 'Play';\n if(gl){\n endVisualizations();\n }\n }\n}", "function handleEndGame() {\n\n}", "function endCT(){\n // HERE ADD YOUR CODE\n \n return false;\n }", "function handleEndQuiz() {\n $('main').on('click', '.js-end-button', (event) => {\n store.score = 0;\n store.questionNumber = 0;\n store.quizStarted = false;\n renderQuizScreen();\n });\n}", "function end(){\n return end;\n}", "function end_game_flow () {\n\t// console.log(\"end...\");\n\t// block all the event to gems\n\tthis.backgroundView.updateOpts({\n\t\tblockEvents: true\n\t});\n\t// disable scoreboard\n\tthis._scoreboard.updateOpts({\n\t\tvisible: false\n\t});\n\t// show end screen\n\tthis._endheader.updateOpts({\n\t\tvisible: true,\n\t\tcanHandleEvents: true\n\t});\n\tanimate(this._endheader).wait(800).then({y: 0}, 100, animate.easeIn).then({y: 35}, 1000, animate.easeIn);\n\n\t// show score\n\tvar scoreText = new TextView({\n\t\tsuperview: this._endheader,\n\t\tx: 0,\n\t\ty: 35, // endscreen animate end point\n\t\twidth: 350,\n\t\theight: 233,\n\t\tautoSize: true,\n\t\ttext: \"You achieved \" + score.toString(),\n\t\tsize: 38,\n\t\tverticalAlign: 'middle',\n\t\thorizontalAlign: 'center',\n\t\tcanHandleEvents: false\n\t});\n\t// //slight delay before allowing a tap reset\n\tsetTimeout(emit_endgame_event.bind(this), 2000);\n\tconsole.log('end game flow.. \\n');\n}", "_endButtonPressed() {\n this._broadcast(MESSAGE_TYPES.PILL_END_PRESSED, this.get('pillData'));\n }", "end () {\n require('./actions/end')(this)\n }", "onEnd() {\n\t\tthis.debug('onEnd');\n\t}", "function end() {\n game.end();\n console.log('End!!, thank you for playing');\n }", "_onEnd() {}", "function gameEnd(){\n if (answer === \"end\") {\n stopTimer();\n showResetBtn();\n $(\"#timer-box, #question\").hide();\n $(\"#results\").show();\n $(\"#incorrect\").text(incorrect);\n $(\"#unanswered\").text(unanswered);\n index = 0;\n tweet = tweetArray[index].tweet;\n answer = tweetArray[index].answer;\n }\n }", "function endQuiz() {\n\n // clear page\n clearPage();\n\n // replace start button\n $(\"#start-button\").append(\"<button>Click here to try again!</button>\");\n\n // show user how they did\n quizQuestion.append(\"<div>Correct Guesses: \" + correctGuesses + \"</div>\");\n quizQuestion.append(\"<div>Incorrect Guesses: \" + (questions.length - correctGuesses) + \"</div>\");\n\n }", "function showEnd(){\n console.log(\"End\")\n}", "end() {\n this.log('end');\n }", "async onEnd() {\n\t\tawait this.say('Exiting...');\n\t}", "function endOfGame() {\n\tcreatesMensg();\n\tstopTime();\n\tshowModal();\n}", "endScript() {\r\n this._endScript = true;\r\n }", "end() {\n\t\tthis.Vars._Status = strings.getString(\"Terms.ShuttingDown\")\n\t\tthis.Vars._event = 'ShuttingDown'\n\t\tthis.Vars._displayStatusMessage = true\n\t\tupdateSession(this.ID)\n\t\tthis.Session.stdin.write('\\nshutdown\\n');\n\t}", "function end(){\n Manager.clearGame();\n changeState(gameConfig.GAME_STATE_START_SCENE);\n}", "function endGame() {\n \n}", "function endGame(){\n if(trivia[currentQAndA] === (trivia.length)){\n stop();\n \n $(\".quiz\").html(\"<h1>\" + 'Done!' + \"</h1>\")\n }\n else{\n loading();\n }\n }", "function endQuiz() {\n //calculate final score\n score = Math.max((timer * 10).toFixed(), 0);\n timer = 0;\n $timer.text(\"Timer: \" + timer.toFixed(1));\n //stop the timer\n clearInterval(interval);\n //write the end message, buttons, and scores\n setEndDOM();\n }", "onEnd(state) {\n this.status = 'answered';\n\n // Rerender prompt (and clean subline error)\n this.render();\n\n this.screen.done();\n cliCursor.show();\n this.done(state.value);\n }", "onEnd(state) {\n this.status = 'answered';\n\n // Rerender prompt (and clean subline error)\n this.render();\n\n this.screen.done();\n cliCursor.show();\n this.done(state.value);\n }", "end() {\n }", "end() {\n }", "end() {\n this.endZoomInMode();\n this.endHandMode();\n }", "function sectionEnd()\r\n{\r\n\tvar end_action=media_data[current].end;\r\n\tconsole.log(\"section End Action: \"+end_action);\r\n\tswitch(end_action)\r\n\t{\r\n\t\tcase \"next\":\r\n\t\t\tarrowDown();\r\n\t\tbreak;\r\n\t\tcase \"loop\":\r\n\t\t\tstartSection();\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tconsole.log(\"unknown section End Action: \"+end_action);\r\n\t}\r\n}", "end() {\n this.isOver = true;\n this.isRunning = false;\n\n if (typeof this.onGameOver === 'function') {\n this.onGameOver();\n }\n }", "endGameAction() {\n\n }", "function endGame() {\n // Overlay\n // Show score\n // Show table \n // Give user chance to restart\n // TODO: add high score to renderGUI\n\n uploadScore(score);\n score = 0;\n}", "end() {\n this.cancel();\n this.callback();\n }", "function end () {\n //the page goes white\n $('body').css({\n backgroundColor: 'white',\n });\n $('#canvas').css({\n visibility: 'hidden',\n });\n\n //the final package downloads\n window.open('https://whogotnibs.github.io/dart450/assignment02/downloads/package03.zip', '_blank');\n\n //the game functions stop running\n end = true;\n\n //the music stops\n Gibber.clear();\n}", "function endOfGame() {\n\t\t$('.timeRemaining').html('<div class=\"text-center\"> Sports Trivia Over </div>'); //changing time stamp to Game Over\t\t\n\t\t$('.questionInfo').empty(); //emptying info about question\n\t\t$('#answerImage').attr('src',\"\"); //taking out image from final score\n\t\t$('.questionsRemaining').html('<div class=\"text-center\"> Sports Trivia Over </div>'); //changing questions # counter to Game over\n\n\t\t//gmae scores\n\t\t$('.questionShowBox').append('<div class=\"text-center score\">You answered ' + correctAnswers + ' questions correctly.</div>');\n\t\t$('.questionShowBox').append('<div class=\"text-center score\">You answered ' + wrongAnswers + ' questions incorrectly.</div>');\n\t\t$('.questionShowBox').append('<div class=\"text-center score\">You did not answer ' + unanswered + ' questions.</div>');\n\n\t\t// adding reset button and its click fucntions\n\t\t$('.questionShowBox').append('<div><button class=\"startGame\"> Play Again</button></div>');\n\t\t$('.startGame').click(function(){\n\t\t\tRestartGame();\n\t\t});\n\t}", "finish(){\n model.stat.timer.stop();\n alert(model.algorithm.getCurrStep().description+' '+model.algorithm.getCurrStep().help);\n\t\tdocument.getElementById('nextBtn').disabled=true;\n\t\tdocument.getElementById('autoRunBtn').disabled=true;\n }", "function endquiz() {\n submitButton.hide();\n $(\"#quiz\").hide();\n $(\"#timer\").hide();\n stop();\n }", "function endGame() {\n $('.home').css({ 'margin-top': '0px' });\n disappear('.instructions');\n hide('.view-button');\n disappear('.follow-circle');\n disappear('.instructions');\n state = \"view\";\n }", "function end(){\n alert('Game over \\nYou reached level '+counter);\n bord.hidden = true;\n cumputerTurn = true;\n buttonDisplay = 0;\n userClicked = false;\n randomData=[];\n userCounter = 0;\n counter = 1;\n gameStart.hidden = false;\n bord.hidden = true;\n start = false;\n}", "function onEnd() {\n\n // reset the offsets\n stickyOffset = 0;\n\n if(pointer) {\n // if we have a pointer reference\n\n // update all the elements in the DOM\n setPointers();\n adjustBubbles();\n\n // the pointer is no longer active\n pointer.removeClass('active');\n\n if (scope.onEndFn) {\n scope.onEndFn();\n }\n }\n\n // reset the references\n pointer = null;\n ref = null;\n\n }", "function end() {\n focusInput();\n updateInput = true;\n move(); up();\n }", "function end() {\n focusInput();\n updateInput = true;\n move(); up();\n }", "function endGame() {\n //exit to the main menu w/o saving\n gameStart = false; //set flag to false\n TimeMe.resetAllRecordedPageTimes(); //reset timer\n clearInterval(handle); //clear score, time, intervals\n clearInterval(spawn);\n clearInterval(addp);\n clearInterval(addb);\n\n handle = 0;\n spawn = 0;\n addp = 0;\n addb = 0;\n score = 0;\n powerUpScore = 0;\n time = 0;\n $(\"#gameOver\").hide(); //hide game over menu and show main menu\n menu();\n }", "end() { }", "function quizEnd() {\n\n //display quiz stats and creates restart button\n $(\"#quiz\").html('<h3 id=\"question\">Behold your statistics:</h3>' + '<p>' + correct + '</p>' + '<p>' + incorrect + '</p>' + '<button type=\"button\" class=\"btn btn-default btn-lg btn-block\" id=\"restart\">Click to be reborn</button>');\n\n //if all correct/incorrect\n if (correct === 5) {\n $(\"#quiz\").append(\"<h1>Your knowledge may be vast, but it cannot save you.</h1>\");\n }\n else if (incorrect === 5) {\n $(\"#quiz\").append(\"<h1>This disappointment shall prepare you well for eternity.</h1>\");\n }\n //click handler to start quiz over\n $(\"#restart\").click(startQuiz);\n }", "function end(){\n inquirer.prompt({\n name: \"endScreen\",\n type: \"list\",\n message: \"What would you like to do now?\",\n choices: [\n \"continue shopping\",\n \"quit\"\n ]\n }).then(function(answer){\n if(answer.endScreen === \"continue shopping\"){\n storefront();\n } else {\n process.exit();\n };\n });\n}", "endGame(){\n score.addToScore(this.result, 'somejsontoken');\n this.scene.pause();\n const sceneEnd = this.scene.get('end');\n sceneEnd.scene.start();\n //this.scene.add(\"end\", new End(this.result));\n }", "function end() {\n stopTime();\n promptText.innerText = \"Test Complete\";\n pegDisplay.classList.add(\"gone\");\n homeButton.classList.remove(\"gone\");\n resultsButton.classList.remove(\"gone\");\n}", "function endGame() {\n //Update UI\n const winner = document.getElementById(`player${logic.getActivePlayer()}-name`);\n winner.innerText = 'WINNER';\n logic.getActivePlayer() === 1 ? score0++ : score1++;\n displayScores();\n gameFieldsEl.forEach(el => el.style.cursor = 'default');\n //Remove game board event listener\n gameBoardEl.removeEventListener('click', makeMove);\n }", "function endEdit(){\n // Reset task form and update UI\n displayTaskForm();\n updateUI()\n}", "function endQuiz() {\n\t\t//fix button state\n\t\tvar button = buttonControl;\n\t\tbutton.value=\"Score\";\n\t\tbutton.disabled=false;\n\t\tbuttonUndo.setAttribute(\"disabled\",\"true\");\n\t\tbuttonUndo.setAttribute(\"display\",\"none\");\n\n\t\t//lock all term widgets\n\t\tvar terms = document.getElementsByClassName(\"termWidget\");\n\t\tfor (var i = 0; i < terms.length; i++) {\n\t\t\tterms[i].draggable = false;\n\t\t}\n\n\t\t//end timer\n\t\tclearInterval(timerInterval);\n\t}", "function endRoutine() {\n // hides the quizContent\n quizContent.setAttribute(\"style\", \"display:none\")\n // shows the endContent\n endContent.setAttribute(\"style\", \"display:flex\")\n\n // Also shows the timeRemaining as the user's score\n remainingTimeDisplay.textContent = timeRemaining;\n\n // Putting the event listener here so that way it's only active\n // when the endRoutine function is active and the button is showing.\n // When the submit button is pressed, run submitHighScores.\n submitButton.addEventListener(\"click\", submitHighScores);\n}", "function onEnding() {\n player.stop();\n\n Messages.messageReceived.disconnect(onMessageReceived);\n Messages.unsubscribe(ASSIGNMENT_MANAGER_CHANNEL);\n }", "function endCountdown() {\n // logic to finish the countdown here\n $('.begin').hide();\n beginGame()\n }", "function end(){\n //window.alert(\"clicked the x\");\n var el = document.getElementById(\"not\");\n el.style.display = 'none';\n }", "function scriptEnding() {\n // re-enabled the standard application for touch events\n Controller.releaseJoystick(THRUST_CONTROLLER);\n Controller.releaseJoystick(VIEW_CONTROLLER);\n}", "function sendEndEvent(globals) {\n updateTimers();\n if (globals.lastProbType == '')\n return;\n else if (globals.lastProbType == HTML_PROB_TYPE || globals.lastProbType == FLASH_PROB_TYPE )\n {\n isExample = isDemoOrExampleMode()\n servletGetWait(\"EndProblem\",{probId: globals.lastProbId, probElapsedTime: globals.probElapsedTime, clickTime: globals.clickTime, isExample: isExample},processEndProblem);\n }\n else if (globals.lastProbType === TOPIC_INTRO_PROB_TYPE)\n ; // Topic Intros are no longer problems and thus we don't need to end them\n else\n servletGetWait(\"EndExternalActivity\", {xactId: globals.lastProbId, clickTime: globals.clickTime, probElapsedTime: globals.probElapsedTime});\n\n\n}", "onMessageEnd() { }", "function endCT(){\n // \n alert(\"O TEMPO ACABOU!!!\");\n return false;\n }", "function end() {\n \tcreditsLoopOn = false;\n \tcreditsAbort();\n }", "endUpdate() {\r\n\r\n }", "function endGame() {\n resetMainContainer();\n loadTemplate(\"result\", displayResults);\n}", "function endOfGame(){\n\tgameDeck.style.display = 'none';\n\tfinalScreen.style.display = 'initial';\n\tplayAgainButton.style.display = 'initial';\n\t\n\t// Display the score at the end of the game\n\tscoreMes.innerHTML = \"- with \" + movesNo + \" moves and \" + starsNo + \" stars -\";\n\n\t// Stop time counter\n\tclearInterval(myInterval);\n\n\tplayAgainButton.addEventListener('click', replay, false);\n}", "function endPlay() {\n\n}", "function emit_endgame_event () {\n\tthis.once('InputSelect', function () {\n\t\tthis.emit('gamescreen:end');\n\t\treset_game.call(this);\n\t});\n}", "function endgame() {\n inquirer\n //ask if the user would like to continue via a y or n prompt \n .prompt({\n name: \"continue\",\n type: \"confirm\",\n message: \"Would you like to order more beans?\",\n })\n .then(function(answer) {\n // based on their answer, either run queryBeans function (i.e. start over) or end the connection and exit the app\n if (answer.continue === true) {\n queryBeans();\n }\n else{\n connection.end();\n return;\n }\n });\n }", "function maybeExit() {\n\t// 'this' here is Controller instance\n\tif ( this.get( 'select' ) && this.get( 'start' ) ) {\n\t\tstopEvent();\n\t\tsceneBack();\n\t}\n}", "function onEnd() {\n //console.log('' + this);\n scope.emit('end', this);\n }", "function End() {\n //calculating duration\n duration = new Date().getTime() - timeStart;\n //adding time to array\n AddToBestTime(duration); \n //clearing intervals and timeout\n clearInterval(foodInterval);\n clearInterval(healthInterval);\n clearTimeout(winTimeout);\n //setting clicked to false\n clicked = false;\n //setting levels and amounts to default values\n levels = [100, 100];\n amounts = [0, 0];\n goldAmount = 0;\n}", "function endScreen() {\n clearScreen();\n var allDone = $(\"<h2>\").text(\"All done, here's how you did!\");\n var correct = $(\"<h3>\").text(\"Correct Answers: \" + correctNumber);\n var incorrect = $(\"<h3>\").text(\"Incorrect Answers: \" + incorrectNumber);\n var unanswered = $(\"<h3>\").text(\"Unanswered: \" + unansweredNumber);\n var resetBtn = $(\"<button>\").text(\"Play Again!\");\n allDone.attr({ id: \"all-done\", class: \"animated fadeInUp\" });\n correct.attr({ id: \"correct-number\", class: \"animated fadeInUp\" });\n incorrect.attr({ id: \"incorrect-number\", class: \"animated fadeInUp\" });\n unanswered.attr({ id: \"unanswered-number\", class: \"animated fadeInUp\" });\n resetBtn.attr({\n id: \"reset-btn\",\n class: \"btn btn-light animated fadeInUp\"\n });\n $(\"#question-section\").append(allDone);\n $(\"#answers-section\").append(correct, incorrect, unanswered);\n $(\"#btn-section\").append(resetBtn);\n }", "function endSala() {\r\n\tgame.endSala();\r\n}", "function end() {\n stopProgressInfo();\n cancelAllJobs();\n if (fromDate) {\n clock.uninstall();\n }\n if (!isEnded) {\n isEnded = true;\n emitEnd();\n }\n}", "function end() {\n result.innerHTML = \"you got a score of \" + score;\n saveInitials.style.visibility = \"visible\";\n clock.innerHTML = \"\";\n form1.style.visibility = \"hidden\";\n clearTimer();\n}", "function endScreen(){\n toggleModalOn();\n var newGameSelector = document.getElementById('modal-new-game');\n var modalCancel = document.getElementById('modal-cancel');\n \n newGameSelector.addEventListener('click', event=>{\n toggleModalOff();\n newGame();\n })\n \n modalCancel.addEventListener('click', event =>{\n toggleModalOff();\n })\n \n}", "end () {\n this.html.classList.remove(Action.RUNNING_CLASS);\n\n const effect = {\n action: this.data,\n people: this.owner,\n };\n const data = this.mergeWithOption(this.chosenOptionId);\n this.chosenOptionId = null;\n\n this.owner.finishAction();\n\n // Effect\n if (Utils.isFunction(this.data.effect)) {\n this.data.effect(this, data, effect);\n }\n\n const result = this.resolveAction(effect, data);\n\n // Give\n if (result.give.length) {\n MessageBus.notify(MessageBus.MSG_TYPES.GIVE, {\n give: result.give,\n initiator: this,\n });\n }\n\n // Unlock for all\n if (result.unlock.forAll.length) {\n // add to all\n MessageBus.notify(MessageBus.MSG_TYPES.UNLOCK, result.unlock.forAll);\n }\n // add to owner\n this.owner.addAction(result.unlock.forOne);\n\n // Lock for all\n if (result.lock.forAll.length) {\n // lock to all\n MessageBus.notify(MessageBus.MSG_TYPES.LOCK, result.lock.forAll);\n }\n // lock to owner\n this.owner.lockAction(result.lock.forOne);\n\n // Build\n if (result.build) {\n MessageBus.notify(MessageBus.MSG_TYPES.BUILD, result.build);\n }\n\n MessageBus.notify(MessageBus.MSG_TYPES.ACTION_END, result.log);\n }", "function end(event, Dt, Op) {\n\n // The handle is no longer active, so remove the class.\n if (Dt.handles.length === 1) {\n Dt.handles[0].data('grab').removeClass(clsList[4]);\n }\n\n // Remove cursor styles and text-selection events bound to the body.\n if (event.cursor) {\n body.css('cursor', '').off(namespace);\n }\n\n // Unbind the move and end events, which are added on 'start'.\n doc.off(namespace);\n\n // Trigger the change event.\n Dt.target.removeClass(clsList[14] + ' ' + clsList[20]).change();\n\n // Trigger the 'end' callback.\n call(Op['set'], Dt.target);\n }", "function end() {\n\tshowResult();\n\toutputData.userFinalValue = userCurrentValue;\n\toutputData.marketFinalValue = marketCurrentValue;\n\toutputData.totalTrades = totalTrades;\n\tfinalData = JSON.stringify(outputData);\n\t$.ajax({\n type:'post',\n url: 'echo.py',\n data: {json: finalData},\n });\n}", "function end() {\n document.getElementById(\"quitOverlay\").style.display = \"block\";\n document.getElementById(\"main\").style.display = \"none\";\n document.getElementById(\"hide\").style.display = \"none\";\n document.getElementById(\"memo\").style.display = \"none\";\n document.getElementById(\"start\").style.display = \"none\";\n document.getElementById(\"quitOverlay\").style.background = 'none';\n document.getElementById(\"quitOverlay\").style.backgroundImage = 'url(\"paw-print-941498_1920.jpg\")';\n}", "function endGame() {\n console.log(\"game ended\");\n\n // clear timer and result\n $(\"#timer\").empty();\n $(\"#result\").empty();\n\n // show final scores\n $(\"#result\").append(\"<h2>GAME OVER! <h2>\");\n $(\"#result\").append(\"Number correct: \" + numAnsRight);\n $(\"#result\").append(\"<BR>Number wrong: \" + numAnsWrong);\n $(\"#result\").append(\"<BR> Number timed out: \" + numTimedOut);\n\n // show button to restart game\n $(\"#restart-btn\").show();\n }", "onFocusExit() { }", "function adbpEndSlateClick() {\n\ttry {\n\t\ttrackMetrics({ \n\t\t\ttype: \"endslate-click\", \n\t\t\tdata: {}\n\t\t}); \n\t} catch(e){}\n}", "exitCommandEnd(ctx) {\n\t}", "function endGame() {\n stop();\n $(\"form\").hide();\n $(\"#endresults\").show();\n $(\"#correct\").text(\"Correct: \" + correct);\n $(\"#incorrect\").text(\"Incorrect: \" + incorrect);\n $(\"#unanswered\").text(\"Unanswered questions: \" + unanswered);\n $(\"#results\").text(\"Cool! Here is your final score!\");\n $(\"#reset\").show();\n }", "function endGame()\n {\n // Displays the game over message, number of questions answered correctly, and number of questions answered incorrectly in the console for debugging purposes\n console.log(\"Game over!\")\n console.log(\"Correct Answers: \" + correctCount);\n console.log(\"Wrong Answers: \" + wrongCount);\n\n // Updates the DOM with the game over message, number of questions answered correctly, and number of questions answered incorrectly\n $(\"#timer-label\").hide();\n $(\"#timer\").text(\"Game over!\");\n $(\"#question2\").text(\"Wrong Answers: \" + wrongCount);\n $(\"#question\").text(\"Correct Answers: \" + correctCount);\n $(\"#question2\").show();\n $(\"#question2\").text(\"Wrong Answers: \" + wrongCount);\n $(\"#answers-div\").hide();\n\n // Updates the DOM with play again button so the player can start the game again\n $(\"#play-again-button\").show();\n\n }", "function end() {\n\tsetTimeout(function () {\n\t\t$(\"#stage\").fadeOut();\n\t}, normalpause);\n\n\t$('#finished').append($('<p style=\"font-size:35px\">' + data.subject_id + '</p>'));\n\n\tshowSlide(\"finished\");\n\tdocument.body.style.background = \"black\";\n\t// upload_to_dropbox();\n}", "function endGame() {\n clearInterval(scorePanel.intervalManager);\n showCongratulationModal();\n}", "function endQuiz(){\n $(stage).append(\n '<div class=\"questionText\">You have finished the quiz!<br><br>Total questions:'\n +num+'<br>Correct answers: '+score+'</div>'\n );\n }", "function endGame() {\n dingSFX.play();\n speak(lineEndGame);\n boxWrite(boxTextEndGame);\n gameState = 20;\n}", "function atEnd() {\n\n iEventID = ''; // cannot re-use this event\n // If there are any dates in the Array left, we need a new EventID\n if (stDate.length > 0) {\n // Lets see if there are no mre eventIDs to use\n if (eventArray.length == 0) {\n // process any more dates as New Repeat Entries\n preExistEvent = false;\n }\n setTimeout(function () {\n NextEvent();\n }, 200);\n } else {\n //if there are eventIDs left, we need to delete them\n if (eventArray.length > 0) {\n iEventID = eventArray.shift();\n deleteNextEvent();\n } else {\n // If no dates are left,\n // enable all fields $('#popupDeleteEvent').popup('close');\n\n $('#buttonCancel, #buttonSubmit', iPage).button('enable');\n }\n }\n\n}", "function endReached() {\n stopDriving();\n updateProgressBar(0);\n showInstruction(\"You have reached your destination\");\n document.getElementById(\"step\" + selectedStep).style.backgroundColor = \"white\";\n selectedStep = null;\n }", "function onEnd() {\n\t\t\tif ( ++counter === total ) {\n\t\t\t\tif ( clbk ) {\n\t\t\t\t\tclbk();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function gameEnd(){\n questionsEl.className = \"hide\";\n gameEnd.className = \"show\";\n }", "function endPhase(reason) {\n\t\t\n\t\tfinalScore = Math.round((totalCorrect / (totalQuestions)) * 100);\n\t\t$(\".submitBtn\").addClass(\"on\").removeClass(\"active correct incorrect\").text(\"FINAL SCORE : \" + finalScore + \"% CLICK TO SAVE\").focus().off();\n\t\t$(\".answerBtn\").removeClass(\"on active correct incorrect\").off();\n\n\t\tif (reason === \"complete\") {\n\n\t\t\t$(\".question\").text(\"Examination Complete!\");\n\t\t\t$(\".four\").text(totalIncorrect).addClass(\"incorrect\");\n\t\t\tsounds.complete();\n\n\t\t}\n\n\t\tif (reason === \"timeUp\") {\n\n\t\t\t$(\".question\").text(\"TIME EXPIRED. GAME OVER.\");\n\t\t\t$(\".four\").text(totalIncorrect).addClass(\"incorrect\").append($(\"<div id='unanswered'>\").text(\" (\" + (totalQuestions - (totalCorrect + totalIncorrect)) + \" unanswered)\"));\n\n\t\t}\n\t\t\n\t\t$(\".one\").text(\"Total Correct\").addClass(\"correct smaller\");\n\t\t$(\".two\").text(\"Total Incorrect\").addClass(\"incorrect smaller\");\n\t\t$(\".three\").text(totalCorrect).addClass(\"correct\");\n\t\tclearInterval(quizInterval);\n\t\t$(\".submitBtn\").click(getName);\n\n\t}", "function end ( event ) {\n\n\t\t// The handle is no longer active, so remove the class.\n\t\t$('.' + Classes[15]).removeClass(Classes[15]);\n\n\t\t// Remove cursor styles and text-selection events bound to the body.\n\t\tif ( event.cursor ) {\n\t\t\t$('body').css('cursor', '').off( namespace );\n\t\t}\n\n\t\t// Unbind the move and end events, which are added on 'start'.\n\t\tdoc.off( namespace );\n\n\t\t// Remove dragging class.\n\t\t$Target.removeClass(Classes[12]);\n\n\t\t// Fire the change and set events.\n\t\tfireEvents(['set', 'change']);\n\t}", "function endCurrentCall() {\n\n}", "function endCondition_outOfTime() {\n outOfTime_count++;\n let headingText = \"Out of Time\";\n let giveDetails = \"The correct answer was:\";\n callModal(headingText, giveDetails);\n }", "function theEnd() {\n console.log(\"This is the end!\");\n}" ]
[ "0.7851226", "0.7632989", "0.758429", "0.7320415", "0.720986", "0.7144952", "0.7105768", "0.701245", "0.69884366", "0.6911069", "0.6901466", "0.6843886", "0.68260735", "0.681316", "0.6802625", "0.6797743", "0.6794221", "0.67759514", "0.67591107", "0.67539173", "0.6721428", "0.6702455", "0.669617", "0.6667523", "0.6623411", "0.6616074", "0.6604795", "0.66037256", "0.66037256", "0.65998036", "0.65998036", "0.6593506", "0.6577506", "0.6572716", "0.6559118", "0.6556285", "0.65542316", "0.65440875", "0.6530001", "0.6528588", "0.65252954", "0.651932", "0.6506948", "0.6500673", "0.6494997", "0.6494997", "0.6494618", "0.64933676", "0.6492435", "0.64654326", "0.64650863", "0.6458252", "0.645043", "0.64497703", "0.64468384", "0.6446558", "0.64463377", "0.64423347", "0.64383316", "0.64378196", "0.64350194", "0.6433829", "0.642932", "0.64284897", "0.6428363", "0.642517", "0.6416361", "0.6413256", "0.64028317", "0.64023113", "0.6388796", "0.6385279", "0.63830835", "0.63804513", "0.6375811", "0.6375275", "0.63727367", "0.6372444", "0.63690853", "0.6369035", "0.6366124", "0.63658863", "0.6364343", "0.6362887", "0.6360867", "0.6350529", "0.6349055", "0.6343384", "0.63388956", "0.633761", "0.633537", "0.6334723", "0.633274", "0.6327441", "0.6322548", "0.6321067", "0.6318109", "0.63164437", "0.6315146", "0.63107044", "0.6309817" ]
0.0
-1
unhighlight is used for controlling what happens when a message is supposed to appear next to an input. In this case : remove class haserror from css bootstrap and fill the helpblock class with nothing inside.
function submitForm() { $.ajax({ url: 'actions/ajax/register.php', type: 'POST', data: $('#register-form').serialize(), // Data are persist and contain in "data" dataType: 'json' }) .done(function (data) { $('#btn-signup').html('<img src="img/loader/ajax-loader.gif" /> &nbsp; signing up...').prop('disabled', true); // Loading gif. $('input[type=text],input[type=password]').prop('disabled', true); // Disable the input text, email and password setTimeout(function () { if (data.status === 'success') { $('#register_result').slideDown('fast', function () { $('#register_result').html('<div class="alert alert-info">' + data.message + '</div>'); // Show the $response['message'] from the actions/ajax/register.php file. $("#register-form").trigger('reset'); // Reset the form $('input[type=text],input[type=password]').prop('disabled', false); // Enable the input text, email, password $('#btn-signup').html('Submit').prop('disabled', false); }).delay(5000).slideUp('fast'); // Hide the $response['message'] after 10 secondes. window.setTimeout(function () { location.reload() }, 6500); // Reload page after a certain delay. } else { $('#register_result').slideDown('fast', function () { $('#register_result').html('<div class="alert alert-danger">' + data.message + '</div>'); const current = 1; const widget = $(".step"); $("#register-form").trigger('reset'); widget.show(); widget.not(':eq(0)').hide(); widget.find('#error').each(function () { $(this).html(''); }); $('#register-form').find('input[name="current_form_step"]').val(1); setProgress(current); hideButtons(current); $('input[type=text],input[type=password]').prop('disabled', false); $('#btn-signup').html('Submit').prop('disabled', false); }).delay(3000).slideUp('fast'); } }, 3000); }) .fail(function () { alert('An error occured, please contact the admin for further support.'); const current = 1; const widget = $(".step"); $("#register-form").trigger('reset'); widget.show(); widget.not(':eq(0)').hide(); widget.find('#error').each(function() { $(this).html(''); }); $('#register-form').find('input[name="current_form_step"]').val(1); setProgress(current); hideButtons(current); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeErrorHint(element) {\n element.classList.remove(\"error\")\n}", "applyErrorStyle() {\n this.nodes.inputHolder.classList.add(this.CSS.inputError);\n this.nodes.progress.remove();\n }", "function removeMessage(){\n var errorinput = document.querySelectorAll(\"wrong-input\");\n [].forEach.call(errorinput,function(el){\n el.classList.remove(\"wrong-input\");\n });\n\n var errorpara = document.querySelectorAll(\".error\");\n [].forEach.call(errorpara, function(el){\n el.innerHTML=\"\";\n })\n \n}", "function inputClearError()\n {\n input.removeClass('mt-error');\n }", "removeErrorStyle() {\n this.nodes.inputHolder.classList.remove(this.CSS.inputError);\n this.nodes.inputHolder.insertBefore(this.nodes.progress, this.nodes.input);\n }", "function removeErrorStyles(input) {\n input.classList.remove('error-input');\n if (input.classList.contains('range')) {\n errorBoxes[0].style.display = 'none';\n document.querySelector('#update-button').classList.remove('flash-button');\n }\n if (input.classList.contains('input-first-row')) {\n errorBoxes[1].style.display = 'none';\n document.querySelector('#submit-button').classList.remove('flash-button');\n }\n if (input.classList.contains('input-second-row')) {\n errorBoxes[2].style.display = 'none';\n document.querySelector('#submit-button').classList.remove('flash-button');\n }\n}", "function resetError(){\n\t\t$('label.error').hide();\n\t\t$('div.form-group').removeClass('has-error');\n\t}", "function cleanNewGradeAlertFormError(){\n $('#formNewAlertGrade #name_new_grade').closest('div').removeClass('has-error');\n $('#formNewAlertGrade #name_new_grade').closest('div').find('span').filter('.help-block').remove();\n}", "function resetErrorMsgElement() {\n $(\"#messages\").removeAttr(\"class\").empty();\n}", "function clearError() {\n return o.term.removeClass('error').attr('placeholder', '');\n }", "function removeErrorDisplay(el) {\n\t\tvar parentEl = el.parentElement;\n\t\tparentEl.removeAttribute('class', 'failed');\n\t\tparentEl.className += 'input-wrap passed';\n\t}", "function clearValidationPrompts() {\n $(\".has-error\").removeClass(\"has-error\");\n $(\".help-block\").remove();\n }", "function RemoveStyle() {\n $('input[type=text],input[type=password],textarea').css({ background: 'white' });\n $('#ErrorBox,#ErrorBox1,#ErrorBox2,#ErrorBox3').hide(1000);\n }", "function resetErrorMsgs(){\n const errors = form.querySelectorAll('.errMsg');\n\n for(i=0; i < errors.length; i++){\n errors[i].previousSibling.classList.remove(\"red-border\");\n errors[i].remove();\n }\n\n }", "function resetErrors() {\n$('form input, form select').removeClass('inputTxtError');\n$('label.error').remove();\n\n$('.confirm').css(\"display\",\"hidden\");\n $(\".confirm\").css(\"visibility\", \"hidden\");\n\n}", "function removeErrorMessage(id) {\n 'use strict';\n\n var span = u.$(id + \"Error\");\n if (span){span.previousSibling.previousSibling.className = null;\n span.parentNode.removeChild(span);}\n\n} // End of removeErrorMessage() function.", "_hideErrors() {\n this._form.find('.ajax_error').each((k, v) => {\n $(v).html('');\n });\n this._form.find('.has_error').each((k, v) => {\n $(v).removeClass('has_error');\n });\n }", "function removeErrors(InputField, SpanErrorField) {\n InputField.classList.replace('focus:ring-red-600', 'focus:ring-blue-600')\n InputField.classList.replace('border-red-600', 'border-blue-300')\n SpanErrorField.classList.add('hidden')\n}", "function removeInputColor(id) {\n DOC.iSel(id).className = \"form-control\"; // removes error class\n}", "function fixSyntaxHighlighting () {\n var sts = document.querySelectorAll('.err');\n Array.prototype.forEach.call(sts, function (st) {\n if (st.textContent === '`' || st.textContent === ':') {\n st.classList.remove('err');\n }\n })\n}", "function _resetErrors() {\r\n el.email_input.removeClass('error');\r\n el.email_error.text('');\r\n }", "function RemoveStyle() {\n try {\n $('input[type=text],input[type=password],textarea,select').css({ background: 'white' });\n $('#ErrorBox,#ErrorBox1,#ErrorBox2,#ErrorBox3,#ErrorBox4,#ErrorBox5').hide(1000);\n }\n catch (e) {\n\n }\n}", "function errorHandler() {\n\tdocument.getElementById(\"overlay-error\").classList.remove(\"hidden\")\n}", "function errorHandler() {\n\tdocument.getElementById(\"overlay-error\").classList.remove(\"hidden\")\n}", "function removeClass($t){\n\t\t\t\t\t\t\t$t.off('focus.removeClass').on('focus.removeClass',function(){$t.removeClass('ui-state-error')});\n\t\t\t\t\t\t\t}", "function hideError() {\n\t\t\tmessagesContainer.empty();\n\t\t\taddLanguageForm.find( '.error' ).removeClass( 'error field-in-error' );\n\t\t}", "function clearErrors() {\n document.getElementById(\"user_message\").innerHTML = \"\";\n document.getElementById(\"user_message\").classList.remove(\"error\")\n}", "unhighlightLabel(label) {\n // debugger\n // set text to display according to mode\n let text;\n if (this.state.mode === EVALUATION) {\n text = label.student_answer || DEFAULT_EVALUATION_LABEL_MESSAGE;\n } else {\n text = label.text || DEFAULT_LABEL_MESSAGE;\n }\n // set style to label\n this.setLabelStyle(label, { text, worldReferenceSize: this._.meshDiameter,\n style: this._.normalLabelStyle });\n }", "function removeWarnings() {\n $(\".auth-input\").each(function() {\n $(this).removeClass(\"invalid\")\n $(this).next().addClass(\"hidden\")\n })\n $(\"login_error\").addClass(\"hidden\")\n $(\"#login_error\").text(\"\")\n $(\"register_error\").addClass(\"hidden\")\n $(\"#register_error\").text(\"\")\n}", "function _clearErrorMessages() {\n $.each($('span[data-valmsg-for]'), function _clearSpan() {\n $(this).html(\"\");\n });\n }", "function clear_error(){\r\n\t\t$('#steps li').removeClass('error');\r\n\t}", "function removeErrorState(field){\n\tfield.removeClass(\"form-error\");\n\tfield.attr(\"placeholder\", \"\");\n}", "function inputError()\n {\n input.addClass('mt-error');\n }", "onUnhighlight() {\n const { onChangeHighlight } = this.props;\n if (onChangeHighlight) {\n onChangeHighlight(null);\n }\n }", "function errorDisplayFailed(el) {\n\t\tvar parentEl = el.parentElement;\n\t\tparentEl.removeAttribute('class', 'required')\n\t\tparentEl.className += 'input-wrap failed';\n\t}", "function handleInvalidInputStyle(inputField, i) {\n if (i.classList.contains(checkIcon)) {\n i.classList.remove(checkIcon);\n inputField.classList.remove(\"green-border\");\n }\n\n i.classList.add(errorIcon, \"red\");\n inputField.classList.add(\"red-border\");\n }", "function onResetFormClearErrors() {\n document.getElementById(\"userTask\").classList.remove(\"errorClass\");\n document.getElementById(\"userFinalDate\").classList.remove(\"errorClass\");\n displayErrorMessage(\"\");\n}", "function removeErrorMessage(id) {\n \t'use strict';\n\n // Get a reference to the span:\n var span = document.getElementById(id + 'Error');\n\tif (span) {\n \n\t // Remove the class from the label:\n\t span.previousSibling.previousSibling.className = null;\n \n\t // Remove the span:\n\t span.parentNode.removeChild(span);\n\n\t} // End of IF.\n \n} // End of removeErrorMessage() function.", "_authFailedRemove() {\n\t\tthis._tooltipPassword.classList.remove('tooltip-error');\n\t\tthis._passwordBox.classList.remove('authentication-failed');\n\t}", "function reset_highlight() {\n\t$('.imj_highlightDependencies').removeClass(\"imj_highlightDependencies\");\n}", "function resetFieldUpdateMessages() {\n var successMessages = Y.all('.' + CSS_CLASS_UPDATE_SUCCESS);\n successMessages.each(function(node) {\n node.removeClass('hidden');\n node.hide();\n });\n var errorMessages = Y.all('.' + CSS_CLASS_UPDATE_ERROR);\n errorMessages.each(function(node) {\n var message = node.one('.' + CSS_CLASS_MESSAGE);\n if (message) {\n message.setHTML('');\n }\n node.removeClass('hidden');\n node.hide();\n });\n }", "function controlClear(element) {\n var parent = element.parent();\n parent.removeClass(\"has-error\");\n parent.removeClass(\"has-success\");\n}", "static cleanErrors() {\n let fields = document.querySelectorAll(\".field\");\n for (let field of fields) {\n field.classList.remove(\"error\");\n }\n }", "function clearErrors(){\n input.value = \"\";\n msg.classList.remove('error');\n input.classList.remove('invalid');\n}", "function error(error_div,input, msg, addClass){\n $(error_div).html(msg);\n $(input).focus();\n\n if (addClass == true){\n $(input).addClass(\"warning-input-border\")\n }\n else{\n $(input).removeClass(\"warning-input-border\")\n }\n}", "function clearErrors() {\r\n\tvar address = getId('address');\r\n\taddress.style.removeProperty('background-color');\r\n}", "function hideErrorDialog() {\n $errorDialog.classList.remove('show'); \n }", "function hideValidate(input) {\r\n var thisAlert = $(input).parent();\r\n\r\n $(thisAlert).removeClass('alert-validate');\r\n }", "function clearInputError(inputElement) {\n \"use strict\";\n inputElement.classList.remove(\"form__input--error\");\n inputElement.parentElement.querySelector(\".form__input-error-message\").textContent = \"\";\n}", "function removeInputError(input) {\n let parent = $(input).parent();\n \n // Removes the error from input\n if($(parent).next().hasClass(\"error\")) {\n $(parent).next().remove();\n }\n \n removeRedShadow(input);\n}", "function clearError() {\n var error = document.querySelector('div.error');\n\n if (error.classList.contains('showError')) {\n error.classList.remove('showError');\n }\n} // CLEAR FIELD IN MODAL WINDOW 'NEW EVENT'", "function clearErrorMessages() {\n\tvar divs = getElementsByClass(\"errormsg\");\n\tfor (var i=0;i<divs.length;i++) {\n\t\tdivs[i].style.display=\"none\";\n\t\tdivs[i].innerHTML = \"\";\n\t}\n}", "function reset_element_with_errorclass(el_input, update_dict) {\n // make field red when error and reset old value after 2 seconds\n const err_class = \"border_bg_invalid\";\n el_input.classList.add(err_class);\n setTimeout(function (){\n el_input.classList.remove(err_class);\n UpdateField(el_input, update_dict);\n }, 2000);\n } // reset_element_with_errorclass", "function cancelHighlight(){\n\t\tfor(var l = 0; l < highlightTiles.length; l++){\n\t\t\thighlightTiles[l].classList.remove(\"highlight\");\n\t\t}\n\n\t\thighlightTiles = [];\n\t}", "function incorrectField(field){\n $(field).css(\"box-shadow\", \"0 0 5px rgb(255, 0, 0)\");\n $(field).addClass(\"false\");\n $(field).removeClass(\"true\");\n $(field).parent().find(\".feedback\").empty();\n }", "function unhighlight(event) {\n preventDefaults(event);\n dropArea.classList.remove('highlight');\n }", "function removeInputErrors() {\n\t$('.form-group').removeClass('has-error');\n\t$('.error').empty();\n}", "hideErrorMessage() {\n this.setState({\n isDanger: false,\n iconColor: Colors.defaultGrey\n });\n }", "function removeValMessage(identifier){\n `${identifier}Message`.innerText = \"\";\n identifier.classList.remove('invalid-field');\n identifier.classList.add('valid-field');\n}", "clearHighlight() {\n\n //TODO - your code goes here -\n }", "function hideValidate(input) {\n 'use strict';\n\n var thisAlert = $(input).parent();\n\n $(thisAlert).removeClass('validate-alert');\n}", "function _hideMessages(){\n $(errorClassContainer).hide(); \n }", "function removeValidationError(el){\n el.classList.remove('invalid');\n document.getElementById('sub-btn').disabled = false;\n}", "function controlHasError(element) {\n element.parent().addClass(\"has-error\");\n}", "function clearErrorMessage() {\n\t$(\"div.error\").each(function(index) {\n\t\t$(this).html(\"\");\n\t});\n}", "function clearValidationLabel() {\n $(\".validation\").hide();\n}", "__unhighlight(e) {\n this.__dropArea.classList.remove('highlight');\n }", "function _unsetErrorFeaturesIothreads () {\n $('#tabs-bootos input[wizard_field=\"IOTHREADS\"]').removeClass('is-invalid-input');\n $('#tabs-bootos label.features_iothreads').removeClass('is-invalid-label');\n }", "function markFieldCorrect(field){\r\n\t\t$(\"#error_\"+field).text('');\r\n\t//\t$(\"#\"+field).css(\"background-color\", \"white\");\r\n\t\treturn true;\r\n}", "hideErrorMessage(){\n \t$(this.element + \"Error\").slideUp();\n\t}", "function removeAllErrors() {\n $(\".alert-danger\").remove();\n $(\".bootbox-body .error\").remove();\n}", "function errorMessage() {\n\t\n\t$loader.html('<span class=\"error typeIt2\">Purrrlease make a selection...... You can do that right meoewwwwermmmm thanks.</span>');\n\n\t//typeIt effect\n\t$('.typeIt2').typeIt({\n\t\tcursor: false,\n\t});\n\n}", "function clearErrors()\n{\n var allErrors = document.getElementsByClassName('error');\n for (var i = 0; i < allErrors.length; i++) {\n allErrors[i].innerHTML = \"\";\n }\n var allInputs = document.getElementsByTagName('input');\n for (i = 0; i < allInputs.length; i++) {\n allInputs[i].style.removeProperty(\"background-color\");\n }\n}", "clearErrorMessages(){\n //input represents the html input filed\n ['#password','#email','#name'].forEach(inputID=>{\n let input = document.querySelector(inputID)\n if(input !== null){\n // so we will get the exact form group \n let formGroup = input.parentElement\n \n \n formGroup.querySelector('.message').innerText = '';\n }\n\n })\n\n }", "function remove_validation() {\n\n $(\"#other_field\").removeClass(\"keyskill_border_active\");\n $('#field_error').remove();\n\n}", "function hideLoginError() {\r\n loginInput.classList.remove('error');\r\n loginError.style.display = 'none';\r\n}", "function help() {\n $('#search_help').removeClass('hidden');\n}", "function clearError() {\r\n\t$('#error').html('');\r\n}", "function showErrors(InputField, SpanErrorField) {\n InputField.classList.replace('focus:ring-blue-600', 'focus:ring-red-600')\n InputField.classList.replace('border-blue-300', 'border-red-600')\n SpanErrorField.classList.remove('hidden')\n}", "function handleBrokenWordUnselect() {\n $(self.util.svgRoot).find('.wordpart').removeClass('wordpart');\n }", "function tidy(input, callback) {\n if (input.data(_iCheck)) {\n\n // Remove everything except input\n input.parent().html(input.attr('style', input.data(_iCheck).s || '').trigger(callback || ''));\n\n // Unbind events\n input.off('.i').unwrap();\n $('label[for=\"' + input[0].id + '\"]').add(input.closest('label')).off('.i');\n };\n }", "function clearError() {\n\tconst errorMessageContainerElement = getErrorMessageContainerElement();\n\n\tif ((errorMessageContainerElement == null)\n\t\t|| errorMessageContainerElement.classList.contains(\"hidden\")) {\n\n\t\treturn;\n\t}\n\n\terrorMessageContainerElement.classList.add(\"hidden\");\n\n\tconst errorMessageDisplayElement = getErrorMessageDisplayElement();\n\n\tif (errorMessageDisplayElement != null) {\n\t\terrorMessageDisplayElement.innerHTML = \"\";\n\t}\n}", "unhighlightAll() {\n if (!this.tf.highlightKeywords) {\n return;\n }\n\n this.unhighlight(null, this.highlightCssClass);\n }", "function clearError(element) {\n\tYAHOO.util.Event.stopEvent(element);\n\t// Modifico il contenuto della classe dell'elemento\n\tvar oldValue = this.className;\n\tvar newValue = oldValue.replace(\"error\", \"\");\n\tYAHOO.util.Dom.replaceClass(this, oldValue, newValue);\n\t// Elimino la classe del blocco di errore\n\tvar next = YAHOO.util.Dom.getNextSibling(this);\n\tif (next) {\n\t\tnext.parentNode.removeChild(next);\n\t}\n}", "function resetForm(){\n $('.slds-has-error').removeClass('slds-has-error');\n $('.slds-form-element__help').addClass('slds-hide');\n}", "function resetForm(){\n $('.slds-has-error').removeClass('slds-has-error');\n $('.slds-form-element__help').addClass('slds-hide');\n}", "function removeMessage() {\r\n\t// Clear all messaging elements.\r\n\t $('#messaging, #status').each(function(){\r\n\t\t if ($(this).html() != \"\") {\r\n\t\t\t $(this).html(\"\");\r\n\t \t}\r\n\t });\r\n\t\r\n\t// Reset any 'invalid' classes on labels and fields.\r\n\t$('.invalid').each(function(){\r\n\t\t$(this).removeClass('invalid');\r\n\t});\r\n\t\r\n}", "function clearerror(){\n\t$(\"#error\").html(\"<p></p>\");\n}", "function _unhighlightResult(item) {\n\n \n\n item.removeClass(\"hawk-sqActive\");\n\n \n\n }", "function ClearAllValidationErrors(){\n $('.has-error').removeClass('has-error');\n }", "function raiseError(inputField) {\r\n inputField.classList.add(\"input-error\");\r\n}", "function errRemove()\n{\n // username\n if(userName.value != \"\"){\n userName.style.borderColor = \"#dddddd\";\n nameErr.innerHTML = \"\";\n }\n\n // surname\n if(surName.value != \"\"){\n surName.style.borderColor = \"#dddddd\";\n surNameErr.innerHTML = \"\";\n }\n\n // email\n if(userEmail.value != \"\"){\n userEmail.style.borderColor = \"#dddddd\";\n userEmailErr.innerHTML = \"\";\n }\n\n // confirm password\n // if(confirmPass.value != \"\"){\n // confirmPass.style.borderColor = \"#dddddd\";\n // confirmPassErr.innerHTML = \"\";\n // }\n\n}", "function toggleErrorMessage($parent, $label, showError) {\n if (showError) {\n $parent.addClass('has-error')\n $label.removeClass('hidden')\n } else {\n $parent.removeClass('has-error')\n $label.addClass('hidden')\n }\n }", "function clearError(input) {\n // get the form field element\n const formField = input.parentElement;\n\n // remove the error class\n formField.classList.remove('error');\n\n // Clear error message\n const errorMessage = formField.querySelector('small');\n errorMessage.classList.remove('danger');\n errorMessage.textContent = '';\n}", "function removeClass(elementParent){\n elementParent.parent().removeClass( \"has-success\" );\n elementParent.parent().removeClass( \"has-error\" );\n elementParent.find( \"span\" ).remove();\n }", "function toggleError(state) {\n state ? $('#classInput').addClass('error') :\n $('#classInput').removeClass('error');\n}", "function invalidInput(field, message) {\n field.addClass(\"invalid\");\n}", "function clearMessage($message) {\n\t$message.removeClass('alert alert-danger alert-info alert-success alert-warning').text(\"\");\n}", "function _setErrorFeaturesIothreads () {\n $('#tabs-bootos input[wizard_field=\"IOTHREADS\"]').addClass('is-invalid-input');\n $('#tabs-bootos label.features_iothreads').addClass('is-invalid-label');\n }", "removeErrorAlert() {\n this.hideElement(this.document.getElementById('error-box'));\n }", "function unblockUI(el, msg) {\r\n \t$(\".blockMsg > div\").removeClass(\"loading-animator\").html(\"<h1>\"+msg+\"</h1>\");\r\n $(el).unblock();\r\n }" ]
[ "0.65928155", "0.6579145", "0.65050477", "0.6498303", "0.64972645", "0.64967495", "0.6429752", "0.6411734", "0.63763297", "0.6370645", "0.6346371", "0.6328108", "0.63204134", "0.6307109", "0.61745083", "0.6173893", "0.6159797", "0.6110402", "0.611002", "0.6092011", "0.60859686", "0.6078779", "0.6062585", "0.6062585", "0.60464054", "0.60112", "0.6007002", "0.5987398", "0.59759134", "0.5953733", "0.59404033", "0.5939158", "0.59176874", "0.5907687", "0.5878788", "0.58438504", "0.5830391", "0.5824604", "0.5818522", "0.5814468", "0.5813417", "0.5795921", "0.57832956", "0.5782345", "0.5777216", "0.57596403", "0.5712358", "0.5691689", "0.56859607", "0.5679878", "0.5678376", "0.5672287", "0.567121", "0.5653692", "0.5649546", "0.56373566", "0.5637261", "0.56364673", "0.56350905", "0.56299824", "0.56298876", "0.5624776", "0.56215966", "0.5618681", "0.5617367", "0.5615215", "0.5612642", "0.5611586", "0.56044495", "0.5593424", "0.55902046", "0.55862635", "0.5584389", "0.55723995", "0.55647403", "0.5561826", "0.5559388", "0.5557088", "0.5546983", "0.55467504", "0.5541855", "0.554033", "0.5535239", "0.55258995", "0.55257785", "0.55257785", "0.5525172", "0.5521482", "0.55199814", "0.5516022", "0.5503971", "0.5499617", "0.5496759", "0.54945105", "0.5489983", "0.54827714", "0.5472944", "0.5470101", "0.54684705", "0.5467612", "0.5464356" ]
0.0
-1
GAME ASSETS BASE CLASS OF ALMOST EVERY ASSET
function Box(x, y, width, height, speed = 30) { this.x = x; this.y = y; this.width = width; this.height = height; this.speed = speed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Spriteset_Base() {\n this.initialize.apply(this, arguments);\n}", "get mainAsset() {}", "set mainAsset(value) {}", "function camSetEnemyBases(bases)\n{\n\tvar reload = !camDef(bases);\n\tif (!reload)\n\t{\n\t\t__camEnemyBases = bases;\n\t\t__camNumEnemyBases = 0;\n\t}\n\t// convert label strings to groups and store\n\tfor (var blabel in __camEnemyBases)\n\t{\n\t\tvar bi = __camEnemyBases[blabel];\n\t\tvar obj = getObject(blabel);\n\t\t//define these here to avoid linter warnings\n\t\tvar idx = 0;\n\t\tvar len = 0;\n\t\tvar s;\n\t\tif (camDef(obj) && obj) // group already defined\n\t\t{\n\t\t\tif (!camDef(bi.group))\n\t\t\t{\n\t\t\t\tbi.group = obj.id;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar structures = enumGroup(bi.group);\n\t\t\t\taddLabel({ type: GROUP, id: bi.group }, blabel);\n\t\t\t\tfor (idx = 0, len = structures.length; idx < len; ++idx)\n\t\t\t\t{\n\t\t\t\t\ts = structures[idx];\n\t\t\t\t\tif (s.type !== STRUCTURE || __camIsValidLeftover(s))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (!camDef(bi.player) || camPlayerMatchesFilter(s.player, bi.player))\n\t\t\t\t\t{\n\t\t\t\t\t\tcamTrace(\"Auto-adding\", s.id, \"to base\", blabel);\n\t\t\t\t\t\tgroupAdd(bi.group, s);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!camDef(bi.cleanup)) // auto-detect cleanup area\n\t\t\t{\n\t\t\t\tvar objs = enumGroup(bi.group);\n\t\t\t\tif (objs.length > 0)\n\t\t\t\t{\n\t\t\t\t\tvar a = {\n\t\t\t\t\t\ttype: AREA,\n\t\t\t\t\t\tx: mapWidth, y: mapHeight,\n\t\t\t\t\t\tx2: 0, y2: 0\n\t\t\t\t\t};\n\t\t\t\t\t// smallest rectangle to contain all objects\n\t\t\t\t\tfor (idx = 0, len = objs.length; idx < len; ++idx)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar o = objs[idx];\n\t\t\t\t\t\tif (o.x < a.x) a.x = o.x;\n\t\t\t\t\t\tif (o.y < a.y) a.y = o.y;\n\t\t\t\t\t\tif (o.x > a.x2) a.x2 = o.x;\n\t\t\t\t\t\tif (o.y > a.y2) a.y2 = o.y;\n\t\t\t\t\t}\n\t\t\t\t\t// but a bit wider\n\t\t\t\t\ta.x -= 2; a.y -= 2; a.x2 += 2; a.y2 += 2;\n\t\t\t\t\tcamTrace(\"Auto-detected cleanup area for\", blabel, \":\", a.x, a.y, a.x2, a.y2);\n\t\t\t\t\tbi.cleanup = \"__cam_enemy_base_cleanup__\" + blabel;\n\t\t\t\t\taddLabel(a, bi.cleanup);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse // define a group automatically\n\t\t{\n\t\t\tif (!camDef(bi.cleanup))\n\t\t\t{\n\t\t\t\tcamDebug(\"Neither group nor cleanup area found for\", blabel);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbi.group = camNewGroup();\n\t\t\taddLabel({ type: GROUP, id: bi.group }, blabel);\n\t\t\tvar structs = enumArea(bi.cleanup, ENEMIES, false);\n\t\t\tfor (idx = 0, len = structs.length; idx < len; ++idx)\n\t\t\t{\n\t\t\t\ts = structs[idx];\n\t\t\t\tif (s.type !== STRUCTURE || __camIsValidLeftover(s))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!camDef(bi.player) || camPlayerMatchesFilter(s.player, bi.player))\n\t\t\t\t{\n\t\t\t\t\tcamTrace(\"Auto-adding\", s.id, \"to base\", blabel);\n\t\t\t\t\tgroupAdd(bi.group, s);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (groupSize(bi.group) === 0)\n\t\t{\n\t\t\tcamDebug(\"Base\", blabel, \"defined as empty group\");\n\t\t}\n\t\tif(!reload)\n\t\t{\n\t\t\tbi.detected = false;\n\t\t\tbi.eliminated = false;\n\t\t}\n\t\tcamTrace(\"Resetting label\", blabel);\n\t\tresetLabel(blabel, CAM_HUMAN_PLAYER); // subscribe for eventGroupSeen\n\t}\n}", "function ShaderProgram() {\r\n A_CLASS;\r\n}", "function EffectClass () {}", "constructor() {\n\t\tif(this.constructor === BaseScene){\n\t\t\tthrow(new Error('Do not instantiate a GameScene directly. Use it to extend your game classes'))\n\t\t}\n\n\t\tObject.defineProperty(this,'type',{\n\t\t\tenumerable:false,\n\t\t\tconfigurable:false,\n\t\t\twritable:false,\n\t\t\tvalue:'BaseScene'\n\t\t})\n\n\t\tObject.defineProperty(this,'_active',{\n\t\t\tenumerable:false,\n\t\t\tconfigurable:false,\n\t\t\twritable:true,\n\t\t\tvalue:false\n\t\t})\n\n\t\tthis.assets = {}\n\t\tthis.children = []\n\t}", "function AddAssets()\n{\n\t//Add static background sprites\n\tbackColor = gfx.CreateRectangle(1, 1, 0xfffdad )\n\tgfx.AddGraphic( backColor, 0 , 0 )\n\tgfx.AddSprite( face, 0, 0.886, 1 )\n\tgfx.AddSprite( pasta, 0.85, 0.08, 0.1 )\n\tgfx.AddSprite( pastaIcon, 0.85, 0.08, 0.1 )\n\tgfx.AddSprite( paperIcon, 0.86, 0.15, 0.08 )\n \n //Add counters.\n\tgfx.AddText( pastaTxt, 0.8, 0.09 );\n\tgfx.AddText( paperTxt, 0.8, 0.15 );\n \n //Add scores\n\tgfx.AddText( score, 0.012, 0.01 );\n\tgfx.AddText( immune, 0.68, 0.02 );\n\tgfx.AddSprite( heart, 0.86, 0.02, 0.08 )\n\t\n\t//Add game objects to screen.\n\tAddHandSan()\n \n //Create a batch containers for our virus and drop sprites.\n //(gives higher performance for lots of same sprite/particle)\n batchVirus = gfx.CreateBatch()\n gfx.AddBatch( batchVirus )\n batchDrops = gfx.CreateBatch()\n gfx.AddBatch( batchDrops )\n \n //Hack to provide missing funcs in GameView.\n batchVirus.RemoveSprite = function( sprite ) { batchVirus.removeChild( sprite.sprite ); sprite.added = false; }\n batchDrops.RemoveSprite = function( sprite ) { batchDrops.removeChild( sprite.sprite ); sprite.added = false; }\n \n\t//Show splash screen.\n gfx.AddSprite( screens, 0, 0, 1,1 )\n \n \n //Start game.\n gfx.Play()\n \n\n\tscreens.PlayRange(2,8,0.08*animationSpeed,false)\n\tsetTimeout(function(){screens.Goto(0); ready=true},2500)\n}", "createBases (dataObj) {\n const textures_d = dataObj.dataBase.textures [dataObj.dataValues.p.textureName]; // ref texture:diffuse\n const textures_n = dataObj.dataBase.textures_n [dataObj.dataValues.p.textureName]; // ref texture:normal\n const d = new PIXI.extras.AnimatedSprite(textures_d);\n const n = new PIXI.Sprite(textures_n[0]);\n this.Sprites = {d,n};\n this.batchWithNormals(n,textures_n);\n \n }", "function Noinit_Spriteset_Battle() {this.initialize.apply(this, arguments);}", "function SuperclassBare() {}", "function SuperclassBare() {}", "function AssetCache() {\n\n this.DEFAULT_CATEGORY = 'general';\n\n this.cache = {};\n this.loadStaging = [];\n\n this.cache[this.DEFAULT_CATEGORY] = {};\n\n}", "loadBallerBase(){\n\n let ballerBase = this.ballerBase = this.rc.getResource(\"baller_base\").scene.children[0].clone();\n\n ballerBase.position.fromArray([0, 0.06999 ,0]);\n\n ballerBase.receiveShadow = true;\n ballerBase.visible = true;\n\n this.playerRollNode.add(ballerBase);\n\n }", "preload() {\n GameBase.prototype.preload.call(this);\n\n // Track assets\n this.load.image('mediumTrack', 'images/tracks/mediumTrack.png');\n //this.load.image('backdrop', 'images/backdrop.png'); find a good backdrop for levels\n }", "init() { \n this.ecs.set(this, \"Game\", \"game\", \"scene\")\n }", "createBases (dataObj) {\n const dataBase = dataObj.dataBase; // getter\n const s = new PIXI.projection.Spine2d(dataBase.spineData); //new PIXI.spine.Spine(sd);\n const [d,n] = s.hackAttachmentGroups(\"_n\",null,null); // (nameSuffix, group)\n //PIXI.projection.Spine2d.call(this,dataBase.spineData);\n /*if(dataObj.dataValues.p.skinName){\n s.skeleton.setSkinByName(dataObj.dataValues.p.skinName);//FIXME: player have no skin for now\n };\n s.state.setAnimation(0, dataObj.dataValues.p.defaultAnimation , true); // default animation 'idle' TODO: add more in getDataValues_spine\n s.skeleton.setSlotsToSetupPose();*/\n this.Sprites = {s,d,n};\n \n }", "get prefabOverride() {}", "constructor() {\n super('playGame');// 'playGame' will be the identifier for this 'scene2'\n }", "function MyGame() {\n this.sceneFile_Level0 = \"assets/Scenes/Level0.json\";\n this.kPlatformTexture = \"assets/Ground.png\";\n this.kWallTexture = \"assets/wall.png\";\n this.kHeroSprite = \"assets/Me.png\";\n this.kCatherine = \"assets/Catherine.png\";\n this.kHuman = \"assets/Human.png\";\n this.kFlower = \"assets/flower.png\";\n this.kFontCon72 = \"assets/fonts/Consolas-72\";\n\n this.sceneParser = null;\n this.mCameras = [];\n this.mPlatformAttrs = [];\n this.mWallAttrs = [];\n this.mTextAttrs = [];\n this.mHumanAttrs = [];\n \n this.mCamera = null;\n this.mHero = null;\n this.mCatherine = null; \n this.mFlower = null;\n this.mGameStatus = 0;\n\n this.nextLevel = null;\n \n this.mAllPlatforms = new GameObjectSet();\n this.mAllHumans = new GameObjectSet();\n\n this.mTexts = new GameObjectSet();\n this.mAllWalls = new GameObjectSet();\n}", "get prototypeTexture() {}", "constructor(game, x, y, width, height) {\n super(game, x, y, width, height, '<%= prefabName %>');\n }", "function Asset(name, imgPath) {\n this.name = name;\n this.imgPath = imgPath;\n this.votes = 0;\n this.timesShown = 0;\n\n // you might not see this in production code depending on where you work but it is a handy way of getting every goat into the allGoat array every time you make one\n Asset.allAssets.push(this)\n}", "function BaseClass() {}", "function BaseClass() {}", "function Sprite_Base() {\n this.initialize.apply(this, arguments);\n}", "constructor(x,y)\n{\n //calling the constructor of base class\n super(x,y,50,50); \n this.image = loadImage(\"sprites/enemy.png\");\n}", "function GameBase()\n{ \n //*************\n // Data members\n //*************\n this.m_RootGameObject = null;\n \n var m_Cameras = [];\n \n this.getCameras = function(){return m_Cameras;};\n \n //***************\n // Game interface\n //***************\n this.superStart = function()\n {\n this.m_RootGameObject = new GameObject();\n this.m_RootGameObject.setName(\"RootGameObject\");\n this.m_RootGameObject.getMesh().draw = null;\n \n };\n \n this.start = function()\n {\n initializeRootGameObject();\n \n };\n \n this.update = function()\n {\n this.m_RootGameObject.update();\n \n };\n \n this.draw = function()\n { \n //Draw scene for each camera\n for(var i = 0; i < m_Cameras.length; i++)\n {\n GRAPHICS.setActiveCamera(m_Cameras[i]);\n \n if (m_Cameras[i].draw != undefined)\n m_Cameras[i].draw();\n \n this.m_RootGameObject.draw();\n \n }\n \n };\n \n}", "function Awake () {\n\tsize = 0;\n\tfor (var b : Transform in transform) {\n\t\tif (b.CompareTag(\"Base\")) {\n\t\t\tbases.Remove(b.gameObject);\n\t\t\tbases.Add(b.gameObject);\n\t\t}\n\t}\n\tUpdatePlayers ();\n}", "function RgbaBase() {\n\n}", "function Spriteset_Map() {\n this.initialize.apply(this, arguments);\n}", "function initializeEnemyBases() {\n let base = components.Base({\n imageName: 'base-red',\n center: { x: world.left + 0.75, y: world.top + 0.75 },\n radius: 0.10,\n orientation: 0,\n rotateRate: (Math.PI / 4) / 1000, // Slow rotation\n vicinity: 0.40,\n missile: {\n delay: 500,\n lifetime: 5000,\n rotateRate: Math.PI / 4000\n },\n hitPoints: {\n max: 5\n },\n shield: {\n regenerationDelay: 1000,\n thickness: 0.025,\n max: 10\n }\n });\n enemyEntities[nextEntityId++] = {\n model: base,\n renderer: renderer.Base\n };\n\n base = components.Base({\n imageName: 'base-green',\n center: { x: world.width - 0.75, y: world.top + 0.75 },\n radius: 0.15,\n orientation: 0,\n rotateRate: (Math.PI / 4) / 1000, // Slow rotation\n vicinity: 0.50,\n missile: {\n delay: 400,\n lifetime: 6000,\n rotateRate: Math.PI / 3000\n },\n hitPoints: {\n max: 5\n },\n shield: {\n regenerationDelay: 800,\n thickness: 0.025,\n max: 10\n }\n });\n enemyEntities[nextEntityId++] = {\n model: base,\n renderer: renderer.Base\n };\n\n base = components.Base({\n imageName: 'base-blue',\n center: { x: world.width / 2, y: world.height / 2 },\n radius: 0.05,\n orientation: 0,\n rotateRate: (Math.PI / 4) / 1000, // Slow rotation\n vicinity: 0.50,\n missile: {\n delay: 400,\n lifetime: 7000,\n rotateRate: Math.PI / 2000\n },\n hitPoints: {\n max: 5\n },\n shield: {\n regenerationDelay: 500,\n thickness: 0.025,\n max: 10\n }\n });\n enemyEntities[nextEntityId++] = {\n model: base,\n renderer: renderer.Base\n };\n\n base = components.Base({\n imageName: 'base-yellow',\n center: { x: world.left + 0.667 * world.width , y: world.height - 1.0 },\n radius: 0.20,\n orientation: 0,\n rotateRate: (Math.PI / 4) / 2000, // Slow rotation\n vicinity: 1.00,\n missile: {\n delay: 1000,\n lifetime: 7000,\n rotateRate: Math.PI / 2000\n },\n hitPoints: {\n max: 25\n },\n shield: {\n regenerationDelay: 1000,\n thickness: 0.03,\n max: 10\n }\n });\n enemyEntities[nextEntityId++] = {\n model: base,\n renderer: renderer.Base\n };\n }", "function Game_BattlerBase() {\n this.initialize.apply(this, arguments);\n}", "constructor(STAGE) {\r\n this.stage = STAGE;\r\n \r\n // Signals if the house is active or not\r\n this.lightOn = true;\r\n \r\n this.assetloader = new Loader();\r\n this.assetloader.add(\"house.png\");\r\n \r\n // \"house\" is actually a container holding building and light\r\n this.house = new Container();\r\n this.building = new Sprite(Texture.from(\"house.png\"));\r\n this.light = new Sprite(Texture.from(\"light.png\"));\r\n }", "function Spriter_Base() {\n this.initialize.apply(this, arguments);\n}", "loadGame() {\n this.player = new Player(100, 100);\n this.treasure = new Treasure()\n this.playerImg = loadImage(\"assets/character-down.png\");\n this.treasureImg = loadImage(\"assets/treasure.png\");\n this.score = 0\n this.bg = loadImage(\"assets/background.png\");\n }", "constructor(game, turn) {\n super(game)\n this.name = \"stageClear\"\n //elements to draw\n this.elements = []\n this.game = game\n this.hero = game.hero\n this.turn = turn\n this.setup(game)\n this.bonus = 0\n this.calcBonus()\n\n }", "function Base() {}", "setType(type) {\n // set base stats\n this.setBase(enemystats.base)\n // and then add some more stats\n var e = enemystats[type]\n this.enemy.controlType = e.control\n while (e != null) {\n this.add(e)\n e = enemystats[e.parent]\n }\n // init guns too\n this.enemy.removeAllGuns()\n for (let g of this.guns) {\n this.enemy.addGun(g.set, g.stat, g.options)\n }\n }", "function GameObjectSet() {\n this.mSet = [];\n}", "initTextures() {\n this.enableTextures(true);\n\n this.ringMat = new CGFappearance(this);\n this.ringMat.setAmbient(0.5, 0.6, 0.7, 1);\n this.ringMat.setDiffuse(1, 1, 1, 1);\n this.ringMat.setSpecular(1, 1, 1, 1);\n this.ringMat.setShininess(1);\n this.ringMat.setEmission(1, 1, 1, 1);\n\n this.ringRopeApp = new CGFappearance(this);\n this.ringRopeApp.setAmbient(1, 0, 0, 1);\n this.ringRopeApp.setDiffuse(1, 0, 0, 1);\n this.ringRopeApp.setSpecular(1, 0, 0, 1);\n this.ringRopeApp.setShininess(1);\n this.ringRopeApp.setEmission(1, 0, 0, 1);\n\n this.chairApp = new CGFappearance(this);\n this.chairApp.setAmbient(0, 0, 0, 1);\n this.chairApp.setDiffuse(0, 0, 0, 1);\n this.chairApp.setSpecular(0, 0, 0, 1);\n this.chairApp.setShininess(1);\n this.chairApp.setEmission(0, 0, 0, 1);\n\n\n this.barrierApp = new CGFappearance(this);\n this.barrierApp.setAmbient(0, 0, 0, 1);\n this.barrierApp.setDiffuse(0.5, 0.5, 0.5, 1);\n this.barrierApp.setSpecular(0, 0, 0, 1);\n this.barrierApp.setShininess(0.1);\n this.barrierApp.setEmission(0.2, 0.2, 0.2, 1);\n\n this.stairsApp = new CGFappearance(this);\n this.stairsApp.loadTexture(\"../res/images/stairs.jpeg\");\n\n this.zephyr = new CGFappearance(this);\n this.zephyr.loadTexture(\"../res/images/mrzephyr.png\");\n\n this.rick = new CGFappearance(this);\n this.rick.loadTexture(\"../res/images/682021.jpg\");\n\n this.defaultMaterial = new CGFappearance(this);\n\n this.ringApron = new CGFappearance(this);\n this.ringApron.loadTexture(\"../res/images/ringApron.jpeg\");\n\n this.donut = new CGFappearance(this); \n this.donut.loadTexture(\"../res/images/donut.png\");\n \n }", "function MMApBaseClass() {\n\t\t\t\t_classCallCheck(this, MMApBaseClass);\n\t\t\n\t\t\t\tthis.dirDefaultOptions = \"modules/\" + this.constructor.name + \"/options/\";\n\t\t\t\tthis.dirCustomOptions = \"modules/\" + this.constructor.name + \"/options/\";\n\t\t\t\tthis._options = null;\n\t\t\t\tthis.defaultLangCode = \"sv\";\n\t\t\t}", "function MAINCLASS(className)\r\n{\r\n\tself.app_className = className;\r\n\t//extend? ...\r\n}", "constructor (key) {\n super('Game'); //when extending a class, need to call super() so it passes all the arguments to the parent class first, before running any code inside the child class.\n }", "constructor(set) {\n this.setting = new Setting(set);\n // this.level = new Level(this.setting);\n this.render = new _render__WEBPACK_IMPORTED_MODULE_0__[\"Render\"](this.setting);\n this.resizeCanvas(this.setting.gridSize, this.setting.step);\n this.player = new _player__WEBPACK_IMPORTED_MODULE_1__[\"Snake\"](this.setting);\n this.player.draw();\n this.player.animate();\n // console.log( 'set: ', this.setting );\n }", "function setCNETAssetBaseHref(baseHref) {\r\n\tif (typeof stickyWinHtml != \"undefined\") {\r\n\t\tvar CGFstickyWinHTML = stickyWinHTML.bind(window);\r\n\t\tstickyWinHTML = function(caption, body, options){\r\n\t\t return CGFstickyWinHTML(caption, body, $merge({\r\n\t\t baseHref: baseHref + '/stickyWinHTML/'\r\n\t\t }, options));\r\n\t\t};\r\n\t}\r\n\tif (typeof TagMaker != \"undefined\") {\r\n\t\tTagMaker = TagMaker.extend({\r\n\t\t options: {\r\n\t\t baseHref: baseHref + '/tips/'\r\n\t\t }\r\n\t\t});\r\n\t}\r\n\r\n\tif (typeof simpleErrorPopup != \"undefined\") {\r\n\t\tvar CGFsimpleErrorPopup = simpleErrorPopup.bind(window);\r\n\t\tsimpleErrorPopup = function(msghdr, msg, baseHref) {\r\n\t\t return CGFsimpleErrorPopup(msghdr, msg, baseHref|| baseHref + \"/simple.error.popup\");\r\n\t\t};\r\n\t}\r\n\t\r\n\tif (typeof DatePicker != \"undefined\") {\r\n\t\tDatePicker = DatePicker.extend({\r\n\t\t options: {\r\n\t\t baseHref: baseHref\r\n\t\t }\r\n\t\t});\r\n\t}\r\n\t\r\n\tif (typeof ProductPicker != \"undefined\") {\r\n\t\tProductPicker = ProductPicker.extend({\r\n\t\t options:{\r\n\t\t baseHref: baseHref + '/Picker'\r\n\t\t }\r\n\t\t});\r\n\t}\r\n\t\r\n\tif (typeof Autocompleter != \"undefined\") {\r\n\t\tAutocompleter.Base = Autocompleter.Base.extend({\r\n\t\t options:{\r\n\t\t baseHref: baseHref + '/autocompleter/'\r\n\t\t }\r\n\t\t});\r\n\t}\r\n\t\r\n\tif (typeof Lightbox != \"undefined\") {\r\n\t\tLightbox = Lightbox.extend({\r\n\t\t options: {\r\n\t\t assetBaseUrl: baseHref + '/slimbox/'\r\n\t\t }\r\n\t\t});\r\n\t}\r\n}", "function baseObj(name, baseDir) {\n var src = name.replace(/ /g , '');\n var baseDir = baseDir || 'Sp14/';\n return { name: name,\n img: baseDir + src + '.jpg',\n imgSrc: src + '.jpg' };\n}", "function FirstLevel(aHero) {\n //this.kTestTexture = \"assets/TestTexture.png\";\n this.kSceneObj = \"assets/SceneObjects.png\";\n this.kPlatTexture = \"assets/platform.png\";\n this.kBrokenTexture = \"assets/broken.png\";\n this.kYouDied = \"assets/YouDied.png\";\n this.kBullet = \"assets/bullet.png\";\n this.kHero = \"assets/EmptyAction.png\";\n this.kSentences = \"assets/sentences.png\";\n this.kSentences2 = \"assets/sentences2.png\";\n this.kSceneObj2 = \"assets/SceneObjects2.png\";\n this.kWall = \"assets/Wall_Level1.png\";\n \n //this.kStabTexture = \"assets/TestStab.png\";\n //this.kWood = \"assets/RigidShape/Wood.png\";\n //this.kIce = \"assets/RigidShape/Ice.png\";\n //this.kDirt = \"assets/RigidShape/Dirt.png\";\n\n // The camera to view the scene\n this.mCamera = null;\n this.LevelSelect = null;\n // backGround\n this.mWall = null;\n // Objects\n this.mHero = aHero ? aHero : null;\n this.mMirrorHero = null;\n this.mPlatSet = new GameObjectSet();\n this.mBrokeSet = new GameObjectSet();\n this.mStabSetSet = new GameObjectSet();\n //Tools\n this.mSolveCol = null;\n this.mTips = null;\n this.mTips2 = null;\n this.mShowDeath = null;\n}", "getclassname() {\n return \"Wac\";\n }", "constructor() { //initializes objects within class\n this.sprite = 'images/'; //targets image folder\n this.x = 2;\n this.y = 5;\n }", "LoadAsset() {}", "function Acre() {\r\n\r\n this.terrain = \"\";\r\n this.features = new Collection();\r\n this.npcs = new Collection();\r\n this.pcs = new Collection();\r\n \r\n this.localLight = {};\r\n this.localSound = {};\r\n this.topSound = \"\";\r\n\r\n this.x;\r\n this.y;\r\n}", "function SkinMan(oElement, sBaseName)\r\n{\r\n this.elem = oElement;\r\n this.baseName = sBaseName;\r\n this.ApplyClass = SkinMan_ApplyClass;\r\n}", "function setSkin(){\n //read skin files\n skinType = \"regular\";\n}", "function Base() {\n\tthis.name = \"Base\"; // 3. {}.name = \"Base\";\n}", "function BaseLevel()\n\t{\n\t\tthis.gameObjectsArray = [];\n\t\tthis.gameObjects = {};\n\t}", "function loadAssets () {\n OasisAssets = {};\n\n // terrain\n OasisAssets['grass'] = getImage('../../res/', 'grass.png');\n OasisAssets['sand'] = getImage('../../res/', 'sand.png');\n OasisAssets['shore'] = getImage('../../res/', 'shore.png');\n OasisAssets['ocean'] = getImage('../../res/', 'ocean.png');\n OasisAssets['stone'] = getImage('../../res/', 'stone.png');\n OasisAssets['tree'] = getImage('../../res/', 'tree.png');\n OasisAssets['leaves'] = getImage('../../res/', 'leaves.png');\n}", "function UHRBase() {\n\n}", "function UHRBase() {\n\n}", "function definir_bases()\r\n{\r\n if(bebida_escolhida == BEBIDA.COCA)\r\n bases_refri = BASES_COCA;\r\n else if(bebida_escolhida == BEBIDA.PEPSI)\r\n bases_refri = BASES_PEPSI;\r\n}", "setClass(shipClass){\n switch(shipClass){\n case \"gunship\": this.setStats(50,30,60,0,30,1); break;\n case \"dreadnaught\": this.setStats(300,60,60,15,5,5); break;\n case \"destroyer\": this.setStats(100,60,60,10,10,3); break;\n case \"railgun\": this.setStats(20,100,80,0,30,8); break;\n case \"fighter\": this.setStats(30,20,50,3,20,2); break;\n }\n this.class=shipClass;\n console.log(`${this.name} converted to ${shipClass}`);\n this.autoname();\n }", "function _accessInstances() {\n load(circle.stage).onComplete.once(() => {\n const circleStage = new circle.stage();\n app.stage.addChild(circleStage);\n });\n\n load(square.stage).onComplete.once(() => {\n const squareStage = new square.stage();\n app.stage.addChild(squareStage);\n });\n}", "function getAC(){\n\t\n\tvar modDex = parseInt(npcMod[1]);\n\t\tif (modDex < 0){\n\t\t\tmodDex = 0;\n\t\t}\n\t\n\tvar ACnumber = 8 + modDex + (Math.floor(Math.random() * 6) + 1);\n\t\n\tammorClass.push(ACnumber);\n}", "constructor() {\n this._ah = new igcext.AssetHandler();\n this._id_gen = 0;\n this._objectIdentitiesToIds = {};\n }", "function PenguinClass() {}", "function loadPlayerBase(base){\n var bg = game.add.sprite(game.world.centerX - 150, game.world.centerY/2, base.background);\n bg.anchor.setTo(.5, .5);\n bg.crop(new Phaser.Rectangle(0, 0, 800, 600));\n bg.scale.setTo(.75, .75);\n for(var i = 0; i < base.list.length; ++i){\n var temp = game.add.sprite((base.list[i].position.x - 130)/2 + game.world.centerX/2 - 150, (base.list[i].position.y + 110)/2, base.list[i].image);\n temp.anchor.setTo(0.5, 0.5);\n temp.scale.setTo(0.5, 0.5);\n }\n }", "get tileClass() {\n const TILE_WRAPPER_SELECTED_CLASS = 'tile-wrapper selected';\n const TILE_WRAPPER_UNSELECTED_CLASS ='tile-wrapper';\n if(this.selectedBoatId){\n return TILE_WRAPPER_SELECTED_CLASS;\n }\n return TILE_WRAPPER_UNSELECTED_CLASS;\n }", "initialize() {\n this.structure.map((obj) => {\n obj.gameObject = new obj.className({\n ...obj.properties,\n ctx: state.canvas.getContext('2d')\n })\n });\n }", "set prototypeTexture(value) {}", "get tileClass() {\n if(this.selectedBoatId){\n return TILE_WRAPPER_SELECTED_CLASS;\n }\n \n return TILE_WRAPPER_UNSELECTED_CLASS;\n \n }", "function OogaahTutorialContent3A() {\n\tOogaahTutorialContent.apply(this, null); // construct the base class\n}", "function couchBaseLoader(){\n\n\t\t\t\t// model base\n\t\t\t\tvar base__loader = new THREE.OBJLoader();\n\n\t\t\t\tbase__loader.load(baseOBJ, function(base__object) {\n\t\t\t\tbase__object.traverse(function(child) {\n\t\t\t\t\t\tif (child instanceof THREE.Mesh) {\n\t\t\t\t\t\t\tchild.material.map = base__texture;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tbase__object.position.set(0, 0, -1);\n\t\t\t\t\tbase__object.scale.set(10, 10, 10);\t\t\t\t\n\t\t\t\t\tscene.add(base__object);\n\t\t\t\t});\n\n\t\t\t\tvar base__loader = new THREE.ImageLoader();\n\t\t\t\tvar base__texture = new THREE.Texture();\n\n\t\t\t\tbase__loader.load(wood_texture, function(base__image) {\n\t\t\t\t\t\t\tbase__texture.image = base__image;\n\t\t\t\t\t\t\tbase__texture.needsUpdate = true;\n\t\t\t\t\t\t\tbase__texture.repeat.set(.02, .08);\n\t\t\t\t\t\t\t// base__texture.scale.set(.05, .05);\n\t\t\t\t\t\t\tbase__texture.wrapS = THREE.RepeatWrapping;\n\t\t\t\t\t\t\tbase__texture.wrapT = THREE.RepeatWrapping;\n\t\t\t\t});\n\n\t\t\t\t// mtl base\n\t\t\t\tvar base__mtlLoader = new THREE.MTLLoader();\n\t\t\t\tbase__mtlLoader.setPath('/');\n\t\t\t\tbase__mtlLoader.load(baseMTL);\n\t\t\t\t}", "function randomClass(){var i=Math.ceil(Math.random()*classAmount);return type=classesArray[i]}", "function addBase(id,name,type){\n return {\n _id: id, // identification arrays\n _name: name,\n _type: type,\n _textureName:`i${id}`,\n description:$GameString.itemsId[id],\n rateFound: { //stastitiques indiquer au joueur drop sur monstre et planet ex: monster1:\"5:14\"35% (sur x rencontre, trouver x fois)\n monster:{},\n planet:{},\n },\n };\n }", "function SpriteDef (){\n StdClass.apply(this, arguments);\n}", "constructor() { //call constructor method on the game object to create an instance of scene \n super({ key: \"Paused\" }); //on the game object create a property of scene and set key to SceneMainMenu, used in config parameters for game\n }", "constructor() {\n this.uuid = this.uuidv4();\n this.type = this.constructor.name;\n this.gameObject = null;\n }", "function AssignClass() {\n\tswitch(Dice(1)) {\n\t\tdefault:\n\t\t\tOPC.class = \"fighter\";\n\t\t\tbreak;\n\t}\n}", "function Base() {\n}", "LoadAssetWithSubAssets() {}", "function OogaahTutorialContent3S() {\n\tOogaahTutorialContent.apply(this, null); // construct the base class\n}", "function Ammo(game, powerUpSprite , theX, theY, bUp, bDown, bLeft, bRight, bNW, bSW, bSE, bNE, scale, name, frate) { \r\n this.x = theX;\r\n this.y = theY;\r\n this.game = game;\r\n this.ctx = game.ctx;\r\n this.PowerUpAnimation = new Animation(powerUpSprite, 64, 64, 64, 1, 1, true, 1);\r\n this.hitBox = {x: theX, y: theY, width: 64, height: 64};\r\n this.name = name;\r\n this.BulletUp = bUp;\r\n this.BulletDown = bDown;\r\n this.BulletLeft = bLeft;\r\n this.BulletRight = bRight;\r\n this.bNW = bNW;\r\n this.bSW = bSW;\r\n this.bSE = bSE;\r\n this.bNE = bNE;\r\n this.scaleUp = scale;\r\n this.frateUpgrade = frate;\r\n \r\n}", "constructor(game, parent) {\n super(game,parent);\n\n }", "function vxlAssetManager(){\r\n\tthis.firstLoadedModel = false; //analyze\r\n\tthis.toLoad = new Array(); //analyze\r\n\tthis.assets = [];\r\n\tvxl.go.notifier.addSource(vxl.events.MODELS_LOADED,this);\r\n}", "getclassname() {\n return \"AnimatedLayer\";\n }", "static BlendCubemap() {}", "static PickGameObject() {}", "function AssetsLoader() {\n this.images = [];\n this.hasLoaded = false;\n}", "get mainClasses() {\n return classNames(super.mainClasses);\n }", "function OogaahTutorialContent36() {\n\tOogaahTutorialContent.apply(this, null); // construct the base class\n}", "function createNewClass ()\n{\n window.Enemy = new Phaser.Class({\n\n Extends: SpinePlugin.SpineGameObject,\n\n initialize:\n\n function Enemy (scene, x, y, skeleton, animation)\n {\n // SpinePlugin.SpineGameObject.call(this, scene, scene.sys.SpinePlugin, x, y, skeleton, animation, true);\n SpinePlugin.SpineGameObject.call(this, scene, scene.spine, x, y, skeleton, animation, true);\n\n scene.sys.displayList.add(this);\n scene.sys.updateList.add(this);\n }\n });\n}", "static load(gameInstance) {}", "static create(aframes, fps) {\nvar aa;\n//------\naa = new AmbientAnim();\naa.set(aframes, fps);\nreturn aa;\n}", "function ZSCJsBase() {\n this.moduleType;\n}", "init() {\n this.requirements = {\n addBackdrop: {bool: false, str: 'Added a new backdrop.'}, \n addSprite: {bool: false, str: 'Added a new sprite.'},\n greenFlagBlock: {bool: false, str: 'The main sprite has a script with the \"when green flag clicked\" block.'},\n goToBlock: {bool: false, str: 'The main sprite starts in the same place every time.'},\n sayBlock: {bool: false, str: 'The main sprite says something.'},\n moveBlock: {bool: false, str: 'The main sprite moves.'},\n }\n this.extensions = {\n secondEvent: {bool: false, str: 'Added another script with the \"when sprite clicked\" or \"when key pressed\" event.'},\n newBlocks: {bool: false, str: \"Project uses new blocks you haven't seen before.\"},\n //TODO: spreadsheet doesn't have the newBlocks extension???\n secondSprite: {bool: false, str: 'Added a second sprite.'},\n secondSpriteMoves: {bool: false, str: 'Second sprite moves or does tricks.'},\n //TODO: should the second sprite requirements be combined\n }\n }", "initDefaults(defaults) {\n super.initDefaults({\n size: '100%',\n fill: 'lightgreen',\n align: 'center top',\n manifests: {\n preloader: {\n images: [],\n spritesheets: [],\n sounds: [],\n },\n game: {\n images: [],\n spritesheets: [],\n sounds: [],\n },\n },\n }.inherit(defaults));\n }", "function Main() {\n\n MyGL.AssetsManager.getInstance().addGroup([\n //new MyGL.AssetData('standard_mat_bp_vshader', MyGL.AssetData.TEXT, './src/shaders/standard_material/phong-f/vert.glsl'),\n //new MyGL.AssetData('standard_mat_bp_fshader', MyGL.AssetData.TEXT, './src/shaders/standard_material/phong-f/frag.glsl'),\n //new MyGL.AssetData('standard_mat_bp_vshader_nt', MyGL.AssetData.TEXT, './src/shaders/standard_material/phong-f/vert_no_texture.glsl'),\n //new MyGL.AssetData('standard_mat_bp_fshader_nt', MyGL.AssetData.TEXT, './src/shaders/standard_material/phong-f/frag_no_texture.glsl'),\n new MyGL.AssetData('img_earth', MyGL.AssetData.IMAGE, './resource/earth.bmp'),\n new MyGL.AssetData('img_earth01', MyGL.AssetData.IMAGE, './resource/earth01.jpg'),\n new MyGL.AssetData('img_crate', MyGL.AssetData.IMAGE, './resource/crate.gif'),\n\n //new MyGL.AssetData('cube_mat_vshader', MyGL.AssetData.TEXT, './src/shaders/cube_material/base/vert.glsl'),\n //new MyGL.AssetData('cube_mat_fshader', MyGL.AssetData.TEXT, './src/shaders/cube_material/base/frag.glsl'),\n /*new AssetData('sky_n_x', AssetData.IMAGE, './resource/sky_n_x.jpg'),\n new AssetData('sky_n_y', AssetData.IMAGE, './resource/sky_n_y.jpg'),\n new AssetData('sky_n_z', AssetData.IMAGE, './resource/sky_n_z.jpg'),\n new AssetData('sky_p_x', AssetData.IMAGE, './resource/sky_p_x.jpg'),\n new AssetData('sky_p_y', AssetData.IMAGE, './resource/sky_p_y.jpg'),\n new AssetData('sky_p_z', AssetData.IMAGE, './resource/sky_p_z.jpg'),*/\n\n new MyGL.AssetData('cloudy_noon_nx', MyGL.AssetData.IMAGE, './resource/cloudy_noon_nx.jpg'),\n new MyGL.AssetData('cloudy_noon_ny', MyGL.AssetData.IMAGE, './resource/cloudy_noon_ny.jpg'),\n new MyGL.AssetData('cloudy_noon_nz', MyGL.AssetData.IMAGE, './resource/cloudy_noon_nz.jpg'),\n new MyGL.AssetData('cloudy_noon_px', MyGL.AssetData.IMAGE, './resource/cloudy_noon_px.jpg'),\n new MyGL.AssetData('cloudy_noon_py', MyGL.AssetData.IMAGE, './resource/cloudy_noon_py.jpg'),\n new MyGL.AssetData('cloudy_noon_pz', MyGL.AssetData.IMAGE, './resource/cloudy_noon_pz.jpg'),\n\n new MyGL.AssetData('land', MyGL.AssetData.IMAGE, './resource/land.png'),\n new MyGL.AssetData('grass', MyGL.AssetData.IMAGE, './resource/grass.png'),\n\n new MyGL.AssetData('drone', MyGL.AssetData.TEXT, './resource/drone.obj')\n //new AssetData('drone_diffuse', AssetData.IMAGE, './resource/drone_diffuse_01.png')\n ]);\n MyGL.AssetsManager.getInstance().addEventListener(MyGL.AssetsManager.GROUP_LOAD_COMPLETE, this.loadComplete, this);\n MyGL.AssetsManager.getInstance().load();\n}", "function Sprite_BattlerLMBS() {\n this.initialize.apply(this,arguments);\n}", "constructor(name, pixelWidth, pixelHeight, pixelOffsetX, pixelOffsetY,\n sight, hitPoints, cost, spriteImages, defaults, buildableGrid, passableGrid, baseWidth, baseHeight) {\n super(name, pixelWidth, pixelHeight, pixelOffsetX, pixelOffsetY, sight, hitPoints, cost, spriteImages, defaults);\n //set the list of buildable units based on each units builtFrom property\n this.unitList = [];\n //add all the units that the building can build to its unit list\n for (let unit in units) {\n if (units.hasOwnProperty(unit)) {\n if (units[unit].builtFrom === this.name) {\n this.unitList.push(units[unit]);\n }\n }\n }\n this.defaults.unitList = this.unitList;\n //set default building specific properties\n this.defaults.type = 'buildings';\n this.baseWidth = baseWidth;\n this.baseHeight = baseHeight;\n this.buildableGrid = buildableGrid;\n this.passableGrid = passableGrid;\n this.imageOffset = 0;\n this.animationIndex = 0;\n }", "function OogaahTutorialContent38() {\n\tOogaahTutorialContent.apply(this, null); // construct the base class\n}", "function SmallAlien(game) {\n this.alienGroup;\n this.alienScoreValue;\n}" ]
[ "0.65754974", "0.59851146", "0.5598863", "0.55185205", "0.5446757", "0.54238814", "0.5412399", "0.53719413", "0.5350498", "0.5339725", "0.52982396", "0.52982396", "0.5295462", "0.52811676", "0.5272436", "0.5267937", "0.52527434", "0.5245198", "0.5214108", "0.5194572", "0.5180916", "0.51681376", "0.5165606", "0.51601946", "0.51601946", "0.515789", "0.51439285", "0.5134368", "0.51096356", "0.5091142", "0.5088217", "0.50879115", "0.5085956", "0.5085134", "0.5070995", "0.50450855", "0.5043034", "0.50428396", "0.5017058", "0.5017002", "0.50125176", "0.5012252", "0.5005929", "0.4990012", "0.49878654", "0.4982552", "0.49820906", "0.49791247", "0.49718487", "0.49714524", "0.49636233", "0.49606082", "0.49603036", "0.49535277", "0.4952836", "0.49520075", "0.4949913", "0.4949212", "0.4949212", "0.49486205", "0.49485722", "0.49482736", "0.49467292", "0.4945205", "0.49401897", "0.4937917", "0.49355024", "0.49325028", "0.49264014", "0.49259722", "0.492461", "0.49240148", "0.49115002", "0.49099573", "0.4906007", "0.49041355", "0.49029577", "0.4899207", "0.48987997", "0.4884872", "0.48703972", "0.4862897", "0.48624185", "0.48621228", "0.4861639", "0.48583293", "0.48565736", "0.48521805", "0.48513472", "0.48512402", "0.48502988", "0.48487106", "0.48482794", "0.48480937", "0.48437622", "0.48434907", "0.48305893", "0.4828651", "0.4827589", "0.48219728", "0.48217687" ]
0.0
-1
HELPER FUNCTIONS HELPER FUNCTIONS FOR GAME LOOP
function readInput() { if (controls.moveUp) player.moveUp(); if (controls.moveDown) player.moveDown(); if (controls.moveLeft) player.moveLeft(); if (controls.moveRight) player.moveRight(); if (controls.faceUp) player.faceUp(); if (controls.faceDown) player.faceDown(); if (controls.faceLeft) player.faceLeft(); if (controls.faceRight) player.faceRight(); if (controls.shoot) player.shoot(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runGame() {\n\t// DISPLAY WELCOME BANNER\n\n\t// STORE INITIAL GAME STATE\n\n\t// WHILE LOOP FOR WHEN GAME IS NOT WON\n}", "function createGame () {}", "launchGame() {\n this.grid.generate()\n this.grid.generateWalls()\n this.grid.generateWeapon('axe', this.grid.giveRandomCase())\n this.grid.generateWeapon('pickaxe', this.grid.giveRandomCase())\n this.grid.generateWeapon('sword', this.grid.giveRandomCase())\n this.grid.generateWeapon('rod', this.grid.giveRandomCase())\n \n this.shears = new Weapon('shears', 10)\n this.sword = new Weapon('sword', 20)\n this.axe = new Weapon('axe', 30)\n this.pickaxe = new Weapon('pickaxe', 40)\n this.rod = new Weapon('rod', 50)\n\n var position_player1 = -1\n var position_player2 = -1\n\n do {\n position_player1 = this.grid.generatePlayer('1')\n this.player1.setPosition(position_player1)\n } while (position_player1 == -1)\n\n do {\n position_player2 = this.grid.generatePlayer('2')\n this.player2.setPosition(position_player2)\n } while (position_player2 == -1 || this.grid.isNextToPlayer(position_player2))\n\n this.game_status = $('#game_status')\n this.game_status.html('Recherche d\\'armes pour les deux joueurs...')\n }", "function loop() {\n //this function controls most of the game\n gameStart = true; //flag for the controller to take inputs for the game and not the menu\n draw.clear(); //for animation\n\n player.draw(); //initialize the player to be drawn and take input to move up/down\n player.move();\n\n wall1.draw(); //draw walls\n wall2.draw();\n\n for (var i = 0; i < rectangleList.length; i++) {\n rec = rectangleList[i]; //push the rectangles to be randomly generated and move\n rec.draw();\n rec.move();\n }\n for (var i = 0; i < powerupList.length; i++) {\n pow = powerupList[i]; //push the powerups to be created\n pow.draw();\n pow.move();\n }\n for (var i = 0; i < debuffList.length; i++) {\n deb = debuffList[i]; //push the debuffs to be created\n deb.draw();\n deb.move();\n }\n\n TimeMe.startTimer(\"game\"); //starts the timer at 0 for a new game\n\n time = TimeMe.getTimeOnPageInSeconds(\"game\").toFixed(2); //sets the time to seconds with 2 decimal places\n score = Math.ceil(powerUpScore + (time * 1.5)); //score is always increasing by 1.5 of time\n }", "function gameplay() {\r\n\t// run hole\r\n\tif (hole == 1)\r\n\t\thole1();\r\n\telse if (hole == 2)\r\n\t\thole2();\r\n\telse if (hole == 3)\r\n\t\thole3();\r\n\telse if (hole == 4)\r\n\t\thole4();\r\n\telse if (hole == 5)\r\n\t\thole5();\r\n\telse if (hole == 6)\r\n\t\thole6();\r\n\telse if (hole == 7)\r\n\t\thole7();\r\n\telse if (hole == 8)\r\n\t\thole8();\r\n\telse if (hole == 9)\r\n\t\thole9();\r\n}", "function game_loop(){\n\tif (pauseenabled == 0){\n\tclear();\n\tdraw_blob();\n\tdraw_coins();\n\tdraw_specials();\n\tdraw_rocks();\n\tdraw_info();\n\tcolide();\n\t}\n\t\n\t}", "function startRandomGame() {\n\n}", "startGame() {\n\n this.cancelGame();\n\n // id name team index shipType\n\n const timerLength = GAME_DURATION[this.options.mode] + COUNTDOWN_DURATION;\n\n this.gameVars = {\n\n ongoing: true,\n\n setupData: {},\n\n scores: null,\n\n timer: new Timer(timerLength),\n\n modeLogic: null,\n\n options: Object.assign({}, this.options),\n\n };\n\n // setup data\n this.gameVars.setupData.teams = this.decideTeams();\n this.gameVars.setupData.colors = this.decideColors();\n this.gameVars.setupData.players = this.mapPlayers();\n this.gameVars.setupData.duration = GAME_DURATION[this.options.mode];\n this.gameVars.setupData.options = this.gameVars.options;\n\n // scores from team count\n this.gameVars.scores = new Array(this.gameVars.setupData.teams.length).fill(100);\n\n this.gameVars.modeLogic = new MODES[this.options.mode](()=>this.endGame(), this.gameVars.setupData.teams.length, this.gameVars.setupData.players);\n\n // timer start TODO - cleanup end game\n this.gameVars.timer.start(() => this.endGame());\n\n /*\n\n flag captured\n flag dropped\n time expired\n\n\n block created\n block damaged\n block converted\n\n stock lost\n\n\n */\n\n\n // if(!this.setupData) {\n // this.gameOverCallback = callback;\n // this.ongoing = true;\n // this.timer.start(() => { this.timeout() });\n // var numOfTeams = this.setupTeams(); console.log(numOfTeams);\n // var colors = DeepSpaceGame.colorCombinations.get(numOfTeams).sample().shuffle().map(e => DeepSpaceGame.colors[e]);\n // var players = [], counter = 0;\n // var block = (id, p, i) => {\n // // p.team = i%numOfTeams;\n // return { name: p.name, team: p.team, index: i, id: id, type: p.type }\n // };\n // Array.from(this.players).shuffle().forEach(entry => {\n // let [id, player] = entry;\n // players.push(block(id, player, counter++));\n // });\n // this.setupData = {\n // teams: numOfTeams,\n // colors: colors,\n // players: players,\n // state: this.state,\n // disconnects: [],\n // tint: TINT.shuffle()\n // };\n //\n // for (let [id, player] of this.players) player.ready = false;\n // for (let i = 0; i < numOfTeams; i++) this.state.scores.push({t:i, s:100});\n // }\n // this.setupData.duration = this.timer.timeLeft - COUNTDOWN_DURATION;\n // return this.setupData;\n\n\n // clear remaining data from last game\n // no longer relevant\n this.lastGameResults.clear();\n\n }", "function gameCheck(){\n\n}", "gameLoop() {\n\n if (this.movie && this.state != STATES.GAMEOVER) {\n console.log(\"beginning to show frame \" + (this.movieIndex + 1));\n this.pieces = this.movieArray[this.movieIndex][2];\n this.currentColour = this.movieArray[this.movieIndex][0];\n this.otherColour = this.movieArray[this.movieIndex][1];\n\n }\n\n if (this.gameMode == MODES.HUMAN_BOT && this.currentColour == 'black' && !this.movie) {\n if (this.state == STATES.READY_TO_PICK_PIECE) {\n this.blackBotMove(this.board, this.verifyBotReply);\n }\n } else {\n if (this.state == STATES.READY_TO_PICK_PIECE) {\n this.PastTabuleiros.push(this.board);\n this.PastScore1.push(this.score1);\n this.PastScore2.push(this.score2);\n this.markSelectables(this.currentColour);\n }\n\n if (this.movie && this.displayMovie) {\n this.piece2Move = this.pieces[this.movieArray[this.movieIndex][3] - 1];\n\n this.markSelectables(this.otherColour);\n } else {\n if (this.state == STATES.PIECE_CHOSEN) {\n this.scene.clearPickRegistration();\n this.piece2Move = this.pieces[this.pickedPiece - 1];\n this.selectedPiece(this.board, this.piece2Move.line, this.piece2Move.column, this.verifyPieceReply);\n }\n\n if (this.state == STATES.READY_TO_PICK_MOVE) {\n this.tmpPiece = this.pickedPiece;\n this.pickedPiece = 0;\n this.resetError();\n this.markSelectables(this.otherColour);\n }\n }\n if (this.movie && this.displayMovie) {\n this.moveWhere2 = this.pieces[this.movieArray[this.movieIndex][3] - 1];\n\n this.markSelectables(this.otherColour);\n } else {\n if (this.state == STATES.MOVE_CHOSEN) {\n this.scene.clearPickRegistration();\n this.moveWhere2 = this.pieces[this.pickedPiece - 1];\n // alert(\"line2: \" + this.moveWhere2.line + \"\\ncol2: \" + this.moveWhere2.column);\n this.checkDifferenceIndexs(this.piece2Move.line, this.piece2Move.column, this.moveWhere2.line, this.moveWhere2.column, this.verifyAttackReply);;\n }\n }\n }\n /*\n if (this.state == STATES.ANIMATION) {\n this.animatePieces(this.piece2Move.id, this.moveWhere2.id);\n }*/\n if (this.state == STATES.READY_TO_MOVE) {\n this.move(this.board, this.piece2Move.line, this.piece2Move.column, this.moveWhere2.line, this.moveWhere2.column, this.currentColour, this.verifyMoveReply);\n\n let varIndexes = [this.piece2Move.line, this.piece2Move.column, this.moveWhere2.line, this.moveWhere2.column];\n this.Undo.push(varIndexes);\n // this.displayBoard();\n }\n\n if (this.state == STATES.MOVED) {\n this.pickedPiece = 0;\n this.tmpPiece = 0;\n //Guarda todos os tabuleiros\n\n\n this.resetError();\n this.changeColours();\n\n this.getScore(this.board, this.verifyScoreReply);\n }\n\n if (this.state == STATES.UPDATED) {\n this.displayBoard();\n if (!this.movie) {\n this.SaveForMovie();\n }\n }\n\n if (this.movie && this.displayMovie) {\n console.log(\"showed movie frame \" + (this.movieIndex + 1));\n this.displayMovie = false; //flag that is true from time to time \n this.movieIndex++;\n if (this.movieIndex >= this.movieArray.length) {\n this.state = STATES.GAMEOVER;\n this.movie = false;\n console.log(\"movie finished\");\n }\n\n }\n }", "function startGame(){\n while (victory==false){\n gameTicTacToe();\n }\n}", "function startGame() { }", "winGame() {\n gameWon();\n }", "function gameTicTacToe(){\n userTurn();\n updateMoves();\n createBoard();\n checkVictory()\n\n computerTurn()\n updateMoves();\n createBoard();\n checkVictory()\n}", "function gameLoop(){\r\n // console.log(\"Game Loop Running\");\r\n draw();\r\n update();\r\n\r\n}", "function gamePlay() {\n //draw the grid\n drawMap();\n\n //Update and display player and check for input\n player.display();\n player.handleInput();\n //Check for collisions with trash and handle scoring\n player.handleScoring(trash);\n //Display trash\n trash.display();\n //Check the score of the player to determine if they've won yet\n checkScores();\n\n //Call all display and movement functions for kids in the kids array\n for (let i = 0; i < kids.length; i++) {\n kids[i].update();\n kids[i].display();\n kids[i].handleDamage(player)\n }\n\n}", "function playGame() {\n}", "function makeMove(strId) { // get game ( remove first two charageters)\n console.log(\"makeMove(\\\"\" + strId + \"\\\");\");\n let y = parseInt(strId.substring(0, 1));\n let x = parseInt(strId.substring(1));\n\n if (boxesTaken > 63) { // game over\n PopUpMessage(\"Please start another game\");\n return;\n }\n\n // if you are not clicking in an OPEN_SPACE square. exit function\n if (board[y][x] != OPEN_SPACE) {\n PopUpMessage(\"Please a valid move \\n(Click one of the shaded squares)\");\n return;\n }\n\n // the square is OPEN_SPACE\n let colorFile = (player == PLAYER1) ? PLAYER1_FILE : PLAYER2_FILE;\n document.getElementById(\"i\" + strId).src = colorFile; // paint it player one's color\n //document.getElementById(strId).style.backgroundColor = url(colorFile); // paint it player one's color\n board[y][x] = player; // put this square's id in the array\n boxesTaken++;\n clearShadeBoxes();\n flipSquares(x, y, colorFile);\n\n if (winner()) {\n PopUpMessage(\"press reset to Play again\");\n return;\n }\n\n player = (player ^ PLAYER1) ? PLAYER1 : PLAYER2; // change player\n shadeBoxes(player); // sahde the next player's available moves\n if (twoNoMovesInARow == 2) {\n PopUpMessage(\"Now More Valid moves\");\n /*\n if (p1Count > p2Count)\n PopUpMessage(\"Dark Player won\");\n if (p1Count < p2Count)\n PopUpMessage(\"Light Player won\");\n if (p1Count == p2Count)\n PopUpMessage(\"It's a tie!\");\n */\n return;\n }\n\n // set next turn color\n let color = (player == PLAYER1) ? PLAYER1_COLOR : PLAYER2_COLOR;\n document.getElementById(\"turnbox\").style.backgroundColor = color;\n\n //document.getElementById('Undo').disabled = false;\n}", "function game() {\n dessinerSerpent();\n dessinerPomme();\n detectionCollision();\n verifMangerPomme();\n gestionVieSerpent();\n gestionBonus();\n }", "function game(){\n\twhile(rounds<5){\n\t\tconst playerSelection = playerPLay();\n\t\tconst computerSelection = computerPlay();\n\t\tconsole.log(playRound(playerSelection, computerSelection));\n\t\tconsole.log(\"Scoreboard: Won: \" + won + \" Lost: \" + lost + \" Drawn: \" + drawn );\n\t\trounds++;\n\t}\n\n}", "function gameLoop() {\n // Game hasn't ended.\n if (!gameover) {\n // Players turn to move.\n if (playersTurn) {\n headerText.text = \"Your turn to move...\";\n }\n // Opponents turn to move.\n else {\n timer += .005;\n // Wait a certain amount of time...\n if (timer > .4) {\n // Disable player from moving pieces.\n setPiecesInteractive(false);\n // Process opponents moves.\n let piece = opponent.calculateMove(playerStack, opponentStack, board);\n moveSound.play();\n gameScene.removeChild(piece);\n gameScene.addChild(piece);\n playersTurn = true;\n // If the opponent won..\n if (checkWin(\"Opponent\")) {\n headerText.text = \"You lose!\";\n headerText.style.fill = 0xFF0000;\n gameover = true;\n setPiecesInteractive(false);\n }\n // otherwise it is now the players turn again.\n else {\n setPiecesInteractive(true);\n }\n timer = 0;\n }\n }\n }\n}", "function main() {\n\n // Get our time delta information which is required if the game requires smooth animation.\n var now = Date.now(),\n dt = (now - lastTime) / 1000;\n\n //Call our update/render functions, pass along the time delta to\n //our update function.\n update(dt);\n render();\n\n //Set our lastTime variable which is used to determine the time delta\n //for the next time this function is called.\n lastTime = now;\n\n //Use the browser's requestAnimationFrame function to call this\n //function again as soon as the browser is able to draw another frame.\n if (player.youWin === true) {\n win.cancelAnimationFrame(gameOver);\n modal.classList.toggle('visible');\n } else {\n gameOver = win.requestAnimationFrame(main);\n }\n }", "function gameLoop(){\n\n if(title){\n draw();\n requestAnimationFrame(gameLoop); //Requests an animation frame?\n return;\n }\n\n //b o i l e r\n\n if(player.score >= 5000 && !powerList.includes('god tier: sonic rotation')){\n powerList.push('god tier: sonic rotation');\n player.ability = 'god tier: sonic rotation';\n player.abilityCool = 400;\n }\n if(player.score >= 10000 && !powerList.includes('god tier: lance of light')){\n powerList.push('god tier: lance of light');\n player.ability = 'god tier: lance of light';\n player.abilityCool = 400;\n }\n if(player.score >= 15000 && !powerList.includes('god tier: disintegrate')){\n powerList.push('god tier: disintegrate');\n player.ability = 'god tier: disintegrate';\n player.abilityCool = 400;\n }\n if(player.score >= 20000 && !powerList.includes('god tier: incursio')){\n powerList.push('god tier: incursio');\n player.ability = 'god tier: incursio';\n player.abilityCool = 400;\n }\n if(player.score >= 25000 && !powerList.includes('god tier: adramelech')){\n powerList.push('god tier: adramelech');\n player.ability = 'god tier: adramelech';\n player.abilityCool = 400;\n }\n if(player.score >= 30000 && !powerList.includes('god tier: a song of ice and fire')){\n powerList.push('god tier: a song of ice and fire');\n player.ability = 'god tier: a song of ice and fire';\n player.abilityCool = 400;\n }\n if(player.score >= 35000 && !powerList.includes('god tier: the fool\\'s world')){\n powerList.push('god tier: the fool\\'s world');\n player.ability = 'god tier: the fool\\'s world';\n player.abilityCool = 400;\n }\n if(player.score >= 40000 && !powerList.includes('god tier: doki doki')){\n powerList.push('god tier: doki doki');\n player.ability = 'god tier: doki doki';\n player.abilityCool = 400;\n }\n\n if(keys[16] && !['hyper light drifter', 'god tier: disintegrate'].includes(player.ability)) player.speed = 3;\n else if(!keys[16] && !['hyper light drifter', 'god tier: disintegrate'].includes(player.ability)) player.speed = 5;\n\n //Because of this, the left key (which has a key code of 37) takes priority over the else if (right arrow key with code 39)\n if((keys[37] || keys[65]) && player.x > 0) player.vx = -player.speed; //Negative x velocity means the player will move left \n else if((keys[39] || keys[68]) && player.x < canvas.width - player.width) player.vx = player.speed; //Positive x velocity means the player will move right\n else player.vx = 0; //Don't move at all\n \n if((keys[38] || keys[87]) && player.y > 300) player.vy = -player.speed; //Negative y velocity means the player will move up \n else if((keys[40] || keys[83]) && player.y < canvas.height - 20) player.vy = player.speed; //Positive y velocity means the player will move down\n else player.vy = 0; //Don't move at all\n\n if(player.abilityCool > 0){ \n player.abilityCool--;\n switch(player.ability){\n case 'nanobots':\n player.hp += player.hp < player.maxHp ? 0.5 : 0;\n break;\n case 'photon override':\n for(let e of enemies){\n e.shoot = 100;\n }\n player.shootDelay = 0;\n break;\n case 'hyper light drifter':\n player.rof = 2;\n player.damage = 5;\n player.speed = 10;\n break;\n case 'god tier: lance of light':\n player.rof = 0;\n player.damage = 5;\n break;\n case 'risk of rain':\n for(let b of enemyBullets){\n b.velY = -5;\n for(let e of enemies){\n if(b.x > e.x && b.x < e.x + e.width && b.y < e.y + e.height && b.y > e.y){ //Check if the bullet is inside the width range of an enemy\n enemyBullets.splice(enemyBullets.indexOf(b), 1)\n b = null;\n delete b;\n e.hp -= player.damage;\n if(e.hp <= 0){ //Leave this as e.hp-- for the first part, point out that they are still alive with no hp, and change it to --e.hp\n enemies.splice(enemies.indexOf(e), 1)\n explode(e.x - 48, e.y - 48); //x - (explosion width / 2) + (enemy width / 2)\n e = null;\n delete e;\n player.score += 5;\n }\n break;\n }\n e.rof = 5;\n }\n }\n break;\n case 'adagio redshift':\n for(let e of enemies){\n e.speed = 0;\n }\n break;\n case 'god tier: the fool\\'s world':\n for(let e of enemies){\n e.speed = 0;\n e.rof = 1;\n e.x += (player.x - e.x) / 20;\n e.y += (player.y - e.y) / 20;\n let deltaX = player.x - e.x;\n let deltaY = player.y - e.y;\n let distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n if(distance < Math.floor(Math.random() * (500 - player.abilityCool)) + 100) e.hp -= 2;\n if(e.hp <= 0){ //Leave this as e.hp-- for the first part, point out that they are still alive with no hp, and change it to --e.hp\n enemies.splice(enemies.indexOf(e), 1)\n explode(e.x - 48, e.y - 48); //x - (explosion width / 2) + (enemy width / 2)\n e = null;\n delete e;\n player.score += 5;\n continue;\n }\n }\n break;\n case 'hack://corruption':\n for(let b of enemyBullets){\n b.velX = 5;\n b.velY = 0;\n for(let e of enemies){\n if(b.x > e.x && b.x < e.x + e.width && b.y < e.y + e.height && b.y > e.y){ //Check if the bullet is inside the range of an enemy\n enemyBullets.splice(enemyBullets.indexOf(b), 1)\n b = null;\n delete b;\n e.hp -= player.damage;\n if(e.hp <= 0){\n enemies.splice(enemies.indexOf(e), 1)\n explode(e.x - 48, e.y - 48); //x - (explosion width / 2) + (enemy width / 2)\n e = null;\n delete e;\n player.score += 5;\n }\n break;\n }\n e.rof = 40;\n }\n }\n break;\n case 'scream':\n player.rof = 6;\n break;\n case 'cyber drive':\n player.rof = 4;\n break;\n case 'god tier: sonic rotation':\n player.rof = 1;\n player.damage = 2;\n break;\n case 'guard skill: distortion':\n player.hp += player.hp < player.maxHp ? 0.1 : 0;\n player.rof = 20\n break;\n case 'guard skill: overdrive':\n player.damage = 0.3;\n break;\n case 'god tier: adramelech':\n player.shootDelay = 0;\n break;\n case 'god tier: disintegrate':\n player.speed = 4;\n for(let e of enemies){\n e.hp -= 0.1;\n if(e.hp <= 0){\n enemies.splice(enemies.indexOf(e), 1)\n explode(e.x - 48, e.y - 48);\n e = null;\n delete e;\n player.score += 5;\n continue;\n }\n e.rof = 1;\n }\n break;\n case 'ivories in the fire':\n for(let b of bullets){\n if(ping){\n b.velX--; \n }else{\n b.velX++;\n }\n if(b.velX < -5 || b.velX > 5){\n ping = !ping;\n }\n }\n player.rof = 1;\n break;\n }\n }\n else player.ability = '';\n\n if(!['hyper light drifter', 'god tier: lance of light', 'scream', 'photon override', 'cyber drive', 'guard skill: distortion', \n 'guard skill: overdrive', 'ivories in the fire', 'god tier: sonic rotation'].includes(player.ability)){\n player.rof = 3;\n player.damage = 1;\n }\n if(!['risk of rain', 'hack://corruption'].includes(player.ability)){\n for(let e of enemies){\n e.rof = 100;\n }\n for(let b of enemyBullets){\n //b.velX = 0;\n b.velY = 5;\n }\n }\n if(player.ability !== 'adagio redshift'){\n for(let e of enemies){\n e.speed = e.speed > 0 ? 1 : -1;\n }\n }\n \n\n if((keys[32] || mouseShooting) && player.shootDelay <= 0){ //If the player presses space and the gun's cooldown has been reached, shoot.\n shoot();\n player.shootDelay = player.rof; //Reset the shooting delay\n }\n\n if(player.shootDelay > 0) player.shootDelay--; //Subtracts 1 from player.shootDelay. Equivalent to player.shootDelay = player.shootDelay - 1.\n\n if(keys[190]) spawnEnemy();\n\n player.y += player.vy;\n player.x += player.vx; //Move the player depending on the velocity (see above).\n\n draw(); //This is where everything is actually drawn. Without this, the canvas would be blank.\n requestAnimationFrame(gameLoop); //Requests an animation frame?\n}", "function startGame() {\n water = 0;\n corn = 2;\n beans = 2;\n squash = 2;\n month = 1;\n gameOver = false;\n \n initGameBoard();\n playGame();\n}", "function game() {\n // Create a loop that will play rock, paper, scissors for 5 rounds\n for (let i = 0; i < 5; i++) {\n // Console.log the results of the game\n let player = player_selection();\n let computer = computerPlay();\n console.log(singleRound(player, computer));\n }\n }", "function startGame(){\n countdown();\n question();\n solution();\n }", "function run(){ //the only function which is executed.Rest all functions are interconnected by this function.\n initial(); //it creates snakes,food and walls\n int=setInterval(gameloop,interval);\n }", "function playerLoop(){\n //...//\n }", "function gamePlay(event) {\n\n // Alternate between player 1 and player 2\n alternatePlayer(event)\n\n // Get values of each row, column and diagonal\n row1Values = lineValues(document.querySelectorAll(\".r1\"))\n row2Values = lineValues(document.querySelectorAll(\".r2\"))\n row3Values = lineValues(document.querySelectorAll(\".r3\"))\n column1Values = lineValues(document.querySelectorAll(\".c1\"))\n column2Values = lineValues(document.querySelectorAll(\".c2\"))\n column3Values = lineValues(document.querySelectorAll(\".c3\"))\n diagonalsValues = getDiagonalValues(document.querySelectorAll('div'))\n\n // Determine if there are 3 of the same token in a row, column or diagonal\n threeInALine(diagonalsValues[0])\n threeInALine(diagonalsValues[1])\n threeInALine(row1Values)\n threeInALine(row2Values)\n threeInALine(row3Values)\n threeInALine(column1Values)\n threeInALine(column2Values)\n threeInALine(column3Values)\n\n // If the max number of moves (9) is reached and there is no winner, it is considered a draw\n movesCounter++\n if (winner === false && movesCounter === 9) {\n alert(\"draw!\")\n gameStatus.innerText = \"It's a draw! Play again?\"\n endGame()\n }\n}", "function gameLoop(){\n\tif(marioGame.enStatus == enStep.nInit) // before user start the game\n\t{\n\t\tif(marioGame.nTurn == 0 && marioGame.nFrame == 0)\n\t\t{\n\t\t\tinitGame();\n\t\t}\n\t}\n\telse if(marioGame.enStatus == enStep.nStarting) // User selected to play but wait until previous action is done\n\t{\n\t\t// Wait until previous motion is done\n\t\tif(marioGame.nFrame == 0) // if previous motion is done\n\t\t{\n\t\t\t// disable click event of some clickable objects, characters/items\n\t\t\tdisableElements();\n\t\t\t// goes to next step\n\t\t\tmarioGame.enStatus = enStep.nLuigiInit;\n\t\t\tmarioGame.nTurn = 0;\n\t\t\treturn;\n\t\t}\n\t}\n\telse if(marioGame.enStatus == enStep.nLuigiInit) // Level initializing, System transforms Luigi to Mario\n\t{\n\t\ttransformLuigi();\n\t\treturn;\n\t}\n\telse if(marioGame.enStatus == enStep.nCharacterInit) // Level initializing, System creates new Mario objects\n\t{\n\t\t// create and initialize characters\n\t\tinitCharacters();\n\t\t// Goes to next step\n\t\tmarioGame.enStatus = enStep.nPlaying;\n\t\t\n\t\t// init stage attributes\n\t\tmarioGame.nTurn = 0;\n\t\tmarioGame.nWrong = 0;\n\t\t\n\t\t// plays theme song\n\t\tmarioGame.audMainTheme.play();\n\t\treturn;\n\t}\n\telse if (marioGame.enStatus == enStep.nPlaying) // game playing\n\t{\n\t\t// do nothing\n\t\t// only draw updated images after this if-else statement\n\t\t;\n\t}\n\telse if (marioGame.enStatus == enStep.nSelect) // A level is done, waiting user input\n\t{\n\t\tif(marioGame.nFrame == 0){ // Runs only at first time\n\t\t\t// enable mouse event of characters and item elements\n\t\t\tenableElements();\n\t\t\t\n\t\t\t// Display \"select where is Luigi\" text for a while\n\t\t\t$(\"#select\").addClass(\"appear\").removeClass(\"disappear\");\n\t\t\tsetTimeout(disappearDiv, 2500);\n\t\t\t\n\t\t\t// stop main theme song and play user input mode song\n\t\t\tmarioGame.audMainTheme.pause();\n\t\t\tif ( marioGame.audMainTheme.currentTime > 0 )\n\t\t\t\tmarioGame.audMainTheme.currentTime = 0;\n\t\t\tmarioGame.audSelect.play();\n\t\t\t\n\t\t\tmarioGame.nFrame++;\t\n\t\t}\n\t\treturn;\n\t}\n\telse if (marioGame.enStatus == enStep.nOver) // Game Over, When user select wrong answer twice\n\t{\n\t\t// Display game over pop-up div for a while and initialize game properties\n\t\tif(marioGame.nFrame == 0)\n\t\t{\n\t\t\tgameOver();\n\t\t\tmarioGame.nFrame++;\n\t\t}\n\t\t\n\t\treturn;\n\t}\n\telse if (marioGame.enStatus == enStep.nEndLevel) // User selected right answer, Initialize Luigi character and goes back to level start step\n\t{\n\t\tdisableElements();\n\t\tif(marioGame.nTurn == 0 && marioGame.nFrame == 0) // runs only at first time, Initialize Luigi character\n\t\t{\n\t\t\tinitLuigi();\n\t\t}\n\t\telse if (marioGame.nTurn == 6) // Goes back to level start step after Luigi roam around 6 times\n\t\t{\n\t\t\tmarioGame.enStatus = enStep.nStarting;\n\t\t}\t\t\n\t}\n\n\t\n\t// Update character object images\n\tupdate();\n\t// One turn is done. Re-allocate character objects to new positions\n\tif(marioGame.nFrame ==0)\n\t{\t\n\t\tnextTurn();\n\t}\n}", "function event(){\r\n document.querySelector('.hole1').addEventListener('click', function(){\r\n game(hole_1_click);\r\n return 'hole_1_click';\r\n });\r\n document.querySelector('.hole2').addEventListener('click', function(){\r\n game(hole_2_click);\r\n return 'hole_2_click';\r\n });\r\n document.querySelector('.hole3').addEventListener('click', function(){\r\n game(hole_3_click);\r\n return 'hole_3_click';\r\n });\r\n document.querySelector('.hole4').addEventListener('click', function(){\r\n game(hole_4_click);\r\n return 'hole_4_click';\r\n });\r\n document.querySelector('.hole5').addEventListener('click', function(){\r\n game(hole_5_click);\r\n return 'hole_5_click';\r\n });\r\n\r\n document.querySelector('.hole6').addEventListener('click', function(){\r\n game(hole_6_click);\r\n return 'hole_6_click';\r\n });\r\n document.querySelector('.hole7').addEventListener('click', function(){\r\n game(hole_7_click);\r\n return 'hole_7_click';\r\n });\r\n document.querySelector('.hole8').addEventListener('click', function(){\r\n game(hole_8_click);\r\n return 'hole_8_click';\r\n });\r\n document.querySelector('.hole9').addEventListener('click', function(){\r\n game(hole_9_click);\r\n return 'hole_9_click';\r\n });\r\n document.querySelector('.hole10').addEventListener('click', function(){\r\n game(hole_10_click);\r\n return 'hole_10_click';\r\n });\r\n document.querySelector('.hole11').addEventListener('click', function(){\r\n game(hole_11_click);\r\n return 'hole_11_click';\r\n });\r\n document.querySelector('.hole12').addEventListener('click', function(){\r\n game(hole_12_click);\r\n return 'hole_12_click';\r\n });\r\n document.querySelector('.hole_1_pebble').addEventListener('click', function(){\r\n game(hole_1_click);\r\n return 'hole_1_click';\r\n });\r\n document.querySelector('.hole_2_pebble').addEventListener('click', function(){\r\n game(hole_2_click);\r\n return 'hole_2_click';\r\n });\r\n document.querySelector('.hole_3_pebble').addEventListener('click', function(){\r\n game(hole_3_click);\r\n return 'hole_3_click';\r\n });\r\n document.querySelector('.hole_4_pebble').addEventListener('click', function(){\r\n game(hole_4_click);\r\n return 'hole_4_click';\r\n });\r\n document.querySelector('.hole_5_pebble').addEventListener('click', function(){\r\n game(hole_5_click);\r\n return 'hole_5_click';\r\n });\r\n\r\n document.querySelector('.hole_6_pebble').addEventListener('click', function(){\r\n game(hole_6_click);\r\n return 'hole_6_click';\r\n });\r\n document.querySelector('.hole_7_pebble').addEventListener('click', function(){\r\n game(hole_7_click);\r\n return 'hole_7_click';\r\n });\r\n document.querySelector('.hole_8_pebble').addEventListener('click', function(){\r\n game(hole_8_click);\r\n return 'hole_8_click';\r\n });\r\n document.querySelector('.hole_9_pebble').addEventListener('click', function(){\r\n game(hole_9_click);\r\n return 'hole_9_click';\r\n });\r\n document.querySelector('.hole_10_pebble').addEventListener('click', function(){\r\n game(hole_10_click);\r\n return 'hole_10_click';\r\n });\r\n document.querySelector('.hole_11_pebble').addEventListener('click', function(){\r\n game(hole_11_click);\r\n return 'hole_11_click';\r\n });\r\n document.querySelector('.hole_12_pebble').addEventListener('click', function(){\r\n game(hole_12_click);\r\n return 'hole_12_click';\r\n });\r\n document.querySelector('.replay_btn').addEventListener('click', function(){\r\n window.location.reload();\r\n })\r\n}", "function move(pos) { //actual move\r\n if(turn == 0 && canPlace(gameBoard, pos, huPlayer, aiPlayer)) { //checks if it is humans turn and he/she can place a tile\r\n gameBoard = updateBoard(gameBoard, pos, huPlayer, aiPlayer); //updates the board\r\n\r\n round += 1; //one more spot is gone\r\n\r\n //checks if each player can make a move, starting with the opposite player, else the game is over\r\n if(canMove(gameBoard, aiPlayer, huPlayer)) {\r\n turn = 1;\r\n } else if(canMove(gameBoard, huPlayer, aiPlayer)) {\r\n turn = 0;\r\n } else {\r\n display();\r\n setTimeout(function(){ gameOver(); }, 1000);\r\n return; //exits the function\r\n }\r\n\r\n } else if(turn == 1 && canPlace(gameBoard, pos, aiPlayer, huPlayer)) { //same as above, checks if the ai can go\r\n gameBoard = updateBoard(gameBoard, pos, aiPlayer, huPlayer); //updates the board\r\n\r\n round += 1; //one more spot is gone\r\n\r\n //checks if each player can make a move, starting with the opposite player, else the game is over\r\n if(canMove(gameBoard, huPlayer, aiPlayer)) {\r\n turn = 0;\r\n } else if(canMove(gameBoard, aiPlayer, huPlayer)){\r\n turn = 1;\r\n } else {\r\n display();\r\n setTimeout(function(){ gameOver(); }, 1000);\r\n return; //exits the function\r\n }\r\n }\r\n\r\n if(round == 64) { //if all the spots are taken, the game is over\r\n display();\r\n setTimeout(function(){ gameOver(); }, 1000);\r\n }\r\n\r\n display(); //displays the board\r\n}", "function AIplaying(){\r\n document.getElementById(\"level-title\").innerHTML=\"AI playing..\";\r\n countForUser=0;\r\n var GameColorBox_loop=setInterval(() => {\r\n if(buttonClick==gameColorBox.length-1) clearInterval(GameColorBox_loop); \r\n Makingsounds(gameColorBox[buttonClick]);\r\n buttonClick++;\r\n setTimeout(() => {\r\n if(buttonClick<gameColorBox.length){\r\n document.getElementById(\"level-title\").innerHTML=\"AI playing..\";\r\n }\r\n else{\r\n document.getElementById(\"level-title\").innerHTML=\"Your Turn To Play\";\r\n }\r\n }, 1200);\r\n \r\n },1000);\r\n\r\n}", "function mainLogic(){\n\tif(switchOn === true){\t\n\tgameLevel++;\n\t\tconsole.log(\"Game level: \" + gameLevel);\n\t\t$(\"#screen\").text(\"Game level: \" + gameLevel);\n\t\trandomizeNumber();\n\t\tvar i = 0;\n\t\tvar gameInterval = setInterval(function(){\n\t\tkey = gameArray[i];\n\t\t//associates color with part id\n\t\tcolor = $(\"#\" + key).attr('class').split(\" \")[1];\n\t\taddSound(key, color);\n\t\ti++;\n\t\tif(i === gameArray.length){\n\t\t\tclearInterval(gameInterval)\n\t\t}\n\t}, 1000);\n\t}\n}", "function gameLoop() {\n\t\t\tMAET_GDK.getInputs();\n\t\t\tthisGSM.runGameState();\n\t\t\t\n\t\t\treturn;\n\t\t}", "exportGameState(){\n let gameString = \"\";\n\n for(let r=0; r < this.rows; r++){\n for(let c=0; c < this.cols; c++){\n\n let charRepresentation = '';\n let tile = this.grid[r][c];\n\n if(tile.isFlagged){\n charRepresentation = 'F'; // F for flagged\n } else if(!tile.isRevealed) {\n charRepresentation = 'D'; // D for default\n } else if(tile.isBomb) {\n charRepresentation = 'B'; // B for default\n } else {\n charRepresentation = '' + tile.surroundingBombs;\n }\n gameString += charRepresentation;\n }\n gameString += ','\n }\n\n let hundreds = (this.bombsLeft / 100 | 0), tens = ((this.bombsLeft-hundreds*100) / 10 | 0), singles = (this.bombsLeft % 10);\n gameString += String(hundreds) + String(tens) + String(singles) + \",\";\n let seconds = ((new Date().getTime() - this.timeStarted)/1000 | 0);\n hundreds = (seconds/100 | 0); tens = ((seconds - hundreds*100)/10 | 0); singles = seconds % 10;\n gameString += String(hundreds) + String(tens) + String(singles)+ \",\" + String(Number(this.gameWon())) + \",\" + String(Number(this.gameOver));\n return gameString;\n }", "function playWinningMove() {\n console.log(`Play Winning Move Called`);\n for (let i = 0; i < temp2Array.length; i++) {\n if (temp2Array[i].length === 1) {\n console.log(`This is the correct move ${temp2Array[i]}`);\n let testNum = temp2Array[i][0] - 1;\n console.log(`This is testNum: ${testNum}`);\n let test = document.querySelectorAll(\".box\")[testNum];\n if (\n test.classList.contains(\"box-filled-1\") ||\n test.classList.contains(\"box-filled-2\")\n ) {\n } else {\n document\n .querySelectorAll(\".box\")\n [testNum].classList.add(\"box-filled-2\");\n testNum = testNum + 1;\n player2Moves[testNum] = player2Moves[testNum] + 1;\n player2TestMoves.push(testNum);\n totalMoves.push([testNum]);\n count = count + 1;\n removeWinning();\n break;\n // computerBlockMove();\n }\n } else {\n randomSelector();\n }\n }\n } //function playWinningMove", "function everyLoopThisHappens() {\n\n //Add current location to list of previous locations\n logPreviousLocations()\n\n //Move the snake forward\n moveSnakeForward()\n\n //Update the location of the snake's body\n updateBodyLocations()\n\n //Render the snakes current position\n renderGameElements()\n\n //Determine if the snake hit item\n checkForItemCollision()\n\n //Determine if the snake hit itself\n checkForBodyCollision()\n\n //Check to see if the player has enough points to win the level\n checkForWinner()\n\n}", "function pieceMover() {\n if(diceNumber === 6 || flag1 === 1 || flag2 === 1) {\n if(playerTurn === 1 && diceNumber === 6) {\n flag1 = 1 ;\n } else if(diceNumber === 6) {\n flag2 = 1;\n }\n if(playerTurn === 1 && flag1 === 1) {\n if(total1 >= 1 && total1 + diceNumber <= 100) {\n total1 = total1 + diceNumber;\n } else if(total1 === 0) {\n total1 = 1;\n }\n document.getElementById(`box${total1}`).appendChild(document.getElementById('player-1'));\n if(diceNumber === 6) {\n if(sixThreeTimesChecker === 0) {\n tempPositionHolder = total1;\n }\n sixThreeTimesChecker+=1;\n if(sixThreeTimesChecker === 3) {\n total1 = tempPositionHolder;\n document.getElementById(`box${total1}`).appendChild(document.getElementById('player-1'));\n sixThreeTimesChecker = 0;\n } else {\n playerTurn = 2;\n }\n } else {\n document.getElementById(`box${total1}`).appendChild(document.getElementById('player-1'));\n setTimeout(snakeChecker, 700, total1, 1);\n setTimeout(ladderChecker, 700, total1, 1);\n sixThreeTimesChecker = 0;\n }\n if(total1 === 100) {\n document.getElementsByClassName('board')[0].style.display = 'none';\n document.getElementById('winner').innerHTML = `${person1} is the Winner <br> Click New Game to Play Again`;\n }\n } else if(playerTurn === 2 && flag2 === 1) {\n if(total2 >= 1 && total2 + diceNumber <= 100) {\n total2 = total2 + diceNumber;\n } else if(total2 === 0) {\n total2 = 1;\n }\n document.getElementById(`box${total2}`).appendChild(document.getElementById('player-2'));\n if(diceNumber === 6 && (total1 + diceNumber <= 100)) {\n if(sixThreeTimesChecker === 0) {\n tempPositionHolder = total2;\n }\n sixThreeTimesChecker += 1;\n if(sixThreeTimesChecker === 3) {\n total2 = tempPositionHolder; \n document.getElementById(`box${total2}`).appendChild(document.getElementById('player-2'));\n sixThreeTimesChecker = 0;\n } else {\n playerTurn = 1;\n }\n } else {\n document.getElementById(`box${total2}`).appendChild(document.getElementById('player-2'));\n setTimeout(snakeChecker, 700, total2, 2);\n setTimeout(ladderChecker, 700, total2, 2);\n sixThreeTimesChecker = 0;\n }\n if(total2 === 100) {\n document.getElementsByClassName('board')[0].style.display = 'none';\n document.getElementById('winner').innerHTML = `${person2} is the Winner <br> Click New Game to Play Again`;\n }\n }\n }\n if(playerTurn === 1) {\n playerTurn = 2;\n } else {\n playerTurn = 1;\n }\n document.getElementById('turn-teller').innerHTML = `Player${playerTurn} turn:`;\n }", "function singleplayerGameLoop() {\n lineIndexA = 1;\n lineIndexB = 0;\n points_list = {};\n // console.log(singleplayer_game_words[singleplayer_rounds_word_index]);\n singleplayerPlayRound(\n singleplayer_game_words[singleplayer_rounds_word_index]\n );\n singleplayer_rounds_word_index++;\n singleplayerIntervalHandler = setInterval(function () {\n lineIndexA = 1;\n lineIndexB = 0;\n points_list = {};\n if (singleplayer_rounds_word_index < singleplayer_game_words.length) {\n singleplayerPlayRound(\n singleplayer_game_words[singleplayer_rounds_word_index]\n );\n clearCanvasOnNewWord();\n } else {\n gameOverHandler();\n }\n singleplayer_rounds_word_index++;\n }, 20000);\n}", "function startGame() {\n pacSoundId = setInterval(pacSound, 650)\n countUpid = setInterval(countUp, 1000)\n ghostMoveIdOne = setInterval(function(){\n chooseAndMove(ghostOne)\n }, ghostTimePerMove)\n ghostMoveIdTwo = setInterval(function(){\n chooseAndMove(ghostTwo)\n }, ghostTimePerMove)\n ghostMoveIdThree = setInterval(function(){\n chooseAndMove(ghostThree)\n }, ghostTimePerMove)\n ghostMoveIdFour = setInterval(function(){\n chooseAndMove(ghostFour)\n }, ghostTimePerMove)\n }", "function tileEventHandler(current){\n let tile = board[current];\n sendChatMessage(\"Current tile: \" + tile.description);\n let modifyMessage = \"\";\n\n if (current == 0 || tile.description.startsWith(\"Just Visiting\")){\n sendChatMessage(\"Rolling again...\");\n setTimeout(roll, 3000);\n }\n else if (tile.description.startsWith(\"Gacha\")){\n sendChatMessage(\"Time for RNGesus :pray:\");\n diceResult = getRandomIntInclusive(1, 6);\n handleGacha(diceResult);\n modifyMessage = gacha[diceResult-1];\n }\n else if (tile.description.startsWith(\"Trap\") || tile.description.startsWith(\"ARTS\")\n || tile.description.startsWith(\"Counter\")){\n sendChatMessage(\"Time for RNGesus :pray:\");\n diceResult = getRandomIntInclusive(1, 6);\n handleMystery(diceResult, tile);\n }\n else if (tile.description === \"RAPE!!\"){\n sendChatMessage(\"Yameteeeeee!!!\");\n sendChatMessage(\"Rape settings: Quiz settings Randomized\");\n modifyMessage = \"Quiz settings Randomized\";\n randomize();\n }\n else if (tile.description === \"Ugly Bastard\"){\n sendChatMessage(\"We can't escape Ugly Bastard.\");\n sendChatMessage(\"Song difficulty: 0-20\");\n modifyMessage = \"Song difficulty: 0-20\";\n curDiffRange = [0,20];\n setDifficulty(curDiffRange);\n }\n else if (tile.description === \"Drugs\"){\n sendChatMessage(\"Drugs are bad kids, don't do drugs.\");\n sendChatMessage(\"Guess time: 10 seconds\");\n modifyMessage = \"Guess time: 10 seconds\";\n curGuessTime = 10;\n setGuessTime(curGuessTime);\n }\n else if (tile.description === \"NTR\"){\n sendChatMessage(\"Everyone gets to choose a partner to coop with. First come, first served.\");\n sendChatMessage(\"Choose your partner now!\");\n modifyMessage = \"Co-op with partner\";\n addModifier(modifyMessage);\n }\n else if (tile.description === \"APT-kun\"){\n sendChatMessage(\"Since APT-kun is a training wagon and not meant to be commonly used\");\n sendChatMessage(\"Show type: no TV\");\n modifyMessage = \"Show type: no TV\";\n tv = false;\n changeTVSelection(tv);\n }\n else if (tile.description === \"Flying Pussyfoot\"){\n sendChatMessage(\"Baccano! characters are immortal\");\n sendChatMessage(\"Everyone starts with 3 lives\");\n modifyMessage = \"Everyone starts with 3 lives\";\n lives = 3;\n }\n else if (tile.description === \"Galaxy Express 999\"){\n sendChatMessage(\"\\\"Back in my days, anime wasn't only isekai trash\\\"\");\n sendChatMessage(\"Year range: 1950-2000\");\n modifyMessage = \"Year range: 1950-2000\";\n curYearRange = [1950,2000];\n setYears(curYearRange);\n }\n else if (tile.description === \"Kotetsujou\"){\n sendChatMessage(\"Kabaneri was a clusterfuck, there's no better settings to describe it than this.\");\n sendChatMessage(\"Song selection: Random\");\n modifyMessage = \"Song selection: Random\";\n curType = 1;\n setSongSelection(curType);\n }\n else if (tile.description === \"Go to Jail\"){\n sendChatMessage(\"You're in Jail, but since you're a cute anime girl, guards let you out but supervise you\");\n sendChatMessage(\"No dropdown\");\n modifyMessage = \"No dropdown\";\n current = 10;\n }\n else if (tile.description === \"Kansei Durifto!?\"){\n sendChatMessage(\"*Eurobeat intensifies*\");\n sendChatMessage(\"Playback Speed x2\");\n modifyMessage = \"Playback Speed x2\";\n curSpeed = 2;\n setSpeed(curSpeed);\n }\n if (current != 0 && !tile.description.startsWith(\"Just Visiting\") && modifyMessage !== \"\" && modifyMessage !== \"Co-op with partner\"){\n addModifier(modifyMessage);\n sendChatMessage(\"Rolling again...\");\n setTimeout(roll, 3000);\n }\n else {\n if (tags.indexOf(tile.description) >= 0){\n if (tile.owner !== \"\"){\n let ownerLives = lives + 1;\n let owner = tile.owner;\n let description = tile.description;\n let filteredTiles = board.filter(checkOwnerShip);\n filteredTiles = filteredTiles.filter(checkTile);\n if (chosenTags.indexOf(description) > 0 && chosenTags.indexOf(description) < 7) {\n if (filteredTiles.length === 3){\n ownerLives ++;\n }\n }\n else if (filteredTiles.length === 2){\n ownerLives ++;\n }\n setLives(ownerLives);\n sendChatMessage(owner + \": \" + ownerLives + \" lives, everyone else \" + lives + \" lives\");\n }\n else {\n setLives(lives);\n sendChatMessage(\"Everyone: \" + lives + \" lives\");\n }\n if (!tagless){\n curTag = tile.description;\n }\n setTag();\n displayModifiers();\n setTimeout(() => { lobby.changeGameSettings(); },1);\n setTimeout(() => { updateModifiers(); },1);\n }\n }\n}", "function engine() {\n \n if(actualState == gameStates.play){\n //novo comando de movimento\n avatar.velocidade = 0;\n avatar.booster = 0;\n if(keyState[\"w\"] || keyState[\"ArrowUp\"]){\n avatar.speedUp();\n };\n\n if(keyState[\"s\"] || keyState[\"ArrowDown\"]){\n avatar.speedDown();\n };\n atualiza();\n };\n if(keyState[\"Escape\"]){\n actualState = gameStates.pause;\n };\n if(keyState[\"Enter\"] && actualState == gameStates.pause){\n actualState = gameStates.play;\n };\n if(keyState[\"Enter\"] && actualState == gameStates.lose){\n actualState = gameStates.start;\n };\n if(actualState == gameStates.lose){\n clear();\n score = 0;\n };\n desenha();\n window.requestAnimationFrame(engine);\n}", "function gameOver(board,player,player1){\n //let resultsTMP = [];\n draw();\n for(let i=0; i < cols; i++){\n for(let j=0; j < rows; j++){\n if(board.game[i][j].class==player.name){\n player.points += pointsConn;\n }\n if(board.game[i][j].class == player1.name){\n player1.points += pointsConn;\n }\n }\n }\n player.myTurn = false;\n player.points += player.wins * 25;\n \n player1.myTurn = false;\n player1.points += player1.wins * 25;\n\n if(player.win){\n //if any player wins\n winboards.push(board.copy());\n player.points += 100;\n player.wins += 1;\n results.push(\" Player \" + player.name.toString() + \" wins at board\"+ boards.indexOf(board).toString());\n results.push(\"Stored at: \"+winboards.length);\n player.win = 0;\n wonGames++;\n \n if(player.name == \"myPlayer\" || player.name == \"playerNN\"){\n player.points += 50;\n //at colonies.js\n starta(1);\n if(!automateToggle){\n //at colonies.js\n play();\n automateToggle = true;\n }\n }\n }\n else {\n //if result of game is draw\n //resultsTMP[0] =\"STALLED GAME at board \" + boards.indexOf(board).toString();\n if(player.name == \"myPlayer\" || player.name == \"playerNN\"){\n boardNN = boardNN.copyEmpty();\n player1.points = 0;\n player.points = 0;\n //new boards\n starta(0);\n if(!automateToggle){\n play();\n }\n }\n else{\n //all other stalled games are restarted without new generation\n /* console.log(boards.indexOf(board));\n boards.splice(boards.indexOf(board));\n colony1.splice(colony1.indexOf(player));\n col ony2.splice(colony2.indexOf(player1));*/\n player1.points = 0;\n player.points = 0;\n board = board.copyEmpty();\n stalledGames++;\n }\n }\n //results.push(resultsTMP.join());\n}", "function handleKeyDown(event) {if (!gameOver) {{\n pikaCollision()\n cells[playerPosition].classList.remove('sprite') \n cells[playerPosition].classList.remove('powerUp') \n \n const x = playerPosition % width\n const y = Math.floor(playerPosition / width)\n if (event.keyCode === 39 || event.keyCode === 68 ) {\n if (x < width - 1 && !cells[playerPosition + 1].classList.contains('maze')){\n playerPosition = playerPosition + 1 \n }\n } else if (event.keyCode === 37 || event.keyCode === 65) {\n if (x > 0 && !cells[playerPosition - 1].classList.contains('maze')) {\n playerPosition = playerPosition - 1 \n } \n } else if (event.keyCode === 38 || event.keyCode === 87) {\n if (y > 0 && !cells[playerPosition - width].classList.contains('maze')) {\n playerPosition = playerPosition - width\n }\n } else if (event.keyCode === 40 || event.keyCode === 83){\n if (y < width - 1 && !cells[playerPosition + width].classList.contains('maze')) {\n playerPosition = playerPosition + width\n }\n } \n //sprite reapplication in whatever position has been decided above\n if (poweredUp === false) {\n cells[playerPosition].classList.add('sprite') \n } else if (poweredUp === true){\n cells[playerPosition].classList.add('powerUp') \n }\n //check for and eat cookies, log points\n if (cells[playerPosition].classList.contains('cookie')){\n cells[playerPosition].classList.remove('cookie')\n getItem()\n playerScore += 100\n cookiesRemaining -= 1\n //-----------WINNING CONDITION HERE------------\n if (cookiesRemaining === 0){\n toggleBGMOff()\n youWinAudio()\n checkHiScore()\n youWinGraphic()\n win = true\n highScore = localStorage.getItem('highscore')\n if (highScore > playerScore){\n highscoreboard.innerHTML = highScore\n }\n gameOver = true\n }\n scoreboard.innerHTML = playerScore\n }\n //bonus points item check \n if (cells[playerPosition].classList.contains('berry')){\n cells[playerPosition].classList.remove('berry')\n playerScore += 8000\n starObtained()\n \n }\n //powerup item check \n if (cells[playerPosition].classList.contains('pokeBall')){\n poweringUp()\n }\n }\n }\n }", "function gamePlay() {\r\n // Check whether the player is on a platform\r\n var isOnPlatform = player.isOnPlatform();\r\n \r\n // Update player position\r\n var displacement = new Point();\r\n\r\n // Move left or right\r\n if (player.motion == motionType.LEFT)\r\n displacement.x = -MOVE_DISPLACEMENT;\r\n if (player.motion == motionType.RIGHT)\r\n displacement.x = MOVE_DISPLACEMENT;\r\n\r\n // Fall\r\n if (!isOnPlatform && player.verticalSpeed <= 0) {\r\n displacement.y = -player.verticalSpeed;\r\n player.verticalSpeed -= VERTICAL_DISPLACEMENT;\r\n }\r\n\r\n // Jump\r\n if (player.verticalSpeed > 0) {\r\n displacement.y = -player.verticalSpeed;\r\n player.verticalSpeed -= VERTICAL_DISPLACEMENT;\r\n if (player.verticalSpeed <= 0)\r\n player.verticalSpeed = 0;\r\n }\r\n\r\n // Get the new position of the player\r\n var position = new Point();\r\n position.x = player.position.x + displacement.x;\r\n position.y = player.position.y + displacement.y;\r\n\r\n // Check collision with platforms and screen\r\n player.collidePlatform(position);\r\n player.collideScreen(position);\r\n\r\n // Set the location back to the player object (before update the screen)\r\n player.position = position;\r\n\r\n player.checkEnterPortal(position)\r\n updateScreen();\r\n\r\n processCoin(player.findCoin(player.position))\r\n if(!cheatMode && bumpIntoGhost(player.position)!=-1){\r\n gameOver()\r\n console.log(\"bumpIntoGhost\")\r\n }\r\n\r\n if (player.findExit(player.position)){\r\n proceedToNextRound()\r\n }\r\n}", "loop() {\n\t\tif( game.paused ) {\n\t\t\tdisplay.clearScreen();\n\t\t\tgame.draw();\n\t\t\treturn;\n\t\t}\n\n\t\tif( !game.nc || ( game.nc && display.frame % 3 === 0 ) ) {\n\t\t\tgame.update();\n\t\t\tdisplay.clearScreen();\n\t\t\tgame.draw();\n\t\t\treturn;\n\t\t}\n\t}", "function gameLoop() {\r\n console.log(\"function call\");\r\n setTimeout(gameLoop, 50);\r\n moveMissiles();\r\n drawMissiles();\r\n moveEnemies();\r\n drawEnemies();\r\n collisionDetection();\r\n }", "function play(){\n function loose(){\n restartPgrs();\n /*jumbotron.animate({backgroundColor:'#EF5350'},\"fast\");\n $(\"#welcome\").html(\"Ooooooh! We are sorry you have lost, maybe the next time\");\n $(\"#question\").html('Hey there, I think you would like to visit <a href=\"http://www.build-it-yourself.com\">Build-It-Yourself</a>');*/\n $(\"#nav-bar\").hide();\n $(\"#TriviaGame\").hide();\n $(\"#victorySplash\").fadeIn();\n startpgr(\"0\");\n }\n function win(){\n restartPgrs();\n /*jumbotron.animate({backgroundColor:'lightgreen'},\"fast\");\n $(\"#welcome\").html('Awesome!! You have won the game!');\n $(\"#question\").html('Maybe you would like to visit <a href=\"http://www.build-it-yourself.com\">Build-It-Yourself</a>');*/\n $(\"#nav-bar\").hide();\n $(\"#TriviaGame\").hide();\n $(\"#victorySplash\").fadeIn();\n startpgr(\"0\");\n }\n function scoreac(minplus){\n if(score + minplus< -5)\n {loose();}\n else if(score + minplus > 10)\n {win();}\n else{\n score = score + minplus;\n selectquest();\n startpgr(\"1\");}\n }\n //Count down at the beggining of the game begins\n var outcount = 5;\n $(\"#welcome\").html(\"The game starts in \"+outcount);\n jumbotron.animate({backgroundColor:'#4DB6AC'},\"fast\");\n var ttimer = setInterval(function(){wel1()},1000);\n function wel1(){\n if(outcount != 1)\n {\n outcount--;\n if(outcount == 4){jumbotron.animate({backgroundColor:'#9CCC65'},\"fast\");}else if(outcount == 3){jumbotron.animate({backgroundColor:'#FFCC80'},\"fast\");}else if(outcount == 2){jumbotron.animate({backgroundColor:'#9FA8DA'},\"fast\");}else{jumbotron.animate({backgroundColor:'#90A4AE'},\"fast\");}\n $(\"#welcome\").html(\"The game starts in \"+outcount);\n }\n else{\n jumbotron.animate({backgroundColor:'#E0E0E0'},\"fast\");\n clearInterval(ttimer);\n startpgr(\"1\");\n selectquest();\n }\n }\n //Checking the selected answer\n function checkAnswer(ans){\n if(ans == arrRightAns[quest])\n {\n jumbotron.animate({backgroundColor:'lightgreen'},\"fast\");\n jumbotron.animate({backgroundColor:'#E0E0E0'},\"fast\");\n scoreac(1);\n }\n else{\n jumbotron.animate({backgroundColor:'#EF5350'},\"fast\");\n jumbotron.animate({backgroundColor:'#E0E0E0'},\"fast\");\n scoreac(-1);\n }\n }\n //Waiting for the user to choose an answer\n $(\"#ans-1\").click(function(){\n checkAnswer($(\"#ans-1\").val());\n });\n $(\"#ans-2\").click(function(){\n checkAnswer($(\"#ans-2\").val());\n });\n $(\"#ans-3\").click(function(){\n checkAnswer($(\"#ans-3\").val());\n });\n //Answer time count down and Progress Bar effect\n function startpgr(bool)\n {\n if(bool == \"0\"){\n limit = 01051997;\n }\n var pgr = 0;\n var timin = 0;\n nowtime = time;\n var answerTime = 10;\n limit = nowtime+answerTime;\n $(\"#pgrbar-lbl\").fadeIn();\n $(\"#pgrbar1\").css(\"width\",pgr+\"%\");\n $(\"#pgrbar2\").css(\"width\",pgr+\"%\");\n var ttimer1 = setInterval(function(){wel()},100);\n function wel(){\n if(limit >= time && limit != 01051997){\n var pgrPerc = ((answerTime-(limit-time))*100)/answerTime;\n if(pgrPerc < 60){\n $(\"#pgrbar1\").css(\"width\",pgrPerc+\"%\");\n }\n else{\n $(\"#pgrbar2\").css(\"width\",(pgrPerc-56)+\"%\");\n }\n }\n else if(limit == 01051997){\n clearInterval(ttimer1);\n }\n else{\n clearInterval(ttimer1);\n restartPgrs();\n checkAnswer(\"[]76/'.;.'2.1';.21';4.3'2./4';1.241'/.4';2.\");\n }\n }\n }\n }", "function gameLoop(estado) {\n if (!estado) {\n return;\n }\n\n const jugadorUno = estado.jugadores[0];\n const jugadorDos = estado.jugadores[1];\n\n jugadorUno.pos.x += jugadorUno.vel.x;\n jugadorUno.pos.y += jugadorUno.vel.y;\n\n jugadorDos.pos.x += jugadorDos.vel.x;\n jugadorDos.pos.y += jugadorDos.vel.y;\n //el juego termina si el jugador se sale del canvas\n if (jugadorUno.pos.x < 0 || jugadorUno.pos.x > GRID_SIZE || jugadorUno.pos.y < 0 || jugadorUno.pos.y > GRID_SIZE) {\n return 2;\n }\n\n if (jugadorDos.pos.x < 0 || jugadorDos.pos.x > GRID_SIZE || jugadorDos2.pos.y < 0 || jugadorDos2.pos.y > GRID_SIZE) {\n return 1;\n }\n //si el jugador coge comida su tamaño aumentará\n if (estado.comida.x === jugadorUno.pos.x && estado.comida.y === jugadorUno.pos.y) {\n jugadorUno.snake.push({ ...jugadorUno.pos });\n jugadorUno.pos.x += jugadorUno.vel.x;\n jugadorUno.pos.y += jugadorUno.vel.y;\n randomcomida(estado);\n }\n\n if (estado.comida.x === jugadorDos.pos.x && estado.comida.y === jugadorDos.pos.y) {\n jugadorDos.snake.push({ ...jugadorDos.pos });\n jugadorDos.pos.x += jugadorDos.vel.x;\n jugadorDos.pos.y += jugadorDos.vel.y;\n randomcomida(estado);\n }\n //si los jugadores colisionan, el que hay a provocado la colisión perderá\n if (jugadorUno.vel.x || jugadorUno.vel.y) {\n for (let cell of jugadorUno.snake) {\n if (cell.x === jugadorUno.pos.x && cell.y === jugadorUno.pos.y) {\n return 2;\n }\n }\n\n jugadorUno.snake.push({ ...jugadorUno.pos });\n jugadorUno.snake.shift();\n }\n\n if (jugadorDos.vel.x || jugadorDos.vel.y) {\n for (let cell of jugadorDos.snake) {\n if (cell.x === jugadorDos.pos.x && cell.y === jugadorDos.pos.y) {\n return 1;\n }\n }\n\n jugadorDos.snake.push({ ...jugadorDos.pos });\n jugadorDos.snake.shift();\n }\n\n return false;\n}", "function runProgram(){\n ////////////////////////////////////////////////////////////////////////////////\n //////////////////////////// SETUP /////////////////////////////////////////////\n ////////////////////////////////////////////////////////////////////////////////\n\n/* \n1. All code in proper sections (setup, core, helpers, etc.) - 5 points\n2. Use objects to store data - 5 points\n3. Use comments to describe setup and functions - 5 points\n4. Avoid magic numbers - 5 points\n5. Use helper functions to separate concerns - 5 points\n6. Generalize functions (i.e. only one collision detection function for all ball-paddle collisions; hard-coding to check both in a single function doesn't count) - 5 points\n*/ \n\n // Constant Variables\n var FRAME_RATE = 60;\n var FRAMES_PER_SECOND_INTERVAL = 1000 / FRAME_RATE;\n var KEY = {\n \"O\" : 79, // rightPaddle Up\n \"L\" : 76, // rightPadde Down \n \"W\": 87, // leftPaddle Up \n \"S\" : 83, // leftPaddle Down \n };\n\n\n var ball = gameItem(\"#ball\");\n var leftPaddle = gameItem(\"#leftPaddle\"); \n var rightPaddle = gameItem(\"#rightPaddle\"); \n\n var maxPaddleY = board.height - leftPaddle.height; \n\n var maxBallX = board.width - ball.width; \n var maxBallY = board.height - ball.height; \n\n \n\n \n // Game Item Objects\n ball.speedX = 5;\n ball.speedY = 5;\n\n\n ball.x += ball.speedX;\n ball.y += ball.speedY;\n\n \n \n\n \n\n\n // one-time setup\n var interval = setInterval(newFrame, FRAMES_PER_SECOND_INTERVAL); // execute newFrame every 0.0166 seconds (60 Frames per second)\n $(document).on('keydown', handleKeyDown); \n $(document).on('keyup', handleKeyUp); // change 'eventType' to the type of event you want to handle\n\n ////////////////////////////////////////////////////////////////////////////////\n ///////////////////////// CORE LOGIC ///////////////////////////////////////////\n ////////////////////////////////////////////////////////////////////////////////\n\n /* \n On each \"tick\" of the timer, a new frame is dynamically drawn using JavaScript\n by calling this function and executing the code inside.\n */\n function newFrame() {\n repositionGameITem(); \n redrawGameItem(); \n\n if (doCollide(leftPaddle, ball) === true) {\n ball.speedX *= -1;\n }\n else if (doCollide(rightPaddle, ball) === true) {\n ball.speedX *= -1;\n }\n \n }\n counter1 = playerOneScore;\n\ndisplayData(playerOneScore); \n \n /* \n Called in response to events.\n */\n\n function handleKeyDown(event) {\n if (event.which === KEY.O) {\n rightPaddle.speedY = -5; \n \n }\n else if (event.which === KEY.L) {\n rightPaddle.speedY = 5;\n \n }\n else if ( event.which === KEY.W) {\n leftPaddle.speedY = -5;\n \n }\n else if (event.which === KEY.S) {\n leftPaddle.speedY = 5;\n \n }\n \n }\n\n function handleKeyUp(event) {\n if (event.which === KEY.O) {\n rightPaddle.speedY = 0; \n \n }\n else if (event.which === KEY.L) {\n rightPaddle.speedY = 0;\n \n }\n else if ( event.which === KEY.W) {\n leftPaddle.speedY = 0;\n \n }\n else if (event.which === KEY.S) {\n leftPaddle.speedY = 0;\n \n }\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n ////////////////////////// HELPER FUNCTIONS ////////////////////////////////////\n ////////////////////////////////////////////////////////////////////////////////\n function gameItem(id) {\n return {\n \n id: id, \n x: parseFloat($(id).css(\"left\")),\n y: parseFloat($(id).css(\"top\")),\n width: $(id).width(), \n height: $(id).height(),\n speedX: 0,\n speedY: 0\n \n \n }\n }\n\n function endGame() {\n // stop the interval timer\n clearInterval(interval);\n\n // turn off event handlers\n $(document).off();\n }\n\n function repositionGameITem() {\n // defining the maximum the ball or paddles can reach before they stop\n\n\n\n\n ball.x += ball.speedX;\n ball.y += ball.speedY;\n\n rightPaddle.y += rightPaddle.speedY;\n leftPaddle.y += leftPaddle.speedY;\n\n\n if (leftPaddle.y > 370 ) {\n leftPaddle.y = 0; \n }\n else if (leftPaddle.y === -10) {\n leftPaddle.y = 360;\n }\n else if (rightPaddle.y > 370) {\n rightPaddle.y = 0;\n }\n else if(rightPaddle.y === -10) {\n rightPaddle.y = 360;\n }\n\n if (ball.y === 370) {\n ball.speedY += -5;\n }\n else if (ball.y === - 20) {\n ball.speedY += 5; \n }\n var counter1 = 0; \n var counter2 = 0; \n\n if (ball.x === 300) {\n counter1++;\n }\n else if (ball.x === -20) {\n counter2++;\n }\n\n\n\n\n \n }\n \n function redrawGameItem() {\n //Redraw the 3 game items: left paddle, right paddle, and ball \n\n $(ball.id).css(\"top\", ball.y); \n $(ball.id).css(\"left\", ball.x);\n $(leftPaddle.id).css(\"top\", leftPaddle.y);\n $(rightPaddle.id).css(\"top\", rightPaddle.y);\n\n\n \n }\n\n function doCollide(paddle, ball) {\n paddle.left = paddle.x;\n paddle.right = paddle.x + paddle.width; \n paddle.top = paddle.y;\n paddle.bottom = paddle.y + paddle.height; \n\n ball.left = ball.x;\n ball.top = ball.y;\n ball.right = ball.x + ball.width;\n ball.bottom = ball.y + ball.height; \n\n\n var maxPaddleY = board.height - leftPaddle.height;\n\n\n\n // return true if the objects do collide\n if (paddle.left < ball.right && paddle.right > ball.left && paddle.top < ball.bottom && paddle.bottom > ball.top) {\n return true; \n }\n else {\n return false; \n }\n\n \n };\n\n \n}", "function Game(container, ms)\n {\n this.container=document.querySelector(\"#canvas\");\n \n this.ms = ms,\n this.width = this.container.width,\n this.height = this.container.height,\n this.ctx = this.container.getContext(\"2d\"),\n this.play = true,\n \n this.rightDown = false,\n this.leftDown = false,\n this.topDown = false,\n this.bottomDown = false,\n this.spaceDown = false,\n \n this.init = function()\n { \n this.initKeys();\n //stocking the IntervalWorker so we can kill it when game has to end up\n IntervalWorker = setInterval(this.mainLoop, this.ms);\n \n },\n \n this.initKeys = function()\n {\n document.addEventListener('keydown', keyDown);\n document.addEventListener('keyup', keyUp);\n \n function keyDown(e){\n if (game.play === true)\n {\n if (e.keyCode === 39)\n game.rightDown = true;\n else if (e.keyCode === 37)\n game.leftDown = true;\n else if (e.keyCode === 38)\n game.topDown = true;\n else if (e.keyCode === 40)\n game.bottomDown = true;\n }\n }\n \n \n function keyUp(e){\n if (game.play === true)\n {\n if (e.keyCode === 39)\n game.rightDown = false;\n else if (e.keyCode === 37)\n game.leftDown = false;\n else if (e.keyCode === 38)\n game.topDown = false;\n else if (e.keyCode === 40)\n game.bottomDown = false;\n }\n }\n \n },\n \n\n //HERE THE MAIN LOOP FUNCTION FOR OUR GAME \n this.mainLoop = function() \n {\n\n if (game.play === true)\n { \n //console.log(`GAME IS TRUE YET ${game.play} .`)\n game.ctx.clearRect(0, 0, game.width, game.height);\n firstLevel.generate();\n \n \n player.create(\"./img/pacman.png\");\n player.move();\n\n redGhost.create(\"./img/redghost.png\");\n redGhost.move(2);\n \n blueGhost.create(\"./img/blueghost.png\");\n blueGhost.move(3);\n\n //update the score element\n document.querySelector(\"#score\").innerHTML= player.score\n \n if (player.score >= maxScore)\n {\n document.querySelector(\"#game_over\").style.color= \"green\"\n document.querySelector(\"#game_over\").innerHTML= \"You Won \"\n let end_time = performance.now();\n let start_time = t0;\n let game_duration = ((end_time - start_time) / 1000).toFixed(2)\n let game_points = (player.score / game_duration).toFixed(2)\n game_over.play();\n console.log(`La partie a pris ${game_duration} SECONDES.`);\n \n setTimeout(\n alert(`👏 BRAVO! Tu as gagné avec un score de ${player.score} et ça t'a pris exactement ${game_duration} secondes ! \\n tu as ${game_points} Points dans le classement`), \n 7000);\n\n clearInterval(IntervalWorker)\n }\n }\n\n if(game.play === false)\n {\n //console.log(\"Entered in game False\")\n document.querySelector(\"#game_over\").innerHTML= \"Game Over\";\n let end_time = performance.now();\n let start_time = t0;\n let game_duration = ((end_time - start_time) / 1000).toFixed(2)\n let game_points = (player.score / game_duration).toFixed(2)\n game_over.play();\n console.log(`TU AS PERDU... 😑 , la partie a durée ${game_duration} SECONDES.`)\n \n setTimeout(\n alert(`OOPS, Tu as Perdu... 😑 , la partie a durée ${game_duration} secondes! \\n tu as ${game_points} Points dans le classement`),\n 3000);\n clearInterval(IntervalWorker)\n }\n \n game.keyManager();\n },\n \n this.keyManager = function()\n {\n if (game.rightDown)\n player.direction = 0;\n if (game.leftDown)\n player.direction = 1;\n if (game.topDown)\n player.direction = 2;\n if (game.bottomDown)\n player.direction = 3;\n };\n }", "function checkGameConditions()\n{\n // if (difficulty === \"easy\")\n // {\n // //create 3 bunkers\n // numbunkers = 3;\n // //create 15 gunners\n // numGunners = 15;\n // //don't change background speed\n // }\n // //if difficulty is medium\n // if (difficulty === \"medium\")\n // {\n // //create 5 bunkers\n // numbunkers = 5;\n // //create 30 gunners\n // numGunners = 30;\n // //change background speed to -10\n // scrollSpeed = -10;\n // }\n // //if difficulty is hard\n // if (difficulty === \"hard\")\n // {\n // //create 7 bunkers\n // numbunkers = 7;\n // //create 50 gunners\n // numGunners = 50;\n // //change background speed to -15\n // scrollSpeed = -15;\n // }\n // //if difficulty is death\n // if (difficulty === \"death\")\n // {\n // //create 10 bunkers\n // numbunkers = 10;\n // //create 90 gunners\n // numGunners = 90;\n // //change background speed to -25\n // scrollSpeed = -25;\n // }\n}", "gameover() {\n if(this.count < 12)\n {\n this.time+=10\n } \n\n if(this.count > 12){\n this.count = 0;\n if(player2)\n {\n player2 = false;\n player1 = true;\n this.IsPlayerDie = false;\n this.life--\n currentScene = PLAYSCENE;\n player2_player = playerArray[0]\n playerArray[0] = player1_player\n player2_level = currentlevel\n currentlevel = player1_level\n barrier_gameplay = player1_barrier\n Scene.black_Scene = true;\n if(playerArray[0].life <=-1)\n {\n toMainScene()\n }\n }\n else if(player1)\n {\n if(player2_play)\n {\n player2 = true;\n player1 = false;\n this.IsPlayerDie = false;\n this.life--\n currentScene = PLAYSCENE;\n player1_player = playerArray[0]\n playerArray[0] = player2_player\n player1_level = currentlevel\n currentlevel = player2_level\n barrier_gameplay = player2_barrier\n Scene.black_Scene = true;\n if(playerArray[0].life <=-1)\n {\n toMainScene()\n }\n }\n else\n {\n toMainScene()\n }\n}\n}\n}", "function runStage() {\n imageMode(CORNERS);\n background(backgroundImg);\n //stageSong1.play();\n drawGridArray();\n renderTowers();\n renderEnemies();\n //In future: these will be synced with the music. //reset counter at 1600 for this song? Unsure. Also, can I reset frame count? //Long term, consider separate timers to creaate & to move enemies. \n //Will pause menu break this? - because still rendering on menu, even as game doesn't move...\n //To solve pause menu timing errors, just set an inc, that updates each frame the game is paused. Also make the base frameCount a sep variable, that just increments every frame. Then Either:\n //a) subtract the number of frames of pause menu from the core counter, or...\n //b) Just don't increment your new custom frame count val during pause, or ...\n //c) have different music on pause screen, and somehow have the in-game song pick up where it left off when play begins again. \n\n moveEnemies();\n if (frameCount%20 == 1) {\n fireTowers();\n }\n if (frameCount%40 == 1) { //occurs once/sec)\n checkEnemyAtGoal(); //done first to catch foes from prev loop. Gives players one more second to catch stragglers.\n }\n if (frameCount%120 == 1) { //occurs once/3 sec\n enemyArray[enemyArray.length] = new Enemy(gridArray[13][0], gridArray[3][12], int(random(0, 3)), gridArray, enemySprites); //(start node, goal node, size, type, gridArray);\n enemyArray[enemyArray.length-1].enemySetUp(); //to do this dynamically, put elsewhere & load all enemy paths simultaneously.\n print(\"new enemy type: \" + enemyArray[enemyArray.length-1].type);\n }\n\n updateProjectiles();\n\n updateLvUI();\n \n if(hitPoints < 0){\n gameState = 5;\n }\n}", "function next_step(id) {\n if (game_finished == false) {\n var x = parseInt(id.substring(0, id.indexOf(\"_\"))); // Horizontal\n var y = parseInt(id.substring(id.indexOf(\"_\") + 1)); // Vertical\n var former_grid = new Array();\n for (var i = 0; i < rows; i++) {\n former_grid[i] = new Array();\n for (var j = 0; j < rows; j++) {\n former_grid[i][j] = new Array();\n }\n }\n\n if ((tour % 2) == 0) {\n for (var i = 0; i < rows; i++) {\n for (var j = 0; j < rows; j++) {\n former_grid[i][j] = grid[i][j];\n }\n }\n }\n\n if (grid[x][y] != 0 || suicide(x, y) == true) {\n swal({\n title: \"Impossible de jouer ici !\",\n text: \"Essayez de placer votre pion ailleurs.\",\n type: \"error\"\n });\n return;\n } else {\n if (ko(x, y) == false) {\n grid[x][y] = player;\n identify_groups();\n scores();\n capture(x, y);\n update_html();\n tour += 1;\n auto_backup();\n\n atari(x, y);\n if (x + 1 <= 8) {\n atari(x + 1, y);\n }\n if (x - 1 >= 0) {\n atari(x - 1, y);\n }\n if (y + 1 <= 8) {\n atari(x, y + 1);\n }\n if (y - 1 >= 0) {\n atari(x, y - 1);\n }\n\n // Player alternation\n if (player == 1) {\n player = 2;\n } else {\n player = 1;\n }\n\n // IA turn\n if (player == 2 && ia_mode == true) {\n //setTimeout(function() {\n var ia_data = ia();\n next_step(ia_data);\n //}, 4000);\n }\n }\n }\n }\n}", "function continueGame(){\n removeModal();\n\n if(stopGame){\n addCirclesToHoverBar();\n //clearing all dots of game board\n clearGameBoard();\n clearMessageBoard(); \n changeMessageBoardBG(\"none\"); \n stopGame=false;\n count=30;\n startGame();\n }\n\n if(gamePaused){\n gamePaused=false;\n playGame();\n }\n}", "function startGame(){\r\n console.log(\"GAME START!!!\");\r\n endScreen.style.opacity = \"0\";\r\n endScreen.style.visibility = \"hidden\";\r\n endScreen.style.display = \"none\";\r\n // Generate the clues\r\n generateClues();\r\n // After the clues are generated, populate the game board\r\n setTimeout(() => {\r\n displayGameBoard();\r\n // Start the timer for 10 minutes\r\n startTimer(10);\r\n }, 5000)\r\n // generateClues() ? displayGameBoard() : setTimeout(displayGameBoard(), 1000);\r\n \r\n // Fade out the preview screen\r\n preview.style.opacity = \"0\";\r\n preview.style.visibility = \"hidden\";\r\n \r\n setTimeout(() => {\r\n // Fade in each column\r\n let delay = 0;\r\n for(let i = 0; i < categories.length; i++){\r\n for(let j = 0; j < categories[i].length; j++){\r\n categories[i][j].style.animationName = \"fadeInClues\";\r\n categories[i][j].style.animationDelay = `${delay}s`;\r\n }\r\n delay += 0.25;\r\n }\r\n }, 1500);\r\n}", "function startGame(){\n initialiseGame();\n}", "function playNormal(args) {\n\tlet ind1 = args[0];\n\tlet ind2 = args[1];\n\tlet rounds = args[2];\n\t\n\tind1.gameInit();\n\tind2.gameInit();\n\t\n\tfor (let i = 0; i < rounds; i++) {\n\t\tplayRound(ind1, ind2);\n\t}\n\t\n\tind1.gameEnd();\n\tind2.gameEnd();\n}", "function monitorGame(){\n //cheack the eggs in player\n checkContainer();\n checkTnt();\n checkPirate();\n checkPirateHit();\n checkCarrierHit();\n checkPlayerHit();\n dead();\n}", "function gameEngine() {\n // Updating the snake array and food\n isCollided(snakeArray);\n // Display the snake\n snakeDisplay();\n // Display the food\n foodDisplay();\n // Eating food\n foodEaten();\n // Updating the score\n setHighScore();\n // displaying the score\n displayScores();\n // moving the snake\n moveSnake();\n}", "function aiMove(){\n if (game1.toprow.length + game1.midrow.length + game1.botrow.length === 9 && !game1.toprow.includes(undefined) && !game1.midrow.includes(undefined) && !game1.botrow.includes(undefined)){\n $(\"#ticTacTurn\").html(\"Draw\");\n game1.won = true;\n $(\"#endgame\").show();\n } else {\n const pos = [parseInt(Math.random() * 3 + 0), parseInt(Math.random() * 3 + 0)]\n switch (pos[0]){\n case 0:\n if (game1.toprow[pos[1]] === undefined){\n aiPlace(pos);\n } else {\n aiMove();\n }\n break;\n case 1:\n if (game1.midrow[pos[1]] === undefined){\n aiPlace(pos);\n } else {\n aiMove();\n } \n break;\n case 2:\n if (game1.botrow[pos[1]] === undefined){\n aiPlace(pos);\n } else {\n aiMove();\n } \n break;\n default:\n console.log(\"AI placement error!\");\n }\n }\n}", "function startGame(game_spaces) {\n var $mainDiv = $('.gamemain');\n var clicks = 0;\n var clicksScore = 0;\n var winCase = 0;\n var answers = [];\n $mainDiv.empty(); //clear the gameboard\n generateRandomGameBoard(game_spaces, $mainDiv);\n gameLogic(winCase, answers, clicks, clicksScore);\n}", "function loop() {\n\t\t// searches textfile to make an array of games, run one of the games, returns whether person won or not\n\t\tconsole.log(\"loop has been called\");\n\n//START SEQUENCE HERE\n\t\t//var game = rungame();\n\t\ttimer();\n\t\tgameLoop = setInterval(timer,12000);\n\t\tscoreLoop = setInterval(scoreChange,100);\n\t\ttimeLoop = setInterval(callTime,1000);\n\t}", "function turnByTurn() {\n function CurrentPlayer(){\n if (currentPlayer < playersArray.length){\n currentPlayer ++;\n }\n else {\n currentPlayer = 0;\n }\n }\n function EndGame(){\n var stop = false;\n if (currentPlayer.health <= 0){\n stop = true;\n }\n while (!stop){\n stop = Move();\n if (!stop){\n CurrentPlayer();\n }\n else {\n alert(\"Bravo, \" + currentEnemy.name + \" gagne la partie !\")\n }\n }\n }\n function CurrentEnemy(){\n if (currentPlayer=0){\n currentEnemy=1;\n }\n if (currentPlayer=1){\n currentEnemy=0;\n }\n }\n}", "function autoPlayDumb() {\r\n\r\n let direction = randomInt(4);\r\n\r\n switch (direction) {\r\n case 0:\r\n monter();\r\n break;\r\n case 1:\r\n reculer();\r\n break;\r\n case 2:\r\n descendre();\r\n break;\r\n case 3:\r\n avancer();\r\n break;\r\n default:\r\n console.log(\"pas d'action sur cette touche\");\r\n }\r\n\r\n if (victory()) {\r\n endTheGame();\r\n autoPlayDumb();\r\n } else {\r\n setTimeout(function() {\r\n autoPlayDumb();\r\n }, 1);\r\n }\r\n}", "function startGame() {\n\n if (turn === 'player') {\n betMenu.style.visibility = 'visible'\n\n if (currentAl1Bet.length > 0) {\n liar.style.visibility = 'visible'\n }\n } else if (turn === 'al1') {\n\n setTimeout(() => {\n\n let sumOfPlayerBet = 0\n\n for (let i = 0; i < currentPlayerBet.length; i++) {\n sumOfPlayerBet += currentPlayerBet[i]\n }\n\n if (sumOfPlayerBet > getRandomArbitrary(20, 30)) {\n \n pirateOneBubble.style.visibility = 'visible'\n pirateOneSpeech.innerHTML = 'LIAR!'\n // make all al cups transparent\n document.querySelectorAll('.cup-al').forEach(cup => {\n cup.style.opacity = '0.4'\n })\n // show al dice\n diceAl1.style.opacity = '1'\n diceAl2.style.opacity = '1'\n // check if liar is true\n alLiar(player)\n\n\n } else {\n\n alBetIncrease(currentPlayerBet)\n }\n\n }, 4000)\n\n } else if (turn === 'al2') {\n\n setTimeout(() => {\n\n let sumOfAl1Bet = 0\n\n for (let i = 0; i < currentAl1Bet.length; i++) {\n sumOfAl1Bet += currentAl1Bet[i]\n }\n\n if (sumOfAl1Bet > getRandomArbitrary(15, 30)) {\n \n pirateTwoBubble.style.visibility = 'visible'\n pirateTwoSpeech.innerHTML = 'LIAR!'\n // make all al cups transparent\n document.querySelectorAll('.cup-al').forEach(cup => {\n cup.classList.add('cup-player')\n })\n // show al dice\n diceAl1.style.opacity = '1'\n diceAl2.style.opacity = '1'\n\n\n alLiar(currentAl1Bet)\n }\n else {\n alBetIncrease(al2)\n }\n }, 4000)\n\n }\n\n}", "function game() {\n addRandomSymbolToCard(allCards);\n setInterval(setTime, 1000);\n}", "function playGame(obj)\n{\n\tlet roundNo = 1;\n\tlet currentPlayers = obj.currentPlayers;\n\tlet countPlayers = 80;\n\tlet playersRemoved = 0;\n\tlet remainingNumbers = new Array();\n\tlet shouted;\n\t\n\tfor (let i = 0; i < 90; i++) \n\t\tremainingNumbers[i] = i + 1;\n\n\tconsole.log('************************ NEW GAME ************************\\n');\n\n\t///////////////////////////// affichage des joueurs et du sac /////////////////////////////\n\tconsole.log('Numéros dans le sac : ');\n\tconsole.log(remainingNumbers);\n\tconsole.log('\\nCartes des joueurs :\\n');\n\tfor (let player in currentPlayers)\n\t\tconsole.log('Joueur ' + player + ' : ' + JSON.stringify(currentPlayers[player].carte));\n\t//////////////////////////////////////////////////////////////////////////////////////\n\n\twhile(currentPlayers.length > 1)\n\t{\n\t\tconsole.log('\\n');\n\t\tconsole.log('ROUND ' + roundNo);\n\t\tconsole.log('Numéro crié : ');\n\t\tshouted = shoutedNumber(remainingNumbers);\n\t\tconsole.log(shouted);\n\t\tremainingNumbers = removeNumber(remainingNumbers, shouted);\n\t\tcurrentPlayers = eliminatePlayers(currentPlayers, shouted);\n\t\tplayersRemoved = countPlayers - currentPlayers.length;\n\t\tconsole.log('Nombre de joueurs éliminés dans ce round : ' + playersRemoved);\n\t\tcountPlayers = countPlayers - playersRemoved;\n\t\tconsole.log('Nombre de joueurs restant en jeu : ' + currentPlayers.length);\n\t\troundNo++;\n\t}\n\tconsole.log('\\n************************************************\\nFinal round : ' + (roundNo - 1) + '\\n************************************************');\n\treturn 'Game terminé';\n}", "function playGameSingle(){\n\n if (isGameOver) return\n\n if (currentPlayer === 'user') {\n turnDisplay.innerHTML = 'Your turn'\n\n computerSquares.forEach(square => square.addEventListener('click', function(e){\n\n shotFired = square.dataset.id \n revealSquare(square.classList)\n }))\n }\n\n if (currentPlayer === 'enemy') {\n turnDisplay.innerHTML = 'Enemy turn'\n\n setTimeout(enemyGo, 1000) // the timeout is for smoother experience \n }\n }", "function processGame() {\n // clear canvas for new draw,when update coordinate letters or not show some letters\n canvasDraw.clearRect(0, 0, canvas.width, canvas.height)\n if (Counterletters == MaxNumberLetter) { //win\n clearInterval(createLetter)\n win = true\n // check if create all letters and all letters caught\n letters.forEach((letter) => {\n if (letter.show && letter.colorCircle == colorLive || letter.time < 25) win = false\n })\n if (win) {\n canvasDraw.font = `${(canvas.height+canvas.width)/30}px arial`\n canvasDraw.textAlign = 'center'\n canvasDraw.fillStyle = 'black'\n canvasDraw.fillText('you have won in our Game', canvas.width / 2, canvas.height / 2)\n // stop create letter\n clearInterval(createLetter)\n // stop redraw game space\n cancelAnimationFrame(step)\n return 0\n }\n }\n // check if five letters arrive to canvas's left wihtout catching them\n if (CounterLeft >= 5) {\n // write lose phrase \n canvasDraw.font = `${(canvas.height+canvas.width)/30}px arial`\n canvasDraw.textAlign = 'center'\n canvasDraw.fillStyle = 'black'\n canvasDraw.fillText('good luck in the future', canvas.width / 2, canvas.height / 2)\n // stop create letter and delete it \n clearInterval(createLetter)\n // stop redraw gaem space\n cancelAnimationFrame(step)\n }\n //else coutinue with Game\n else {\n // update radius letters for change size screen ,.....\n let radius = (canvas.height + canvas.width) / 60\n // press in letters\n letters.forEach(letter => {\n //update or catch one of letters , start it big then not show \n if (letter.show) {\n // check if letter arrive to scanner left\n if (letter.show // letter is live and it without caught \n &&\n letter.colorCircle == colorLive // not catch\n &&\n letter.x - letter.radius < 0 //arrive left \n ) {\n CounterLeft++ // increase counter\n letter.show = false//hide the letter\n }\n // process when letter dead\n if (letter.colorCircle == colorDead) {\n letter.time++//change time to death\n }\n\n if (letter.time == 25) // it's time to death\n letter.show = false\n else // except update the letter -it's maybe live or about to die- ,and press radius for chang size\n letter.update(radius)\n }\n })\n }\n // counter error and counter are update in screen \n document.getElementById('Countererror').innerHTML = CounterError\n document.getElementById('Counterleft').innerHTML = 5 - CounterLeft\n // call function is responsible for call processGame 60 times per second\n step = requestAnimationFrame(processGame)\n}", "function gameLoop(e) {\n\t\t\t//game loop occurs here\n\t\tif(isPlaying) {\n\t\tcurrentTime = (new Date()).getTime();\n\t\ttimeLimit = 60;\n\t\t \t//bullet\n\t\t\tmoveBullets();\n\t\t\t\n\t\t\t\n\t\t\tif (rocketA.x>=w){\n\t\t\trocketA.x=w;\n\t\t}\n\t\t\n\t\tif (rocketA.x<=0){\n\t\t\trocketA.x=0;\n\t\t}\n\t\t\n\t\tif (rocketA.y>=h){\n\t\t\trocketA.y=h;\n\t\t}\n\t\t\n\t\tif (rocketA.y<=0){\n\t\t\trocketA.y=0;\n\t\t}\n\t\t\n\t\t\tperformBackgroundMovements(s);\n\t\t\tperformClockMovements(e);\n\t\t\n\t\t\tif (p % 5 == 0 && p>0){\n\t\t\t\ts += 1;\n\t\t\t g += 1;\n\t\t\t\tdy2 += 1;\n\t\t\t\t//console.log (\"s \" + s);\n\t\t\t\t//console.log (\"g \" + g);\n\t\t\t}\n\t\t}\n\t\t//console.log (\"game loop\");\n\t\t}", "function runProgram(){\n ////////////////////////////////////////////////////////////////////////////////\n //////////////////////////// SETUP /////////////////////////////////////////////\n ////////////////////////////////////////////////////////////////////////////////\n\n // Constant Variables\n var FRAME_RATE = 60;\n var FRAMES_PER_SECOND_INTERVAL = 1000 / FRAME_RATE;\n \n // Game Item Objects\n function GameItem(selector) {\n var obj = {};\n obj.$element = $(selector);\n obj.width = obj.$element.width();\n obj.height = obj.$element.height();\n obj.x = 0;\n obj.y = 0;\n obj.velocityX = 0;\n obj.velocityY = 0;\n return obj;\n }\n var $board = $('#board');\n var $score = $(\"#score\");\n \n\n // one-time setup\n var interval = setInterval(newFrame, FRAMES_PER_SECOND_INTERVAL); // execute newFrame every 0.0166 seconds (60 Frames per second)\n $(document).on('eventType', handleEvent); // change 'eventType' to the type of event you want to handle\n\n ////////////////////////////////////////////////////////////////////////////////\n ///////////////////////// CORE LOGIC ///////////////////////////////////////////\n ////////////////////////////////////////////////////////////////////////////////\n\n /* \n On each \"tick\" of the timer, a new frame is dynamically drawn using JavaScript\n by calling this function and executing the code inside.\n */\n function newFrame() {\n \n\n }\n \n /* \n Called in response to events.\n */\n function handleEvent(event) {\n\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n ////////////////////////// HELPER FUNCTIONS ////////////////////////////////////\n ////////////////////////////////////////////////////////////////////////////////\n\n \n function endGame() {\n // stop the interval timer\n clearInterval(interval);\n\n // turn off event handlers\n $(document).off();\n }\n \n}", "function ClassicGame(){}", "function updateLoop() {\n setupGraphics();\n if (window.playing) {\n var other_options = '[Mouse Wheel] zoom' + '<br>' + '[Z] reset zoom' + '<br>' + '[ESC] quick respawn' + '<br>'\n + '[Tab] toggle stats' + '<br>' + '[G] toggle graphic' + '<br>' + '[Q] quit to menu' + '<br>' + '[O] toggle this window';\n botContainer.innerHTML = ('[T] bot: ' + handleTextColor(bot.isBotEnabled));\n radiusMultiplierContainer.textContent = ('[A/S] radius multiplier: ' + bot.opt.radiusMult);\n autoRespawnContainer.innerHTML = ('[I] auto respawn: ' + handleTextColor(window.autoRespawn));\n visualDebuggingContainer.innerHTML = ('[Y] visual debugging: ' + handleTextColor(window.visualDebugging));\n logDebuggingContainer.innerHTML = ('[U] log debugging: ' + handleTextColor(window.logDebugging));\n keyOptionsContainer.innerHTML = other_options;\n positionContainer.textContent = 'X: ' + (~~window.view_xx || 0) + ' Y: ' + (~~window.view_yy || 0);\n // Target coordinates are only in Bot mode\n if (window.goalCoordinates && window.goalCoordinates.sz && bot.isBotEnabled) {\n targetContainer.textContent = ('Target X: ' + window.goalCoordinates.x + ' Y: ' + window.goalCoordinates.y + ' sz: ' + window.goalCoordinates.sz);\n } else {\n targetContainer.textContent = '';\n }\n if (window.bso && currentIP != window.bso.ip + ':' + window.bso.po) {\n currentIP = window.bso.ip + \":\" + window.bso.po;\n ipContainer.textContent = 'IP: ' + currentIP;\n }\n\n zoomContainer.textContent = 'Zoom: ' + window.gsc.toFixed(2);\n xferContainer.textContent = 'BPS: ' + window.rdps;\n var currentScore = Math.floor(150 * (window.fpsls[window.snake.sct] + window.snake.fam / window.fmlts[window.snake.sct] - 1) - 50) / 10;\n if (currentScore > highScore) {\n highScore = currentScore;\n localStorage.setItem('high-score', highScore);\n highscoreContainer.textContent = 'High Score: ' + highScore;\n }\n } else {\n xferContainer.textContent = '';\n zoomContainer.textContent = '';\n positionContainer.textContent = '';\n }\n\n setTimeout(updateLoop, 1000);\n }", "function startGame() {\n removeClicks();\n resetGame();\n addPattern();\n addPattern();\n playPattern();\n}", "function startGame(gameMode, characterName) {\n const player = (name, characterName) => {\n return { name, characterName };\n };\n\n const playerOne = player(`<i class=\"fas fa-${characterName}\"></i>`, characterName);\n const playerTwo = player(`<i class=\"fab fa-optin-monster\"></i>`, \"Monster\");\n\n\n let board = [\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"];\n let currentPlay = playerOne;\n\n //startBackgroundMusic();\n initEventListeners();\n\n // Starts the background music on a loop.\n function startBackgroundMusic() {\n let backgroundMusic = new Audio(\"./sounds/scary-background.mp3\");\n backgroundMusic.play();\n backgroundMusic.volume = 0.3;\n backgroundMusic.loop = true;\n }\n\n // Initializes event listeners for each game spot.\n function initEventListeners() {\n document.querySelectorAll(\".game-spot\").forEach(gameSpot => {\n gameSpot.addEventListener(\"click\", event => {\n if (gameSpot.innerHTML == \"\") {\n gameSpot.innerHTML = currentPlay.name;\n board[gameSpot.getAttribute(\"data-index\")] = currentPlay;\n checkWinner(board, currentPlay);\n changePlayer();\n if (gameMode == \"hvc\") {\n computerMove();\n checkWinner(board, currentPlay);\n changePlayer();\n }\n }\n });\n });\n }\n\n // Computers move.\n function computerMove() {\n let gameSpots = document.querySelectorAll(\".game-spot\");\n for (let i = 0; i < gameSpots.length; i++) {\n if(gameSpots[i].innerHTML == \"\") {\n console.log(\"looping\");\n gameSpots[i].innerHTML = currentPlay.name;\n board[gameSpots[i].getAttribute(\"data-index\")] = currentPlay;\n break;\n }\n }\n }\n\n // Changes player.\n function changePlayer() {\n if (currentPlay == playerOne) {\n currentPlay = playerTwo;\n } else {\n currentPlay = playerOne;\n }\n }\n\n // Checks to see if there is a winner based on the current board.\n function checkWinner(board, currentPlay) {\n let winner = winTest(board, currentPlay);\n if (winner == playerOne || winner == playerTwo) {\n // Make Modal and announce winner.\n makeResultsModal(winner);\n } else if (winner == \"tie\") {\n // Make Modal and announce tie.\n makeResultsModal(\"tie\");\n }\n }\n\n function makeResultsModal(winner) {\n let modalElement = document.querySelector(\"#results-modal\");\n let options = {\n inDuration: 500,\n outDuration: 0,\n opacity: 1.0,\n dismissible: false\n };\n \n let resultsModal = M.Modal.init(modalElement, options);\n resultsModal.open();\n\n if (winner == \"tie\") {\n document.querySelector(\"#winner-display\").innerText = \"IT'S A TIE!\";\n } else {\n document.querySelector(\"#winner-icon\").innerHTML = winner.name;\n document.querySelector(\"#winner-display\").innerText = winner.characterName.toUpperCase();\n }\n\n document.querySelector(\"#play-again-button\").addEventListener(\"click\", function(){\n location.reload();\n });\n }\n\n // Contains and checks all win cases.\n function winTest(board, side) {\n const winConditions = [\n [0, 1, 2],\n [3, 4, 5],\n [6, 7, 8],\n [0, 4, 8],\n [2, 4, 6],\n [0, 3, 6],\n [1, 4, 7],\n [2, 5, 8]\n ];\n\n for (let i = 0; i < winConditions.length; i++) { \n let sum = 0;\n let w = winConditions[i];\n \n for (let b = 0; b < w.length; b++) {\n if(board[w[b]] === side) {\n sum++\n }\n }\n \n if (sum === 3) {\n return side;\n }\n\n // check tie:\n let spotsTaken = 0;\n for (let i = 0; i < board.length; i++) {\n if(board[i] !== \"\") {\n spotsTaken++;\n }\n }\n\n if (spotsTaken == 9) {\n return \"tie\";\n } \n }\n\n return false;\n }\n}", "tickCaller(game){\n game.tick();\n }", "function gameLoop(timestamp){\n\n //c_ship.dispatchEvent(mousemove);\n\n\n tempo++; // indice utilizado para criacao de asteroides\n// console.log(tempo);\n\n // condicional de controle de FPS, soh atualiza o quadro quando\n // o intervalo minimo de tempo eh passado\n if (timestamp < lastFrameTimeMs + (1000/maxFPS)){\n return;\n }\n lastFrameTimeMs = timestamp;\n // chamadas de desenho & calculo\n draw.camera(camera, ctx_ship); // desenha no canvas da camera\n draw.allAsteroids(); // desenha todos os asteroides do vetor\n draw.allEnemies();\n draw.allLasers();\n draw.allBlasters();\n calculo.versor(ship.versor); // calcula vetor versor (de geometria analitica) do ship\n draw.ship(ctx_ship, ship.raio, calculo.anguloGiro(ship, data.coord)); // desenha o ship atualizado com a rotacao\n// limob demanda que puxa esse script (e taAsteroides();\n// console.log(ship.vetorLaser);\n// colisoes.confere(); // confere colisao de tudo (asteroides, ship, laser, bordas)\n // if abaixo calcula um versor a partir do ultimo touch n drag\n // e manda para o servidor\n draw.hud(); // desenha hud\n sound.play();\n}", "function startGame() {\n showGuessesRemaining();\n showWins();\n}", "function ExecuteGamescreen() {\n while (in_game) {\n // Remember if there is pattern in the background\n background = led.point(new_x, new_y)\n if (background) {\n score += 1\n }\n if (!(quiet)) {\n if (!(background)) {\n music.playTone(131, music.beat(BeatFraction.Sixteenth))\n }\n else {\n music.playTone(131 + 20, music.beat(BeatFraction.Sixteenth))\n }\n } else {\n // 1/16 equivalent\n basic.pause(music.beat(BeatFraction.Sixteenth))\n }\n led.plotBrightness(new_x, new_y, 255)\n curent_time = input.runningTime()\n // Wait until time passed or aby key is pressed\n while (input.runningTime() - curent_time < speed && !(input.buttonIsPressed(Button.A) || input.buttonIsPressed(Button.B))) {\n\n }\n // A+B - Restart this screen\n if (input.buttonIsPressed(Button.AB)) {\n in_game = false\n } else {\n if (input.buttonIsPressed(Button.A) || input.buttonIsPressed(Button.B)) {\n if (!(quiet)) {\n music.playTone(165, music.beat(BeatFraction.Quarter))\n } else {\n basic.pause(music.beat(BeatFraction.Quarter))\n }\n selectedDots[new_y] = new_x\n total_tries += 1\n speed = speed - (level - 3) * 10\n // ChooseXDirection() This is end of the current\n // screen. Let's check result\n if (total_tries == 5) {\n CheckResult()\n in_game = false\n } else if (!(background)) {\n CheckResult()\n in_game = false\n }\n } else {\n // Background reconstruction\n if (background) {\n led.plotBrightness(new_x, new_y, 10)\n if (score > 29) {\n CheckResult()\n in_game = false\n }\n } else {\n led.unplot(new_x, new_y)\n }\n }\n // Wait until keys are released\n while (input.buttonIsPressed(Button.A) || input.buttonIsPressed(Button.B)) {\n\n }\n }\n MovetoXYCoordinates()\n }\n}", "function startgame() {\t\r\n\tloadImages();\r\nsetupKeyboardListeners();\r\nmain();\r\n}", "function mainGameLoopSlow() {\r\n\t\r\n\tif (gameData.autoStartSimulation)\r\n\t\tstartSimulation()\r\n\t\r\n\tif (gameData.autoStartTask) \r\n\t\tdiseaseControlTask()\r\n\t\r\n\tif (gameData.autoCheckSimulation)\r\n\t\tcheckResults()\r\n\t\r\n\tif (gameData.autoAdvertiseBroker)\r\n\t{\r\n\t\tif (gameData.currencyApplicantSpeed > gameData.autoAdvertiseSpeedValue || (gameData.smarterAdvertisingManagerBroker && gameData.currencyApplicantTransferAmount < gameData.autoAdvertiseAmountValue))\r\n\t\t{\r\n\t\t\tadvertise()\r\n\t\t}\r\n\t}\r\n\r\n\tif(gameData.numberOfTiles >= 17)\r\n\t{\r\n\t\ttabs('mapTile-4-0', 'inline-block')\r\n\t}\r\n\tif(gameData.numberOfTiles >= 18)\r\n\t{\r\n\t\ttabs('mapTile-4-1', 'inline-block')\r\n\t}\r\n\tif(gameData.numberOfTiles >= 19)\r\n\t{\r\n\t\ttabs('mapTile-4-2', 'inline-block')\r\n\t}\r\n\tif(gameData.numberOfTiles >= 20)\r\n\t{\r\n\t\ttabs('mapTile-4-3', 'inline-block')\r\n\t}\r\n\tif(gameData.numberOfTiles >= 21)\r\n\t{\r\n\t\tgameData.numberOfTiles = 20\r\n\t}\r\n\r\n\tstartCurrentTask(gameData.currentTask)\t\r\n\tstartCurrentTask(gameData.currentTask2)\t\r\n\r\n\t\r\n\tif(gameData.currentSkill !== 'none')\r\n\t\tbarStartGranularSkillBasic(gameData.currentSkill)\r\n\r\n\t\t\r\n\tif(gameData.bachelorsDegreeFinance)\r\n\t{\r\n\t\tif(beckyRandom(2) == 1 && gameData.alphaCoinsExchangeRate < 200)\r\n\t\t\tgameData.alphaCoinsExchangeRate += 1\r\n\t\telse if (gameData.alphaCoinsExchangeRate > 50)\r\n\t\t\tgameData.alphaCoinsExchangeRate -= 1\r\n\t}\r\n\t\r\n\tgameData.achievementBar = 0\r\n for (i = 1; i < 7; i++) {\r\n\t\t\r\n\t\tif (gameData['achievement' + i]) {\r\n\t\t\tgameData.achievementBar += 100 / 7\r\n\t\t}\r\n\t}\r\n\t\r\n\tgameData.lastSaveTime = Date.now()\r\n\t\r\n\tmoveBar('achievement')\r\n\tupdateMapTileAesthetic()\r\n\tsetTimeout(mainGameLoopSlow, 500)\r\n}", "function main() {\n\n if (has_game_ended()){\n coins+=scores \n console.log(coins)\n score=0\n clear_board()\n return coins}\n\n changing_direction = false;\n setTimeout(function onTick() {\n clear_board();\n drawFood();\n move_snake();\n drawSnake();\n // Repeat\n main();\n }, 100)\n }", "function main() {\n if (has_game_ended()) return;\n\n changing_direction = false;\n setTimeout(function onTick() {\n clear_board();\n gridBoard();\n numPathBoard();\n drawFood();\n move_snake();\n drawSnake();\n // Call main again\n main();\n }, delay)\n }", "function playGame() {\n if (game) {\n board.updateGrid();\n }\n}", "function main() {\n var now = Date.now();\n var dt = (now - lastTime) / 1000.0;\n if(player.lives === 0) {\n gameState = 'game over';\n }\n update(dt);\n render(); \n lastTime = now;\n win.requestAnimationFrame(main);\n }", "function drawing_menu_loop() { \r\n\t/* Drawing the background */\r\n\tGame.background.draw();\r\n\t/* Drawing each module in the Module Array, and making them moving */\r\n\tfor(var i=Game.moduleArray.length-1; i>=0; i--) {\r\n\t\tGame.moduleArray[i].draw();\r\n\t}\r\n\t\r\n\t/* Drawing the main square only if it is not dead */\r\n\tif(!Game.mobile.isDead) {\r\n\t\tGame.mobile.draw();\t\r\n\t\t/* searching for a module ahead at a 3 square distance (distance to land on a SQUARE) */\r\n\t\tfor(var i=0;i<Game.moduleArray.length-1;i++) {\r\n\t\t\t/* don't want the MainSquare to jump on the last SQUARE */\r\n\t\t\tif(Game.moduleArray[i].y <= Measures.lineHeightCoef * Canvas.height - 5*Measures.halfSquareHeight) \r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* if it's not a SQUARE */\r\n\t\t\tif(Game.moduleArray[i].type != SQUARE)\r\n\t\t\t\tcontinue;\t\r\n\t\t\t\r\n\t\t\t/* if it's a SQUARE we look if he is 3 SQUARE distant ahead */\r\n\t\t\tif(((Game.mobile.x + 8*Measures.halfSquareHeight) >= Game.moduleArray[i].x) \r\n\t\t\t\t&& (Game.mobile.x - Measures.halfSquareHeight <= Game.moduleArray[i].x)) {\r\n\t\t\t\tif(Game.moduleArray[i].y <= (Measures.initialPos+Game.mobile.currentLine*2*Measures.halfSquareHeight)) {\r\n\t\t\t\t\t/* making MainSquare jump */\r\n\t\t\t\t\tGame.mobile.onJump = true;\r\n\t\t\t\t\tGame.mobile.onContact = false;\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}\r\n\t\t\r\n\t\r\n\t/* Calling the function as a loop to make an animation */\r\n\tGame.id=window.requestAnimationFrame(drawing_menu_loop);\r\n}", "function theGameLoop() {\n\t\n\tcurrent_time = new Date().getTime();\n\tcurrent_tick_ms = BABYLON.Tools.GetDeltaTime();\n\tdeltaTime = current_tick_ms/1000; // divide by 1000 to get per second\n\tif (deltaTime > 0.25) { // this makes deltaTime stick to above 4fps\n\t\tdeltaTime = 0.25;\n\t} else if (deltaTime < 0.01) { // this makes deltaTime stick to below 100fps\n\t\tdeltaTime = 0.01;\n\t}\n\t\n\tvar moved = false;\n\tvar input_this_time = [];\n\t\n\tvar x_dir = 0;\n\tvar y_dir = 0;\n\t\n\tif (moveForward && !moveReverse) {\n\t\tinput_this_time.push('u');\n\t\ty_dir += speed * deltaTime;\n\t\tmoved = true;\n\t}\n\t\n\tif (!moveForward && moveReverse) {\n\t\tinput_this_time.push('d');\n\t\ty_dir -= speed * deltaTime;\n\t\tmoved = true;\n\t}\n\t\n\tif (rotateLeft && !rotateRight) {\n\t\tinput_this_time.push('l');\n\t\tx_dir += speed * deltaTime;\n\t\tmoved = true;\n\t}\n\t\n\tif (!rotateLeft && rotateRight) {\n\t\tinput_this_time.push('r');\n\t\tx_dir -= speed * deltaTime;\n\t\tmoved = true;\n\t}\n\t\n\tif (moved) {\n\t\t\n\t\t//console.log('doing physics for you');\n\t\t\n\t\t// this is for client-side prediction\n\t\tplayer_origin.position.x += x_dir;\n\t\tplayer_origin.position.y += y_dir;\n\t\tplayer_origin.position.x = player_origin.position.x.toFixed(5) * 1;\n\t\tplayer_origin.position.y = player_origin.position.y.toFixed(5) * 1;\n\t\t\n\t\t// see if we've collided with anyone!\n\t\tif (Object.keys(other_clients).length > 0) {\n\t\t\tfor (var other_id in other_clients) {\n\t\t\t\tif (other_clients[other_id].ball == undefined) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (circleCollision({x: player_origin.position.x, y: player_origin.position.y, r: 0.5}, {x: other_clients[other_id].ball.position.x, y: other_clients[other_id].ball.position.y, r: 0.5})) {\n\t\t\t\t\t// bounce backwards from each other...\n\t\t\t\t\t//console.log(client_id + ' and ' + other_client_id + ' collided!');\n\t\t\t\t\tplayer_origin.position.x += -x_dir;\n\t\t\t\t\tplayer_origin.position.y += -y_dir;\n\t\t\t\t\tplayer_origin.position.x = player_origin.position.x.toFixed(5) * 1;\n\t\t\t\t\tplayer_origin.position.y = player_origin.position.y.toFixed(5) * 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// see if we've collided with the world!\n\t\t// for this usage, stay between 15 and -15 in a square\n\t\tif (player_origin.position.x > 15) {\n\t\t\tplayer_origin.position.x = 15;\n\t\t} else if (player_origin.position.x < -15) {\n\t\t\tplayer_origin.position.x = -15;\n\t\t}\n\t\tif (player_origin.position.y > 15) {\n\t\t\tplayer_origin.position.y = 15;\n\t\t} else if (player_origin.position.y < -15) {\n\t\t\tplayer_origin.position.y = -15;\n\t\t}\n\t\t\n\t\tclient_last_position = { x: player_origin.position.x, y: player_origin.position.y };\n\t\t//console.log('new position: ');\n\t\t//console.log({ seq: input_seq, pos: client_last_position });\n\t\tpositions.push( { seq: input_seq, pos: client_last_position, ct: current_time } );\n\t\t\n\t\t// send these inputs to the server to see what it does\n\t\tvar latest_inputs = { i: input_this_time, seq: input_seq, dt: deltaTime, ct: current_time };\n\t\tsocket.emit('new-inputs', latest_inputs);\n\t\tinput_seq++;\n\t}\n\t\n\t// go through and show other clients\n\tif (Object.keys(other_clients).length > 0) {\n\t\t//console.log('doing physics for other players');\n\t\t\n\t\t// turn back time\n\t\tcurrent_time -= 100;\n\t\t\n\t\tfor (var other_id in other_clients) {\n\t\t\t\n\t\t\tif (other_clients[other_id].ball == undefined) {\n\t\t\t\tother_clients[other_id].ball = BABYLON.Mesh.CreateSphere(\"player-\"+other_clients[other_id].id, 5, 1.0, scene);\n\t\t\t\tother_clients[other_id].ball.material = new BABYLON.StandardMaterial(\"other-player-texture\", scene);\n\t\t\t\tother_clients[other_id].ball.material.diffuseColor = new BABYLON.Color3(1, 0, 0);\n\t\t\t\tother_clients[other_id].ball.position.x = other_clients[other_id].positions[0].pos.x;\n\t\t\t\tother_clients[other_id].ball.position.y = other_clients[other_id].positions[0].pos.y;\n\t\t\t}\n\t\t\t\n\t\t\tvar pos_length = other_clients[other_id].positions.length;\n\t\t\t\n\t\t\tif (pos_length == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// old way -- just move them to the latest position\n\t\t\t// other_clients[other_id].ball.position.x = other_clients[other_id].positions[pos_length-1].pos.x;\n\t\t\t// other_clients[other_id].ball.position.y = other_clients[other_id].positions[pos_length-1].pos.y;\n\t\t\t\n\t\t\t// new way -- we need to move them between two old position updates\n\t\t\t// find those updates and lerp between them based on where the clients' current time is between them\n\t\t\tvar prev_pos;\n\t\t\tvar next_pos;\n\t\t\tfor (var i = 0; i < pos_length - 1; i++) {\n\t\t\t\tif (current_time > other_clients[other_id].positions[i].ct && current_time < other_clients[other_id].positions[i+1].ct) {\n\t\t\t\t\tprev_pos = other_clients[other_id].positions[i];\n\t\t\t\t\tnext_pos = other_clients[other_id].positions[i+1];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (prev_pos == undefined && next_pos == undefined) {\n\t\t\t\t// move them the old fashioned way... snap to latest\n\t\t\t\t//other_clients[other_id].ball.position.x = other_clients[other_id].positions[pos_length-1].pos.x;\n\t\t\t\t//other_clients[other_id].ball.position.y = other_clients[other_id].positions[pos_length-1].pos.y;\n\t\t\t\tother_clients[other_id].ball.position.x = other_clients[other_id].position.x;\n\t\t\t\tother_clients[other_id].ball.position.y = other_clients[other_id].position.y;\n\t\t\t} else {\n\t\t\t\t// lerp between positions\n\t\t\t\t// how far are we between current time and the previous time?\n\t\t\t\t// what's the spatial distance between the previous position and the next one?\n\t\t\t\t// move the other player \n\t\t\t\tvar time_percentage = (current_time - prev_pos.ct) / (next_pos.ct - prev_pos.ct);\n\t\t\t\tvar x_distance = next_pos.pos.x - prev_pos.pos.x;\n\t\t\t\tvar y_distance = next_pos.pos.y - prev_pos.pos.y;\n\t\t\t\t// lerp = (start + percent*(end - start));\n\t\t\t\tother_clients[other_id].ball.position.x = prev_pos.pos.x + (x_distance * time_percentage);\n\t\t\t\tother_clients[other_id].ball.position.y = prev_pos.pos.y + (y_distance * time_percentage);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// always do this\n\t\t\tother_clients[other_id].ball.position.x = other_clients[other_id].ball.position.x.toFixed(5) * 1;\n\t\t\tother_clients[other_id].ball.position.y = other_clients[other_id].ball.position.y.toFixed(5) * 1;\n\t\t\tother_clients[other_id].position.x = other_clients[other_id].ball.position.x;\n\t\t\tother_clients[other_id].position.y = other_clients[other_id].ball.position.y;\n\t\t}\n\t}\n\t\n}", "function gameplay() {\n //initiates game play on click\n gameBoard.find('.tileContainer').click(function() {\n var tileContainer = $(this);\n var tile = tileContainer.data(tileDataKey);\n var flipNum;\n var prevTileContainer;\n var prevTile;\n\n //only flip if the tile was face down\n if(!tile.faceUp) {\n animateFlip(tileContainer, tile);\n\n //record the move until the end of the game\n tileFlipArr.push(tileContainer);\n\n //store the current move # just in case they click really fast and length changes before the check finishes\n flipNum = tileFlipArr.length;\n\n //if this is an even tile flip\n if(0 == flipNum % 2) {\n //get the move immediately before this one\n prevTileContainer = tileFlipArr[flipNum - 2];\n prevTile = prevTileContainer.data(tileDataKey);\n\n //check for a matched pair\n if(tile.tileNum == prevTile.tileNum) {\n ++matches;\n } else {\n ++misses;\n setTimeout(function() {\n animateFlip(tileContainer, tile);\n animateFlip(prevTileContainer, prevTile);\n }, 750); //1 second was too long. It irritated me during testing.\n }\n }\n $('#matches').text('Matches: ' + matches + ' (' + (8 - matches) + ' left)');\n $('#misses').text('Misses: ' + misses);\n }\n\n if(matches >= 8) {\n win();\n }\n });\n } //gameplay", "function game()\n {\n \tlet playerScore = 0;\n \tlet computerScore = 0;\n \tlet ties = 0;\n \tconst MAX_ROUNDS = 5;\n\n \tfor(let i = 0; i < MAX_ROUNDS; i++)\n \t{\n \t\tif(!(playerScore === 3 || computerScore === 3))\n \t\t{\n \t\t\tlet outcome = playRound();\n\n\t \t\tif(outcome === \"win\")\n\t \t\t{\n\t \t\t\tplayerScore++;\n\t \t\t}\n\t \t\telse if(outcome === \"lose\")\n\t \t\t{\n\t \t\t\tcomputerScore++;\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tties++;\n\t \t\t}\n\n\t \t\tgetCurrentScore(playerScore, computerScore, ties);\n\t \t}\n \t}\n\n \tgetOutcome(playerScore, computerScore, ties);\n }", "function gameLoop() {\n\n handleUI();\n\n switch (gameMode) {\n case kMode_Init:\n ctx.clear(0, 0, canvasWidth, canvasHeight);\n ctx.drawText('Click on \"Start Game\"', 110, 200);\n break;\n\n case kMode_Play:\n rotationAngle += rotationFactor;\n ctx.rotation(rotationAngle);\n\n advance();\n drawAll();\n break;\n\n case kMode_Finished:\n ctx.clear(0, 0, canvasWidth, canvasHeight);\n ctx.drawText('Game over!', 140, 200);\n break;\n }\n}", "function gameLoop() {\n // Clear the screen, this make characters movements\n context.clearRect(0, 0, GAME_WIDTH, GAME_HEIGHT);\n\n gameHUD.liveIndicator(shipLives, ship.crash);\n gameHUD.scoreIndicator(ship.score);\n\n if(ship.score > gameHandler.highestScore) {\n gameHandler.highestScore = ship.score;\n localStorage.setItem(KEY_SCORE_SAVE, gameHandler.highestScore);\n }\n\n gameHUD.highestScore(gameHandler.highestScore);\n\n if(!ship.crash) {\n if(ship.alive) {\n\n // Show game level when changes\n if (gameHUD.textAlpha >= 0) {\n gameHUD.levelIndicadorFade(gameLevel);\n }\n\n // Making ship movements\n ship.movingForward = keys[87];\n\n if (keys[68]) {\n ship.rotate(1);\n }\n\n if (keys[65]) {\n ship.rotate(-1);\n }\n\n // Updating the Ship and drawing\n if (ship.blinkOn) {\n ship.update();\n ship.draw(debug);\n }\n\n // Handle ship blinking\n if (ship.blinkNum >= 0) {\n // Toggles the blink state\n ship.blinkOn = ship.blinkNum % 2 === 0;\n\n // Reducing blink time\n ship.blinkTime--;\n\n // Reducing blink num\n if (ship.blinkTime === 0) {\n ship.blinkTime = Math.ceil(ship.blinkDuration * 60);\n ship.blinkNum--;\n }\n }\n\n // New level when the last asteroid is destroyed\n if (rocks.length === 0) {\n gameLevel++;\n gameHandler.newLevel(gameLevel);\n gameHUD.textAlpha = 1;\n }\n\n // Bullet Gun\n if (bullets.length !== 0) {\n // Collision Detection\n collision.bulletCollisionRocks(rocks, bullets, gameLevel, ship);\n collision.bulletOffScreen(bullets);\n\n for (let i = 0; i < bullets.length; i++) {\n bullets[i].update();\n bullets[i].draw(debug);\n }\n }\n } else {\n gameHUD.gameOverIndicador();\n }\n } else {\n ship.explosion();\n }\n\n // Rocks behavior\n if(rocks.length !== 0) {\n for(let j = 0; j < rocks.length; j++) {\n rocks[j].update();\n rocks[j].draw(debug);\n\n // Collision Detection\n if(!ship.crash && ship.alive) {\n if(ship.blinkNum === -1) {\n const distance = collision.distanceBetweenEntities(\n ship.x, ship.y, rocks[j].x, rocks[j].y);\n\n const sumOfRadius = ship.radius + rocks[j].radius;\n\n if (distance < sumOfRadius) {\n ship.explosion();\n }\n }\n } else {\n ship.explosionTime--;\n\n if (ship.explosionTime === 0) {\n shipLives--;\n gameHUD.textAlpha = 1;\n\n if (--shipLives === 0) {\n gameHandler.gameOver(ship);\n } else {\n ship = gameHandler.newShip();\n }\n }\n }\n }\n }\n\n // Looping\n requestAnimationFrame(gameLoop);\n}", "function takeTurn () {}", "function gamePlay(playerMove) {\n const computerChoice = generateComputerMove();\n //learnt the use of switch statements via tutorial - used to execute one of many blocks of code to be used. \n //switch expression is evaluated once and then compared against the \"case\" for a match then code can be executed. \n //originally used if statements but this was an easier way to execute.\n switch (playerMove + computerChoice) {\n case \"rockscissor\":\n case \"paperrock\":\n case \"scissorspaper\":\n //change console log \"you win\" to call the win function \n winner(playerMove, computerChoice);\n break; //stops the switch statement from continuing to run\n case \"rockpaper\":\n case \"paperscissors\":\n case \"scissorsrock\":\n // change console log to call the lose function \n //lose(playerMove, computerChoice)\n loser(playerMove, computerChoice);\n break;\n case \"rockrock\":\n case \"paperpaper\":\n case \"scissorsscissors\":\n tie(playerMove, computerChoice);\n break;\n\n }\n\n\n}", "function aiFunc(){\n if (playerTurn ==1){\n return\n }\n if (playerTurn == 0){\n if (ai ==1){\n pickSquare ()\n }\n if (ai==2){\n mediumAI ()\n }\n }\n}", "function game() {\n round = 0;\n while (round < 5) {\n playerSelection = prompt('Enter rock, paper, or scissors.');\n computerSelection = computerPlay();\n console.log(playRound(playerSelection,computerSelection));\n round++;\n }\n \n if (w > l) {\n return 'You Win the Game!';\n } else if (w < l) {\n return 'You Lose the Game!';\n } else {\n return 'It\\'s a draw!';\n }\n }", "function game() {\n for (let round = 1; round <= 5; round++) {\n //playerSelection = humanPlay();\n computerSelection = computerPlay();\n let oneRoundGame = playRound(playerSelection, computerSelection);\n console.log(`round # ${round}: Human = ${playerSelection} & AI = ${computerSelection} | ${oneRoundGame} |`);\n }\n}", "function gameLoop() {\r\n\t//behind the scenes canvas\r\n\tctx.clearRect(0, 0, width, height);\r\n\tdrawScore();\r\n\tsnake.move();\r\n\tsnake2.move();\r\n\tif (settings.biteme) { biteMe(snake, snake2); }\r\n\tif (settings.snakebite) { snakeBite(snake, snake2); }\r\n\tsnake.draw();\r\n\tsnake2.draw();\r\n\tapple.draw();\r\n\tif (settings.applex2) { apple2.draw(); }\t\r\n}", "function mainGameLoop(game, games){\n // get randomized game.turn\n // game.turn = Math.round(Math.random()) + 1;\n game.turn = 1;\n game.turnNum = 0;\n game.round = 1;\n console.log(\"Game commencing; get ready!\");\n\n // set the random decks\n game.p1['deck_spell'] = randomDeck(cardIDs);\n game.p1['deck_element'] = randomElement();\n game.p2['deck_spell'] = randomDeck(cardIDs);\n game.p2['deck_element'] = randomElement();\n\n // get each player's sockets from sockets, telling their game.game.turn number\n game.p1S.emit('playerNumber', {you: 1});\n game.p2S.emit('playerNumber', {you: 2});\n\n // Generate Hand\n if(game.turn == 1){\n game.p1.drawSpell(4);\n game.p2.drawSpell(3);\n game.p1.drawElement(1);\n game.p2.drawElement(1);\n }else{\n game.p1.drawSpell(3);\n game.p2.drawSpell(4);\n game.p1.drawElement(1)\n game.p2.drawElement(1);\n }\n\n // tell the current game.turn to all players\n game.p1S.emit('curTurn', {curTurn: game.turn});\n game.p2S.emit('curTurn', {curTurn: game.turn});\n\n // Send the first state of board\n sendBoard(game.p1, game.p2, game.p1S, game.p2S);\n\n dbFunc.createGame(game.p1, game.p2, true, game.turn, ((game.turn == 1) ? [1,2] : [2,1])).then(function(result){\n console.log(result);\n game.gameID = result['_id'];\n console.log(game.gameID);\n });\n\n // play card event\n game.p1S.on('playCard', function(e){\n if(game.turn == 1 && e.playerID == game.p1.playerID){\n if(game.p1.hand.includes(parseInt(e.cardNo))){\n const card = cards.find(card => card.cardNo === parseInt(e.cardNo));\n if(game.p1.playCard(card)){\n console.log('game.p1 playing card: ' + e.cardNo);\n console.log(card);\n const cardIndex = game.p1.hand.indexOf(card.cardNo);\n game.p1.hand.splice(cardIndex, 1);\n game.p1.doLifesteal(game.p2.applyCard(card));\n successTurn(game.p1S);\n game.p2S.emit('lastCard', {cardNo: e.cardNo})\n sendBoard(game.p1, game.p2, game.p1S, game.p2S);\n winCheck = checkWin(game.p1, game.p2, game.p1S, game.p2S)\n if(winCheck){\n endGame(game.p1S, game.p2S, game.gameID, games);\n dbFunc.updateGameWinner(game.gameID, game.p1, game.p2, game.turn, game.turnNum, game.round, winCheck).then(function(result){\n console.log('db update successful');\n }).catch(function(err){\n console.log('error updating db');\n })\n return;\n }\n }else{\n sendCardWarning(game.p1S, \"insufficient resources to play card\");\n console.log(\"insufficient resources to play card\");\n }\n }else{\n sendCardWarning(game.p1S, \"card not in hand\");\n console.log(\"card not in hand\");\n }\n }else{\n sendTurnWarning(game.p1S, 'its not your game.turn');\n console.log('its not your game.turn');\n }\n \n });\n\n game.p2S.on('playCard', function(e){\n if(game.turn == 2 && e.playerID == game.p2.playerID){\n if(game.p2.hand.includes(parseInt(e.cardNo))){\n const card = cards.find(card => card.cardNo === parseInt(e.cardNo));\n if(game.p2.playCard(card)){\n console.log('game.p2 playing card: ' + e.cardNo);\n console.log(card);\n const cardIndex = game.p2.hand.indexOf(card.cardNo);\n game.p2.hand.splice(cardIndex, 1);\n game.p2.doLifesteal(game.p1.applyCard(card));\n successTurn(game.p2S);\n game.p1S.emit('lastCard', {cardNo: e.cardNo})\n sendBoard(game.p1, game.p2, game.p1S, game.p2S);\n winCheck = checkWin(game.p1, game.p2, game.p1S, game.p2S)\n if(winCheck){\n endGame(game.p1S, game.p2S, game.gameID, games);\n dbFunc.updateGameWinner(game.gameID, game.p1, game.p2, game.turn, game.turnNum, game.round, winCheck).then(function(result){\n console.log('db update successful');\n }).catch(function(err){\n console.log('error updating db');\n })\n return;\n }\n }else{\n sendCardWarning(game.p2S, \"insufficient resources to play card\");\n console.log(\"insufficient resources to play card\");\n }\n }else{\n sendCardWarning(game.p2S, \"card not in hand\");\n console.log(\"card not in hand\");\n }\n }else{\n sendTurnWarning(game.p2S, 'its not your game.turn');\n console.log('its not your game.turn');\n }\n });\n\n // end game.turn event\n game.p1S.on('endTurn', function(e){\n if(game.turn == 1 && e.playerID == game.p1.playerID){\n console.log('ending game.p1 game.turn');\n game.p1.turnEnd();\n game.turn = 2;\n game.turnNum ++;\n game.round = Math.ceil(game.turnNum/2);\n winCheck = checkWin(game.p1, game.p2, game.p1S, game.p2S)\n if(winCheck){\n endGame(game.p1S, game.p2S, game.gameID, games);\n dbFunc.updateGameWinner(game.gameID, game.p1, game.p2, game.turn, game.turnNum, game.round, winCheck).then(function(result){\n console.log('db update successful');\n }).catch(function(err){\n console.log('error updating db');\n })\n return;\n }\n if(!drawManager(game.p2, game.round)){\n overDraw(game.p1S, game.p2S, 1);\n endGame(game.p1S, game.p2S, game.gameID, games);\n dbFunc.updateGameWinner(game.gameID, game.p1, game.p2, game.turn, game.turnNum, game.round, 1).then(function(result){\n console.log('db update successful');\n }).catch(function(err){\n console.log('error updating db');\n })\n return;\n }\n sendTurn(game.p1S, game.p2S, game.turn);\n sendBoard(game.p1, game.p2, game.p1S, game.p2S);\n dbFunc.updateGameTurn(game.gameID, game.p1, game.p2, game.turn, game.turnNum, game.round).then(function(result){\n console.log('db update successful');\n }).catch(function(err){\n console.log('error updating db');\n });\n console.log(game.p1);\n console.log(game.p2);\n }else{\n console.log('not your game.turn ', game.turn)\n }\n });\n\n game.p2S.on('endTurn', function(e){\n if(game.turn == 2 && e.playerID == game.p2.playerID){\n console.log('ending game.p2 game.turn');\n game.p2.turnEnd();\n game.turn = 1;\n game.turnNum ++;\n game.round = Math.ceil(game.turnNum/2);\n winCheck = checkWin(game.p1, game.p2, game.p1S, game.p2S)\n if(winCheck){\n endGame(game.p1S, game.p2S, game.gameID, games);\n dbFunc.updateGameWinner(game.gameID, game.p1, game.p2, game.turn, game.turnNum, game.round, winCheck).then(function(result){\n console.log('db update successful');\n }).catch(function(err){\n console.log('error updating db');\n })\n return;\n }\n if(!drawManager(game.p1, game.round)){\n overDraw(game.p1S, game.p2S, 2);\n endGame(game.p1S, game.p2S, game.gameID, games);\n dbFunc.updateGameWinner(game.gameID, game.p1, game.p2, game.turn, game.turnNum, game.round, 2).then(function(result){\n console.log('db update successful');\n }).catch(function(err){\n console.log('error updating db');\n })\n return;\n }\n sendTurn(game.p1S, game.p2S, game.turn);\n sendBoard(game.p1, game.p2, game.p1S, game.p2S);\n dbFunc.updateGameTurn(game.gameID, game.p1, game.p2, game.turn, game.turnNum, game.round).then(function(result){\n console.log('db update successful');\n }).catch(function(err){\n console.log('error updating db');\n });\n console.log(game.p1);\n console.log(game.p2);\n }else{\n console.log('not your game.turn ', game.turn)\n }\n \n });\n \n game.p1S.on('disconnect', function(){\n if(!checkWin(game.p1, game.p2, game.p1S, game.p2S)){\n game.p2S.emit('winner', {winner: 2});\n gameRunning = false;\n }\n game.p2S.disconnect();\n cleanup(players, sockets, game.gameID, games);\n })\n\n game.p2S.on('disconnect', function(){\n if(!checkWin(game.p1, game.p2, game.p1S, game.p2S)){\n game.p1S.emit('winner', {winner: 1});\n gameRunning = false;\n }\n game.p1S.disconnect();\n cleanup(players, sockets, game.gameID, games);\n })\n \n}" ]
[ "0.6723328", "0.65571755", "0.6491383", "0.6438042", "0.6430582", "0.6383302", "0.638224", "0.6370705", "0.63647467", "0.6356082", "0.6340284", "0.6336723", "0.63341904", "0.63219833", "0.6316161", "0.6305208", "0.6297144", "0.6288664", "0.6282659", "0.6271422", "0.6265592", "0.6256356", "0.625504", "0.62440664", "0.6243229", "0.62316805", "0.6230173", "0.6211934", "0.6209211", "0.6206489", "0.62044555", "0.61914617", "0.6189562", "0.6182672", "0.6181464", "0.6167036", "0.6162303", "0.6160717", "0.61537915", "0.61521006", "0.61412376", "0.61402076", "0.61371535", "0.613605", "0.61319584", "0.6127305", "0.61185724", "0.6115017", "0.61125404", "0.6110209", "0.61037546", "0.6102376", "0.60999554", "0.6098379", "0.60883844", "0.6084416", "0.6082562", "0.608219", "0.60791564", "0.60655046", "0.6063986", "0.60623235", "0.60588175", "0.60570157", "0.6056733", "0.60546935", "0.6053111", "0.60474527", "0.60474235", "0.6046348", "0.60404867", "0.6038174", "0.60326415", "0.6027395", "0.6027279", "0.60272545", "0.60252213", "0.60238224", "0.6022259", "0.60210943", "0.601959", "0.60140663", "0.60135305", "0.6009417", "0.6008022", "0.60068864", "0.60068065", "0.6005836", "0.60006183", "0.5999366", "0.59976286", "0.5990851", "0.59903103", "0.59882456", "0.59853256", "0.5984892", "0.5982343", "0.5978127", "0.5977212", "0.5977197", "0.59734297" ]
0.0
-1
HELPER FUNCTIONS FOR EVENT LISTENERS
function checkKey(e) { if (e.keyCode === 87) controls.moveUp = true; else if (e.keyCode === 83) controls.moveDown = true; else if (e.keyCode === 65) controls.moveLeft = true; else if (e.keyCode === 68) controls.moveRight = true; else if (e.keyCode === 38) controls.faceUp = true; else if (e.keyCode === 40) controls.faceDown = true; else if (e.keyCode === 37) controls.faceLeft = true; else if (e.keyCode === 39) controls.faceRight = true; else if (e.keyCode === 32) controls.shoot = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventHelper (possibleEvents) {\n }", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function registerEvents() {\n}", "handleEvents() {\n }", "function FsEventsHandler() {}", "ConnectEvents() {\n\n }", "function EventEmitter(){}// Shortcuts to improve speed and size", "function EventReader() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}" ]
[ "0.75532854", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.72231007", "0.6923514", "0.6903391", "0.6870549", "0.6865423", "0.67132056", "0.66783124", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543", "0.6525543" ]
0.0
-1
Loads the function code from a local disk path.
static fromAsset(path, options) { try { jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_assets_AssetOptions(options); } catch (error) { if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") { Error.captureStackTrace(error, this.fromAsset); } throw error; } return new AssetCode(path, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LocalLoader() { }", "load() {}", "load() {}", "loadFile(path) {\r\n path = this.getAbsoluteDataPath(path);\r\n // Check if a file exists at this path\r\n if (FS_1.FS.existsSync(path)) {\r\n try {\r\n // If it exists, read the contents\r\n const contents = FS_1.FS.readFileSync(path, \"utf8\");\r\n // Return undefined if there are no contents\r\n if (contents.length == 0)\r\n return;\r\n // Parse it to json\r\n const data = JSON.parse(contents);\r\n // Return the data\r\n return data;\r\n }\r\n catch (e) {\r\n // If anything goes wrong, just log an error. TODO: Properly handle these errors\r\n console.error(`Something went wrong while retrieving ${path}:`, e);\r\n }\r\n }\r\n }", "loadFromFile(path, callback){\n\t\tfs.readFile(path, 'utf8', function(err, data){\n\t\t\tif(err){\n\t\t\t\tconsole.log(err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//data is the string returned by fs's readFile function.\n\t\t\tlet newData = JSON.parse(data);\n\n\t\t\tthis.idIterator = newData.idIterator;\n\t\t\tthis.currentFeature = newData.currentFeature;\n\t\t\tthis.geo = newData.geo;\n\t\t\tcallback();\n\t\t}.bind(this))\n\t}", "function loadFunctions () {\n console.log('Loading in functions')\n let fs = require('fs')\n let methods = fs.readdirSync('./functions/');\n for (let i in methods) {\n let file = methods[i].split('.')[0]\n require('./functions/' + file)\n }\n}", "function getDataFromLocal(path) {\n return tr.get_datas(path);\n}", "async load( path ) {\n return false;\n }", "function f() {return load('f.js');}", "function load(key) { return local.load(key); }", "static LoadFromFile() {}", "function loadJS(path,name) {\n js[name] = fs.readFileSync(__dirname+path,\"utf8\")\n}", "function loadJS(filePath) {\n console.log(\"Found \"+filePath);\n var contents = fs.readFileSync(filePath, {encoding:\"utf8\"});\n var realExports = exports;\n exports = undefined;\n var r = eval(contents);\n exports = realExports; // utf8 lib somehow breaks this\n return r;\n /* the code below would be better, but it doesn't seem to work when running\n CLI - works fine when running as a module. */\n //return require(\"vm\").runInThisContext(contents, filePath );\n}", "function runCode() {\n\tPromise.all(preLoad()).then((neverland) => {\n\t\tif (neverland)\n\t\t\tneverland.forEach((p) => {usr_res[p[0]] = p[1];});\n\t\t//console.log(usr_res);\n\n\t\tstopCode();\n\n\t\tconst code = Blockly.JavaScript.workspaceToCode(workspace);\n\t\ttry {\n\t\t\teval(code);\n\t\t}\n\t\tcatch (e) {\n\t\t\tstopCode();\n\t\t\talert(e);\n\t\t}\n\t}).catch((err) => {\n\t\tconsole.log(err);\n\t});\n}", "function loadFunction(wwwRoot, fnName) {\r\n if (fnCache[fnName]) {\r\n return fnCache[fnName];\r\n }\r\n var assemblyFile = path.join(wwwRoot, 'lib\\\\zip\\\\zip.dll');\r\n var fn = edge.func({\r\n assemblyFile: assemblyFile,\r\n typeName: 'zip.Lib',\r\n methodName: fnName\r\n });\r\n fnCache[fnName] = fn;\r\n return fn;\r\n }", "load() {\n\n }", "async load () {}", "function load_function_text(funShun) {\n // Iterate through the present JS file's text.\n var line_num = 0; // Track line num so you can grab the previous line.\n var current_function = [];\n var copying_lines = false;\n this_file.forEach(function(line) {\n // Start copying when 'function funShun' is spotted. (Start pushing from previous line.)\n if (line.match(\"function \" + funShun)) {\n current_function.push(this_file[line_num - 1]);\n current_function.push(line);\n copying_lines = true;\n line_num += 1;\n // Stop copying and return when '}' by itself is spotted.\n } else if (copying_lines && line === \"}\") {\n // Add this line.\n current_function.push(line);\n // Stop copying when end of function is reached.\n copying_lines = false;\n } else {\n // Omits the lines that call codeReporter(); pushes all others.\n if (copying_lines && !line.match(/codeReporter\\(\"/)) current_function.push(line);\n line_num += 1;\n }\n });\n return current_function;\n}", "function loadFile(path, callback) {\n fs.readFile(__dirname + \"/data/\" + path, \"utf-8\", (err, data) => {\n if (err) {\n print(\"error\");\n } else {\n callback(data);\n }\n });\n}", "function loadFile(path) {\n if (typeof process !== \"undefined\" && process.versions && !!process.versions.node && require.nodeRequire) {\n var fs = require.nodeRequire('fs');\n var file = fs.readFileSync(path, 'utf8');\n if (file.indexOf('\\uFEFF') === 0)\n return file.substring(1);\n return file;\n }\n else {\n var file = new java.io.File(path),\n lineSeparator = java.lang.System.getProperty(\"line.separator\"),\n input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), 'utf-8')),\n stringBuffer, line;\n try {\n stringBuffer = new java.lang.StringBuffer();\n line = input.readLine();\n if (line && line.length() && line.charAt(0) === 0xfeff)\n line = line.substring(1);\n stringBuffer.append(line);\n while ((line = input.readLine()) !== null) {\n stringBuffer.append(lineSeparator).append(line);\n }\n return String(stringBuffer.toString());\n }\n finally {\n input.close();\n }\n }\n }", "function loadFile(path) {\n if (typeof process !== \"undefined\" && process.versions && !!process.versions.node && require.nodeRequire) {\n var fs = require.nodeRequire('fs');\n var file = fs.readFileSync(path, 'utf8');\n if (file.indexOf('\\uFEFF') === 0)\n return file.substring(1);\n return file;\n }\n else {\n var file = new java.io.File(path),\n lineSeparator = java.lang.System.getProperty(\"line.separator\"),\n input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), 'utf-8')),\n stringBuffer, line;\n try {\n stringBuffer = new java.lang.StringBuffer();\n line = input.readLine();\n if (line && line.length() && line.charAt(0) === 0xfeff)\n line = line.substring(1);\n stringBuffer.append(line);\n while ((line = input.readLine()) !== null) {\n stringBuffer.append(lineSeparator).append(line);\n }\n return String(stringBuffer.toString());\n }\n finally {\n input.close();\n }\n }\n }", "function load()\n{\n dashcode.setupParts();\n loadVersionString();\n loadUserAppKey();\n}", "function getSourceFile(host, path) {\n const buffer = host.read(path);\n if (!buffer) {\n throw new schematics_1.SchematicsException(`Could not find file for path: ${path}`);\n }\n const content = buffer.toString();\n return ts.createSourceFile(path, content, ts.ScriptTarget.Latest, true);\n}", "load(field) {\n return new code.Load(field);\n }", "static LoadFromMemory() {}", "load() {\r\n\r\n }", "onCodePathStart(codePath, node) {\n funcInfo = {\n upper: funcInfo,\n codePath,\n hasReturn: false,\n node\n };\n }", "function load(){\r\n\r\n}", "async loadFile(path) {\n const buf = await fs_extra_1.readFile(path);\n await this.client.raw(buf.toString());\n }", "function load()\n{\n dashcode.setupParts();\n}", "function load()\n{\n dashcode.setupParts();\n}", "function load()\n{\n dashcode.setupParts();\n}", "function readFileEval(path) {\n if (path === EVAL_PATH)\n return EVAL_INSTANCE.input;\n try {\n return fs_1.readFileSync(path, 'utf8');\n }\n catch (err) { /* Ignore. */ }\n}", "async function load_init_file(filepath) {\n console.log(\"initfile :\", filepath);\n\n const u = new URL(filepath);\n fetch(u).then(res => res.text()).then(text => {\n try {\n execute(text);\n } catch (exception) {\n console.log(\"commands failed\");\n }\n });\n }", "function LocalFileSystem() {}", "function AmandaJSLoad(filepath)\n{\n clearErrors();\n\n Module.ccall('Load', // name of C function\n 'bool', // return type\n ['string'], // argument types\n [filepath]); // arguments\n\n initAutoComplete($(\"#input\"));\n}", "function loadPath(pathStr, basePathStr) {\n var path = pathStr\n , match;\n //if the path begins with a dot, it's relitive to the current project\n if (pathStr[0] === \".\") {\n path = node_path.join(\n basePathStr\n , pathStr.substring(1)\n );\n }\n //otherwise, if the path has a project path in it, create the project path\n else if ((match = pathStr.match(PROJ_PATH_PATT))) {\n path = node_path.join(\n workspacePath\n , defaults.sourceDirectory\n , match[1].replace(DOT_PATT, \"/\")\n , match[2]\n );\n }\n\n return fs_fileLoader(\n path\n )\n .then(function thenParseData(data) {\n return parseData(data);\n });\n }", "function loadFile(path) {\n if (typeof process !== \"undefined\" && process.versions && !!process.versions.node && require.nodeRequire) {\n var fs = require.nodeRequire('fs');\n var file = fs.readFileSync(path, 'utf8');\n if (file.indexOf('\\uFEFF') === 0)\n return file.substring(1);\n return file;\n }\n else {\n var encoding = \"utf-8\",\n file = new java.io.File(path),\n lineSeparator = java.lang.System.getProperty(\"line.separator\"),\n input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)),\n stringBuffer, line,\n content = '';\n try {\n stringBuffer = new java.lang.StringBuffer();\n line = input.readLine();\n if (line && line.length() && line.charAt(0) === 0xfeff)\n line = line.substring(1);\n stringBuffer.append(line);\n while ((line = input.readLine()) !== null) {\n stringBuffer.append(lineSeparator);\n stringBuffer.append(line);\n }\n content = String(stringBuffer.toString());\n }\n finally {\n input.close();\n }\n }\n }", "function LoadLocalFile(file, idDiv, func){\n $(\"#divClaims\").hide();\n if(idDiv == undefined){\n idDiv = 'divCuerpo';\n } else if(idDiv == ''){\n idDiv = 'divCuerpo'; \n }\n getID(idDiv).innerHTML = LoadingViewHTML();\n var url = 'inc/' + file + \".html\";\n var request = new Request(url, {\n \tmethod: 'GET',\n \t// mode: 'cors',\n \tredirect: 'follow',\n \theaders: new Headers({\n \t\t'Content-Type': 'text/plain'\n \t})\n });\n\n \n fetch(request)\n .then( res => { \n return res.text() \n })\n .then( data => {\n getID(idDiv).innerHTML = data;\n LoadComponentMaterialize();\n if(func != undefined)func();\n \n })\n .catch( err => {\n console.log(err);\n })\n}", "function __krequire(path) {\n return eval('(()=>{var exports={};' + fs.readFileSync(___data + path, 'utf8').toString() + ';return exports})()');\n }", "function loadCode_dep(text) {\n\tif (isdef(text)) text = text.trim();\n\tif (isEmpty(text)) {\n\t\t//console.log('text is empty!!! no script loaded!');\n\t\treturn;\n\t}\n\t//console.log('text', text);\n\n\tvar scriptTag = document.createElement(\"script\");\n\tscriptTag.onload = () => console.log('code loaded.....');\n\tscriptTag.setAttribute(\"type\", \"text/javascript\");\n\tscriptTag.innerHTML = text;\n\tdocument.getElementsByTagName(\"body\")[0].appendChild(scriptTag);\n}", "function fn(path){\n var orig = path;\n path = fn.resolve(path);\n return require(path, parent, orig);\n }", "function getSourceFile(host, path) {\n return cdk_1.getSourceFile(host, path);\n}", "static async loadPath(source, entries) {\n const stat = Fs.statSync(source.path);\n if (stat.isDirectory()) {\n await Helper_1.loadDirectory(source, entries);\n }\n else if (stat.isFile()) {\n await Helper_1.loadFile(source, entries);\n }\n }", "function loadContents (path, prefix) {\n var fullFile = require.resolve(path);\n var data = fs.readFileSync(fullFile).toString();\n return data.replace(/%%PREFIX%%/g, prefix).replace(/%%DATE%%/g, version);\n}", "function loadFFLYKaitai(fname,callback){\n\t// initialize a FileReader object\n\tvar binary_reader = new FileReader;\n\t// get local file\n\tfetch(fname)\n\t\t.then(res => res.blob()) // convert to blob\n\t\t.then(blob =>{ \n\t\t// interpret blob as an \"ArrayBuffer\" (basic binary stream)\n\t\tbinary_reader.readAsArrayBuffer(blob)\n\t\t// wait until loading finishes, then call function\n\t\tbinary_reader.onloadend = function () {\n\t\t\t// convert ArrayBuffer to FireflyFormat\n\t\t\tkaitai_format = new FireflyFormat1(\n\t\t\t\tnew KaitaiStream(binary_reader.result));\n\t\t\t// call compileFFLYData as a callback\n\t\t\tcallback(kaitai_format);\n\t\t}\n\t});\n}", "function loadSaveFromFile(file, closure) {\r\n \"use strict\";\r\n var reader = new FileReader();\r\n reader.onload = function(e) {\r\n var text = e.target.result;\r\n closure(text.match(/[^\\r\\n]+/g));\r\n };\r\n reader.readAsText(file);\r\n}", "function safeLoadFile(dir) {\r\n\tif (fs.existsSync(dir)) {\r\n\t\tlog(0, 'Loaded: ' + dir);\r\n\t\treturn fs.readFileSync(dir);\r\n\t} else {\r\n\t\tlog(2, 'Unable to load: ' + dir);\r\n\t\treturn '{}';\r\n\t}\r\n}", "function loadCode(clickedLink) {\n\n\tvar Element \t\t= document.getElementById('presentationCode');\n\n\t//console.log(\"clicked : \" + clickedLink)\n\t$(\"#presentationCode\").hide()\n\tif (( index = codeFiles.findIndex(x => x.includes(clickedLink))) != -1) {\n\t\t// randomize the query to never get the cached version of the file\n\t\t//fetch(\"/resources/code/\" + \"arrayExamples.java\" + \"?\" + performance.now())\n\t\tfetch(\"/resources/code/\" + codeFiles[index] + \"?\" + performance.now())\n\t\t\t.then(res => res.text())\n\t\t\t.then(res => escapeXml(res))\n\t\t\t.then(res => \"<pre><code>\\n\" + res + \"</pre></code>\")\n\t\t\t.then(res =>\n\t\t\t\t{\n\t\t\t\t\tElement.innerHTML \t= res\n\t\t\t\t\treturn res\n\t\t\t\t})\n\t\t\t\t.then(res => {\n\t\t\t\t\thljs.initHighlighting.called = false;\n\t\t\t\t\thljs.initHighlighting();\n\t\t\t\t\t$(\"#presentationCode\").fadeIn(1500)\n\t\t\t\t})\n\t}\n}", "function GCodeImporter() {}", "static async loadFile(source, entries) {\n if (Path.extname(source.path) === '.js') {\n const code = await Helper_1.readFile(source.path);\n const file = Path.basename(source.name);\n if (file === 'index') {\n entries.push(Helper_1.createEntry(source.name, false, code));\n entries.push(Helper_1.createLink(Path.dirname(source.name), file));\n }\n else {\n entries.push(Helper_1.createEntry(source.name, false, code));\n }\n }\n }", "async function ireeLoadProgram(vmfbPathOrBuffer) {\n return _ireeLoadProgram(vmfbPathOrBuffer);\n}", "function load_present_file_for_code_reporter() {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\",\"javascript/showcase.js\");\n xhr.send(null);\n xhr.onreadystatechange = function(){\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n this_file = xhr.responseText.match(/[^\\r?\\n]+/g);\n } else {\n present_file_loadable = false;\n }\n }\n };\n}", "function loadFile(name, path) {\n if ( current_windows[name] ) {\n current_windows[name].loadURL(`file://${__dirname}/static/` + path)\n }\n}", "async function load_init_file(filepath) {\n const u = new URL(filepath);\n return await fetch(u).then(res => res.text()).then(text => text);\n}", "function preload() {\n result = loadStrings('data.txt');\n}", "async load(id) {\n if (!id || !filter(id) || !fsSync.existsSync(id)) return;\n\n let source;\n try {\n source = fsSync.readFileSync(id, {encoding: 'utf8'});\n } catch (err) {\n this.warn(`Failed to load file '${id}' : ${err.message}`);\n return;\n }\n\n /** @type {GLSLStageName} */\n const stage = stageRegexes.find(([, regex]) => id.match(regex))?.[0];\n if (!stage) {\n this.error({message: `File '${id}' : extension did not match a shader stage.`});\n }\n\n if (pluginOptions.glslify) {\n try {\n source = await glslifyProcessSource(id, source, pluginOptions.glslifyOptions,\n (message) => this.error({message}));\n } catch (err) {\n this.error({message: `Error processing GLSL source with glslify:\\n${err.message}`});\n }\n }\n\n try {\n const result = await glslProcessSource(id, source, stage, pluginOptions);\n result.code = generateCode(result.code);\n return result;\n } catch (err) {\n this.error({message: `Error processing GLSL source:\\n${err.message}`});\n }\n }", "function loadForPath(path, id, onComplete, args){\r\n function loadForId(id, Path){\r\n var url = args.getUrl(Path?Path:path, id);\r\n if(loadedUrls[url]){\r\n onComplete(Path?Path:path, id);\r\n }else{\r\n loadScript(url, function(err){\r\n if(err){\r\n var newPath = replacePath(Path?Path:path);\r\n if(newPath !== (Path?Path:path)){\r\n loadForId(id, newPath);\r\n }else{\r\n if(args.degrade){\r\n id = args.degrade(id);\r\n if(id){\r\n loadForId(id);\r\n return;\r\n }\r\n }\r\n onComplete(path, id, err); \r\n }\r\n\r\n }else{\r\n loadedUrls[url] = 1;\r\n //FIXME (by eddy.zeng) temporary change, since we're using require.js in jsonp, \r\n //delay call callback to make sure jsonp content evaluated before trying to get language content from setting map.\r\n setTimeout(function() {\r\n onComplete(Path?Path:path, id);\r\n }, 4);\r\n }\r\n });\r\n }\r\n }\r\n loadForId(id);\r\n }", "function loadJS(url, code) {\n var script = document.createElement(\"script\")\n document.head.appendChild(script)\n script.onload = code\n script.onreadystatechange = code\n script.src = url\n}", "static LoadFromFileAsync() {}", "function load() {\n\t\t\t\tvar path = includes.shift();\n\t\t\t\tif (path) {\n\t\t\t\t\tvar url = /^\\/lib\\//.test(path) ? path.substring(1) : path;\n\t\t\t\t\t// Switch to the editor console globally so loaded libraries use\n\t\t\t\t\t// our own console too:\n\t\t\t\t\twindow.console = scope.console;\n\t\t\t\t\t$.getScript(url, load).fail(function(xhr, error) {\n\t\t\t\t\t\tscope.console.error('Cannot load ' + path + ': ' + error);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tevaluateCode();\n\t\t\t\t\twindow.console = realConsole;\n\t\t\t\t}\n\t\t\t}", "loadLocalTLE(id, callback) {\n $.get(\"assets/tle/\" + id + \".txt\", function (data) {\n callback(data.split(\"\\n\"));\n });\n }", "function LoadData(path) {\n\tLoadJSON(path + 'UseCaseData.json', 'Use case data loaded successfully.', function(response) {\n\t\tTestScriptData = JSON.parse(response);\n\t});\n}", "function requireval(path) {\n const res = resolve.sync(path, { basedir: __dirname });\n const filesrc = fs.readFileSync(res, 'utf8');\n // eslint-disable-next-line no-eval\n eval(filesrc + '\\n\\n//# sourceURL=' + path);\n}", "function load()\n{\n\tsetupParts();\n\t\n\tmain();\n}", "function loadFoo() {\n // 这是懒加载 foo,原始的加载仅仅用来做类型注解\n var _foo = require('foo');\n // 现在,你可以使用 `_foo` 替代 `foo` 来作为一个变量使用\n}", "function loadJs(path){\n\tjQuery.getScript(path);\n}", "function loadFile(name) {\n\treturn readFileSync(join(__dirname, name), 'utf-8');\n}", "function loadFileFromPath(path) {\n if (searching == \"scouts\") {\n // copies the scouts file over\n let file = fs.readFileSync(path).toString();\n if (isJsonString(file) && file[0] == \"{\") {\n fs.writeFileSync(\"./resources/scouts.json\", file);\n }\n // copies the schedule file over\n } else if (searching == \"schedule\") {\n let file = fs.readFileSync(path).toString();\n if (isJsonString(file) && file[0] == \"{\") {\n fs.writeFileSync(\"./resources/schedule.json\", file);\n }\n }\n // reload that page!\n window.location.reload();\n}", "function LoadDataFile(Func)\n{\n var xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n dataObj = JSON.parse(this.responseText);\n Func();\n }\n };\n xhttp.open(\"GET\", \"./data/projects.json\", true);\n xhttp.send();\n}", "_parseFile(requireName, filepath, cache, ifStoreSrc, fakeCode, coreModules) {\n let code, e;\n if (filepath in cache) { return cache[filepath]; }\n const isCore = (coreModules && (Array.from(coreModules).includes(requireName))) || !/[\\\\\\/]/.test(filepath);\n const isBinary = /\\.node$/i.test(filepath);\n const unit = {\n isCore, // built-in nodejs modules\n isBinary, // binary modules, \".node\" extension\n fpath: isCore ? requireName : filepath, // the file path\n mpath: '', // the path of module that contains this file\n mname: '', // the module name\n src: \"\",\n requires: [], // array of dependencies, each element is {node, unit}\n // node is the parded ast tree node\n // unit is another unit\n warnings: [],\n // if set, then this file is the \"main\" file of a node module, as defined by nodejs\n package: undefined,\n };\n cache[filepath] = unit;\n if (isCore || isBinary) { return unit; }\n if (path.extname(filepath).toLowerCase() === \".json\") {\n if (ifStoreSrc) { unit.src = fs.readFileSync(filepath).toString(); }\n return unit;\n }\n\n // determine if parameter filepath itself represents a module, if so, mark the module by setting the\n // package member\n (function() {\n const detail = bna.identify(filepath);\n\n unit.mname = detail.mname;\n unit.mpath = detail.mpath;\n unit._detailPackage = detail.package;\n const mainfiles = [path.join(detail.mpath, \"index.js\"), path.join(detail.mpath, \"index.node\")];\n if (detail.package) {\n detail.package.name = detail.mname; // ensure correct package name\n if (detail.package.main) {\n const main = path.resolve(detail.mpath, detail.package.main);\n mainfiles.push(main);\n // append .js .node variations as well\n if (path.extname(main) === '') { mainfiles.push(...Array.from([`${main}.js`, `${main}.node`] || [])); }\n }\n }\n if (Array.from(mainfiles).includes(unit.fpath)) {\n return unit.package = detail.package || { name: detail.mname, version: 'x' }; // construct default package if no package.json\n }\n })();\n\n // do first pass without parsing location info (makes parsing 3x slower), if bad require is detected,\n // then we do another pass with location info, for user-friendly warnings\n try {\n let src;\n if (fakeCode) {\n src = fakeCode;\n } else { src = fs.readFileSync(filepath).toString().replace(/^#![^\\n]*\\n/, ''); } // remove shell script marker\n\n if (ifStoreSrc) { unit.src = src; }\n code = jsParse(src);\n } catch (error) {\n e = error;\n log((`Ignoring ${filepath}, failed to parse due to: ${e}`));\n return unit;\n }\n // 1st pass, traverse ast tree, resolve all const-string requires if possible\n const dynLocs = []; // store dynamic require locations\n ast.traverse(code, [ast.isRequire], function(node) {\n if (!node.loc) {\n node.loc = { file: filepath, line: '?' };\n } else {\n node.loc.file = filepath;\n node.loc.line = node.loc.start.line;\n }\n const arg = node.arguments[0];\n if (arg && (arg.type === 'Literal')) { // require a string\n let fullpath;\n const modulename = arg.value;\n\n e = undefined;\n try {\n fullpath = resolver.sync(modulename, {\n extensions: ['.js', '.node', '.json'],\n basedir: path.dirname(filepath)\n });\n } catch (error1) {\n e = error1;\n unit.warnings.push({\n node,\n reason: \"resolve\"\n });\n }\n\n if (!e) {\n const runit = bna._parseFile(modulename, fullpath, cache, ifStoreSrc, null, coreModules);\n return unit.requires.push({\n name: modulename,\n node,\n unit: runit\n });\n }\n } else {\n return dynLocs.push(node.loc);\n }\n });\n\n // resolving dynamic require trick: evaluate js once, record all required modules....\n if (dynLocs.length > 0) {\n (() => {\n let dynamicModules = bna.detectDynamicRequires(unit);\n // filter out already required string modules, and nulls\n dynamicModules = (Array.from(dynamicModules).filter((m) => m && !_(unit.requires).find(e => e.name === m)).map((m) => m));\n\n for (let modulename of Array.from(dynamicModules)) {\n // filter out required modules that are already parsed\n var node;\n e = undefined;\n let fullpath = ''; // catch block needs this too\n try {\n fullpath = resolver.sync(modulename, {\n extensions: ['.js', '.node', '.json'],\n basedir: path.dirname(filepath)\n });\n // only if resolved ok\n node = { loc: { file: fullpath, line: '?' } }; //\n const runit = bna._parseFile(modulename, fullpath, cache, ifStoreSrc, null, coreModules);\n unit.requires.push({\n name: modulename,\n node,\n unit: runit\n });\n } catch (error1) {\n e = error1;\n unit.warnings.push({\n node: { loc: { file: filepath, line: '?' } },\n reason: \"dynamicResolveError\",\n error: e\n });\n }\n }\n\n return unit.warnings.push({\n locs: dynLocs,\n modules: dynamicModules,\n reason: \"nonconst\"\n });\n })();\n }\n\n return unit;\n }", "function file_load(file, callback) {\n\tif (!file) return; // No file found.\n\n\tlet reader = new FileReader();\n\n\treader.onload = event => callback(sched_parse(\n\t\tevent.target.result\n\t), file.path);\n\n\treader.readAsText(file);\n}", "function load(path, callback, errorCallback) {\n if (path) {\n var req = new XMLHttpRequest();\n req.onreadystatechange = function() {\n if (req.readyState == 4) {\n var status = req.status;\n if (status == 200) {\n // readyState is done, request status ok\n callback(req.responseXML, req.responseText.trim());\n } else if (status >= 400) {\n errorCallback();\n } else if (status == 0) {\n errorCallback();\n }\n }\n };\n req.open('GET', path, true);\n req.send();\n }\n }", "function loadFile(filename, cpu, onComplete) {\n const content = fs.readFileSync(filename, 'utf-8');\n processFile(content, cpu, onComplete);\n}", "onCodePathStart(codePath) {\n scopeInfo = {\n upper: scopeInfo,\n uselessContinues: [],\n codePath\n };\n }", "function loadFunction(){\n\tvalidateLogin();\n\tgetImg();\n\tgetTags();\n\tgetUploader()\n\tgetComments();\n\tupdateViewCount();\n\t\n}", "function loadFile() {\n loadStrings('rainbow.txt', fileLoaded);\n}", "function loadFile() {\n loadStrings('rainbow.txt', fileLoaded);\n}", "loadFromLocalFile (file) {\n let deferred = this.$q.defer();\n let ext = GeoUtils.getFileExtension(file.name);\n let reader = new FileReader();\n //\n if ((ext === 'kmz') || (ext === 'jpeg') || (ext === 'jpg')){\n reader.readAsArrayBuffer(file);\n } else {\n reader.readAsText(file);\n }\n reader.onload = () => {\n let p = null;\n switch (ext) {\n case 'kml':\n p = this._fromKml(reader.result);\n break;\n case 'json':\n p = this._fromJson(JSON.parse(reader.result));\n break;\n case 'geojson':\n p = this._fromJson(JSON.parse(reader.result));\n break;\n case 'kmz':\n p = this._fromKmz(reader.result);\n break;\n case 'gpx':\n p = this._fromGpx(reader.result);\n break;\n case 'jpeg':\n p = this._fromImage(reader, file.name);\n break;\n case 'jpg':\n p = this._fromImage(reader, file.name);\n break;\n case 'dsmap':\n p = this._fromDsmap(JSON.parse(reader.result));\n break;\n default:\n p = this._fromJson(JSON.parse(reader.result));\n }\n p.then( (data)=> { return deferred.resolve(data);});\n // deffered.resolve(p)\n };\n return deferred.promise;\n }", "function loadMethods(input) {\n return loadAnything('function', input, (myFunc) => new InspectorFunction(myFunc));\n}", "function downloadCode() {\n const code = Blockly.C.workspaceToCode(Blockly.getMainWorkspace());\n const codeArray = [];\n codeArray.push(code);\n\n const codeBlob = new Blob(codeArray, {type: \"text/plain;charset=utf-8\"});\n saveAs(codeBlob, \"main.cpp\");\n}", "load(callback) {\n callback();\n }", "loadFile(file, module, x, y) {\n var dsp_code;\n var reader = new FileReader();\n var ext = file.name.toString().split('.').pop();\n var filename = file.name.toString().split('.').shift();\n var type;\n if (ext == \"dsp\") {\n type = \"dsp\";\n reader.readAsText(file);\n }\n else if (ext == \"json\") {\n type = \"json\";\n reader.readAsText(file);\n }\n else if (ext == \"jfaust\") {\n type = \"jfaust\";\n reader.readAsText(file);\n }\n else if (ext == \".polydsp\") {\n type = \"poly\";\n reader.readAsText(file);\n }\n else {\n throw new Error(Utilitary.messageRessource.errorObjectNotFaustCompatible);\n }\n reader.onloadend = (e) => {\n dsp_code = \"process = vgroup(\\\"\" + filename + \"\\\",environment{\" + reader.result + \"}.process);\";\n if (!module) {\n if (type == \"dsp\") {\n this.compileFaust({ isMidi: false, name: filename, sourceCode: dsp_code, x: x, y: y, callback: (factory) => { this.createModule(factory); } });\n }\n else if (type == \"jfaust\") {\n Utilitary.currentScene.recallScene(reader.result);\n }\n else if (type == \"poly\") {\n this.compileFaust({ isMidi: true, name: filename, sourceCode: dsp_code, x: x, y: y, callback: (factory) => { this.createModule(factory); } });\n }\n }\n else {\n if (type == \"dsp\") {\n module.isMidi = false;\n module.update(filename, dsp_code);\n }\n else if (type == \"jfaust\") {\n Utilitary.currentScene.recallScene(reader.result);\n }\n else if (type == \"poly\") {\n module.isMidi = true;\n module.update(filename, dsp_code);\n }\n }\n };\n }", "function load() {\n\t\t// Load external resources then proceed with init.\n\t\t//require([\"cog1/ext/glMatrix.js\",\"cog1/exercise.js\"], init(createSceneFkt););\n\t\t//require([\"cog1/ext/glMatrix.js\"], function() { init(createSceneFkt); });\n\t\tinit();\n\t}", "function load() {\r\n\r\n\r\n fetch('zooland.json')\r\n .then(function(result){\r\n return result.json();\r\n })\r\n .then(function(data){\r\n createZooland(data);\r\n });\r\n}", "static LoadFromMemoryAsync() {}", "function loadPath(path, forceReload, activate) {\r\n\r\n if (scope.activeTree) {\r\n syncTree(scope.activeTree, path, forceReload, activate);\r\n }\r\n else {\r\n scope.eventhandler.one(\"activeTreeLoaded\", function (e, args) {\r\n syncTree(args.tree, path, forceReload, activate);\r\n });\r\n }\r\n }", "function file_cache_load(name) {\n\t\tlet load_promise = promise();\n\t\treturn file_cache_open().then(load);\n\n\t\tfunction load(db) {\n\t\t\tif (wkof.file_cache.dir[name] === undefined) {\n\t\t\t\tload_promise.reject(name);\n\t\t\t\treturn load_promise;\n\t\t\t}\n\t\t\tlet transaction = db.transaction('files', 'readonly');\n\t\t\tlet store = transaction.objectStore('files');\n\t\t\tlet request = store.get(name);\n\t\t\twkof.file_cache.dir[name].last_loaded = new Date().toISOString();\n\t\t\tfile_cache_dir_save();\n\t\t\trequest.onsuccess = finish;\n\t\t\trequest.onerror = error;\n\t\t\treturn load_promise;\n\n\t\t\tfunction finish(event){\n\t\t\t\tif (event.target.result === undefined || event.target.result === null) {\n\t\t\t\t\tload_promise.reject(name);\n\t\t\t\t} else {\n\t\t\t\t\tload_promise.resolve(event.target.result.content);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction error(event){\n\t\t\t\tload_promise.reject(name);\n\t\t\t}\n\t\t}\n\t}", "function load(path, userID) {\n}", "function getCodePath(name) {\n var safeName = name.split(/[\\/\\.]/g).slice(-1)[0];\n return path.join(__dirname, \"..\", \"code\", safeName) + \".js\";\n }", "function preload(){\n rawtext = loadStrings(\"data/Tale_of_Two_cities.txt\");\n}", "function load() {\n var p_cb = PRELOADING ? preloader_callback : null;\n m_data.load(\"dalena_web.json\", load_cb, p_cb, !true);\n}", "function loadEditor(code) {\n\t\tvar curPos = P3_EDITOR.getCursorPosition();\n\t\tP3_EDITOR.setValue(code);\n\t\tP3_EDITOR.gotoLine(curPos.row);\n\t\tP3_EDITOR.moveCursorTo(curPos.row, curPos.column);\n\t}", "function loadFile(fn) {\n return new Promise ( (res, rej) => {\n fs.readFile(fn, (err, data) => {\n if (err) {\n rej(err);\n };\n res(data);\n })\n\n })\n}", "function _load(path) {\n var actual_JSON = {};\n _loadJSON(path||'', function(response) {\n try{\n actual_JSON = JSON.parse(response); \n }catch(ex){\n debuglog('ColorCode.load: Error parse JSON file.');\n }\n });\n return actual_JSON;\n }", "function loadScript(path) {\n var result = $.Deferred(),\n script = document.createElement(\"script\");\n script.async = \"async\";\n script.type = \"text/javascript\";\n if (env == \"prod\")\n path = path + \"-min.js\";\n else\n path = path + \".js\";\n script.src = path;\n script.onload = script.onreadystatechange = function(_, isAbort) {\n if (!script.readyState || /loaded|complete/.test(script.readyState)) {\n if (isAbort)\n result.reject();\n else\n result.resolve();\n }\n };\n script.onerror = function() {\n result.reject();\n };\n document.querySelector(\"head\").appendChild(script);\n return result.promise();\n }", "async load(filepath) {\n\t\tawait this.#preprocessor.extractFileCommands(filepath);\n\t\tthis.#preprocessor.queueCommands();\n\t\tthis.#preprocessor.pageGen = this.#pageGen;\n\n\t\tawait this.#pageGen.extractFilePages(filepath);\n\n\t\t// File manager settings\n\t\tthis.#fileManager.sourceDir = this.#preprocessor.settings.source_dir;\n\t\tthis.#fileManager.buildDir = this.#preprocessor.settings.build_dir;\n\t\tthis.#fileManager.ignoreFile = this.#preprocessor.settings.ignore_rules;\n\n\t\tthis.#emitter.emit('load');\n\t}", "function sourceFunction()\n\t\t{\n\t\t\tinspect(func, 'Test function')\n\t\t}", "isLoadedFromFileSystem() {\n return false;\n }", "function readFile(path) {\n\t\tvar content = \"\";\n\t\ttry {\n\t\t\tcontent = fs.readFileSync(path).toString();\n\t\t} catch (e) {\n\t\t\tif (e.code === \"ENOENT\") {\n\t\t\t\twarn(\"Source file \" + e.path + \" not found.\");\n\t\t\t} else {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\t\treturn content;\n\t}", "function loadContractCode (name) {\n loadScript (\n \"target/test-solc-js/\" + name + \".bin.js\");\n return _;\n}" ]
[ "0.61710286", "0.6004756", "0.6004756", "0.59410226", "0.59317225", "0.5924242", "0.5920621", "0.5919022", "0.58467567", "0.5802487", "0.5800652", "0.5656796", "0.565346", "0.5651359", "0.5628073", "0.5524898", "0.551345", "0.54191357", "0.5414121", "0.5358909", "0.5358909", "0.53425467", "0.5339797", "0.53385985", "0.5337447", "0.53245693", "0.52998966", "0.52933025", "0.52892804", "0.52832335", "0.52832335", "0.52832335", "0.5274494", "0.52670634", "0.52576756", "0.52393126", "0.523347", "0.5231921", "0.522975", "0.52206415", "0.5206484", "0.51713717", "0.51624864", "0.51611847", "0.51587", "0.5139112", "0.5123749", "0.51008445", "0.50974655", "0.5096597", "0.50857335", "0.50855553", "0.5080002", "0.50791985", "0.5078959", "0.50759345", "0.50752217", "0.5026877", "0.5013635", "0.50061846", "0.4997499", "0.4991128", "0.49817473", "0.49781242", "0.4975788", "0.49682474", "0.49651396", "0.49623117", "0.49457705", "0.4935297", "0.4935067", "0.4931873", "0.49317175", "0.49131656", "0.4912857", "0.49055818", "0.48979077", "0.48979077", "0.48952547", "0.48925972", "0.48904753", "0.4884686", "0.48776448", "0.48774216", "0.48772424", "0.48734865", "0.4864462", "0.4863409", "0.48610944", "0.4856743", "0.48557594", "0.48451886", "0.4838445", "0.48374158", "0.4833661", "0.48330832", "0.4832426", "0.48317346", "0.48287705", "0.4826189", "0.4821315" ]
0.0
-1
Inline code for AppSync function
static fromInline(code) { return new InlineCode(code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async _syncApplications(req, res) {\n // log method\n logger.log(1, '_syncApplications', 'Attempting to sync applications');\n try {\n // lambda invoke parameters\n let params = {\n FunctionName: `expense-app-${STAGE}-PortalDataSyncFunction`,\n Qualifier: '$LATEST'\n };\n const resp = await lambdaClient.send(new InvokeCommand(params));\n const result = JSON.parse(Buffer.from(resp.Payload));\n // send successful 200 status\n res.status(200).send(result);\n // return result from lambda function\n return result;\n } catch (err) {\n // log error\n logger.log(1, '_syncApplications', 'Failed to sync applications');\n // send error status\n this._sendError(res, err);\n // return error\n return err;\n }\n }", "sync() {\n CodePush.sync();\n }", "function Sync() {\n\n}", "function syncToWrapper() {\n\n try {\n\n // Run the syncTo function.\n syncTo_();\n \n // Show a dialog box to indicate sync has completed.\n SpreadsheetApp.getUi().alert(`Sync Complete.`);\n\n } catch (error) {\n\n SpreadsheetApp.getUi().alert(error);\n\n }\n\n}", "function SYNC() {}", "function SYNC() {}", "function SYNC() {}", "function SYNC() {}", "function sync() {\n \n}", "async syncToRemote() {\n __WEBPACK_IMPORTED_MODULE_3__utility_OfflineUtility__[\"a\" /* default */].syncToRemote();\n }", "syncImmediate() {\n CodePush.sync(\n { installMode: CodePush.InstallMode.IMMEDIATE,//启动模式三种:ON_NEXT_RESUME、ON_NEXT_RESTART、IMMEDIATE\n updateDialog: {\n appendReleaseDescription:true,//是否显示更新description,默认为false\n descriptionPrefix:\"更新内容:\",//更新说明的前缀。 默认是” Description:\n mandatoryContinueButtonLabel:\"立即更新\",//强制更新的按钮文字,默认为continue\n mandatoryUpdateMessage:\"\",//- 强制更新时,更新通知. Defaults to “An update is available that must be installed.”.\n optionalIgnoreButtonLabel: '稍后',//非强制更新时,取消按钮文字,默认是ignore\n optionalInstallButtonLabel: '后台更新',//非强制更新时,确认文字. Defaults to “Install”\n optionalUpdateMessage: '有新版本了,是否更新?',//非强制更新时,更新通知. Defaults to “An update is available. Would you like to install it?”.\n title: '更新提示'//要显示的更新通知的标题. Defaults to “Update available”.\n },\n },\n );\n }", "function module_sync() {\n\t//tycheesdb_syncDatabaseNow(APP_NAME_SETTINGS);\n} // .end of module_sync", "syncImmediate() {\n CodePush.sync(\n {installMode: CodePush.InstallMode.IMMEDIATE, updateDialog: true},\n this.codePushStatusDidChange.bind(this),\n this.codePushDownloadDidProgress.bind(this),\n );\n }", "sync(...args) {\n return sync.call(this, ...args);\n }", "function SyncPrivateApi() {}", "function doUpdate(projectId, appId, name, value, cb) {\n common.readApp(projectId, appId, function(err, app){\n if (err) return cb(err);\n app[name] = value;\n fhreq.PUT(fhreq.getFeedHenryUrl(), \"box/api/projects/\" + projectId + \"/apps/\" + appId, app, function (err, remoteData, raw, response) {\n if (err) return cb(err);\n if (response.statusCode !== 200) return cb(raw);\n\n if(ini.get('table') === true && remoteData) {\n\t\t apps.table = common.createTableForAppProps(remoteData);\n }\n return cb(undefined, remoteData);\n });\n });\n}", "function asap(callback, context) {\n\t !batchingStrategy.isBatchingUpdates ? ({\"AUTH0_CLIENT_ID\":\"vFL9QUjpiy8LmqgykJVXRhk7dYVvdEip\",\"AUTH0_DOMAIN\":\"edcheung.auth0.com\"}).NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;\n\t asapCallbackQueue.enqueue(callback, context);\n\t asapEnqueued = true;\n\t}", "function sync() {\n// start sync process\n\tsetStatusDisplay(\"syncStatus\",1);\n\n\tgetStatus();\n}", "function asap(callback, context) {\n\t !batchingStrategy.isBatchingUpdates ? ({\"TERM_PROGRAM\":\"Apple_Terminal\",\"SHELL\":\"/bin/bash\",\"TERM\":\"xterm-256color\",\"TMPDIR\":\"/var/folders/0j/sct_mds14ljd8k18mkdpqznh0000gn/T/\",\"Apple_PubSub_Socket_Render\":\"/private/tmp/com.apple.launchd.wV6as6027H/Render\",\"TERM_PROGRAM_VERSION\":\"388\",\"OLDPWD\":\"/Users/maxwelldemers/documents/repos\",\"TERM_SESSION_ID\":\"F26783D2-1813-4F7E-84C9-0293EA6BE539\",\"USER\":\"maxwelldemers\",\"SSH_AUTH_SOCK\":\"/private/tmp/com.apple.launchd.xHoP6guWcs/Listeners\",\"__CF_USER_TEXT_ENCODING\":\"0x1F5:0x0:0x0\",\"PATH\":\"/Users/maxwelldemers/Documents/google/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin\",\"PWD\":\"/Users/maxwelldemers/documents/repos/MasterMind\",\"LANG\":\"en_US.UTF-8\",\"XPC_FLAGS\":\"0x0\",\"XPC_SERVICE_NAME\":\"0\",\"SHLVL\":\"1\",\"HOME\":\"/Users/maxwelldemers\",\"LOGNAME\":\"maxwelldemers\",\"_\":\"/usr/local/bin/webpack\"}).NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;\n\t asapCallbackQueue.enqueue(callback, context);\n\t asapEnqueued = true;\n\t}", "function requestSync() {\n if (typeof TogetherJS !== 'undefined' && TogetherJS.running) {\n togetherjsSyncRequested = true;\n TogetherJS.send({type: \"requestSync\"});\n }\n}", "function asap(callback, context) {\n\t !batchingStrategy.isBatchingUpdates ? ({\"TERM_PROGRAM\":\"Apple_Terminal\",\"SHELL\":\"/bin/bash\",\"TERM\":\"xterm-256color\",\"TMPDIR\":\"/var/folders/0j/sct_mds14ljd8k18mkdpqznh0000gn/T/\",\"Apple_PubSub_Socket_Render\":\"/private/tmp/com.apple.launchd.wV6as6027H/Render\",\"TERM_PROGRAM_VERSION\":\"388\",\"OLDPWD\":\"/Users/maxwelldemers/documents/repos\",\"TERM_SESSION_ID\":\"F26783D2-1813-4F7E-84C9-0293EA6BE539\",\"USER\":\"maxwelldemers\",\"SSH_AUTH_SOCK\":\"/private/tmp/com.apple.launchd.xHoP6guWcs/Listeners\",\"__CF_USER_TEXT_ENCODING\":\"0x1F5:0x0:0x0\",\"PATH\":\"/Users/maxwelldemers/Documents/google/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin\",\"PWD\":\"/Users/maxwelldemers/documents/repos/MasterMind\",\"LANG\":\"en_US.UTF-8\",\"XPC_FLAGS\":\"0x0\",\"XPC_SERVICE_NAME\":\"0\",\"SHLVL\":\"1\",\"HOME\":\"/Users/maxwelldemers\",\"LOGNAME\":\"maxwelldemers\",\"_\":\"/usr/local/bin/webpack\"}).NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\\'t enqueue an asap callback in a context where' + 'updates are not being batched.') : invariant(false) : undefined;\n\t asapCallbackQueue.enqueue(callback, context);\n\t asapEnqueued = true;\n\t}", "function SYNC_update(data)\r\n{\r\n\t//when user logout, no need to update.\r\n\tif (CommInfo.is_login == false) {\r\n\t\tBookmarkSyncCtrl.setSyncStatus(0);\r\n\t\tlocal = null;\t\t\r\n\t\treturn;\r\n\t}\r\n\r\n\t//console.log(JSON.stringify(data));\r\n\tvar time_current = get_utc()/1000;\r\n\tBookmarkInfo.lastSyncTime = time_current;\r\n\t//console.log('update! start send!')\r\n\tvar data_encode = urlencode({'token':CommInfo.token,'data':data, \"device_id\":get_clientid(true)});\r\n\tjQuery.ajax({\r\n\t\turl:API.sync_update(),\r\n\t\tcontentType:\"application/json\",\r\n\t\ttype:\"post\",\r\n\t\tdata:data_encode,\r\n\t\tsuccess:SYNC_update_callback,\r\n\t\terror:function(){\r\n\t\t\tprint_msg(\"[BookmarkSync] update error.\");\r\n\t\t\tBookmarkSyncCtrl.setSyncStatus(0);\r\n\t\t\t\t\r\n\t\t\tlocal = null;\r\n\t\t\ttrack_event({\r\n\t\t\t\tcategory:'general',\r\n\t\t\t\taction:'BookmarkSync',\r\n\t\t\t\tlabel:'fail',\r\n\t\t\t\tvalue:1\r\n\t\t\t});\t\t\r\n\t\t}\r\n\t});\r\n}", "function update (argv, cb) {\n var args = argv._;\n if (args.length === 0 || args.length > 4) return cb(update.usage);\n\n var projectId;\n var appId = fhc.appId(args[0]);\n var name = args[1];\n var value = args[2];\n\n if (args.length === 4) {\n projectId = args[0];\n appId = fhc.appId(args[1]);\n name = args[2];\n value = args[3];\n }\n return doUpdate(projectId, appId, name, value, cb);\n}", "function patchUIApplicationMain(iosProjectFolder) {\n try {\n const nsInteralFolder = path.join(iosProjectFolder, \"internal\");\n if (!fs.existsSync(nsInteralFolder)) {\n console.log(\"iOS not installed, skipping AppSync hook.\");\n return;\n }\n\n const appSyncFileDest = path.join(nsInteralFolder, \"main.m\");\n const tnsAppSyncFileDestContents = fs.readFileSync(appSyncFileDest);\n\n // making sure we don't do this more than once\n if (tnsAppSyncFileDestContents.indexOf(\"TNSAppSync\") === -1) {\n // let's first inject a header we need\n replaceInFile(\n appSyncFileDest,\n '#import <NativeScript/NativeScript.h>',\n '#import <NativeScript/NativeScript.h>\\n#include <AppSync/TNSAppSync.h>'\n );\n\n // now inject the function call that determines the correct application path (either default or appsync'ed)\n replaceInFile(\n appSyncFileDest,\n 'baseDir = [[NSBundle mainBundle] resourcePath];',\n 'baseDir = [TNSAppSync applicationPathWithDefault:[NSBundle mainBundle].bundlePath];'\n );\n }\n\n } catch (e) {\n console.log(\"AppSync iOS hook error: \" + e);\n }\n}", "async createAppId(anOrgId, anAppObject) {\n const method = 'createAppId'\n\n // await this.getUuidsForWalletAddresses()\n // return\n // TODO: 1. Might want to check if the user has the org_id in their sid\n // user data property.\n // 2. Might want to check if the user is listed as a member in the\n // org data table.\n // 3. Use update to do the assignment (right now we're doing the\n // horrible read--modify--clobber-write)\n // 4. Def check to make sure the same app id doesn't exist / collide\n // in the wallet analytics table\n\n const appId = uuidv4()\n\n // 1. Fetch the organization data\n //\n let orgData = undefined\n try {\n // TODO: See TODO.3 above!\n orgData = await organizationDataTableGet(anOrgId)\n } catch (error) {\n throw new Error(`${method} Failed to fetch organization data.\\n${error}`)\n }\n\n // 2 Get the public key\n //\n let publicKey = undefined\n try {\n publicKey = orgData.Item.cryptography.pub_key\n\n if (!publicKey) {\n throw new Error(`publicKey is undefined in organization data.`)\n }\n } catch (error) {\n throw new Error(`${method} Failed to fetch public key from organization data.\\n${error}`)\n }\n\n // 3. Create an entry for 3Box in the new app's data. Encrypt the 3Box id for\n // this app using the same shared public key used for analytics:\n // - TODO: very similar to getChatSupportAddress code in 3.a. (Unify if possible)\n try {\n const chatSupportWallet = ethers.Wallet.createRandom()\n const chatSupportWalletStr = JSON.stringify(chatSupportWallet)\n let chatSupportWalletCipherText = await eccrypto.encrypt(publicKey, Buffer.from(chatSupportWalletStr))\n anAppObject.chat_support = {\n wallet: chatSupportWalletCipherText\n }\n } catch (error) {\n throw new Error(`${method} Failed to create chat support address.\\n${error}`)\n }\n\n // 4. Update the apps entry for the organization with the new app's data:\n //\n try {\n orgData.Item.apps[appId] = anAppObject\n await organizationDataTablePut(orgData.Item)\n } catch (error) {\n throw new Error(`${method} Failed to update organization data.\\n${error}`)\n }\n\n // 5. Update the Wallet Analytics Data table\n //\n try {\n const walletAnalyticsRowObj = {\n app_id: appId,\n org_id: anOrgId,\n public_key: publicKey,\n analytics: {}\n }\n await walletAnalyticsDataTablePut(walletAnalyticsRowObj)\n } catch (error) {\n throw new Error(`${method} Failed to add wallet analytics data table row.\\n${error}`)\n }\n\n // AC: Not sure if this is needed.\n // // 6. TODO: Update the user data using Cognito IDP (the 'sid' property)\n // //\n // await this.tableUpdateWithIdpCredentials('sid', 'apps', appId, {})\n\n return appId\n }", "sync() {\n CodePush.sync(\n {},\n this.codePushStatusDidChange.bind(this),\n this.codePushDownloadDidProgress.bind(this),\n );\n }", "_changeLoginToApp() {\n this.setState({\n login: false,\n app: true,\n });\n // versionCheck calls -> syncRequest -> syncRequest calls syncStatus + emits data to listener here in componentDidMount \n \n }", "async myTask(data, msg, conn, ch, db) {\n\n if (!data.app) {\n ch.ack(msg);\n throw Error(\"Must include an app label\");\n }\n\n if (this.isClientRequested(data)) {\n throw Error(\"Not authorized for client requests\");\n }\n\n try {\n\n let result = {\n app: ''\n };\n\n Object.assign(result, data);\n result.app = result.app.toUpperCase();\n\n // ***** ETL Logic ******\n\n result.processed_worker = moment().format();\n result.id_worker = this.consumer.uuidForCurrentExecution;\n\n let query = {id:result.id,app:result.app};\n let cookie = result['request_cookies'];\n delete result['request_cookies'];\n\n await db.collection(c).findOneAndUpdate(query, {$set: result}, {upsert:true});\n\n if (cookie && cookie != '') {\n Object.assign(result, {timestamp:moment().toDate()}, flatten(cookie, {delimiter: '__'}));\n await db.collection(c + '_registration').findOneAndUpdate(query, {$set: result}, {upsert: true});\n }\n\n console.log(` [x] Wrote ${JSON.stringify(result)} to ${this.DbName + '.' + c}`);\n\n ch.ack(msg);\n } catch (ex) {\n this.logError(data, msg, ex);\n // client.close();\n // conn.close();\n }\n }", "function syncDevelop() {\n return syncBranch('develop');\n}", "execute(code){\n }", "getCurrentSyncStatus() {\n return __WEBPACK_IMPORTED_MODULE_3__utility_OfflineUtility__[\"a\" /* default */].syncStatus;\n }", "updateApplication() {\n const { selectedApplication, selectedKeyType, subscriptions } = this.state;\n const promiseApp = Application.get(selectedApplication);\n let accessToken;\n let keyType;\n\n if (subscriptions != null && subscriptions.find(sub => sub.applicationId\n === selectedApplication).status === 'PROD_ONLY_BLOCKED') {\n this.setState({ selectedKeyType: 'SANDBOX' });\n keyType = 'SANDBOX';\n } else {\n keyType = selectedKeyType;\n }\n\n promiseApp\n .then((application) => {\n return application.getKeys();\n })\n .then((appKeys) => {\n if (appKeys.get(keyType)) {\n ({ accessToken } = appKeys.get(keyType).token);\n }\n this.setState({ accessToken, keys: appKeys });\n });\n }", "function doLiveAct(appId, funct, data, cb) { \n common.getAppNameUrl(appId, 'live', function(err, appName, appUrl) {\n // post to /cloud\n request({uri: appUrl + \"/cloud/\" + funct, method: 'POST', json: data}, function (err, response, body) {\n log.silly(response, \"act response\");\n return cb(common.nullToUndefined(err), body);\n });\n });\n}", "function asap(callback,context){!batchingStrategy.isBatchingUpdates?process.env.NODE_ENV!=='production'?invariant(false,'ReactUpdates.asap: Can\\'t enqueue an asap callback in a context whereupdates are not being batched.'):_prodInvariant('125'):void 0;asapCallbackQueue.enqueue(callback,context);asapEnqueued=true;}", "function asap(callback,context){!batchingStrategy.isBatchingUpdates?process.env.NODE_ENV!=='production'?invariant(false,'ReactUpdates.asap: Can\\'t enqueue an asap callback in a context where'+'updates are not being batched.'):invariant(false):void 0;asapCallbackQueue.enqueue(callback,context);asapEnqueued=true;}", "function asap(callback,context){!batchingStrategy.isBatchingUpdates?process.env.NODE_ENV!=='production'?invariant(false,'ReactUpdates.asap: Can\\'t enqueue an asap callback in a context where'+'updates are not being batched.'):invariant(false):void 0;asapCallbackQueue.enqueue(callback,context);asapEnqueued=true;}", "function syncData() {}", "function addTagKey(appId){\n\t$.ajax({\n url: '/backliftapp/apps/'+ appId,\n type: \"PUT\",\n dataType: 'json',\n data: {\n \ttags: \"all\"\n },\n success: function(data) {\n \talert (\"successful\" + appId);\n },\n error: function(data){\n \talert(\"fail\");\n }\n\t});//end ajax\n}", "sync(){\n Region.sync();\n }", "function syncLocalDistros() {\n\tvar db = window.openDatabase(window.dbName, window.dbVersion, window.dbName, window.dbSize);\n\t$.getJSON(window.serviceURL + window.apiFile + window.apiKey + 'appsyncdistros', function (data) {\n\t\tvar distros = data.items;\n\t\tdb.transaction(\n\t\t\tfunction (transaction) {\n\t\t\t\t$.each(distros, function (index, distro) {\n\t\t\t\t\ttransaction.executeSql(\n\t\t\t\t\t\t'INSERT INTO dpAppDistributions (logo, name, wallpapers, wallpaperstext, ringtones, ringtonestext, type, os) VALUES (?, ?, ?, ?, ?, ?, ?, ?)',\n\t\t\t\t\t\t[distro.logo, distro.name, distro.wallpapers, distro.wallpaperstext, distro.ringtones, distro.ringtonestext, distro.type, distro.os],\n\t\t\t\t\t\tcheckSyncFinished(index, distros.length, 'distros')\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t},\n\t\t\terrorHandlerSqlTransaction\n\t\t);\n\t}).fail(function () { apiErrorHandler($('#infoSync'), \"appsyncdistros\"); });\n\treturn true;\n}", "function invokeSync(tok, props, opts = {}) {\n const syncInvokes = settings_1.tryGetSyncInvokes();\n if (!syncInvokes) {\n // We weren't launched from a pulumi CLI that supports sync-invokes. Let the user know they\n // should update and fall back to synchronously blocking on the async invoke.\n return invokeFallbackToAsync(tok, props, opts);\n }\n return invokeSyncWorker(tok, props, opts, syncInvokes);\n}", "function syncLocalContent() {\n\tvar db = window.openDatabase(window.dbName, window.dbVersion, window.dbName, window.dbSize),\n\t\tconnection = checkConnection(),\n\t\tdownloadstartdistros = $.t('downloadstartdistros'),\n\t\tdownloadstartwalls = $.t('downloadstartwalls'),\n\t\tdownloadstartrings = $.t('downloadstartrings'),\n\t\tdownloadstartwallnotes = $.t('downloadstartwallnotes'),\n\t\tnointernetdetected = $.t('nointernetdetected');\n\tif (connection !== \"None\") {\n\t\t$('#panelMenu' + window.localStorage.getItem('divIdGlobal')).panel(\"close\");\n\t\t$('#startSyncButton').button('disable');\n\t\twindow.distroSyncFinished = false;\n\t\twindow.wallSyncFinished = false;\n\t\twindow.ringSyncFinished = false;\n\t\twindow.wallNotesSyncFinished = false;\n\t\t// update version number\n\t\t$.getJSON(window.serviceURL + window.apiFile + window.apiKey + 'appsyncversion', function (data) {\n\t\t\tvar versions = data.items;\n\t\t\t$.each(versions, function (index, version) {\n\t\t\t\thandleAndroidPreferences(\"set\", window.androidPrefsLib, \"localContentVersion\", version.version, emptyCallback);\n\t\t\t\t// distributions\n\t\t\t\t$('#distroSync').empty().append('<img alt=\"download\" src=\"./images/icons/ic_action_download.png\" class=\"syncIcon\" />' + downloadstartdistros);\n\t\t\t\t$('#wallsSync').empty().append('<img alt=\"download\" src=\"./images/icons/ic_action_download.png\" class=\"syncIcon\" />' + downloadstartwalls);\n\t\t\t\t$('#ringsSync').empty().append('<img alt=\"download\" src=\"./images/icons/ic_action_download.png\" class=\"syncIcon\" />' + downloadstartrings);\n\t\t\t\t$('#wallNotesSync').empty().append('<img alt=\"download\" src=\"./images/icons/ic_action_download.png\" class=\"syncIcon\" />' + downloadstartwallnotes);\n\t\t\t\tdb.transaction(\n\t\t\t\t\tfunction (transaction) {\n\t\t\t\t\t\ttransaction.executeSql(\n\t\t\t\t\t\t\t'DELETE FROM dpAppDistributions',\n\t\t\t\t\t\t\tsyncLocalDistros()\n\t\t\t\t\t\t);\n\t\t\t\t\t\ttransaction.executeSql(\n\t\t\t\t\t\t\t'DELETE FROM dpAppWallpapers',\n\t\t\t\t\t\t\tsyncLocalWalls()\n\t\t\t\t\t\t);\n\t\t\t\t\t\ttransaction.executeSql(\n\t\t\t\t\t\t\t'DELETE FROM dpAppRingtones',\n\t\t\t\t\t\t\tsyncLocalRings()\n\t\t\t\t\t\t);\n\t\t\t\t\t\ttransaction.executeSql(\n\t\t\t\t\t\t\t'DELETE FROM dpAppWallpapersNotes',\n\t\t\t\t\t\t\tsyncLocalWallNotes()\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\terrorHandlerSqlTransaction\n\t\t\t\t);\n\t\t\t});\n\t\t}).fail(function () { $('#startSyncButton').button('enable'); apiErrorHandler($('#infoSync'), \"appsyncversion\"); });\n\t} else {\n\t\ttoast(nointernetdetected, 'short');\n\t}\n}", "function asap(callback,context){\"production\"!==process.env.NODE_ENV?invariant(batchingStrategy.isBatchingUpdates,'ReactUpdates.asap: Can\\'t enqueue an asap callback in a context where'+'updates are not being batched.'):invariant(batchingStrategy.isBatchingUpdates);asapCallbackQueue.enqueue(callback,context);asapEnqueued=true;}", "handle__CheckApp() {\n this.props.actions.toggleCheck(this.props.appId, true);\n }", "registerSync(syncFunction) {\n this.setState({ requestSync: syncFunction },\n function() {\n this.updateItem(this.state);\n }.bind(this));\n\n //syncFunction();\n }", "function startSync(syncID) { // fonction appelée depuis le bouton iObeya\r\n\ttry {\r\n\t\tif(!syncID){\r\n\t\t\tconsole.log(\"Pas de jeu de paramètres donné, on prend la valeur par défaut\");\r\n\t\t \t// on recherche la liste selon le titre de la page \r\n\r\n\t\t\tvar wname = window.document.title ;\r\n\t\t\tfor (entry in SYNC_PROPERTIES_MAP){\r\n\t\t\t\tif (wname.includes(SYNC_PROPERTIES_MAP[entry].LISTSHAREPOINT_TITLE) )\r\n\t\t\t\t\tsyncID=entry;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (!syncID){\r\n\t\t\t\talert(\"Le paramètrage de synchronisation iObeya de cette n'est pas configuré,\\n veuillez contactez votre administrateur\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tg_syncID= syncID;\r\n\t\t}\r\n\t\t\r\n\t\tif (lockSync == true)\r\n\t\t\tthrow new InterfaceException(\"Une autre instance est déjà en cours, veuillez patienter.\\nlockSync==true\");\r\n\r\n\t\t// Chargement des variables globales\r\n\t\t// TODO what if FAILED ? <<- throw exception. Caught below\r\n\t\tloadSyncConf(syncID);\r\n\r\n\t\t// Pour détecter qu'une autre thread est active\r\n // la valeur false est positionnée après l'affichage du pop-up de fin.\r\n lockSync=true;\r\n disableButton();\r\n\t\trefreshTable(); // Rafraîchissement de la vue \r\n\t\t\r\n // Mise à jour de la liste des données RIDA\r\n\t\tExecuteOrDelayUntilScriptLoaded(function () {\r\n\t\t\tg_clientContext = new SP.ClientContext.get_current(); // le contexte ne peut être récupéré que si le script sp.js est loadé.\r\n\t\t\t//g_clientContext = new SP.ClientContext(SITEURL); // méthode alternative\r\n\t\t\t\r\n\t\t\toList = g_clientContext.get_web().get_lists().getByTitle(LISTSHAREPOINT_TITLE);\r\n\t\t\tretrieveActorsList_sync(); \r\n\t\t\tridaNodes = retrieveListItems(); //checkIn(syncNotes) en call back\r\n\t\t}, \"sp.js\");\r\n\t}\r\n\tcatch (e) {\r\n\t\t// TODO: factoriser la gestion des erreurs\r\n\t\talert(\"Erreur lors de la synchronisation Sharepoint/iObeya :\\n\" + e.message);\r\n\t\tconsole.log(e.message);\r\n\t\t// On informe l'utilisateur de la raison de l'erreur\r\n\t\t// Réactivation du bouton\r\n\t\tenableButton();\r\n\t\tlockSync=false;\r\n\t\twindow.location.reload() ; // rafraichi la page après l'erreur\r\n\t}\r\n}", "function syncWithServer(){\n\tvar route = '/getSync';\n\tvar event_data = '';\n\t//gets the stored event queue on the client\n\tlocal_events = get_local_events();\n\tif(local_events == null){\n\t\t//if the event queue is null create a new one\n\t\tevent_data = JSON.stringify(newEventQueue());\t\n\t}\n\telse{\n\t\t//stringify the event queue for sending\n\t\tvar event_data = JSON.stringify(local_events);\n\t}\t\n\t//emit the event queue to our listening socket server\n\tsocket.emit(route, event_data );\n}", "function sendNotification(){\n var msg = \"Edited at: \" + new Date().toTimeString(); \n SharedDb.sendGCM(msg);\n}", "function updateAppForBiz(req, res , next){\n var params=req.params;\n\n bizApplyDao.updateBizApply(req.params, function(error , result){\n if(error){\n logger.error(' updateAppForBiz ' + error.message);\n throw sysError.InternalError(error.message,sysMsg.SYS_INTERNAL_ERROR_MSG);\n }\n if(result.affectedRows<=0){\n logger.warn(' updateAppForBiz ' + 'false');\n res.send(200,{success:false})\n }else{\n logger.info(' updateAppForBiz ' + 'success');\n res.send(200,{success:true});\n }\n\n next();\n });\n}", "function addApresentacao(app){\n db.transaction(function(tx){\n tx.executeSql('INSERT INTO apresentacao(id,tema,data,hora,aluno, orientador, sobre, local, campus) values (\"'+app.id+'\",\"'+app.tema+'\",\"'+app.data+'\",\"'+app.hora+'\",\"'+app.aluno+'\",\"'+app.orientador+'\",\"'+app.sobre+'\",\"'+app.local+'\",\"'+app.campus+'\")')\n },\n function(err){\n console.log(err);\n },\n function(){\n });\n}", "async confirmAppointment(stub, args) \n {\n var docType = args[0];\n let roleAsBytes = await stub.getState(docType); \n if (!roleAsBytes || roleAsBytes.toString().length <= 0) \n {\n throw new Error(docType + ' does not exist');\n }\n let role = JSON.parse(roleAsBytes);\n if(role.appointment != 'Y')\n {\n throw new Error('Not authorized');\n }\n\n \n let tokenBytes = await stub.getState(args[1]);\n \n if(tokenBytes == null || tokenBytes.toString().length <= 0 || !tokenBytes)\n {\n throw new Error('token not verified');\n }\n let token = JSON.parse(tokenBytes);\n\n let appKey = token.key;\n let appBytes = await stub.getState(appKey);\n let app = JSON.parse(appBytes);\n if(appBytes == null || appBytes.toString().length <= 0 || !appBytes)\n {\n throw new Error('Appointment not found');\n } \n \n return appBytes;\n }", "syncNow(sender='app', callback=function(){}){\n\t\tsyncing = true;\n\t\tvar _self = this;\n\t\tlet note_id_list = [];\n\t\t\n\t\tfor(let i = 0 ; i < data.notes.length ; i++){\n\t\t\tnote_id_list.push(data.notes[i].id);\n\t\t\tif(data.notes[i].status == 0 && data.notes[i].synced == 1){\n\t\t\t\tdata.notes.splice(i, 1);\n\t\t\t\tconsole.log(\"Deleted Note Cleaned...\");\n\t\t\t\t\n\t\t\t\tif(i == data.notes.length - 1){\n\t\t\t\t\t_self.updateLocal('force');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//console.log(note_id_list);\n\t\t\n\t\t//setTimeout(function(){\n\t\t_self.checkUserAuth(function(res){\n\t\t\tif(res == true){\n\t\t\t\t//TODO: ALL SYNCING TO SERVER\n\t\t\t\t//Start Syncing Data Here...\n\t\t\t\tlet delay = (ms) => new Promise(\n\t\t\t\t (resolve) => setTimeout(resolve, ms)\n\t\t\t\t);\n\n\t\t\t\tdelay(200)\n\t\t\t\t .then(async () => {\n\t\t\t\t\t// 1. SYNC NOTE\n\t\t\t\t\tlet noteCount = data.notes.length;\n\t\t\t\t\t// Example using Promise.all() - Promise resolve before completion//\n\t\t\t\t\tlet promises = [];\n\t\t\t\t\tfor(let i = 0 ; i < data.notes.length ; i++){\n\t\t\t\t\t\tpromises.push(\n\t\t\t\t\t\t\t_self.checknote(data.notes[i].id, data.notes[i].modified_at, function(msg, resultData){\n\t\t\t\t\t\t\t\tif(msg == 'new_note'){\n\t\t\t\t\t\t\t\t\t_self.newnote(data.notes[i].id, data.notes[i].title, data.notes[i].note, data.notes[i].synced, data.notes[i].public, data.notes[i].status, data.notes[i].modified_at, data.notes[i].url, function(){\n\t\t\t\t\t\t\t\t\t\tdata.notes[i].synced = 1;\n\t\t\t\t\t\t\t\t\t\t//_self.updateLocal('force');\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}else if(msg == 'perfect'){\n\t\t\t\t\t\t\t\t\tdata.notes[i].synced = 1;\n\t\t\t\t\t\t\t\t\t//_self.updateLocal('force');\n\t\t\t\t\t\t\t\t}else if(msg == 'update_now'){\n\t\t\t\t\t\t\t\t\t_self.updatenow(data.notes[i].id, data.notes[i].title, data.notes[i].note, data.notes[i].synced, data.notes[i].public, data.notes[i].status, data.notes[i].modified_at, data.notes[i].url, function(){\n\t\t\t\t\t\t\t\t\t\tdata.notes[i].synced = 1;\n\t\t\t\t\t\t\t\t\t\t//_self.updateLocal('force');\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}else if(msg == 'replace_this'){\n\t\t\t\t\t\t\t\t\t//id, title, note, synced, isPublic, status, modified_at, url\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdata.notes[i].title = resultData.title;\n\t\t\t\t\t\t\t\t\tdata.notes[i].note = resultData.note;\n\t\t\t\t\t\t\t\t\tdata.notes[i].synced = 1;\n\t\t\t\t\t\t\t\t\tdata.notes[i]['public'] = resultData['public']==true?1:0;\n\t\t\t\t\t\t\t\t\tdata.notes[i].status = resultData.status==true?1:0;\n\t\t\t\t\t\t\t\t\tdata.notes[i].modified_at = new Date(resultData.local_modified_at + ' UTC').getTime();\n\t\t\t\t\t\t\t\t\tdata.notes[i].url = resultData.url;\n\t\t\t\t\t\t\t\t\t//_self.updateLocal('force');\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\t\t\t\t\t\n\t\t\t\t\tawait Promise.all(promises)\n\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\tconsole.log('Started Note Sync');\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t/****** for(let i = 0 ; i < data.notes.length ; i++){\n\t\t\t\t\t\tif(data.notes[i].synced == 0){\n\t\t\t\t\t\t\t// AJAX SYNC THIS data.notes[i] object\n\t\t\t\t\t\t\t//data.notes[i].synced = 1;\n\t\t\t\t\t\t\tdelay(10)\n\t\t\t\t\t\t\t\t.then(() => {\n\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\t\n\t\t\t\t\t\t//Check is Status = 0 delted and already synced = 1 then delete BECAUSE STORGE Duh..\n\t\t\t\t\t\tif(data.notes[i].status == 0 && data.notes[i].synced == 1){\n\t\t\t\t\t\t\t// Deleted this record or object//\n\t\t\t\t\t\t\tdata.notes.splice(i, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t} ******/\n\t\t\t\t\treturn delay(1000);\n\t\t\t\t }).catch(() => {\n\t\t\t\t\tcallback('Note Not Synced Properly');\n\t\t\t\t }).then(async () => {\n\t\t\t\t\tconsole.log('Started Focus Sync - Async Mode');\n\t\t\t\t\t// 2. SYNC FOCUS\n\t\t\t\t\t// AJAX SYNC FOCUS\n\t\t\t\t\t_self.checkfocus(data.focus_modified_at, function(msg, resultData, focus_modified_at){\n\t\t\t\t\t\tif(msg == 'perfect'){\n\t\t\t\t\t\t\tdata.focus_synced = 1;\n\t\t\t\t\t\t\t//_self.updateLocal('force');\n\t\t\t\t\t\t}else if(msg == 'update_now'){\n\t\t\t\t\t\t\t_self.focus_updatenow(data.focus_modified_at, JSON.stringify(data.focus), function(){\n\t\t\t\t\t\t\t\tdata.focus_synced = 1;\n\t\t\t\t\t\t\t\t//_self.updateLocal('force');\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}else if(msg == 'replace_now'){\n\t\t\t\t\t\t\tlet parsed = resultData.replace(/\\\\&quot;/g, '\"');\n\t\t\t\t\t\t\tdata.focus = JSON.parse(parsed);\n\t\t\t\t\t\t\tdata.focus_modified_at = new Date(focus_modified_at + ' UTC').getTime();\n\t\t\t\t\t\t\tdata.focus_synced = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\treturn delay(1000);\n\t\t\t\t }).catch(() => {\n\t\t\t\t\tcallback('Focus Sync went wrong');\n\t\t\t\t }).then(() => {\n\t\t\t\t\t// 3. SYNC BACK DATA FROM SERVER - THAT IS NOT IN LOCAL\n\t\t\t\t\t_self.checkNewNotesInServer(note_id_list, function(msg, resultData){\n\t\t\t\t\t\tif(msg == 'download_now'){\n\t\t\t\t\t\t\tif(resultData.length > 0){\n\t\t\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\t\tfor(let i = 0 ; i < resultData.length ; i++){\n\t\t\t\t\t\t\t\t\t\t_self.add_note(null, true, resultData[i]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t_self.updateLocal('force');\n\t\t\t\t\t\t\t\t}, 5000);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tconsole.log('Server checknew note is - perfect');\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 }).catch(() => {\n\t\t\t\t\tcallback('Disable Features Sync Failed');\n\t\t\t\t }).then(() => {\n\t\t\t\t\tdata.last_sync = _self.getUTC();\n\t\t\t\t\t_self.updateLocal('force');\n\t\t\t\t\tif(sender == 'user'){\n\t\t\t\t\t\t//showMessage('Synced Successful');\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\tsyncing = false;\n\t\t\t\t\t}, 2000);\n\t\t\t\t\tcallback(true);\n\t\t\t\t });\n\t\t\t}else{\n\t\t\t\tsyncing = false;\n\t\t\t\tcallback(res);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\t//}, 2000);\n\t}", "function checkContentVersionIndex() {\n\t$.getJSON(window.serviceURL + window.apiFile + window.apiKey + 'appsyncversion', function (data) {\n\t\tvar versions = data.items,\n\t\t\tnewcontentavailable = $.t('newcontentavailable'),\n\t\t\tdownloadrequiredcontent = $.t('downloadrequiredcontent'),\n\t\t\tnewappavailable = $.t('newappavailable');\n\t\thandleAndroidPreferences(\"get\", window.androidPrefsLib, \"localContentVersion\", \"\", function (prefValue) {\n\t\t\t$.each(versions, function (index, version) {\n\t\t\t\tif (version.version !== prefValue && prefValue !== \"\" && prefValue !== null) {\n\t\t\t\t\t$('#infoSyncStatus').empty().append('<a href=\"#syncPage\" class=\"ui-btn\">' + newcontentavailable + '<br />Update: ' + version.version + ' - ' + version.notes + '</a>').trigger(\"create\");\n\t\t\t\t} else if (prefValue === null || prefValue === \"\") {\n\t\t\t\t\t$('#infoSyncStatus').empty().append('<a href=\"#syncPage\" class=\"ui-btn\">' + downloadrequiredcontent + '</a>').trigger(\"create\");\n\t\t\t\t} else {\n\t\t\t\t\t$('#infoSyncStatus').empty();\n\t\t\t\t}\n\t\t\t\tgetPackageVersion(function (versionValue) {\n\t\t\t\t\thandleAndroidPreferences(\"get\", window.androidPrefsLib, \"settingAutoCheckApp\", \"\", function (prefValue) {\n\t\t\t\t\t\tif (compareAppVersion(version.app, versionValue) === true && prefValue === \"on\") {\n\t\t\t\t\t\t\t$('#appUpdateStatus').empty().append('<a class=\"ui-btn\">' + newappavailable + ': ' + version.app + '</a>').trigger(\"create\");\n\t\t\t\t\t\t\t$(\"#appUpdateStatus\").off(\"click\").on(\"click\",\n\t\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\t\t$('#appUpdateStatus').empty();\n\t\t\t\t\t\t\t\t\tappstoreCheck(function (value) {\n\t\t\t\t\t\t\t\t\t\tif (value === \"unknown\") {\n\t\t\t\t\t\t\t\t\t\t\twindow.open('http://droidpapers.teusink.org/about.php', '_system');\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tappstore(\"org.teusink.droidpapers\", \"app\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}).fail(function () { apiErrorHandler($('#appUpdateStatus'), \"appsyncversion\"); });\n}", "async function sync(deployInfo) {\n process.env.MAGENTO_INSTALL_FOLDER = path.resolve(\n deployInfo.dest,\n \".magento\"\n );\n process.env.MAGENTO_REMOTE = deployInfo.host;\n process.env.MAGENTO_MODULE = deployInfo.module || process.env.MAGENTO_MODULE;\n\n console.log(\n \"Syncing files\",\n deployInfo.src,\n `${process.env.MAGENTO_REMOTE}:${process.env.MAGENTO_INSTALL_FOLDER}`\n );\n\n await require(\"../lib/magento/sync-plugin\")();\n}", "function _____SHARED_functions_____(){}", "syncDirectory() {\n const s3Bucket = this.serverless.variables.service.custom.s3Bucket;\n const args = [\n 's3',\n 'sync',\n 'app/',\n `s3://${s3Bucket}/`,\n '--delete',\n ];\n const { sterr } = this.runAwsCommand(args);\n if (!sterr) {\n this.serverless.cli.log('Successfully synced to the S3 bucket');\n } else {\n throw new Error('Failed syncing to the S3 bucket');\n }\n }", "function addApresentacao(app) {\n db.transaction(function (tx) {\n tx.executeSql('INSERT INTO apresentacao(id,tema,data,hora,aluno, orientador, sobre, local, campus) values (\"' + app.id + '\",\"' + app.tema + '\",\"' + app.data + '\",\"' + app.hora + '\",\"' + app.aluno + '\",\"' + app.orientador + '\",\"' + app.sobre + '\",\"' + app.local + '\",\"' + app.campus + '\")')\n },\n function (err) {\n console.log(err);\n },\n function () {\n });\n}", "bgSyncPolyfill() {\n if (('SyncManager' in self) === false) {\n if (navigator.serviceWorker.controller) \n this.send_message_to_sw({\n action: 'bgSyncPolyfill'\n });\n }\n }", "function dobroadcast ()\n {broadcast = true;\n if (broadcast) {autosavedata(folder)};\n return true}", "async function BackupDB()\n{\n //var data = await httpRequest('GET', usr_data_url, '');\n var response = httpRequest('PUT', db_url, db);\n console.log(\"Backing DB to cloud\");\n}", "localUpdate(action) {\n if (this._signAsync) {\n this._signAsync(super.localUpdate.bind(this), action, this._reduxGetState)\n } else {\n super.localUpdate(action)\n }\n }", "async function v3(v4,v5,v6,v7,v8) {\n}", "function syncMaster() {\n return syncBranch('master');\n}", "function Synchronized () {}", "function Synchronized () {}", "function Synchronized () {}", "update() {\n let scopes = this.stores.essentials.getAllScopes(),\n application = this.stores.kio.getApplication(this.props.applicationId);\n this.data = {\n application: application,\n applicationId: this.props.applicationId,\n isOwnApplication: this.stores.user\n .getUserTeams()\n .map(team => team.id)\n .some(id => id === application.team_id),\n ownerScopes: scopes.filter(s => s.is_resource_owner_scope),\n appScopes: scopes.filter(s => !s.is_resource_owner_scope),\n oauth: this.stores.mint.getOAuthConfig(this.props.applicationId)\n };\n }", "static async syncToRemote() {\n if (!__WEBPACK_IMPORTED_MODULE_2__Client__[\"a\" /* client */].isOnlineEnabled()) {\n this.changeSyncStatus(\"failed\");\n return;\n }\n if (this.synching) {\n this.changeSyncStatus(\"progress\");\n return;\n }\n console.log(\"You are back online: syncing to remote...\");\n this.synching = true;\n this.changeSyncStatus(\"started\");\n const oauth = new __WEBPACK_IMPORTED_MODULE_1__services_OauthService__[\"a\" /* default */]();\n try {\n await oauth.refreshToken();\n } catch (err) {\n console.warn(\"Failed to refresh token:\", err);\n try {\n const credentials = this.getUser();\n await oauth.getToken(credentials[0], credentials[1]);\n } catch (err) {\n console.error(\"Cannot get token: \", err);\n this.synching = false;\n this.changeSyncStatus(\"failed\");\n return;\n }\n }\n try {\n await this.sendFromStack();\n console.log(\"...sync completed!\");\n this.synching = false;\n this.changeSyncStatus(\"ended\");\n } catch (err) {\n console.error(\"Sync error: could not send the pending requests to server.\", err);\n this.synching = false;\n this.changeSyncStatus(\"failed\");\n }\n }", "snippetsWorkspaceEncodedIdWatchPut(incomingOptions, cb) {\n const Bitbucket = require('./dist');\n let defaultClient = Bitbucket.ApiClient.instance;\n // Configure API key authorization: api_key\n let api_key = defaultClient.authentications['api_key'];\n api_key.apiKey = incomingOptions.apiKey;\n // Uncomment the following line to set a prefix for the API key, e.g. \"Token\" (defaults to null)\n api_key.apiKeyPrefix = incomingOptions.apiKeyPrefix || 'Token';\n // Configure HTTP basic authorization: basic\n let basic = defaultClient.authentications['basic'];\n basic.username = 'YOUR USERNAME';\n basic.password = 'YOUR PASSWORD';\n // Configure OAuth2 access token for authorization: oauth2\n let oauth2 = defaultClient.authentications['oauth2'];\n oauth2.accessToken = incomingOptions.accessToken;\n\n let apiInstance = new Bitbucket.SnippetsApi(); // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. // String | The snippet id.\n /*let workspace = \"workspace_example\";*/ /*let encodedId = \"encodedId_example\";*/ apiInstance.snippetsWorkspaceEncodedIdWatchPut(\n incomingOptions.workspace,\n incomingOptions.encodedId,\n (error, data, response) => {\n if (error) {\n cb(error, null, response);\n } else {\n cb(null, data, response);\n }\n }\n );\n }", "handleOnSync(doctypeUpdates) {\n const normalizedData = mapValues(doctypeUpdates, normalizeAll)\n if (this.client) {\n this.client.setData(normalizedData)\n }\n if (this.options.onSync) {\n this.options.onSync.call(this, normalizedData)\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.info('Pouch synced')\n }\n }", "async myTask(data, msg, conn, ch, db) {\n\n\n if (!data.app) {\n ch.ack(msg);\n throw Error(\"Must include an app label\");\n }\n\n if (this.isClientRequested(data)) {\n throw Error(\"Not authorized for client requests\");\n }\n\n try {\n\n let result = {\n app: ''\n };\n\n Object.assign(result, data);\n\n result.app = data.app = data.app.toUpperCase();\n\n result.id_submission = crypto.createHash('md5').update(`${data.app}${data.activity_id}`).digest(\"hex\");\n\n // ***** ETL Logic ******\n\n result.processed_worker = moment().format();\n result.id_worker = this.consumer.uuidForCurrentExecution;\n\n // time\n\n if (data.timestamp) {\n result.time_answered_formatted = moment(data.timestamp).utcOffset(-6).format('MMMM Do YYYY, h:mm:ss a');\n result.time_answered = new Date(moment(data.timestamp).format());\n }\n \n let query = {id_submission:result.id_submission};\n\n if (result.activity_name == 'Drill') {\n const headers = {\n routing_key: 'usage.activity.drill'\n };\n this.publish(result, headers, ch);\n }\n\n await db.collection(c).findOneAndUpdate(query, {$set: result}, {upsert:true});\n delete result.id; delete result.timestamp; delete result.object_id; delete result.content_type_id;\n await db.collection('raw_usage').update(query, {$set: result}, {upsert:false});\n \n console.log(` [x] Wrote ${JSON.stringify(result)} to ${this.DbName + '.' + c}`);\n\n // this.publish({id_submission:data.id_submission}, 'test.calculate_old');\n ch.ack(msg);\n } catch (ex) {\n this.logError(data, msg, ex);\n // client.close();\n // conn.close();\n }\n }", "function sync() {\n CodePush.sync({}, codePushStatusDidChange, codePushDownloadDidProgress);\n }", "updateLocal(force = '', callback=function(){}){\n\t\tlet _self = this;\n\t\tif(syncing == false || force == 'force'){\n\t\t\tchrome.storage.local.set(\n\t\t\t\t{\n\t\t\t\t\tuser_data: data,\n\t\t\t\t\tapp_id: chrome.runtime.id,\n\t\t\t\t\tlatest_interaction: new Date().getTime()\n\t\t\t\t}, function(){\n\t\t\t\t\tcallback();\n\t\t\t\t\tsyncing_message_shown = false;\n\t\t\t\t}\n\t\t\t);\n\t\t}else{\n\t\t\tsetTimeout(function(){\n\t\t\t\t_self.updateLocal('',callback);\n\t\t\t\tconsole.log('Syncing in process - Waiting for sync to complete.');\n\t\t\t\tif(syncing_message_shown == false){\n\t\t\t\t\tshowMessage('Syncing In Process Try Again Later');\n\t\t\t\t\tsyncing_message_shown = true;\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}", "function syncStatus(data,options) {\n\n//TODO write status to desk\n\n\n// sync completed\n\tsetStatusDisplay(\"syncStatus\",2);\n}", "function syncLocalWalls() {\n\tvar db = window.openDatabase(window.dbName, window.dbVersion, window.dbName, window.dbSize);\n\t$.getJSON(window.serviceURL + window.apiFile + window.apiKey + 'appsyncwalls', function (data) {\n\t\tvar walls = data.items;\n\t\tdb.transaction(\n\t\t\tfunction (transaction) {\n\t\t\t\t$.each(walls, function (index, wall) {\n\t\t\t\t\ttransaction.executeSql(\n\t\t\t\t\t\t'INSERT INTO dpAppWallpapers (name, resolution, folder, filename, amount, distribution, version, density) VALUES (?, ?, ?, ?, ?, ?, ?, ?)',\n\t\t\t\t\t\t[wall.name, wall.resolution, wall.folder, wall.filename, wall.amount, wall.distribution, wall.version, wall.density],\n\t\t\t\t\t\tcheckSyncFinished(index, walls.length, 'walls')\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t},\n\t\t\terrorHandlerSqlTransaction\n\t\t);\n\t}).fail(function () { apiErrorHandler($('#infoSync'), \"appsyncwalls\"); });\n\treturn true;\n}", "function updateApp(config) {\n var appType = config.apptype;\n if (appType !== 'native' && appType !== 'hybrid_remote' && appType !== 'hybrid_local') {\n console.log(outputColors.red + 'Unrecognized app type: \\'' + appType + '\\'.' + outputColors.reset + 'App type must be native, hybrid_remote, or hybrid_local.');\n usage();\n process.exit(4);\n }\n\n // Copy dependencies\n copyDependencies(config, function(success, msg) {\n if (success) {\n if (msg) console.log(outputColors.green + msg + outputColors.reset);\n console.log(outputColors.green + 'Congratulations! You have successfully updated your app.' + outputColors.reset);\n } else {\n if (msg) console.log(outputColors.red + msg + outputColors.reset);\n console.log(outputColors.red + 'There was an error updating the app.' + outputColors.reset);\n }\n });\n}", "static async method(){}", "function workerApp(meta) {\n var response, payload;\n return _regenerator2.default.wrap(function workerApp$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return (0, _effects.call)(api.getCmsAppData, meta.appId);\n\n case 2:\n response = _context.sent;\n\n if (!(response && response.ok)) {\n _context.next = 11;\n break;\n }\n\n payload = {\n entities: {\n apps: {}\n },\n result: null\n };\n\n\n payload.entities.apps[meta.appId] = response.data;\n payload.result = meta.appId;\n //console.log('APP PAYLOAD', payload)\n\n _context.next = 9;\n return (0, _effects.put)(_Creators2.default.getCmsAppSuccess(payload));\n\n case 9:\n _context.next = 13;\n break;\n\n case 11:\n _context.next = 13;\n return (0, _effects.put)(_Creators2.default.getCmsAppFailure({ errorCode: response }));\n\n case 13:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this);\n }", "getLastSync (req, res) {\n sqlService.getLastSync(req.user.user_id)\n .then((result)=>{\n res.status(200).send(result)\n })\n }", "handleOnSync(doctypeUpdates) {\n const normalizedData = mapValues(doctypeUpdates, normalizeAll)\n if (this.client) {\n this.client.setData(normalizedData)\n }\n if (this.options.onSync) {\n this.options.onSync.call(this, normalizedData)\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.info('Pouch synced')\n }\n this.client.emit('pouchlink:sync:end')\n }", "function update(appConfig, updateFn) {\r\n return Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__awaiter\"])(this, void 0, void 0, function () {\r\n var key, db, tx, store, oldValue, newValue;\r\n return Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__generator\"])(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n key = getKey(appConfig);\r\n return [4 /*yield*/, getDbPromise()];\r\n case 1:\r\n db = _a.sent();\r\n tx = db.transaction(OBJECT_STORE_NAME, 'readwrite');\r\n store = tx.objectStore(OBJECT_STORE_NAME);\r\n return [4 /*yield*/, store.get(key)];\r\n case 2:\r\n oldValue = _a.sent();\r\n newValue = updateFn(oldValue);\r\n if (!(newValue === undefined)) return [3 /*break*/, 4];\r\n return [4 /*yield*/, store.delete(key)];\r\n case 3:\r\n _a.sent();\r\n return [3 /*break*/, 6];\r\n case 4: return [4 /*yield*/, store.put(newValue, key)];\r\n case 5:\r\n _a.sent();\r\n _a.label = 6;\r\n case 6: return [4 /*yield*/, tx.complete];\r\n case 7:\r\n _a.sent();\r\n return [2 /*return*/, newValue];\r\n }\r\n });\r\n });\r\n}", "async function reloadAppAndReplaceScriptviaEngine(appId, scriptReplace, generationUserId) {\n // console.log('server: QSSOCKS reloadAppviaEngine');\n\n //source based on loic's work: https://github.com/pouc/qlik-elastic/blob/master/app.js\n var scriptMarker = '§dummyDatabaseString§';\n var _global = {};\n\n engineConfig.appname = appId; //(String) Scoped connection to app. see https://github.com/mindspank/qsocks\n // console.log('Connect to Engine with a new appname parameter when you call global,openDoc: ', engineConfig.appname);\n var call = {};\n call.action = 'Connect to Qlik Sense Engine API';\n call.request = 'Connect to Engine (using EnigmaJS) with a new appname parameter when you call global,openDoc: ', engineConfig.appname;\n call.url = gitHubLinks.replaceAndReloadApp;\n REST_Log(call, generationUserId);\n\n //use ES7 await function so this code will run in synchronous mode\n return await qsocks.Connect(engineConfig)\n .then(function(global) {\n // console.log('connected to Qsocks');\n _global = global;\n return global.openDoc(appId, '', '', '', true) //global.openDoc(appId), this code opens the app without data, that is faster!\n })\n .then(function(doc) {\n // console.log('** getAppsViaEngine, QSocks opened and now tries to set the script for appId: ', appId);\n return doc.getScript()\n .then(function(script) {\n // console.log('get Script success, ', script);\n\n var call = {};\n call.action = 'Get data load script';\n call.url = gitHubLinks.getScript;\n call.request = 'We extracted the following script from the app: ' + script;\n REST_Log(call, generationUserId);\n // if you want to replace the database connection per customer use the script below.\n //return doc.setScript(script.replace(scriptMarker, scriptReplace)).then(function (result) {\n //you can also change the sense database connection: https://github.com/mindspank/qsocks/blob/master/examples/App/create-dataconnection.js\n return doc.setScript(script) //we now just include the old script in this app\n .then(function(result) {\n var call = {};\n call.action = 'Insert customer specific data load script for its database';\n call.url = gitHubLinks.setScript;\n call.request = 'The script of the app has been replaced with a customer specific one. Normally you would replace the database connection for each customer. Or you can insert a customer specific script to enable customization per customer. ';\n REST_Log(call, generationUserId);\n // console.log('Script replaced');\n return doc;\n })\n });\n })\n .then(function(doc) {\n return doc.doReload()\n .then(function(result) {\n var call = {};\n call.action = 'Reload the app';\n call.url = gitHubLinks.reloadApp;\n call.request = 'Has the app been reloaded with customer specific data?';\n call.response = result;\n REST_Log(call, generationUserId);\n // console.log('Reload : ' + result);\n return doc.doSave()\n .then(function(result) {\n var call = {};\n call.action = 'Save app'\n call.url = gitHubLinks.saveApp;\n call.request = 'App with GUID ' + appId + ' has been saved to disk';\n REST_Log(call, generationUserId);\n // console.log('Save : ', result);\n _global.connection.close();\n return doc;\n });\n })\n })\n .catch((error) => {\n console.error('ERROR while reloading the new app: ', error);\n throw new Meteor.error(error);\n });\n}", "function asap(callback, context) {\r\n\t !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;\r\n\t asapCallbackQueue.enqueue(callback, context);\r\n\t asapEnqueued = true;\r\n\t}", "get isSyncable() {\n let addon = addonFor(this);\n return (addon.location.name == KEY_APP_PROFILE);\n }", "function syncImmediate() {\n CodePush.sync(\n { installMode: CodePush.InstallMode.IMMEDIATE, updateDialog: true },\n codePushStatusDidChange,\n codePushDownloadDidProgress\n );\n }", "function syncSandbox(done) {\n prompt.get({\n name: 'sync',\n description: '\\nWould you like to sync your local \\'sandbox\\' now?'.bold,\n type: 'string',\n pattern: /y[es]*|n[o]?/,\n message: 'You must respond [y]es or [n]o',\n default: 'yes',\n required: false,\n }, function(err, result) {\n if (err) {\n logger.errorMessage(err.message);\n return done(1);\n }\n\n if (/n[o]?/.test(result.sync)) {\n logger.successMessage('Done');\n return done(0);\n }\n\n // redirect to sync command\n done(sync.run());\n });\n}", "function updateApplications(application){\n let user = auth['user'];\n user.applications.push(application);\n auth['removeUser']('user');\n auth['setUser']('user',user);\n }", "function sync_email_systems_forms() {\n sync_forms = !sync_forms;\n if (sync_forms) {\n document.getElementById(\"sync-forms\").innerHTML = \"Unsync Forms\";\n alert(\"The following forms will synchronize similar questions:\\n\" +\n \"\\u2022 Email Systems SE/PS\" +\n \"\\n\\nPlease review your changes before saving.\");\n } else {\n document.getElementById(\"sync-forms\").innerHTML = \"Sync Forms\";\n alert(\"The following forms will not synchronize similar questions:\\n\" +\n \"\\u2022 Email Systems SE/PS\" +\n \"\\n\\nPlease review your changes before saving.\");\n }\n}", "function setAPP_ID(pApp) {\r\n\tAPP_ID = pApp;\r\n}", "function updatedb_sql(){\n\n}", "function asap(callback, context) {\n\t\t !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\\'t enqueue an asap callback in a context where' + 'updates are not being batched.') : invariant(false) : undefined;\n\t\t asapCallbackQueue.enqueue(callback, context);\n\t\t asapEnqueued = true;\n\t\t}", "function addSyncCPS(a, b, callback) {\n callback(a+b);\n}", "function updateroster() {\n\n}", "GetAppCode(Site, User=\"null\", UserId=\"null\", Admin=false){\n let MyApp = new Object()\n MyApp.JS = \"\"\n MyApp.CSS = \"\"\n\n let fs = require('fs')\n let os = require('os')\n\n // Ajout des modules de CoreX\n MyApp.JS += fs.readFileSync(__dirname + \"/Client_CoreX_Modules.js\", 'utf8') + os.EOL\n MyApp.JS += fs.readFileSync(__dirname + \"/Client_CoreX_Module_CoreXBuild.js\", 'utf8') + os.EOL\n MyApp.JS += fs.readFileSync(__dirname + \"/Client_CoreX_Module_CoreXApp.js\", 'utf8') + os.EOL\n MyApp.JS += fs.readFileSync(__dirname + \"/Client_CoreX_Module_SocketIo.js\", 'utf8') + os.EOL\n MyApp.JS += `\n // Creation de l'application\n let MyApp = new CoreXApp(`+this._AppIsSecured+`,`+ this._Usesocketio +`)\n // Fonction globale Admin is user\n function GlobalIsAdminUser(){\n return `+ Admin +`\n }\n // Fonction globale GlobalStart\n function GlobalStart(){\n MyApp.Start()\n }\n // Fonction global reset de l'application\n function GlobalReset(){\n MyApp.ResetCoreXApp()\n }\n // Fonction globale GlobalClearActionList\n function GlobalClearActionList(ExecuteBeforeQuit = null) {\n MyApp.ClearActionList(ExecuteBeforeQuit)\n }\n // Fonction gloable AddActionInList\n function GlobalAddActionInList(Titre, Action) {\n MyApp.AddActionInList(Titre, Action)\n }\n // Fonction globale to Execute Before Quit a module\n function GlobalExecuteBeforeQuit (Fct){\n MyApp.ExecuteBeforeQuit = Fct\n }\n // Fonction globale GetSocketIo\n function GlobalGetSocketIo(){\n return MyApp.SocketIo\n }\n // Fonction globale Send SocketIO\n function GlobalSendSocketIo(ModuleName, Action, Value){\n let SocketIo = GlobalGetSocketIo()\n SocketIo.emit('api', {ModuleName: ModuleName, Data: {Action: Action, Value: Value}})\n }\n // Fonction globale GetContentAppId\n function GlobalCoreXGetAppContentId() {\n return MyApp.ContentAppId\n }\n // Fonction globale Add App in CoreXApp\n function GlobalCoreXAddApp(AppTitre, AppSrc, AppStart, StartWithThisModule = false) {\n MyApp.AddApp(AppTitre, AppSrc, AppStart, StartWithThisModule)\n }\n // Fonction globale Get User Data\n function GlobalGetUserDataPromise(){\n return new Promise((resolve, reject)=>{\n GlobalCallApiPromise(\"GetAllUser\", \"User\").then((reponse)=>{\n resolve(reponse)\n },(erreur)=>{\n reject(erreur)\n })\n })\n }\n // Fonction globale GlobalDisplayAction\n function GlobalDisplayAction(Type){\n MyApp.SetDisplayAction(Type)\n }\n `\n switch (Site) {\n case \"Admin\":\n this.LogAppliInfo(\"Start loading Admin App\", User, UserId)\n MyApp = this.LoadAppFilesFromAdminFolder(MyApp)\n break\n default:\n this.LogAppliInfo(\"Start loading App\", User, UserId)\n MyApp = this.LoadAppFilesFromClientFolder(MyApp)\n break\n }\n MyApp.JS += \" MyApp.Start(true)\"\n\n return MyApp\n }", "function syncEvents(){\n sync('events', { status: 'past,upcoming,cancelled' }, Events);\n}", "function upgradeApp(){\n // 3. Create a Business Network Definition object from directory\n var bnaDef = {}\n BusinessNetworkDefinition.fromDirectory(bnaDirectory).then(function(definition){\n bnaDef = definition;\n console.log(\"Successfully created the definition!!! \",bnaDef.getName())\n\n // 4.Install the new version of the BNA\n return adminConnection.install(bnaDef);\n \n }).then(()=>{\n\n // 5. start the network \n // If you do not have the app installed, you will get an error\n console.log(\"Install successful\")\n return adminConnection.start(appName, version, \n { networkAdmins:\n [ {userName : 'admin', enrollmentSecret:'adminpw'} ]\n }\n )\n \n\n }).then(()=>{\n console.log('Network up and runing!!! ', 'Network name: ', bnaDef.getName(),' ', 'Network version: ', bnaDef.getVersion());\n //6. connect network admin card \n adminConnection.connect(cardNameForNetworkAdmin).then(()=>{\n // 7. Ping the network \n adminConnection.ping(appName).then(function(response){\n console.log(\"Ping Response:\");\n console.log(response);\n });\n })\n \n \n // 8. Disconnect\n adminConnection.disconnect();\n \n\n }).catch(function(error){\n console.log(error);\n });\n\n}", "function syncOfflinetoMongoDBSelfHosted(key, method, title, url, requestHeadersKey1, requestHeadersValue1) {\n\n // alert(\"sync : id \" + key + \" method \" + method + \"title:\" + title + \" url: \" + url + \" headersKey1: \" + requestHeadersKey1 + \" headersValue1: \" + requestHeadersValue1);\n var currentDateTime = new Date().getTime();\n\n var xhr = new XMLHttpRequest();\n\n xhr.open('POST', 'http://localhost:3000/request', true);\n\n xhr.setRequestHeader('Content-Type', 'application/json');\n\n var toServer = JSON.stringify(\n {\n id: key,\n method: method,\n title: title,\n url: url,\n authorization: {type: 'authorizationoption', key: 'httpBasicAuthUserName', value: 'httpBasicAuthPassword'},\n headers: [{key : requestHeadersKey1, value: requestHeadersValue1}],\n body: 'requestBody',\n description: 'requestDescription',\n dateCreated: 1488846301000,\n dateUpdated: currentDateTime\n }\n );\n\n xhr.send(toServer);\n\n // loadRequestList()\n reloadMenu()\n notifyClient(toServer)\n\n}", "initleancloud() {\n AV.init({\n appId: keys.appId,\n appKey: keys.appKey\n })\n this.globalData.AV = AV\n }", "execute() {}", "execute() {}", "function AppUtils() {}" ]
[ "0.6237409", "0.58064175", "0.56619716", "0.5627084", "0.5610517", "0.5610517", "0.5610517", "0.5610517", "0.56017953", "0.5454321", "0.5402877", "0.5373927", "0.5217258", "0.5168108", "0.51403946", "0.51399827", "0.5105531", "0.50881344", "0.5071753", "0.5066518", "0.50654006", "0.50475186", "0.5047492", "0.50038534", "0.49897972", "0.49843398", "0.4983948", "0.49690413", "0.49377543", "0.49368283", "0.4932538", "0.49217582", "0.49116033", "0.48869893", "0.4881934", "0.4881934", "0.48782888", "0.4875705", "0.48553687", "0.48447257", "0.48424003", "0.4824411", "0.48192948", "0.48087817", "0.47906688", "0.47867173", "0.47835", "0.4761831", "0.4754964", "0.47432864", "0.47413555", "0.47395754", "0.47395372", "0.473738", "0.47286198", "0.47123894", "0.47107512", "0.47029614", "0.47012335", "0.46961716", "0.46947563", "0.46904376", "0.46902698", "0.4690135", "0.4690135", "0.4690135", "0.4685994", "0.46837065", "0.46802485", "0.46753213", "0.46715203", "0.46624175", "0.46582648", "0.46570748", "0.4656866", "0.46529967", "0.46363348", "0.4634191", "0.463233", "0.46241322", "0.46178117", "0.4614815", "0.46007857", "0.45990908", "0.45982918", "0.45935744", "0.45792064", "0.45755994", "0.45736074", "0.45698684", "0.45666024", "0.45655236", "0.45548737", "0.45517012", "0.45475116", "0.45459056", "0.45448604", "0.4541311", "0.45400497", "0.45400497", "0.45396858" ]
0.0
-1
alphabetical sort function used to sort the "AddTab" dropdown list.
function alphabeticalsort(a,b){ var z = 0; if (a.label.toLowerCase() < b.label.toLowerCase()){ z = -1; } if (a.label.toLowerCase() > b.label.toLowerCase()){ z = 1; } if (a.label.toLowerCase() == b.label.toLowerCase()){ z = 0; } return (z); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function orderAlphabetically() {}", "function sortTableAlphabeticallyAscending(){\n sortAlphabeticallyAscending();\n}", "sortOptionsByName(a, b) {\n var aName = a.value.toLowerCase();\n var bName = b.value.toLowerCase();\n return ((aName < bName) ? -1 : ((aName > bName) ? 1 : 0));\n }", "function Sort() {}", "function updateTabOrder(){var selectedItem=ctrl.tabs[ctrl.selectedIndex],focusItem=ctrl.tabs[ctrl.focusIndex];ctrl.tabs=ctrl.tabs.sort(function(a,b){return a.index-b.index;});ctrl.selectedIndex=ctrl.tabs.indexOf(selectedItem);ctrl.focusIndex=ctrl.tabs.indexOf(focusItem);}", "function SortOptions(id) \n\t{\n var prePrepend = \"#\";\n if (id.match(\"^#\") == \"#\") prePrepend = \"\";\n $(prePrepend + id).html($(prePrepend + id + \" option\").sort(\n function (a, b) { return a.text == b.text ? 0 : a.text < b.text ? -1 : 1 })\n );\n\t}", "function sortFromOption(){\n // console.log(\"sortFromOption\");\n getSortMethod(nowArray);\n pageNumber = 1;\n changeDisplayAmount(displayType,1);\n}", "Sort() {\n\n }", "function ascendentAlphabeticOder() {\n userOutput.sort(User.alphabeticOrder)\n}", "function sortAlpha(a, b){\r\n\t if(a < b) return -1;\r\n\t if(a > b) return 1;\r\n\t return 0;\r\n}//sortAlpha", "function orderAlphabetically(tab){\n var tab2= tab.map(function(elt){\n return elt.title;\n })\n\n console.log(tab2);\n var res= tab2.sort();\n return res.slice(0,20);\n}", "sort(){\n\n }", "function sortBy(){\n var option = btnSelectBy.options[btnSelectBy.selectedIndex].value;\n resultHotel = resultHotel.sort((a, b)=>{\n var itemA = a[option];\n var itemB = b[option];\n return itemA < itemB ? -1 : itemA > itemB ? 1 : 0;\n });\n display(resultHotel);\n}", "function arraySort() {\n var selectedChoice = document.getElementById(\"arraySelect\").value;\n if (selectedChoice == \"Alfabetisk\") {\n globalEntries.sort();\n } else if (selectedChoice == \"Revers\") {\n globalEntries.reverse();\n }\n}", "function sort_order(){\n\tvar current_order = document.getElementById('inc/dec');\n\tif(current_order.innerHTML == \"Increasing\"){\n\t\tcurrent_order.innerHTML = \"Decreasing\";\n\t\tincreasing = false;\n\t}else{\n\t\tcurrent_order.innerHTML = \"Increasing\";\n\t\tincreasing = true;\n\t}\n\t//alert(document.getElementById('dropdownMenuButton').value);\n\tsortingFunction(document.getElementById('dropdownMenuButton'));\n}", "function sortByProcName(a, b) {//sort by name(display_as) ascending only\n\t\tif (a.DISPLAY_AS.toUpperCase() > b.DISPLAY_AS.toUpperCase()) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (a.DISPLAY_AS.toUpperCase() < b.DISPLAY_AS.toUpperCase()) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t}", "sort() {\n\t}", "sort() {\n\t}", "sortBy() {\n // YOUR CODE HERE\n }", "function sortTheItem(e) {\r\n\te.preventDefault();\r\n\tif (e.target.classList.contains('dropdown-name')) {\r\n\t\tcontentBody.innerText = \"\"\r\n\t\tsortByName()\r\n\t\tshowPage(currentPage)\r\n\t} else if (e.target.classList.contains('dropdown-rate')) {\r\n\t\tcontentBody.innerText = \"\"\r\n\t\tsortByRate()\r\n\t\tshowPage(currentPage)\r\n\t} \r\n}", "function sortSelect(selElem) {\r\n\tvar tmpAry = new Array();\r\n\tfor (var i=0;i<selElem.options.length;i++) {\r\n\t\ttmpAry[i] = new Array();\r\n\t\ttmpAry[i][0] = selElem.options[i].text;\r\n\t\ttmpAry[i][1] = selElem.options[i].value;\r\n\t}\r\n\ttmpAry.sort();\r\n\twhile (selElem.options.length > 0) {\r\n\t\tselElem.options[0] = null;\r\n\t}\r\n\tfor (var i=0;i<tmpAry.length;i++) {\r\n\t\tvar op = new Option(tmpAry[i][0], tmpAry[i][1]);\r\n\t\tselElem.options[i] = op;\r\n\t}\r\n\treturn;\r\n}", "function sortRenderOrder() {\n \n var sortBy = function(field, reverse, primer){\n var key = primer ? function(x) {return primer(x[field])} : function(x) {return x[field]};\n reverse = [-1, 1][+!!reverse];\n return function (a, b) {\n\treturn a = key(a), b = key(b), reverse * ((a > b) - (b > a));\n } \n }\n \n gadgetRenderOrder.sort(sortBy(\"tabPos\", true, parseInt));\n gadgetRenderOrder.sort(sortBy(\"paneId\", true, parseInt));\n gadgetRenderOrder.sort(sortBy(\"parentColumnId\", true, parseInt));\n }", "function updateTabOrder () {\n var selectedItem = ctrl.tabs[ ctrl.selectedIndex ],\n focusItem = ctrl.tabs[ ctrl.focusIndex ];\n ctrl.tabs = ctrl.tabs.sort(function (a, b) {\n return a.index - b.index;\n });\n ctrl.selectedIndex = ctrl.tabs.indexOf(selectedItem);\n ctrl.focusIndex = ctrl.tabs.indexOf(focusItem);\n }", "function updateTabOrder () {\n var selectedItem = ctrl.tabs[ ctrl.selectedIndex ],\n focusItem = ctrl.tabs[ ctrl.focusIndex ];\n ctrl.tabs = ctrl.tabs.sort(function (a, b) {\n return a.index - b.index;\n });\n ctrl.selectedIndex = ctrl.tabs.indexOf(selectedItem);\n ctrl.focusIndex = ctrl.tabs.indexOf(focusItem);\n }", "function updateTabOrder () {\n var selectedItem = ctrl.tabs[ ctrl.selectedIndex ],\n focusItem = ctrl.tabs[ ctrl.focusIndex ];\n ctrl.tabs = ctrl.tabs.sort(function (a, b) {\n return a.index - b.index;\n });\n ctrl.selectedIndex = ctrl.tabs.indexOf(selectedItem);\n ctrl.focusIndex = ctrl.tabs.indexOf(focusItem);\n }", "function updateTabOrder () {\n var selectedItem = ctrl.tabs[ ctrl.selectedIndex ],\n focusItem = ctrl.tabs[ ctrl.focusIndex ];\n ctrl.tabs = ctrl.tabs.sort(function (a, b) {\n return a.index - b.index;\n });\n ctrl.selectedIndex = ctrl.tabs.indexOf(selectedItem);\n ctrl.focusIndex = ctrl.tabs.indexOf(focusItem);\n }", "function asc_sort(a, b) {\n return ($(b).text().toLowerCase()) < ($(a).text().toLowerCase()) ? 1 : -1;\n}", "function toogleSort(){\r\n\t\tif(settings.sort_type=='desc'){\r\n\t\t\tsettings.sort_type='asc';\r\n\t\t }else{\r\n\t\t\t settings.sort_type='desc';\r\n\t\t }\r\n\t}", "function sort() {\n let val = document.getElementById('sort').value\n if (val === 'title') {\n sortByTitle()\n } else if (val === 'author') {\n sortByAuthor()\n } else if (val === 'genre') {\n sortByGenre()\n } else if (val === 'pages') {\n sortByPages()\n } else {\n sortByCreationDate()\n }\n}", "function sortFieldList() {\n\tvar mylist = $('#editorFieldList');\n\tvar listitems = mylist.children('.formItem').get();\n\tlistitems.sort(function(a, b) {\n\t\tvar labelA = $(a).find('label').html().toLowerCase();\n\t\tvar labelB = $(b).find('label').html().toLowerCase();\n\t\treturn labelA.localeCompare(labelB);\n\t});\n\t$.each(listitems, function(idx, itm) {\n\t\tmylist.append(itm);\n\t});\n}", "function sortab(a,b){\n return a - b;\n }", "function sortLetters(inputString) {\n\t// your code goes here\n}", "sortChange() {\n let choice = this.selector.value;\n switch(choice) {\n case \"1\":\n return this.sortAlpha();\n case \"2\":\n return this.sortAlpha(true);\n case \"3\":\n return this.sortDonation();\n case \"4\":\n return this.sortDonation(true);\n }\n }", "function sortBy(categories) {\n    var sortIt = $(this).attr(\"data-sortby\"); \n    sortObjArray(Employees.entries, sortIt); \n    \n    $(\".btn.active\").removeClass(\"active\");\n    $(this).addClass(\"active\");\n}", "function sortASelect(select){\r\n select.append($(select.selector +\" option\").remove().sort(function(a, b) {\r\n var at = $(a).text(), bt = $(b).text();\r\n return (at > bt)?1:((at < bt)?-1:0);\r\n }));\r\n}", "get overrideSorting() {}", "function sortAlphabetically(a,b) {\n\treturn a.toLowerCase().localeCompare(b.toLowerCase());\n}", "function onClickLastNameTableHeader(event)\n{\n document.isAscendingOrder = !document.isAscendingOrder;\n sortTableElementsBy(\"last_name\");\n}", "function sortAsc(a, b) {\n return a - b;\n }", "function sortAssets2() {\r\n\t//}\r\n\tchangeList();\r\n\t}", "nameSort() {\n orders.sort( \n function(a,b) {\n return (a[0] < b[0]) ? -1 : (a[0] > b[0]) ? 1 : 0; \n }\n ); \n }", "set sortingOrder(value) {}", "function alphabeticalOrder(arr) {\n // Add your code below this line\n return arr.sort()\n\n // Add your code above this line\n}", "_sortFilters() {\n this.$filterSelects.each(function() {\n const $select = $(this);\n const $toSort = $select.find('option');\n const sortingFunction = sortingFunctions[$select.data('filters-type')];\n\n if (sortingFunction) {\n $toSort.sort((a, b) => {\n return sortingFunction($(a).val(), $(b).val());\n });\n }\n });\n }", "function sortOptionsByText() {\n\tvar selectElement, optionElements, options;\n\tselectElement = jQuery('select[data-sort=\"sort\"]');\n\tif (selectElement) {\n\t\toptionElements = jQuery(selectElement.find('option'));\n\t\toptions = jQuery.makeArray(optionElements).sort(function(a, b) {\n\t\t\treturn (a.innerHTML > b.innerHTML) ? 1 : -1;\n\t\t});\n\t\tselectElement.html(options);\n\t}\n}", "function sortSelect(obj) {\n var o = new Array();\n if (!hasOptions(obj)) { return; }\n for (var i=0; i<obj.options.length; i++) {\n o[o.length] = new Option( obj.options[i].text, obj.options[i].value, obj.options[i].defaultSelected, obj.options[i].selected) ;\n }\n if (o.length==0) { return; }\n o = o.sort( \n function(a,b) { \n if ((a.text+\"\") < (b.text+\"\")) { return -1; }\n if ((a.text+\"\") > (b.text+\"\")) { return 1; }\n return 0;\n } \n );\n\n for (var i=0; i<o.length; i++) {\n obj.options[i] = new Option(o[i].text, o[i].value, o[i].defaultSelected, o[i].selected);\n }\n }", "function listsort(obj, by, num, cs) { /*updated from version 1.2*/\n\tobj = (typeof obj == \"string\") ? document.getElementById(obj) : obj;\n\tby = (parseInt(\"0\" + by) > 5) ? 0 : parseInt(\"0\" + by);\n\tif (obj.tagName.toLowerCase() != \"select\" && obj.length < 2)\n\t\treturn false;\n\tvar elements = new Array();\n\tfor (var i=0; i<obj.length; i++) {\n\t\telements[elements.length] = new Array((document.body.innerHTML ? obj[i].innerHTML : obj[i].text), obj[i].value, (obj[i].currentStyle ? obj[i].currentStyle.color : obj[i].style.color), (obj[i].currentStyle ? obj[i].currentStyle.backgroundColor : obj[i].style.backgroundColor), obj[i].className, obj[i].id, obj[i].selected);\n\t}\n\tsort2d(elements, by, num, cs);\n\tfor (i=0; i<obj.length; i++) {\n\t\tif (document.body.innerHTML) obj[i].innerHTML = elements[i][0];\n\t\telse obj[i].text = elements[i][0];\n\t\tobj[i].value = elements[i][1];\n\t\tobj[i].style.color = elements[i][2];\n\t\tobj[i].style.backgroundColor = elements[i][3];\n\t\tobj[i].className = elements[i][4];\n\t\tobj[i].id = elements[i][5];\n\t\tobj[i].selected = elements[i][6];\n\t}\n}", "function sortSelect(select) {\n if (select.options.length > 1) {\n var tempArray = [];\n for (i = 0; i < select.options.length; i++) {\n tempArray[i] = [];\n tempArray[i][0] = select.options[i].text;\n tempArray[i][1] = select.options[i].value;\n }\n tempArray.sort();\n while (select.options.length > 0) {\n select.options[0] = null;\n }\n for (i = 0; i < tempArray.length; i++) {\n select.options[i] = new Option(tempArray[i][0], tempArray[i][1]);\n }\n return;\n }\n }", "function funSortByName(a, b) {\n return (a.employee_name.toLowerCase() > b.employee_name.toLowerCase()) ? 1 : -1;\n}", "alphaSort(a, b, invert) {\r\n let aName = a.value.toLowerCase();\r\n let bName = b.value.toLowerCase();\r\n\r\n var result;\r\n if (aName < bName) {\r\n result = -1;\r\n }\r\n else if (aName > bName) {\r\n result = 1;\r\n }\r\n else {\r\n result = 0;\r\n }\r\n if (invert == true) {\r\n result = -result;\r\n }\r\n return result;\r\n }", "function bindSort(obj, sortByID, sortOrderID, actionTypeID, fnCallback) {\r\n\r\n\r\n var sortby = ($(obj).attr(\"sortby\"));\r\n var previouseSortBy = $(\"#\" + sortByID).val();\r\n var sortOrder = $(\"#\" + sortOrderID).val();\r\n\r\n if (sortby == previouseSortBy) {\r\n if (sortOrder == '0') {\r\n $(\"#\" + sortOrderID).val(\"1\");\r\n $(obj).addClass(\"desc\");\r\n }\r\n else {\r\n $(\"#\" + sortOrderID).val(\"0\");\r\n $(obj).addClass(\"asc\");\r\n }\r\n $(\"#\" + sortByID).val(sortby);\r\n }\r\n else {\r\n $(\"#\" + sortOrderID).val(\"1\");\r\n $(\"#\" + sortByID).val(sortby);\r\n }\r\n $(\"#\" + actionTypeID).val(\"sortList\");\r\n //$(\"#currentPage\").val(\"1\");\r\n fnCallback();\r\n\r\n}", "function sortViewList() {\n var primarySort = document.getElementsByTagName(\"select\")[0].value;\n var hierarchy = [];\n if (primarySort === \"name\") { //hierarchy: name > category > price\n hierarchy = [\"name\", \"category\", \"price\"];\n } else if (primarySort === \"price\") { //hierarchy: price > name > category\n hierarchy = [\"price\", \"name\", \"category\"];\n } else if (primarySort === \"category\") { //hierarchy: category > name > price\n hierarchy = [\"category\", \"name\", \"price\"];\n }\n itemViewList = mergeSort(itemViewList, hierarchy);\n}", "function getMyListSortByOptions() {\n\t\tvar html = '';\n\t\thtml += '<option value=\"country\">Country</option>';\n\t\thtml += '<option value=\"city\">City</option>';\n\t\thtml += '<option value=\"repository\">Repository</option>';\n\t\thtml += '<option value=\"hmmlProjectNumber\">HMML Project Number</option>';\n\t\t\n\t\treturn html;\n\t}", "function alphabits(string) {\n var alph = document.getElementById(\"alpha\");\n alph.innerHTML = string.split('').sort();\n}", "function ascSort(a,b){\n return a - b;\n }", "function sortByFunc() {\n switch (sortBy.field) {\n case 'name':\n case 'ticker':\n if (sortBy.desc === 0) {\n return (a, b) => a[sortBy.field].localeCompare(b[sortBy.field])\n }\n return (a, b) => b[sortBy.field].localeCompare(a[sortBy.field])\n case 'price':\n case 'changes':\n case 'marketCapitalization':\n default:\n if (sortBy.desc === 0) {\n return (a, b) => (a[sortBy.field] - b[sortBy.field])\n }\n return (a, b) => (b[sortBy.field] - a[sortBy.field])\n }\n }", "function sortRows(){\n sortRowsAlphabeticallyUpwards();\n}", "function sortFlights() {\n handleSelect();\n }", "function onClickFirstNameTableHeader(event)\n{\n document.isAscendingOrder = !document.isAscendingOrder;\n sortTableElementsBy(\"first_name\");\n}", "function sortByNameHandler() {\n let sorted = sortByName(myData);\n showData(sorted, document.getElementById(\"display\"));\n}", "function alphabetSort(){\n const tilesArr = [\"Caribbean\", \"The Bahamans\", \"Mexico\", \"Europe\", \"Bermuda\", \"Alaska\", \"Canada & New England\", \"Hawaii\", \"Panama Canal\", \"Transatlantic\", \"Transpacific\", \"Australia\"];\n tilesArr.sort()\n console.log(tilesArr);\n}", "function sortSelector(event) {\n event.preventDefault();\n if ($(\".select-field\").val() == 1) {\n var sortOrder = \"asc\";\n var functionArray = currentSongResults[0];\n var sortedResultsObj = _.orderBy(functionArray, [\"title\"], [sortOrder]);\n var track = sortedResultsObj.map(createListing);\n node.append(track);\n playEventListener(track);\n\n } else if ($(\".select-field\").val() == 2) {\n var sortOrder = \"desc\";\n var functionArray = currentSongResults[0];\n var sortedResultsObj = _.orderBy(functionArray, [\"title\"], [sortOrder]);\n var track = sortedResultsObj.map(createListing);\n node.append(track);\n playEventListener(track);\n };\n}", "get sortingOrder() {}", "sort() {\n if (this.sortOrder === 'asc') {\n this.set('sortOrder', 'desc');\n\n } else if (this.sortOrder === '') {\n this.set('sortOrder', 'asc');\n\n } else {\n this.set('sortOrder', '');\n\n }\n }", "function sorterRetter() {\n console.log(\"Sortering\");\n\n document.querySelector(\"select\").addEventListener(\"change\", sorteringDropdown);\n\n function sorteringDropdown() {\n if (this.value == \"alfa\") {\n retter.sort((a, b) => a.navn.localeCompare(b.navn));\n } else if (this.value == \"pris-stigende\") {\n retter.sort((a, b) => a.pris - b.pris);\n } else if (this.value == \"pris-faldende\") {\n retter.sort((a, b) => b.pris - a.pris);\n }\n vis(retter, menuKategori);\n }\n }", "sort () {\r\n this._data.sort((a, b) => a.sortOrder !== b.sortOrder ? b.sortOrder - a.sortOrder : a.value.localeCompare(b.value))\r\n }", "function flist_cmp(a, b) {\n\tif (a.name.toLowerCase() > b.name.toLowerCase()) {\n\t\treturn 1;\n\t}\n\treturn -1;\n}", "sortFunctionAsc(field) {\n const compare = (a, b) => {\n var aField = a[field]\n var bField = b[field]\n if (typeof a[field] === 'string') {\n aField = a[field].toLowerCase()\n }\n if (typeof b[field] === 'string') {\n bField = b[field].toLowerCase()\n }\n\n if (aField < bField) { return -1 }\n if (aField > bField) { return 1 }\n return 0\n }\n return compare\n }", "function onSort() {\n\tvar items = {};\n\titems[ this.options.sortIdKey ] = this.sorTable.sortId;\n\titems[ this.options.sortAscKey ] = this.sorTable.sortAsc;\n\tchrome.storage.local.set( items );\n}", "function sortBy(elem){\n\n var sort = elem.innerHTML.replace(/<.+?>/g,\"\")\n var sortDirection = elem.children[0].className\n \n if(sort == \"name\"){\n \n if(sortDirection.match(\"sortAscending\")){\n elem.children[0].className = elem.children[0].className.replace(\"glyphicon-arrow-down\", \"glyphicon-arrow-up\")\n elem.children[0].className = elem.children[0].className.replace(\"sortAscending\", \"sortDescending\")\n tableRef.fnSort([2, \"desc\"]) //sort by last name\n }else {\n elem.children[0].className = elem.children[0].className.replace(\"glyphicon-arrow-up\", \"glyphicon-arrow-down\")\n elem.children[0].className = elem.children[0].className.replace(\"sortDescending\", \"sortAscending\")\n tableRef.fnSort([2, \"asc\"]) //sort by last name\n }\n \n var $ProfileList = $(\"div.ProfileContainer\")\n \n var rows = tableRef._('tr', {\"filter\":\"applied\"}); \n var IndexArray = rows.map(function(value,index) { return value[0]; });\n \n var SortedProfiles = $ProfileList.sort(function (a, b) {\n var test1 = IndexArray.indexOf(a.id.match(/\\d+/)[0])\n var test2 = IndexArray.indexOf(b.id.match(/\\d+/)[0])\n\n return test1 < test2 ? -1 : test1 > test2 ? 1 : 0;\n });\n \n $(\"#ProfileResults\").html(SortedProfiles)\n\n }\n updateActiveContent()\n }", "function sortFunction(val){\n return val.sort();\n}", "function ewrpt_Sort(e, url) {\n\tvar newUrl = url\n\tif (e.ctrlKey)\n\t\tnewUrl += \"&ctrl=1\";\n\tlocation = newUrl;\n\treturn true;\n}", "function ezInitSorting(isCaseSensitive)\n{\n \t\n \tvar InnerdivId=document.getElementById(\"InnerBox1Div\")\n\t\n if(InnerdivId!=null) //if rowCount!=0\n {\n\n\t rowCount=dataArray.length\n\t if(isCaseSensitive==null || isCaseSensitive==\"\")\n\t\tisCaseSensitive=false\n\t else\n\t\tisCaseSensitive=true\n\n\t try\n\t {\n\t tabObj=InnerBox1Div.getElementsByTagName(\"table\")\n\t tabObj[0].id=\"InnerBox1Tab\"\n\n\t \tfor(t=0;t<rowCount;t++)\n\t\t{\n\t \t\tinitialData[t]=InnerBox1Tab.rows(t).outerHTML\n\t\t}\n\t}catch(varError)\n \t{\n \t \talert(varError)\n \t \treturn\n \t}\n\n }//main if close\n}", "genSortAscendingByField(field) {\n return (a, b) => {\n const valA = a[field].toUpperCase()\n const valB = b[field].toUpperCase()\n let order = 0\n if (valA < valB) order = -1\n if (valA > valB) order = 1\n return order\n }\n }", "repeaterOnSort() {\n }", "set overrideSorting(value) {}", "function sort(value , column, obj, tableId)\r\n {\r\n //fix for eQ :: 530156 - IE loses document after we do save on reports\r\n var docObj;\r\n \r\n if ( obj != null )\r\n {\r\n docObj = obj.document;\r\n }\r\n else\r\n {\r\n docObj = document;\r\n }\r\n \r\n docObj.sortByClient = 'false';\r\n docObj.form.reset();\r\n\r\n var sortByElementName = \"SORT_BY\";\r\n \r\n if ( tableId != null && tableId != \"\" ) \r\n {\r\n sortByElementName = tableId + \"_SORT_BY\";\r\n gSortOrderElemName = tableId + \"_SORT_ORDER\";\r\n gStartCountElemName = tableId + \"_START_COUNT\";\r\n }\r\n \r\n var sortByElement = docObj.getElementById(sortByElementName);\r\n if (sortByElement != null) \r\n {\r\n sortByElement.value = value;\r\n }\r\n else\r\n {\r\n docObj.form.SORT_BY.value = value;\r\n }\r\n\r\n var sortOrderPopUpObj = docObj.getElementById('sortOrder');\r\n gSortTableId = tableId;\r\n\r\n i2uiShowMenu('sortOrder',sortOrderPopUpObj);\r\n }", "function compareAsc( a, b ) {\n if ( a.name.first < b.name.first ){\n return -1;\n }\n if ( a.name.first > b.name.first ){\n return 1;\n }\n return 0;\n }", "getSortOptions () {\n return [\n {value: 0, label: 'Price - Low to High'},\n {value: 1, label: 'Price - High to Low'},\n {value: 2, label: 'Distance - Close to Far'},\n {value: 3, label: 'Recomended'}\n ];\n }", "function alphaSort(str)\n//converting the function into an array & converting back into string.\n {\nreturn str.split('').sort().join('');\n }", "function sorter(a,b) {\n return a - b;\n}", "function laodPLMSortColumn(action, url, processHandler)\r\n{\r\n\t//alert('calling the new sort function');\r\n\tcloseMsgBox();\r\n\tvar htmlAreaObj = _getWorkAreaDefaultObj();\r\n var objAjax = htmlAreaObj.getHTMLAjax();\r\n var objHTMLData = htmlAreaObj.getHTMLDataObj();\r\n\tif(objAjax)\r\n {\r\n objAjax.setActionURL(action);\r\n objAjax.setActionMethod(url);\r\n objAjax.setProcessHandler(processHandler);\r\n objAjax.sendRequest();\r\n \r\n if(objAjax.isProcessComplete())\r\n \t{\r\n \tobjHTMLData.resetChangeFields();\r\n \t}\r\n }\r\n\t\r\n}", "function sortArrayAsc(index){\n console.log(\"Display before sort: \", displayArray);\n // switch/case based on asc button index\n switch (index) {\n case 0:\n displayArray.sort(function (a,b) { \n var x = a.property[1].propertyName.toLowerCase();\n var y = b.property[1].propertyName.toLowerCase();\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 1: \n displayArray.sort(function (a,b) { \n var x = a.property[1].propertyAddress.toLowerCase();\n var y = b.property[1].propertyAddress.toLowerCase();\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 2: \n displayArray.sort(function (a,b) { \n var x = a.property[1].propertyNeighborhood.toLowerCase();\n var y = b.property[1].propertyNeighborhood.toLowerCase();\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 3: \n displayArray.sort(function (a,b) { \n var x = parseInt(a.property[1].propertySquareFoot);\n var y = parseInt(b.property[1].propertySquareFoot);\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 4: \n displayArray.sort(function (a,b) { \n var x = a.workspaceType.toLowerCase();\n var y = b.workspaceType.toLowerCase();\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 5: \n displayArray.sort(function (a,b) { \n var x = parseInt(a.dateAvailable.replace(/[-,]+/g, \"\"));\n var y = parseInt(b.dateAvailable.replace(/[-,]+/g, \"\"));\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 6: \n displayArray.sort(function (a,b) { \n var x = parseInt(a.price.replace(/[$,]+/g, \"\"));\n var y = parseInt(b.price.replace(/[$,]+/g, \"\"));\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 7: \n displayArray.sort(function (a,b) {\n function leaseConvert(value){\n switch (value){\n case \"day\":\n return 1;\n case \"week\":\n return 7;\n case \"month\":\n return 30;\n }\n } \n var x = leaseConvert(a.leaseLength.toLowerCase());\n var y = leaseConvert(b.leaseLength.toLowerCase());\n \n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 8: \n displayArray.sort(function (a,b) { \n var x = parseInt(a.numberOfSeats);\n var y = parseInt(b.numberOfSeats);\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n };\n \n \n console.log(\"Display after sort: \", displayArray)\n }", "function sort() {\r\n\t// Set the and filter strings\r\n\tsortString = $('#page_sort').val();\r\n\tfilterString = $('#page_filter').val();\r\n\r\n\t// Remove current thumbnails from DOM\r\n\tclearThumbnails();\r\n\t\r\n\t// Display updated thumbnails\r\n\tdisplayThumbnails();\r\n\t\r\n\tissorting = true;\r\n}", "function sorter(columna){\n\t\t$(\".tablesorter\").tablesorter({\n \t sortList: [[columna,0]] \n });\n\t}", "function sortJson() {\r\n\t \r\n}", "function alphabetical(alpha) {\n return alpha.sort()\n}", "function alphabeticalOrder(arr) {\n // Add your code below this line\n return arr.sort(function(a, b){\n return a === b ? 0 : a > b ? 1 : -1;\n });\n // Add your code above this line\n}", "_reorderTabs(firstTabIndex, secondTabIndex) {\n function reorderList(list, x, y) {\n const temp = list[x];\n\n list.splice(x, 1);\n list.splice(y, 0, temp);\n }\n\n const that = this;\n\n if (that._groups.length === 0) {\n const tabs = that._tabs,\n tabLabelContainers = that._tabLabelContainers,\n referenceNodeIndex = firstTabIndex > secondTabIndex ? secondTabIndex : secondTabIndex + 1;\n\n if (that.selectedIndex === firstTabIndex) {\n that.selectedIndex = secondTabIndex;\n }\n else if (that.selectedIndex <= secondTabIndex && that.selectedIndex > firstTabIndex) {\n that.selectedIndex--;\n }\n else if (that.selectedIndex >= secondTabIndex && that.selectedIndex < firstTabIndex) {\n that.selectedIndex++;\n }\n\n let tabStripInsertBefore;\n\n if (tabLabelContainers[referenceNodeIndex]) {\n tabStripInsertBefore = tabLabelContainers[referenceNodeIndex];\n }\n else if (that.addNewTab) {\n tabStripInsertBefore = that._addNewTab;\n }\n else {\n tabStripInsertBefore = null;\n }\n\n that.$.tabStrip.insertBefore(tabLabelContainers[firstTabIndex], tabStripInsertBefore);\n that.$.dropDownButtonDropDown.insertBefore(that.$.dropDownButtonDropDown.children[firstTabIndex], that.$.dropDownButtonDropDown.children[referenceNodeIndex] || null);\n that.$.tabContentSection.insertBefore(tabs[firstTabIndex], tabs[referenceNodeIndex] || null);\n\n reorderList(tabs, firstTabIndex, secondTabIndex);\n reorderList(tabLabelContainers, firstTabIndex, secondTabIndex);\n\n that._updateTabIndexes();\n }\n else {\n that._reorderTabsGrouping(firstTabIndex, secondTabIndex);\n }\n\n that.$.fireEvent('reorder', { 'newIndex': secondTabIndex, 'originalIndex': firstTabIndex });\n\n that._reorderedIndex = secondTabIndex;\n\n that._positionTabSelectionBar(that._tabLabelContainers[that.selectedIndex], true);\n }", "function handleSortInput(e) {\n setFieldToSortBy(e.target.value)\n }", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortMethod(a, b) {\n var x = a.name.toLowerCase();\n var y = b.name.toLowerCase();\n return ((x < y) ? -1 : ((x > y) ? 1 : 0));\n }", "function sortAlt(sfield)\n {\n document.designateDEForm.sortColumn.value = sfield;\n submitDesignate(\"sortAlt\");\n }", "changeSorting() {\n this.currentlySelectedOrder =\n (this.currentlySelectedColumn === this.columnName) ? !this.currentlySelectedOrder : false;\n this.currentlySelectedColumn = this.columnName;\n }", "function sort(column) {\r\n\tnotImplemented();\r\n\treturn;\r\n\tvar sortColumn = document.forms[0].elements.sortColumn;\r\n\tvar sortDirection = document.forms[0].elements.sortDirection;\r\n\tif(sortColumn.value == column) {\r\n\t\tif(sortDirection.value == 'DESC') {\r\n\t\t\tsortDirection.value = 'ASC';\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsortDirection.value = 'DESC';\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tsortColumn.value = column;\r\n\t\tsortDirection.value = 'ASC';\r\n\t}\r\n\tdocument.forms[0].submit();\r\n}", "function doSorting(isAscending,orderByColumn)\n{\n if(orderByColumn != document.pagexform.orderByColumn.value )\n {\n\t document.pagexform.isAscending.value = \"true\";\n\t document.pagexform.orderByColumn.value = orderByColumn;\n }\n else\n {\n if(isAscending == \"true\")\n {\n isAscending=\"false\";\n } \n else if(isAscending == \"false\")\n {\n isAscending=\"true\";\n }\n\t document.pagexform.isAscending.value = isAscending;\n\t document.pagexform.orderByColumn.value = orderByColumn;\n \n }\n document.pagexform.FROM_INDEX.value=\"1\";\n document.pagexform.TO_INDEX.value = parseInt(document.pagexform.FROM_INDEX.value) + parseInt(document.pagexform.viewLength.value)-1;\n document.pagexform.PAGE_NUMBER.value=\"1\";\n\tdocument.pagexform.submit();\n}", "function sorting($event) {\n //get all thead td \n var tds = $($($event.currentTarget).parents('thead')).find('td');\n\n //check sorting or desc \n if ($($event.currentTarget).hasClass(\"sorting\") == true || $($event.currentTarget).hasClass(\"sorting_desc\") == true) {\n\n $(tds).attr(\"class\", \"sorting\"); // add sorting class to every td in thead\n $(tds[0]).attr(\"class\", \"\"); //remove class sorting from action coloumn \n $(tds[1]).attr(\"class\", \"\"); //remove class sorting from action coloumn \n\n $($event.currentTarget).attr(\"class\", \"sorting_asc\"); //add asc class in current tag\n\n vmab120.sortExp = $($event.currentTarget).attr(\"data-colname\") + \" asc\"; //update soring column in sorting exp\n\n } else {\n\n $(tds).attr(\"class\", \"sorting\"); // add sorting class to every td in thead\n $(tds[0]).attr(\"class\", \"\"); //remove class sorting from action coloumn \n $(tds[1]).attr(\"class\", \"\"); //remove class sorting from action coloumn \n\n $($event.currentTarget).attr(\"class\", \"sorting_desc\"); //add asc class in current tag\n vmab120.sortExp = $($event.currentTarget).attr(\"data-colname\") + \" desc\"; //update soring column in sorting exp\n }\n\n getab120();\n }" ]
[ "0.72943866", "0.7039919", "0.683717", "0.6819782", "0.67544645", "0.66391206", "0.6631086", "0.65611935", "0.654577", "0.6520791", "0.65192986", "0.65158516", "0.64789605", "0.6471293", "0.6470589", "0.64686185", "0.6438568", "0.6438568", "0.64292765", "0.6428717", "0.64089334", "0.6397304", "0.63872606", "0.63872606", "0.63872606", "0.63872606", "0.6359485", "0.6355071", "0.6343441", "0.6319076", "0.62963635", "0.6275441", "0.625737", "0.62573504", "0.62564814", "0.62053835", "0.6203683", "0.6200161", "0.6200128", "0.61973596", "0.6194502", "0.61917526", "0.6170723", "0.6168188", "0.6162075", "0.6161661", "0.6156186", "0.61497647", "0.6142086", "0.61411875", "0.6138071", "0.6132862", "0.613216", "0.61272335", "0.61210454", "0.61126137", "0.61099327", "0.61089194", "0.6101463", "0.6096513", "0.6082315", "0.60704273", "0.60549486", "0.6042172", "0.60379577", "0.60311", "0.6027255", "0.60263115", "0.60252476", "0.6018357", "0.60164845", "0.60163593", "0.6010585", "0.6006712", "0.60059875", "0.60010266", "0.5995827", "0.5987471", "0.59738696", "0.597033", "0.59660995", "0.5965714", "0.5961996", "0.5959167", "0.5955586", "0.5950685", "0.5944983", "0.59437853", "0.59426177", "0.5941746", "0.5939887", "0.5939887", "0.5939887", "0.5939887", "0.59376097", "0.5927677", "0.59255296", "0.59250224", "0.59247345", "0.59236884" ]
0.6361438
26
var word = "hello";
function receiver(request, sender, sendResponse){ word = request; console.log(word); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function req_string(){\n\tlet word = ;\n\treturn word\n}", "function words(str) {\n\n}", "function hello(str){\n return str;\n }", "function sayItLoud(word) {\n console.log(word.toUpperCase());\n}", "function getVariable(str) {\n\n return str;\n}", "function printApple (word) {\n console.log(word);\n}", "function saySomething(word) {\n console.log(`I was told to say ${word}`)\n}", "function getlength(word) {\r\n return word.length;\r\n\r\n}", "function reverseWord(string){\n\n}", "function sayHello(string) {\n return string;\n}", "function addS(word) {\n\n}", "function sayString(stringinput) {\n return stringinput;\n}", "function getWord() {\n var number = Math.floor(Math.random() * words.length);\n return words[number].toLowerCase();\n }", "function correct(word) {\n \n}", "function addS(word) {\n return word + 's';\n}", "function addS(word) {\n\treturn word + \"s\"\n}", "function createFirst(word) {\n return word.charAt(0).toLowerCase()\n}", "function makeWord(text) {\n return {word: text, score: 1};\n}", "function word(name, definition){\n this.name = name;\n this.definition = definition;\n}", "function pickWord() {\n \"use strict\";\n return words[Math.floor(Math.random() * words.length)];\n}", "function pickWord(word) {\n var words = [\"monkey\", \"crocodile\", \"hippopotamus\", \"giraffe\", \"pterodactyl\"];\n var word = words[Math.floor(Math.random() * words.length)];\n return word; // Return a random word\n}", "function getWord () {\n\n\tvar chosenWord = wordBank[Math.floor(Math.random() * wordBank.length)];\n\t// \tsplit up the characters in the word into a new array\n\tletters = chosenWord.split('');\n}", "function word() {\n return wrap('word', or(atom, quotedString)());\n }", "function word() {\n return wrap('word', or(atom, quotedString)());\n }", "function word() {\n return wrap('word', or(atom, quotedString)());\n }", "function word() {\n return wrap('word', or(atom, quotedString)());\n }", "function helloWord() {\n console.log(\"hello\");\n}", "function getLength(word) {\n return word.length;\n}", "function newWord(word) {\n mysteryWord = new Word(word);\n mysteryWord.guess(\" \");\n goalWord = word;\n goalWord = goalWord\n .split(\"\")\n .join(\" \")\n .concat(\" \");\n}", "function getRandom(word) {\n return word[Math.floor(Math.random() * word.length)];\n }", "function getLengthOfWord(word) {\r\n return word.length;\r\n}", "function getRandomWord() {\r\n\twordString = wordRandomizer();\r\n\tlowerCaseRandomWord = wordString.toLowerCase();\r\n}", "function getLength(word) {\n console.log(word.length);\n}", "function first(word) {\n return word[0];\n}", "function nameCharacters(word, character) {\n return character + word + character;\n}", "function kleineLetters(text) {\nvar str = \"Hello World!\";\nvar res = str.toLowerCase();\n}", "function first(word) {\n return word[0];\n}", "function getWord() {\n var wordIndex = Math.floor(Math.random() * 10);\n var word = words[wordIndex]\n return word\n}", "function getlength(word) {return word.length }", "function hai(){\n\treturn \"haiiii\"\n}", "function sayString(str) {\n return str;\n }", "function helloWorld() {\n var myString = \"Hello World!\";\n console.log(myString);\n}", "function wibble(string) {\n console.log(string)\n var result = \"wibbly \" + string;\n return result;\n}", "function upperCaseWord(word) {\n return word.toUpperCase();\n}", "function singleWord(){\n var s = ch;\n while (next() && \": \\t\\n\\r-+={(}[])'\\\"\".indexOf(ch)==-1) {s+= ch}\n return s;\n }", "function randomWord() {\nvar chars = \"abcdefghijklmnopqrstuvwxyz\";\nvar randomLength = Math.floor(Math.random() * 10) + 1; \nvar string= '';\n for (var letters = 0; letters < randomLength; letters ++) {\n var randomLetter= chars[Math.floor(Math.random() * (chars.length))];\n string += randomLetter; \n }\nreturn string; \n}", "function getRandomWord() {\n return words[Math.floor(Math.random() * words.length)];\n}", "function getRandomWord() {\n return words[Math.floor(Math.random() * words.length)];\n}", "function sc_string2keyword(o) {\n return sc_KEYWORD_PREFIX + o;\n}", "function greet(greetingWord, name) {\n greetingWord = greetingWord.charAt().toUpperCase() + greetingWord.slice(1);\n console.log(greetingWord + \", \" + name + \"!\");\n}", "function getLength(anyWord){\n return anyWord.length;\n}", "function getWord(text, start, end){\n\t\n\treturn text.substring(start, end);\n}", "function sayHi() {\n 'hello';\n}", "function getRandomWord() {\n return words[Math.floor(Math.random() * words.length)];\n\n}", "function getLenght(word) {\n return word.length\n}", "function getword(partOfSpeech) {\n return partOfSpeech[Math.floor(Math.random() * partOfSpeech.length)];\n}", "function captialize(word){\n\treturn word.charAt(0).toUpperCase() + word.slice(1);\n}", "function newWord(){\r\n let myword = words[selector];\r\n return myword;\r\n}", "function translate(word)\n{\n return Language[word]\n\n}", "function uselessHelloWorld(){\n var word = '';\n let letters = ['H','e','l','l','o',' ','W','o','r','l','d'];\n letters.forEach(function(letter){\n word +=letter;\n });\n\n return word;\n}", "function getWord(){\n var $theWord = $('#inputBox').val();\n return($theWord);\n}", "function printLetters(string) {\n /* DO SOMETHING HERE */\n}", "function allCaps(word){\n return word.toUpperCase()\n}", "function getInitalWords(str) {\n return str.substr(1);\n }", "function greet(name){\r\n return \"hello \"+name;\r\n}", "function warble(string){\n var result = string + \"arglebargle\";\n return result;\n}", "function f(str) {\n\n}", "function hello(str) {\n console.log('Hello, ' + str);\n}", "function wordType(word) {\n return word.substring(1, word.lastIndexOf(\"%\"));\n}", "function toUpperCase(word) {\n return word.toUpperCase();\n}", "function getRandomWord(){\n return randomWords[Math.floor(Math.random() * randomWords.length)];\n}", "function greet(name){\n return 'hi ' + name\n}", "function sayThings() {\n // let cities = ['Bogota', 'Madrid'];\n // console.log(cities);\n\n let word = 'dinosaur';\n console.log(word);\n}", "function madLib(wordToAdd){\n // This <word> is the coolest thing ever\n var thisString = \"This \";\n var coolestString = \" is the coolest thing ever\";\n // concat'd in the middle of my two vars with word to add\n var outputString = thisString + wordToAdd + coolestString;\n // Output the sentence\n return outputString;\n}", "function hasWord(string, word) {\nreturn string.includes(word);\n}", "function reverse(word)\n{\n var newWord = word.charAt(1)+word.charAt(0);\n return newWord;\n}", "postlude (word) {\n return word.toLowerCase()\n }", "function speak(name){\n return \"Hello \" + name;\n}", "function speak(name){\n return \"Hello \" + name;\n}", "function firstWord(a, b) {\n // Find the first word in a given text using RegExp match() method.\n var word = a.match(/[A-Za-z']+/)[0];\n\n return word;\n}", "function hangman(game, word){\n var words = [ruby, android, fellowship, javascript];\n this.word = words.sample;\n}", "function Word(chosenWord, spaceHolder, lettersInWord) {\n this.chosenWord = chosenWord;\n this.spaceHolder = spaceHolder;\n this.lettersInWord = lettersInWord;\n}", "function getLength (word) {\n\treturn word.length;\n}", "function SelectWord() {\n\treturn words[Math.floor(Math.random()*words.length)];\n}", "function CurrentWord(word) {\n this.word = word;\n this.guessedLetters = '-';\n}", "function lol(){\r\n return 'kelly';\r\n}", "function says(str){\n console.log(str);\n}", "function greet() {\r\n return \"string\";\r\n}", "ola() {\n return 'Hello Word!'\n }", "function getToken(word, tokenLength, position)\r\n{\r\n\treturn word.substring(position, position + tokenLength);\r\n}", "function greet(Name){\n var Name= \"Name!\"\n}", "function Word(characters, placeholder) {\n this.letters = [];\n this.placeholder = placeholder;\n let letter = \"_\";\n let word = \"\";\n word = characters.toString();\n for(i=0; i < word.length ;i++)\n {\n let character = word.charAt(i);\n if ( character != '\"')\n {\n letter = new Letter(character,this.placeholder);\n this.letters.push(letter);\n }\n }\n this.answered = false;\n }", "function Word(word) {\n this.letters = word.split(\"\").map(function(char) {\n return new Letter(char);\n });\n}", "function foo(str) {\n\tvar name = \"foo\";\n\tconsole.log(str);\n}", "function hello(){\n return 'hello';\n}", "function hello(){\n return 'hello';\n}", "function hasWord(string, word) {\n return string.includes(word);\n}", "function hasWord(string, word) {\n return string.includes(word);\n}", "function pickWord(words) {\n var word = stringToArray(words[Math.floor((Math.random() * words.length) + 0)]);\n return word;\n}", "function sayHello(name) {\n return name;\n}", "function sample(){\n var x=\"hello\";\n var y=\"Nitish\";\n return x+\" \"+y;\n}" ]
[ "0.70901877", "0.6964679", "0.6697091", "0.6641019", "0.657495", "0.65557116", "0.65388286", "0.651875", "0.64888126", "0.64452547", "0.643175", "0.63970685", "0.63329244", "0.63242084", "0.6311911", "0.63015914", "0.62795395", "0.6265138", "0.62560004", "0.625304", "0.6213111", "0.6207837", "0.6205737", "0.6205737", "0.6205737", "0.6205737", "0.61952496", "0.6187268", "0.618577", "0.616073", "0.6159559", "0.6151804", "0.61470526", "0.6131856", "0.6130125", "0.6128541", "0.6127617", "0.6124249", "0.6121684", "0.6121652", "0.61128676", "0.60962796", "0.6095876", "0.60939145", "0.60886925", "0.60805523", "0.6075872", "0.6075872", "0.6073984", "0.6062981", "0.60617477", "0.60460305", "0.6042901", "0.60397947", "0.603956", "0.60364944", "0.6033249", "0.60318923", "0.60203385", "0.60185266", "0.60175693", "0.60162735", "0.60161567", "0.60158044", "0.60061824", "0.600574", "0.600086", "0.599758", "0.59944344", "0.59880817", "0.5981665", "0.5972713", "0.5968294", "0.59677595", "0.5964761", "0.59589833", "0.5958034", "0.59464496", "0.59464496", "0.59309596", "0.59260833", "0.59229314", "0.5921097", "0.5920096", "0.59196734", "0.5917955", "0.5907191", "0.59071803", "0.5902785", "0.5894102", "0.58851624", "0.588288", "0.5880204", "0.58785534", "0.5875615", "0.5875615", "0.58701605", "0.58701605", "0.5861574", "0.5861183", "0.5855399" ]
0.0
-1
next step is to put the recipe label and url in the a tah in inner.html items that we want to be displayed in order: Recipe img > findings.hits[i].recipe.image Recipe label with href > label findings.hits[i].recipe.label ; href > findings.hits[i].recipe.url Calories > findings.hits[i].recipe.calories
function getMeSomeRecipes(findings) { for (let i = 0; i < 10; i++) { // Recipe Image let imgUrl = findings.hits[i].recipe.image; let img = document.createElement("img"); img.setAttribute("src", imgUrl); //Recipe Label let labelName = findings.hits[i].recipe.label; let label = document.createElement("a"); let labelhref = findings.hits[i].recipe.url; label.setAttribute("href", labelhref); label.innerText = labelName; //Recipe Calories let caloriesNumber = findings.hits[i].recipe.calories; let calories = document.createElement("p"); calories.innerText = `Only ${Math.round(caloriesNumber)} calories!`; //Recipe Div let recipediv = document.createElement("div"); // recipediv.appendChild(img); // recipediv.appendChild(label); // recipediv.appendChild(calories); recipediv.append(img, label, calories); //last one below endPoint.appendChild(recipediv); recipediv.setAttribute("class", "plate"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useApiData(data) {document.querySelector(\"#content\").innerHTML = `\n<img src=\"${data.hits[0]recipe.image}\">\n<h5>${data.hits[0].recipe.label}</h5>\n<p>Source: ${data.hits[0].recipe.source}</p>\n<a href=\"${data.hits[0].recipe.url}\">Go conferir</a>\n`\n}", "function renderResult(result) {\n $('body').removeClass('background-image');\n\t//hides the start page after the results are rendered\n\t$('.js-start-page').addClass(\"hidden\");\n\t//grab the results div and display the result in html format\n\t$('.js-food-results').html(result);\n\t// declare a empty listItems array\n\tlet listItems = [];\n\t// loop through the results\n\tfor(var i = 0; i < result.hits.length && i < 5; i++) {\n\t\tconsole.log(result);\n\t\t//returns the ingredients and returns the list we use map\n\t\tlet recipes = result.hits[i].recipe.ingredients.map(function(ingredient){\n\t\t\treturn `<li>${ingredient.text}</li>`;\n\t\t});\n let listItem =\n `<div class =\"js-food-item\"> \n <!--IMAGE -->\n <div style=\"background-image: url(${result.hits[i].recipe.image}); background-size:cover; background-position: center; height: 500px; width: 100%; background-repeat: no-repeat\"> </div> \n <!--ingr-->\n <h1>${result.hits[i].recipe.label}</h1>\n <!--.join(\"\") removes the commas since we are working with an array -->\n <ul>${recipes.join(\"\")}</ul>\n <!--SOURCE-->\n <a class=recipes href=\"${result.hits[i].recipe.url}\" target=\"_blank\">Learn more about the recipe</a>\n </div>`\n\t// grab the listItems and push in to the listItem\n listItems.push(listItem);\n// push the listItem to listItems array\n\t// result.hits[i].uri\n\t// we make a object to store the data\n\tlet recipe = {\n uri: \"\",\n label: \"\",\n image:\"\",\n source:\"\",\n url:\"\",\n ingr:\"\",\n }\n}\n$('.js-food-results').html\n(listItems.join(''));\nconsole.log(result);\n}", "function displayIngredientSearch(clicked) {\n var clicked_recipe = document.getElementById(clicked).innerHTML,\n results_string = \"\",\n r_list = globe.getRecipes(),\n i,\n j;\n\n globe.hint_span.innerHTML = \" Recipes containing \" + clicked_recipe;\n globe.user_search.value = \"\";\n removeLink();\n \n for (i = 0; i < r_list.length; i += 1) {\n for (j = 0; j < r_list[i].ingredients.length; j += 1) {\n if (r_list[i].ingredients[j].ingredient === clicked_recipe) {\n\n results_string += \"<p id=\\\"\" + i.toString() + \"\\\">\" + r_list[i].toMake + \"</p>\";\n globe.addID(i.toString());\n break;\n }\n }\n }\n\n globe.results_div.innerHTML = results_string;\n globe.search_type_name.checked = true;\n globe.search_type_ingredient.checked = false;\n createLink();\n}", "function showRecipe(recipe) {\n\n // display index page inside recipe section\n const recipe_pages = document.getElementById('navigatingIndex');\n if (recipe_pages !== null) recipe_pages.innerHTML = navigatingIndex;\n\n let nutrients_labels = [],\n nutrients_values = [],\n nutrients_daily = [],\n recipe_calories = [],\n recipe_img_url = [],\n recipe_label = [];\n\n \n // check for a valid length of the array\n if (recipe.hits.length > 0) {\n\n const childNodes = plant_detail.childNodes;\n\n childNodes.forEach(node => {\n\n // if a node's style is defined\n node.style !== undefined ? \n\n // if the node's id is table_wrapper\n node.id === 'table_wrapper' ? \n (node.style.right = '-100%', node.style.position = 'absolute') :\n\n // or if the node's id is nutrientsChart\n node.id === 'nutrientsChart' ? \n (node.style.bottom = '0px') :\n\n // or if the node's id is recipe_wrapper\n node.id === 'recipe_wrapper' ? \n (node.style.zIndex = 2) :\n\n // otherwise\n (node.style.left = '-100%') :\n undefined;\n });\n \n // loop through the array\n for (let i = 0; i < recipe.hits.length; i++) {\n\n recipe_calories.push(recipe.hits[i].recipe.calories + 'kcal / serving');\n recipe_img_url.push(recipe.hits[i].recipe.image);\n recipe_label.push(recipe.hits[i].recipe.label);\n\n const recipe_digest = recipe.hits[i].recipe.digest;\n\n // loop through digest array\n for(let j = 0; j < recipe_digest.length; j++) {\n \n nutrients_labels.push(recipe_digest[j].label);\n nutrients_values.push(recipe_digest[j].total);\n nutrients_daily.push(recipe_digest[j].daily);\n }\n }\n\n \n // divide the total number of recipes into individual one\n const divided = nutrients_values.length / recipe.hits.length;\n\n // create next and previous buttons for the recipe detail navigations\n if (document.querySelector('.recipe_nav_buttons') === null)\n nextPrevButtons(recipe);\n else if (document.querySelector('.recipe_detail_img_container') !== null) {\n removeElements(document.getElementsByTagName('h4'));\n removeElements([document.querySelector('.recipe_detail_img_container')]);\n }\n \n const img = document.createElement('img'),\n img_div = document.createElement('div');\n img.src = recipe_img_url[navigatingIndex];\n img.className = 'recipe_detail_img'\n img_div.className = 'recipe_detail_img_container';\n img_div.style.display = 'block';\n\n // append the img to the img div\n img_div.appendChild(img);\n\n // create the title of the recipe\n const title = document.createElement('h4');\n title.innerHTML = recipe_label[navigatingIndex];\n \n // append the title to recipe_wrapper div as the first element\n recipe_wrapper.insertAdjacentElement('afterbegin', title);\n\n // append the img div to recipe_wrapper div as the next sibling of title header\n title.parentNode.insertBefore(img_div, title.nextSibling);\n\n // default value for the display, in order to show the first recipe\n nutrients_values = nutrients_values.slice(divided * navigatingIndex, divided * (navigatingIndex + 1));\n nutrients_labels = nutrients_labels.slice(divided * navigatingIndex, divided * (navigatingIndex + 1));\n\n // draw a chart with the total number of recipes,\n // all recipe's total values, all the corresponding labels, and healthy daily consumption of the nutrients\n chartData(nutrients_values, nutrients_labels, 2);\n }\n}", "function renderHTML(data) {\n let statusHTML = '<ul class=\"container product-wrapper\">';\n for (let i = 0; i < 6; i++) {\n let imageLink = {};\n statusHTML += '<li class=\"product-wrapper__item\">';\n statusHTML += `<a href=\"` + data.hits[i].link + `\" target=\"_blank\">`;\n //checking img key exist or not\n // if(\"image\" in data.hits[i]) \n if(typeof data.hits[i].image !== \"undefined\") {\n imageLink.url = data.hits[i].image.link;\n imageLink.title = data.hits[i].image.title;\n imageLink.alt = data.hits[i].image.alt;\n statusHTML += `<img class=\"product-wrapper__item__img\" src=\"` + imageLink.url + `\" alt=\"` + imageLink.alt + `\" title=\"` + imageLink.title + `\">`;\n } else \n {\n statusHTML += '<img class=\"product-wrapper__item__img\" src=\"img/warehouse_03294847_1.jpg\" alt=\"BEAUTIFUL ASYMMETRIC DRESS\" title=\"BEAUTIFUL ASYMMETRIC DRESS\">';\n }\n statusHTML += '<div class=\"centered product-overlay\">';\n statusHTML += '<h3 class=\"font_small\"><span class=\"fa fa-heart-o\"></span>Save for later </h3>';\n statusHTML += '</div>';\n statusHTML += '<div class=\"product-detail\">';\n statusHTML += '<h3 class=\"product-detail__name font_small\">' + data.hits[i].product_name + '</h3>';\n statusHTML += '<span class=\"product-detail__price font_small\">';\n statusHTML += data.hits[i].price + ' €';\n statusHTML += '</span>';\n statusHTML += '</div>';\n statusHTML += '</a>';\n statusHTML += '</li>';\n }\n statusHTML += '</ul>';\n //adding into DOM\n document.getElementById('product-section').innerHTML = statusHTML;\n}", "function runRecipes(ingrSearch) {\n \n // Construct new query string with user inputs\n var newURL = baseQuery + ingrSearch + \"&app_id=\" + appId + \"&app_key=\" + apiKey;\n\n // Ajax call to Edamam API to grab recipes\n $.ajax({\n url: newURL,\n method: \"GET\"\n }).then(function(response) {\n console.log(response);\n\n // List each recipe\n var numRecipes = response.hits.length;\n console.log(numRecipes);\n for (var i = 0; i < numRecipes; i++) {\n\n // Create div to dynamically list recipes\n var recipeDiv = $(\"<div class='mb-5'>\");\n // Label tag for recipes\n var recipeLabel = $(\"<h3 class='text-center'>\").text(response.hits[i].recipe.label);\n // Image tag for recipes\n var recipeImg = $(\"<img class='resimg img-round'>\");\n recipeImg.attr(\"src\",response.hits[i].recipe.image);\n\n // List ingredients \n var getIngr = response.hits[i].recipe.ingredientLines;\n\n var recipeIngrs = $(\"<span class='ingredients'>\").text(\"Ingredients: \" + getIngr);\n\n // Create anchor tag for the recipeDiv\n var recipeAnchor = $(\"<a>\");\n // Set src attribute of recipe URL to the anchor tag\n recipeAnchor.attr(\"href\", response.hits[i].recipe.url);\n recipeAnchor.attr(\"target\", \"_blank\")\n console.log(response.hits[i].recipe.url); \n\n // Append label to the recipeAnchor\n recipeAnchor.append(recipeLabel);\n\n // Append label, image, ingredients to the recipe div\n recipeDiv.append(recipeAnchor);\n recipeDiv.append(recipeImg);\n recipeDiv.append(recipeIngrs);\n \n // Adding the button to the HTML\n $(\".recipeList\").append(recipeDiv);\n };\n });\n}", "function displayRecipes(recipeData) {\n console.log(\"showing recipes\");\n $('#recipe-area').removeClass('hidden');\n $('#recipe-area').append(\n `<div class = \"results-header\">\n <p>What to Eat</p>\n </div>\n <section class= \"recipe-boxes\">\n <ul class=\"recipe\">\n <li><h3><a href=\"${recipeData.recipes[0].sourceUrl}\" target=\"_blank\">${recipeData.recipes[0].title}</a>\n <img src=\"${recipeData.recipes[0].image}\" alt=\"${recipeData.recipes[0].title} image\">\n </li>\n \n <li><h3><a href=\"${recipeData.recipes[1].sourceUrl}\" target=\"_blank\">${recipeData.recipes[1].title}</a>\n <img src=\"${recipeData.recipes[1].image}\" alt=\"${recipeData.recipes[1].title} image\">\n </li>\n \n <li><h3><a href=\"${recipeData.recipes[2].sourceUrl}\" target=\"_blank\">${recipeData.recipes[2].title}</a>\n <img src=\"${recipeData.recipes[2].image}\" alt=\"${recipeData.recipes[2].title} image\">\n </li>\n </ul>\n </section>`\n );\n}", "function appendExploreArtist1(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <article>\n <img src=\"${getFeaturedImageUrl(content)}\">\n <div>\n <h1>${content.title.rendered}</h1>\n <p>${content.excerpt.rendered}<p>\n <h3>Selected albums</h3>\n </div>\n </article>\n `;\n }\n document.querySelector('#explore1-container').innerHTML += htmlTemplate;\n }", "function getEntrees() {\n fetch(\n `https://api.spoonacular.com/recipes/complexSearch?includeIngredients=${ingredientString}&apiKey=${apiKey}`\n )\n .then((blob) => {\n return blob.json();\n })\n .then((response) => {\n console.log(response);\n if (response.results.length === 0) {\n $(\"#dynamic-ingredient-list\").empty();\n let sadClown = $(\"<img src='./assets/images/sadclown.jpg'>\");\n $(\"#dynamic-ingredient-list\").append(sadClown);\n } else {\n // making variable for recipe array\n var recipes = response.results;\n\n //emptying containers that hold things\n ulElement.empty();\n $(\"#dynamic-recipe-container\").empty();\n\n //looping through recipe titles\n for (let i = 0; i < recipes.length; i++) {\n //create li\n var liElement = $(`<li>${recipes[i].title}</li>`);\n //create class for hand pointer\n liElement.attr(\"class\", \"clickable\");\n //append li to ul\n ulElement.append(liElement);\n //add even listeners to ul and lis\n }\n ulElement.on(\"click\", liElement, function (e) {\n fetch(\n `https://api.spoonacular.com/recipes/complexSearch?query=${e.target.textContent}&apiKey=${apiKey}`\n )\n .then((blob) => {\n return blob.json();\n })\n .then((response) => {\n var chosenRecipeId = response.results[0].id;\n\n fetch(\n `https://api.spoonacular.com/recipes/${chosenRecipeId}/information/?apiKey=${apiKey}`\n )\n .then((blob) => {\n return blob.json();\n })\n .then((response) => {\n ulElement.empty();\n wineIngredients = response.extendedIngredients;\n for (let i = 0; i < wineIngredients.length; i++) {\n // this puts the name of the aisle from each ingredient object into an array that we will use to determine wine \\\n aisleIngredients[i] = wineIngredients[i].aisle;\n\n let liElement = $(`<li>${wineIngredients[i].name}</li>`);\n //turning off event listener\n ulElement.off();\n\n ulElement.append(liElement);\n }\n\n // puts the recipe's wine pairing text into var winePairText to check for \"undefined\"\n if (typeof response.pairingText != \"undefined\") {\n winePair.innerHTML = response.pairingText;\n } else {\n checkCuisine(response);\n }\n\n let h3Element = $(`<h3>${response.title}</h3>`);\n let pElement = $(`<p>${response.instructions}</p>`);\n\n $(\"#dynamic-recipe-container\").append(h3Element, pElement);\n });\n });\n });\n }\n });\n}", "function appendExploreAlbum1(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n \n <article onclick=\"showDetailView('${content.id}')\">\n <img src=\"${getFeaturedImageUrl(content)}\">\n </article>\n `;\n }\n document.querySelector('#explore1-class-container').innerHTML += htmlTemplate;\n }", "function getRecipes(food) {\n // $(\"#recipeDisplay\").empty();\n console.log(\"hungry\");\n var cuisine = $(food).attr(\"id\");\n var recipeURL = \"https://api.edamam.com/search?q=\" + cuisine + \"&app_id=\" + appId + \"&app_key=\" + apiKey;\n $.ajax({\n url: recipeURL,\n method: \"GET\"\n }).then(function (response) {\n console.log(response);\n response.hits.forEach(element => {\n\n var divStyled = $('<div>');\n divStyled.attr('class', 'row');\n var divSize = $('<div>');\n divSize.addClass('col s12');\n var divColor = $('<div>');\n divColor.addClass('card red card blue-grey darken-4');\n var divText = $('<div>');\n divText.addClass('card-content white-text');\n // divStyled.attr('class', 'card');\n var divFood = $('<span>');\n divFood.addClass('card-title');\n var cardAction = $('<div>');\n cardAction.addClass('card-action');\n var divMoreInfo = $('<button>');\n divMoreInfo.attr('class', 'btn btn-primary red accent-4')\n divMoreInfo.html(`<a href=\"${element.recipe.url}\" target=\"_blank\">Full Recipe</a>`)\n divFood.text(element.recipe.label);\n console.log(element);\n cardAction.append(divMoreInfo);\n divText.append(divFood).append(cardAction);\n divColor.append(divText);\n divSize.append(divColor);\n divStyled.append(divSize);\n $(\".name\").append(divStyled);\n\n // $(\".recipe\").append(element.recipe.url);\n\n console.log(element);\n cantSearch = false;\n\n });\n })\n\n }", "function showResults() {\n let bigString = \"\";\n\n for (let i = page; i < page + 10; i++) {\n let result = results[i];\n\n let smallURL = result.recipe.image;\n if (!smallURL) smallURL = \"Media/gif_finder_images/no-image-found.png\";\n\n //get url of recipe, yield/servings, total time\n let url = result.recipe.url;\n let portions = result.recipe.yield;\n let time = result.recipe.totalTime;\n //if there is no estimate on time (0 minutes), change phrases\n if (time == 0) {\n time = \"N/A\"\n }\n else {\n time += \" min\";\n }\n //get name of recipe, cut off name if too long\n let name = result.recipe.label;\n if (name.length > 42) {\n name = name.substring(0, 42) + \"...\";\n }\n //build HTML\n let line = `<div class='result'><div class=\"title\"><h2>${name}</h2></div><div class=\"info\">Servings: ${portions}\n <br>Time: ${time}</div><div class=\"foodImage\"><img src='${smallURL}' title='${result.id}' /></div>`;\n line += `<div class=\"link\"><a target='_blank' href='${url}'> View Recipe </a></div></div>`;\n bigString += line;\n }\n\n //put into HTML\n document.querySelector('#content').innerHTML = bigString;\n\n document.querySelector('#status').innerHTML = \"<b>Search was successful!</b>\";\n}", "function useApiData(data){\n\n for (var i = 0; i < data.hits.length; i++) {\n\ndocument.querySelector(\"#content\").innerHTML+=`\n\n\n<div class=\"w3-card-4\">\n <div class=\"card-group\">\n <div class=\"w3-container w3-center\">\n <img class=\"card-img-top\" src=\"${data.hits[i].recipe.image}\" alt=\"Card image cap\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${data.hits[i].recipe.label}</h5>\n <p class=\"card-text\">${data.hits[i].recipe.healthLabels}</p>\n <br> Calories:\n ${data.hits[i].recipe.calories}\n </p>\n <a href=\"${data.hits[i].recipe.url}\" class=\"w3-button w3-green\">Source</a>\n </div>\n </div>\n </div>\n </div>\n\n <pre class=\"tab\"></pre>\n\n`\ndocument.querySelector(\"#resultnum\").innerHTML=`<p>Number of Results: </p>${data.hits.length}`\n\n}\n\n}", "function buildRecipeList(json) {\n var html = \"\";\n var count = 0;\n\n html += \"<thead>\";\n html += tableGen.headerRow([\"Title\", \"Description\", \"Author\", \"Tags\"]);\n html += \"</thead><tbody>\";\n for (var key in json) {\n value = json[key];\n\n var output = [];\n output.push(tableGen.dataCell(\"<a href='#view/ID=\" + value['ID'] + \"'>\" + value['Title'] + \"</a>\"));\n output.push(tableGen.dataCell(value['Description']));\n output.push(tableGen.dataCell(value['Author'] != undefined ? value['Author']['Name'] : ''));\n var tagList = [];\n var tags = value['Tags']\n for (var tagKey in tags) {\n tagList.push(tags[tagKey]['Tag']);\n }\n output.push(tableGen.dataCell(tagList));\n var attrs = \"data-cmd='view' data-id='\" + value['ID'] + \"'\";\n var sClass = (count++ % 2 == 1 ? ' alt' : '');\n html += tableGen.dataRow(attrs, sClass, output);\n }\n html += \"</tbody>\";\n\n return html;\n}", "function displayRecipeDetsils(recipeDetails)\n{\n let coaught=`\n \n <div class=\"recipeDetals\">\n <img src=\"${recipeDetails.image_url}\" alt=\"\" class=\"w-100 img-fluid\">\n <h5 class=\"color-mine py-3\">${recipeDetails.title}</h5>\n <p class=\" color-mine my-2\">By <span class=\"font-weight-bolder text-dark \">${recipeDetails.publisher}</span></p>\n <ul class=\"list-unstyled\">\n <p class=\"lead pl-3 pb-0 pt-2 font-weight-bolder text-danger\"> The Ingredients </p>`;\n for(let i=0 ; i<recipeDetails.ingredients.length;i++)\n { coaught+=` <li class=\"font-weight-bold pl-2 text-black-50 pb-1\">${recipeDetails.ingredients[i]}</li>`;}\n coaught+=`</ul></div>`;\n\n\nrecipeDetailsDiv.innerHTML = coaught;\n\n\n\n}", "function renderSubText(data) {\n if (data.length > 0) {\n section.innerHTML = \"\";\n let currentBreed = window.location.hash.substring(1);\n let ul = document.createElement(\"ul\");\n section.appendChild(ul);\n for (let key of data){\n let li = document.createElement(\"li\");\n li.textContent = big(key);\n ul.appendChild(li);\n li.addEventListener('click', function (e) {\n window.location.hash = currentBreed + \"/\" + small(e.target.textContent);\n getBreedImg();\n });\n }\n } else {\n section.innerHTML = \"\";\n }\n}", "function getListHtml(sorted_entities, extra_caption) {\n var html = [];\n for (i = 0; i < sorted_entities.length && i < 40; i++) {\n var index = reverse[sorted_entities[i].eid];\n var entity = entities[index]; \n var color = \"list-group-item-info\"; // green\n if (isIndividual(entity.eid)) color = \"list-group-item-info\"; // blue\n if (entity.selected) color = \"list-group-item-danger\"; // red \n if (i > 0 && extra_caption && !entity.selected) {\n var prev_entity = entities[reverse[sorted_entities[i-1].eid]];\n if (prev_entity.selected) {\n html.push('<label>Firmy a ľudia v geografickom okolí:</label>');\n }\n } else if (i == 0 && extra_caption && !entity.selected && isIndividual(entity.eid)) {\n html.push('<label>Firmy a ľudia v geografickom okolí:</label>');\n }\n // TODO: Refactor this\n html.push(\n '<a ' + (entity.selected ? '' : 'href=\"#world-top\"') + ' class=\"list-group-item ' + color + '\"'\n + (entity.selected ? '' : ' onclick=\"selectMarker(' + index + ');getInfo(' + index + ')\"') + '>'\n + (entity.selected ? '<button type=\"button\" class=\"close\" onmousedown=\"selectMarker(' + index + ');getInfo(' + index + ')\"><span aria-hidden=\"true\">&times;</span></button>' : '')\n + ((!entity.selected && isIndividual(entity.eid)) ? '<span style=\"color: ' + (isPolitician(entity) ? kPoliticianColor : kNormalColor) + ';font-size:18px;font-weight:bold;\">' + (hasContractsWithState(entity) ? '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i>' : '<i class=\"fa fa-circle-o\" aria-hidden=\"true\"></i>') + ' </span> ' : '')\n + ((!entity.selected && !isIndividual(entity.eid)) ? '<i class=\"fa fa-circle\" aria-hidden=\"true\"></i> &nbsp; ' : '')\n + ((entity.selected && entity.info != undefined) ? entity.info : entity.title)\n + (!isIndividual(entity.eid) && !entity.selected ? ' <span class=\"many\">' + entity.size + '</span>' : '')\n + (isIndividual(entity.eid) && !entity.selected ? ' &nbsp;<span class=\"manygray\"><i class=\"fa fa-chevron-right sizeCellArrow\" aria-hidden=\"true\"></i></span>' : '')\n + '</a>');\n }\n return html;\n}", "function appendExploreArtist2(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <article>\n <img src=\"${getFeaturedImageUrl(content)}\">\n <div>\n <h1>${content.title.rendered}</h1>\n <p>${content.excerpt.rendered}<p>\n <h3>Selected albums</h3>\n </div>\n </article>\n `;\n }\n document.querySelector('#explore2-container').innerHTML += htmlTemplate;\n}", "function displayRecipe(data) {\n var Recipe = data.meals[0];\n var RecipeDiv = document.getElementById(\"event-list-group\");\n \n var recipeContainer = document.createElement(\"div\");\n $(recipeContainer).addClass(\"recipe-container columns\");\n\n var RecipeImg = document.createElement(\"img\");\n RecipeImg.id = \"::img\";\n RecipeImg.style.cssText = \"width:300px;height:300px;\";\n $(RecipeImg).addClass(\"inline-img col-auto\");\n RecipeImg.src = Recipe.strMealThumb;\n recipeContainer.appendChild(RecipeImg);\n\n var contentDiv = document.createElement(\"div\");\n $(contentDiv).addClass(\"col-auto\");\n\n var RecipeIngredients = document.createElement(\"ul\");\n $(RecipeIngredients).addClass(\"inline-ul\");\n contentDiv.appendChild(RecipeIngredients);\n\n recipeContainer.appendChild(contentDiv);\n\n RecipeDiv.appendChild(recipeContainer);\n\n $(\"<label>\")\n .addClass(\"form-checkbox\")\n .html(\"<input class='recipe-checkbox' type='checkbox'><i class='form-icon'></i> Add Recipe\")\n .appendTo(contentDiv);\n\n\n var getIngredients = Object.keys(Recipe)\n .filter(function (ingredient) {\n return ingredient.indexOf(\"strMeal\") == 0;\n })\n .reduce(function (ingredients, ingredient) {\n if (Recipe[ingredient] != null) {\n ingredients[ingredient] = Recipe[ingredient];\n }\n return ingredients;\n }, {});\n\n var getArea = Object.keys(Recipe)\n .filter(function (ingredient) {\n return ingredient.indexOf(\"strArea\") == 0;\n })\n .reduce(function (ingredients, ingredient) {\n if (Recipe[ingredient] != null) {\n ingredients[ingredient] = Recipe[ingredient];\n }\n return ingredients;\n }, {});\n\n var getCategory = Object.keys(Recipe)\n .filter(function (ingredient) {\n return ingredient.indexOf(\"strCategory\") == 0;\n })\n .reduce(function (ingredients, ingredient) {\n if (Recipe[ingredient] != null) {\n ingredients[ingredient] = Recipe[ingredient];\n }\n return ingredients;\n }, {});\n\n var getSource = Object.keys(Recipe)\n .filter(function (ingredient) {\n return ingredient.indexOf(\"strSource\") == 0;\n })\n .reduce(function (ingredients, ingredient) {\n if (Recipe[ingredient] != null) {\n ingredients[ingredient] = Recipe[ingredient];\n }\n return ingredients;\n }, {});\n\n var getVideo = Object.keys(Recipe)\n .filter(function (ingredient) {\n return ingredient.indexOf(\"strYoutube\") == 0;\n })\n .reduce(function (ingredients, ingredient) {\n if (Recipe[ingredient] != null) {\n ingredients[ingredient] = Recipe[ingredient];\n }\n return ingredients;\n }, {});\n\n let value = getIngredients[\"strMeal\"];\n listItem = document.createElement(\"li\");\n listItem.innerHTML = value;\n RecipeIngredients.appendChild(listItem);\n\n let area = getArea[\"strArea\"];\n listItem = document.createElement(\"li\");\n listItem.innerHTML = area;\n RecipeIngredients.appendChild(listItem);\n\n let category = getCategory[\"strCategory\"];\n listItem = document.createElement(\"li\");\n listItem.innerHTML = category;\n RecipeIngredients.appendChild(listItem);\n\n let recipeSource = getSource[\"strSource\"];\n if (recipeSource) {\n var link = $(\"<li>\").appendTo(listItem);\n $(\"<a>\")\n .text(\"Recipe Link\")\n .attr(\"href\", `${recipeSource}`)\n .attr(\"target\", \"_blank\")\n .appendTo(link);\n }\n\n let recipeVideo = getVideo[\"strYoutube\"];\n if (recipeVideo) {\n var videolink = $(\"<li>\").appendTo(listItem);\n $(\"<a>\")\n .text(\"Recipe YouTube Video\")\n .attr(\"href\", `${recipeVideo}`)\n .attr(\"target\", \"_blank\")\n .appendTo(videolink);\n }\n}", "function getRecipeLink(selectedResults) {\n // recipe list: display the selected results for copy/paste\n const recipeList = document.getElementById('recipe-list');\n // recipe link: link to search food network, e.g.\n const recipeLink = document.getElementById('recipe-link');\n const fnlink = 'https://www.foodnetwork.com/search/' + selectedResults.join('-,') + '-';\n const fhtip = 'Food Network recipes for ' + selectedResults.join(', ');\n const allrecipeslink = 'https://www.allrecipes.com/search?q=' + selectedResults.join('+'); \n const allrecipestip = 'All Recipes with ' + selectedResults.join(', ');\n const googlelink = 'https://www.google.com/search?q=' + selectedResults.join('+') + '+recipes';\n const googletip = 'Google recipes with ' + selectedResults.join(', ');\n const cocktaillink = 'https://www.thecocktailproject.com/search/?search_api_fulltext=' + selectedResults.join('+');\n const cocktailtip = 'Cocktail Project recipes for ' + selectedResults.join(', ');\n if (selectedResults.length === 0) {\n recipeLink.innerHTML = '';\n } else {\n recipeLink.innerHTML = \"recipes: \"\n + ' <a href=\"' + fnlink + '\" target=\"_blank\" title=\"' + fhtip + '\" >food network</a>'\n + ' · <a href=\"' + allrecipeslink + '\" target=\"_blank\" title=\"' + allrecipestip + '\">allrecipes</a>'\n + ' · <a href=\"' + googlelink + '\" target=\"_blank\" title=\"' + googletip + '\">google</a>'\n + ' · <a href=\"' + cocktaillink + '\" target=\"_blank\" title=\"' + cocktailtip + '\">cocktails</a>'\n ;//+ '<span style=\"float: right;\">' + selectedResults.join(' + ') + '</span>' ; \n //TODO: add a copy to clipboard button\n }\n}", "function displayRecipes(responseJSON) {\n // console.log(responseJSON);\n\n // this clears out any pre-existing data\n $(\"#showRecipes\").html(\"<h3>Top Recipes</h3>\");\n\n var hitsArray = responseJSON.hits;\n var counter = 0;\n // var total = hitsArray.length;\n var total = 3;\n\n while(counter < total ) {\n\n // found in jsonp file i.e. https://api.edamam.com/search?q=chicken&app_id=21035d97&app_key=fd726687e4cfbcb844326f030aa3ed95\n var hit = hitsArray[counter];\n\n // each recipe has its subsection in the file\n var recipe = hit.recipe;\n\n // use the template function to get a list item\n var li = getRecipeListItem(recipe);\n\n // append the list item to our HTML\n // $(\"ul\").append(li);\n $(\"#showRecipes\").append(li);\n\n // increment the counter\n // to avoid infinite loops\n counter = counter + 1;\n }\n }", "function dispalySelectedRecipe(clicked) {\n var request_recipie = document.getElementById(clicked),\n create_innerHTML = \"<br />\",\n r_list = globe.getRecipes(),\n lines,\n plural,\n i;\n\n if (globe.getID(0)) {\n removeLink();\n }\n\n globe.user_search.value = \"\";\n globe.hint_span.innerHTML = \"\";\n globe.results_div.innerHTML = \"\";\n create_innerHTML += \"\" + r_list[clicked].toMake + \" Recipe<br /><table>\";\n create_innerHTML += \"<tr><th>ingredients</th><th>Amount</th><th>Mesure</th></tr>\"\n for (i = 0; i < r_list[clicked].ingredients.length; i += 1) {\n \n if (i % 2 === 0) {\n lines = \"even\";\n } else {\n lines = \"odd\"\n }\n \n if (r_list[clicked].ingredients[i].amount > 1) {\n plural = \"s\";\n } else {\n plural = \"\";\n }\n\n create_innerHTML += \"<tr>\"\n create_innerHTML += \"<td class=\\\"ingredients \" + lines + \"\\\">\" + r_list[clicked].ingredients[i].ingredient + \"</td>\";\n create_innerHTML += \"<td class=\\\"amount \" + lines + \"\\\">\" + r_list[clicked].ingredients[i].amount + \"</td>\";\n create_innerHTML += \"<td class=\\\"mesure \" + lines + \"\\\">\" + r_list[clicked].ingredients[i].mesure + plural + \"</td>\";\n create_innerHTML += \"</tr>\"\n }\n create_innerHTML += \"</table>\"\n \n globe.display_recipe.innerHTML = create_innerHTML;\n}", "function displayRecipe(recipe){\n console.log(recipe);\n // creates a link to recipe found in recipeList\n recipeLink = createA(recipeList[recipe], 'recipe', '_blank');\n // recipeLink.center('horizontal');\n div.child(recipeLink);\n}", "function buildFoodInformation(hit, mealPlan) {\n var recipeContainer = $(\"<div class='recipeContainer card-body'>\");\n var recipieRow = $(\"<div class='recipeRow'>\");\n var label = $(\"<h3>\").text(hit.recipe.label);\n var image = $(\"<img>\").attr(\"src\", hit.recipe.image);\n var ingredients = $(\"<p>\").text(hit.recipe.ingredientLines);\n var caloriesLabel = $(\"<p>\").text(hit.recipe.totalNutrients.ENERC_KCAL.label + \" \" + hit.recipe.totalNutrients.ENERC_KCAL.quantity + \" \" + hit.recipe.totalNutrients.ENERC_KCAL.unit);\n var fatLabel = $(\"<p>\").text(hit.recipe.totalNutrients.FAT.label + \" \" + hit.recipe.totalNutrients.FAT.quantity + \" \" + hit.recipe.totalNutrients.FAT.unit);\n var carbsLabel = $(\"<p>\").text(hit.recipe.totalNutrients.CHOCDF.label + \" \" + hit.recipe.totalNutrients.CHOCDF.quantity + \" \" + hit.recipe.totalNutrients.CHOCDF.unit);\n var proteinLabel = $(\"<p>\").text(hit.recipe.totalNutrients.PROCNT.label + \" \" + hit.recipe.totalNutrients.PROCNT.quantity + \" \" + hit.recipe.totalNutrients.PROCNT.unit);\n \n recipeContainer.append(label, image, ingredients, caloriesLabel, fatLabel, carbsLabel, proteinLabel);\n $(`#${mealPlan}Div`).append(recipeContainer);\n}", "function appendExploreAlbum2(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <article onclick=\"showDetailView('${content.id}')\">\n <img src=\"${getFeaturedImageUrl(content)}\">\n </article>\n `;\n }\n document.querySelector('#explore2-class-container').innerHTML += htmlTemplate;\n}", "function renderRecipeInfo(recipeinfo) {\n resultSearch.recipeImg = recipeinfo.images[0].hostedLargeUrl;\n if (resultSearch.recipeImg) {\n // Sometimes returns HTTP instead of HTTPS, resulting in console warnings\n // Please ignore (since it's not our fault but yummly's)\n cardImg.src = resultSearch.recipeImg;\n } else { \n cardImg.src = \"img/knife_and_fork.png\";\n }\n // When the user clicks on the card, display extra recipe\n // information and a link to the external recipe.\n document.querySelector(\"#card\" + i).addEventListener(\"click\", function(){\n document.querySelector(\".modal-title\").textContent = recipeinfo.name;\n if (recipeinfo.images[0].hostedLargeUrl) {\n document.querySelector(\"#modal-img\").src = recipeinfo.images[0].hostedLargeUrl;\n } else {\n document.querySelector(\"#modal-img\").src = \"\";\n }\n var array = recipeinfo.ingredientLines;\n document.getElementById(\"ingredients\").innerHTML = '<ul><li>' + array.join(\"</li><li>\"); + '</li></ul>';\n document.querySelector(\"#rating\").textContent = recipeinfo.rating + \" / 5\";\n document.querySelector(\"#instruction\").href = recipeinfo.source.sourceRecipeUrl;\n }); \n }", "function makeDetailHtml(data){\r\n var count = 0;\r\n var i = 0;\r\n var html = '<div style=\"display: none; \" class=\"detail_info\" id=\"detail_info_' + data.index + '\">'\r\n // id\r\n html += '<p class=\"detail_id\">id: DOID:' + data.info.id + '</p>';\r\n // name\r\n html += '<p class=\"detail_name\">name: ' + data.info.name + '</p>';\r\n //def\r\n if (data.info.definition != null){\r\n // html += '<p class=\"detail_def\">def: ' + data.info.definition + '</p>';\r\n var s=data.info.definition;\r\n if(s.match('url')){\r\n var t1=s.substring(s.lastIndexOf('[')+1,s.lastIndexOf(']'));\r\n var t2=s.substring(0,s.lastIndexOf('['));\r\n var txt=t2.substring(1,t2.length-2);\r\n html += '<p class=\"detail_def\">def: '+ txt+'url:';\r\n if(t1.match(',')){\r\n var t=t1.split(',');\r\n count=t.length;\r\n for(i=0;i < count;i++){\r\n if(t[i].match('http')){\r\n html+='<a href=\"'+makeUrl(t[i])+ '\" target=\"blank\" style=\"text-decoration:underline;\">'+makeUrl(t[i])+'</a>'+(i==(count-1)? '&nbsp;':'&nbsp;|&nbsp;'); \r\n }\r\n } \r\n }else{\r\n html +='<a href=\"'+makeUrl(t1)+ '\" target=\"blank\" style=\"text-decoration:underline;\">'+makeUrl(t1)+'</a>';\r\n }\r\n html+='</p>';\r\n }\r\n } \r\n // alt_id\r\n if (data.info.alt_ids != null){\r\n count = data.info.alt_ids.length;\r\n for (i = 0; i < count; i++){\r\n html += '<p class=\"detail_alt_id\">alt_id: DOID:' + data.info.alt_ids[i].alt_id + '</p>';\r\n }\r\n } \r\n // subset\r\n if (data.info.subsets != null){\r\n count = data.info.subsets.length;\r\n for (i = 0; i < count; i++){\r\n html += '<p class=\"detail_subset\">subset: ' + data.info.subsets[i].subset + '</p>';\r\n }\r\n }\r\n // synonym\r\n if (data.info.synonyms != null){\r\n count = data.info.synonyms.length;\r\n for (i = 0; i < count; i++){\r\n html += '<p class=\"detail_synonym\">synonym: ' + data.info.synonyms[i].synonym + '</p>';\r\n }\r\n } \r\n // xref\r\n if (data.info.xrefs != null){\r\n count = data.info.xrefs.length;\r\n for (i = 0; i < count; i++){\r\n html += '<p class=\"detail_xref\">xref: ' + data.info.xrefs[i].xref_name + ':' + data.info.xrefs[i].xref_value + '</p>';\r\n }\r\n } \r\n // relations\r\n if (data.info.relations != null){\r\n count = data.info.relations.length;\r\n for (i = 0; i < count; i++){\r\n html += '<p class=\"detail_relation\">' + data.info.relations[i].relation + ': ' + data.info.relations[i].term2_id + '</p>';\r\n }\r\n }\r\n html += '</div>';\r\n return html;\r\n}", "displayRecipe(ingredientsJSON, stepsJSON, note)\n {\n const ingredients = ingredientsJSON.extendedIngredients.map((ingredient) => {\n return `<li> ${ingredient.measures.us.amount} ${ingredient.measures.us.unitLong} ${ingredient.name}</li>`;\n } ).join('');\n const steps = stepsJSON[0].steps.map((step) => {\n return `<li> ${step.number} ${step.step} </li>`;\n } ).join('');\n \n let displayResults = `<h1>${ingredientsJSON.title}</h1>\n <img src=\"${ingredientsJSON.image}\" alt=\"Dish image\">\n <p>Servings: ${ingredientsJSON.servings}</p>\n <p>Ready in ${ingredientsJSON.readyInMinutes} Minutes</p>\n <a href=\"${ingredientsJSON.sourceUrl}\">Source: ${ingredientsJSON.creditsText} </a>\n <h2>Ingredients</h2>\n <ul id=\"ingredientsList\">\n ${ingredients}\n </ul>\n <h2>Instructions</h2>\n <ul id=\"steps\">\n ${steps}\n </ul>\n <p id=\"idPlaceHolder\">${ingredientsJSON.id}</p>\n <p> ${note}</p>`; \n \n document.getElementById('recipe').innerHTML = displayResults;\n document.getElementById(\"main\").classList.toggle(\"slide\");\n }", "function displayResults(responseJson) {\n\n let recipeinfo = `\n <img src= ${responseJson.recipes[0].image} class=\"imgStyle\" alt=\"Recipe Photo\">\n <h2><span> ${responseJson.recipes[0].title}</span></h2>\n <p><span> Make Time: ${responseJson.recipes[0].readyInMinutes}</span></p>\n `\n $('.recipeScreen').html(recipeinfo)\n\n // Ingredient List\n $('.resultsList').empty();\n $('.resultsList').append(`<h3>Ingredient List:</h3>`);\n for (let i = 0; i < responseJson.recipes[0].extendedIngredients.length; i++) {\n $('.resultsList').append(`<li><p>${responseJson.recipes[0].extendedIngredients[i].name}</p>\n </li>`);\n }\n $('.resultsList').append(`\n <h3> Instructions: </h3>\n <p class=\"instructionBox\">${responseJson.recipes[0].instructions}</p>`);\n\n //display the results section\n $('.contentBox').hide();\n $('.recipePage').show();\n $('html,body').scrollTop(0);\n}", "function getRecipe() {\n // same as before, gets ID\n var mainContainer = document.getElementById(\"myRecipe\");\n // gets stored URI\n let getURI = localStorage.getItem(\"uri\");\n console.log(getURI);\n fetch(getURI, {\n method: \"GET\",\n })\n .then((response) => response.json())\n .then(function (data) {\n console.log(data.recipe);\n var div = document.createElement(\"div\");\n \n // get all needed objects within object\n // will use map method to output data within template literal\n \n var obj = data.recipe.ingredientLines;\n var nutritional = data.recipe.totalNutrients;\n var daily = data.recipe.totalDaily;\n console.log(nutritional);\n div.classList.add(\"columns\");\n div.innerHTML = `\n <div class=\"column is-4 recipe-photo\">\n <img src=\"${data.recipe.image}\" style=\"width:100%;\"> \n </div>\n <div class=\"column is-8\">\n <h3>${data.recipe.label}</h3> \n <strong>Yield:</strong> ${data.recipe.yield}<br />\n <strong>Prep Time:</strong> ${data.recipe.totalTime} minutes\n <hr />\n <p><strong>Ingredients:</strong></p>\n <ul>\n ${Object.keys(obj)\n .map(function (key) {\n return \"<li>\" + obj[key] + \"</li>\";\n })\n .join(\"\")}\n </ul>\n <hr />\n <p><strong>Nutritional Data:</strong></p>\n <ul>\n ${Object.keys(daily)\n .map(function (key) {\n return (\n \"<li>\" +\n daily[key].label +\n \": \" +\n daily[key].quantity.toFixed(2) +\n daily[key].unit +\n \"</li>\"\n );\n })\n .join(\"\")}\n </ul>\n <hr />\n <strong>Daily Amounts:</strong>\n <ul>\n ${Object.keys(nutritional)\n .map(function (key) {\n return (\n \"<li>\" +\n nutritional[key].label +\n \": \" +\n nutritional[key].quantity.toFixed(2) +\n nutritional[key].unit +\n \"</li>\"\n );\n })\n .join(\"\")}\n </ul>\n </div>\n `;\n mainContainer.appendChild(div);\n })\n .catch((error) => {\n console.error(\"Error:\", error);\n });\n}", "function appendRnb(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n \n htmlTemplate += /*html*/ `\n <article onclick=\"showDetailView('${content.id}')\">\n <img src=\"${getFeaturedImageUrl(content)}\">\n </article>\n `;\n }\n document.querySelector('#rnb-container').innerHTML += htmlTemplate;\n document.querySelector('#favourite-albums').innerHTML += htmlTemplate;\n}", "function searchResultDisplayHtmlString(venue){\n\n \n let venue_name = venue.name?venue.name:\"\"\n let address = venue.location.formattedAddress?venue.location.formattedAddress:\"\"\n let descriptions = venue.categories?venue.categories:\"\"\n let location_description=[]\n for(let description of descriptions){\n\n location_description.push(description.name)\n\n }\n\n return `\n <style>\n .search-result p{\n\n font-family: var(--font-family-main);\n margin:10px;\n \n \n }\n \n .search-result p a{\n \n text-decoration:none;\n color:black;\n \n }\n\n .location-name-link{\n\n font-size:17px;\n\n }\n\n .address-link{\n\n font-size:15px;\n\n }\n\n .description-link{\n\n font-size:12px;\n\n }\n\n \n .line{\n \n background-image:linear-gradient(90deg,transparent, var(--primary-color),transparent);\n width:auto;\n height:2px;\n \n }\n \n </style>\n <div class=\"search-result\" onClick=\"stopCallingApi()\">\n <p>\n <a class=\"location-name-link\" href=\"#\">${venue_name}</a> \n </p>\n <p>\n <a class=\"address-link\" href=\"#\">${address.join(\" \")}</a> \n </p>\n <p>\n <a class=\"description-link\" href=\"#\">${location_description.join(\" \")}</a> \n </p>\n\n <div class=\"line\"></div>\n </div>`\n}", "function makeHtmlFromEsummaryJson(esummaryJson) { \n //Given a jsonObj from eSummary, generates html <li> for display of Docsummary\n //The jsonOBj could be for one or multiple eSummaries\n // jsonObj passed from jQuery.get(url, f())\n\n //USAGE:\n //domElementIdHtml += makeHtmlFromEsummaryJson(esummaryJson);\n \n \n //TO DO Take code from getDocSumAttributesFromJson (id)\n var esummaryResult = esummaryJson.result; //main json obj containing uids list and summary for each uid\n var uidsList = esummaryResult.uids; // array of all uids in the jsonObj from eSummary\n //(.result.uids is from the ncbi esummary json)\n //console.log(\"uidsList: \" + uidsList.join()); //debug\n \n citation_html =\"\";\n \n uidsList.forEach(function(uid) {\n //Go through each uid and extract the attributes to make html\n //console.log(\"for-each: \" + uid); //debug\n \n var authors = [];\n esummaryResult[uid]['authors'].forEach(function(author){\n authors.push([author.name]); \n }) // forEach author\n //console.log(\"AUTTHORS: \" + authors); //debug\n \n var authorFirst = esummaryResult[uid]['authors'][0]['name'];\n var title = esummaryResult[uid]['title']; //console.log(title);\n var pubdate = esummaryResult[uid]['pubdate'];\n var year = pubdate.match(/^\\d\\d\\d\\d/);\n \n var issue = (esummaryResult[uid]['issue']);\n issue = (issue) ? \"(\" + issue + \")\":\"\"; //null if no issue else with parenthesis (issue)\n \n var pages = esummaryResult[uid]['pages'];\n var sortfirstauthor = esummaryResult[uid]['sortfirstauthor'];\n var source = esummaryResult[uid]['source']; //console.log(source);\n var volume = esummaryResult[uid]['volume']; //console.log(volume);\n \n var linkToUid = \"<a href=\\\"https://www.ncbi.nlm.nih.gov/pubmed/\" + uid + \"\\\"\" + \" target=\\\"_blank\\\">\" + title + \"</a>\";\n \n var citation = (authors.join(\", \") + \". \" + \"<b>\" + year + \"</b>\" + \". \" + linkToUid + \" \" + \"<strong>\" + source + \" \" + volume + issue + \":\" + pages + \"</strong>\" + \".\" + \" (\" + uid + \")\");\n var citation_li = \"<li>\" + citation + \"</li><br/>\"; // + \"\\n\\n\";\n //Creates like:\n //Dash S, Campbell JD, Cannon EK, Cleary AM, ......, Farmer AD, Cannon SB. 2016. Legume information system (LegumeInfo.org): a key component of a set of federated data resources for the legume family. Nucleic Acids Res 44(D1):D1181-8. (<a href=\"https://www.ncbi.nlm.nih.gov/pubmed/26546515\" target=\"_blank\">26546515</a>)\n //console.log(\"citation_li: \" + citation_li); //debug\n citation_html += citation_li; \n \n }) //uidsList.forEach\n \n //console.log(\"citation_html: \" + citation_html); //debug\n return citation_html; // Returns XMLHttpRequest {}\n \n} //function makeHtmlFromEsummaryJson(EsummaryJson)", "async function setPopupHTML(recipe) {\n // create the '<a>' tags to put the ingredients into\n let tempIngredients = recipe.ingredients.reduce((acc, ingredient) => acc += `<a href=\"#\">${ingredient}</a>\\n`, ``)\n\n title.innerHTML = recipe.title;\n description.innerHTML = recipe.description\n // set the ingredients list in the html\n ingredientList.innerHTML = tempIngredients;\n}", "displayDrinksWithIngredients(drinks){\n\n // show the results field\n const resultsWrapper = document.querySelector('.results-wrapper');\n resultsWrapper.style.display = 'block';\n\n // insert the results\n const resultsDiv = document.querySelector('#results');\n\n drinks.forEach(drink => {\n resultsDiv.innerHTML += `\n <div class=\"col-md-6\">\n <div class=\"card my-3\">\n\n <img class=\"card-img-top\" src=\"${drink.strDrinkThumb}\" alt=\"${drink.strDrink}\">\n\n <div class=\"card-body\">\n <h2 class=\"card-title text-center\">${drink.strDrink}</h2>\n <p class=\"card-text font-weight-bold\">Instructions: </p>\n <p class=\"card-text\">\n ${drink.strInstructions}\n </p>\n <p class=\"card-text\">\n <ul class=\"list-group\">\n <li class=\"list-group-item alert alert-danger\">Ingredients</li>\n ${this.displayIngredients(drink)}\n </ul>\n </p>\n <p class=\"card-text font-weight-bold\">Extra Information:</p>\n <p class=\"card-text\">\n <span class=\"badge badge-pill badge-success\">\n ${drink.strAlcoholic}\n </span>\n <span class=\"badge badge-pill badge-warning\">\n Category: ${drink.strCategory}\n </span>\n </p>\n </div>\n </div>\n </div>\n `;\n })\n }", "function renderData(data){\n let k=JSON.parse(data)\n\n let goodData='';\n\n for(let i=0;i<k.count;i++){\n\t goodData+= `<ul>` + `<a href=${k.recipes[i].source_url} target=\"_blank\"> `+ `<li> ` + `<img src=${k.recipes[i].image_url} alt=you style=\"width:300px;height:300px;\">` + `</li>` + `<div class =\"content\">` + `<h1> ${k.recipes[i].title} </h1>` + `</div>` + `</ul>`\n\n }\n\n return goodData\n}", "function recipeInformationHTML(results) {\n let arr = [];\n let i;\n let recipes = $(results.results);\n\n if(page <= 1) {\n $(\"#previous\").addClass(\"disable\");\n } else {\n $(\"#previous\").removeClass(\"disable\");\n }\n\n if(recipes.length < 10) {\n $(\"#next\").addClass(\"disable\");\n } else {\n $(\"#next\").removeClass(\"disable\");\n }\n\n // If there are no recipes matching the search criteria, return an error message\n if(recipes.length === 0) {\n $(\"#recipe\").html(`<h2 class=\"search-title\">We can't find what you're looking for!</h2>`);\n removeButtons();\n\n return;\n }\n\n for(i = 0; i < recipes.length; i++) {\n arr.push(`\n <div class=\"recipe-card box-shadow d-block\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12\">\n <a href=\"${results.results[i].href}\" target=\"_blank\">\n <img class=\"card-image\" src=\"${results.results[i].thumbnail}\" onerror=\"this.onerror=null; this.src='./assets/img/alt.jpeg'\" alt=\"recipe\" width=\"250\" height=\"150\"/>\n </a>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-12\">\n <h6 class=\"card-title my-auto\">${results.results[i].title}</h6>\n </div>\n </div>\n </div>\n </div>\n `);\n }\n\n addButtons();\n\n return arr;\n}", "function appendExploreArtist4(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <article>\n <img src=\"${getFeaturedImageUrl(content)}\">\n <div>\n <h1>${content.title.rendered}</h1>\n <p>${content.excerpt.rendered}<p>\n <h3>Selected albums</h3>\n </div>\n </article>\n `;\n }\n document.querySelector('#explore4-container').innerHTML += htmlTemplate;\n}", "function renderHTML(data){ //Sikter til funksjon som tidelere er blitt tildelt ourdata, parameter kan være samme\r\n var htmlString = \"\"; // tom string som vi skal fylle\r\n\r\n for(i = 0; i < data.length; i++){ // kjører gjennom listen\r\n htmlString += \"<p>\" + data[i].name + \" is a \" + data[i].species + \" that likes to eat \" // bruker dot notation for å få tilgang til elementer\r\n\r\n for (ii = 0; ii < data[i].foods.likes.length; ii++){ //sikter oss dypere inn i underliggende arrays, så for loops inne i en for loop\r\n if (ii <= 0){\r\n htmlString += data[i].foods.likes[ii];\r\n } else{\r\n htmlString += \" and \" + data[i].foods.likes[ii];\r\n }\r\n }\r\n\r\n htmlString += \" and dislikes \";\r\n\r\n for(iii = 0; iii < data[i].foods.dislikes.length; iii++){\r\n if(iii <= 0){\r\n htmlString += data[i].foods.dislikes[iii];\r\n } else {\r\n htmlString += \" and \" + data[i].foods.dislikes[iii];\r\n }\r\n }\r\n\r\nhtmlString += \". </p>\"\r\n\r\n }\r\n\r\n animalContainer.insertAdjacentHTML('beforeend', htmlString);\r\n}", "function appendExploreAlbum4(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <article onclick=\"showDetailView('${content.id}')\">\n <img src=\"${getFeaturedImageUrl(content)}\">\n </article>\n `;\n }\n document.querySelector('#explore4-class-container').innerHTML += htmlTemplate;\n}", "function render(object) {\n let $imageSection = $('<section></section>').attr('data-keyword', object.keyword);\n let $title = $('<h2></h2>').text(object.title);\n let $image = $('<img>').attr({ src: object.image_url, alt: object.description });\n let $horns = $('<p></p>').text(`# of horns: ${object.horns}`);\n $imageSection.append($title, $image, $horns);\n $('main').append($imageSection);\n }", "function appendGenres(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <a href=\"#genres\">\n <img src=\"${getFeaturedImageUrl(content)}\">\n </a>\n `;\n }\n document.querySelector('#featured-container').innerHTML += htmlTemplate;\n}", "_generateMarkup() {\n return `\n <figure class=\"recipe__fig\">\n <img src=\"${this._data.image}\" alt=\"${\n this._data.title\n }\" class=\"recipe__img\" />\n <h1 class=\"recipe__title\">\n <span>${this._data.title}</span>\n </h1>\n </figure>\n\n <div class=\"recipe__details\">\n <div class=\"recipe__info\">\n <svg class=\"recipe__info-icon\">\n <use href=\"${icons}#icon-clock\"></use>\n </svg>\n <span class=\"recipe__info-data recipe__info-data--minutes\">${\n this._data.cookingTime\n }</span>\n <span class=\"recipe__info-text\">minutes</span>\n </div>\n <div class=\"recipe__info\">\n <svg class=\"recipe__info-icon\">\n <use href=\"${icons}#icon-users\"></use>\n </svg>\n <span class=\"recipe__info-data recipe__info-data--people\">${\n this._data.servings\n }</span>\n <span class=\"recipe__info-text\">servings</span>\n\n <div class=\"recipe__info-buttons\">\n <button class=\"btn--tiny btn--update-servings\" data-update-to=\"${\n this._data.servings - 1\n }\">\n <svg>\n <use href=\"${icons}#icon-minus-circle\"></use>\n </svg>\n </button>\n <button class=\"btn--tiny btn--update-servings\" data-update-to=\"${\n this._data.servings + 1\n }\">\n <svg>\n <use href=\"${icons}#icon-plus-circle\"></use>\n </svg>\n </button>\n </div>\n </div>\n\n <div class=\"recipe__user-generated ${this._data.key ? '' : 'hidden'}\">\n <svg>\n <use href=\"${icons}#icon-user\"></use>\n </svg>\n </div>\n <button class=\"btn--round btn--bookmark\">\n <svg class=\"\">\n <use href=\"${icons}#icon-bookmark${\n this._data?.bookmarked ? '-fill' : ''\n }\"></use>\n </svg>\n </button>\n </div>\n\n <div class=\"recipe__ingredients\">\n <h2 class=\"heading--2\">Recipe ingredients</h2>\n <ul class=\"recipe__ingredient-list\">\n ${this._data.ingredients.map(this._generateMarkupIngredient).join('')}\n </ul>\n </div>\n <div class=\"recipe__directions\">\n <h2 class=\"heading--2\">How to cook it</h2>\n <p class=\"recipe__directions-text\">\n This recipe was carefully designed and tested by\n <span class=\"recipe__publisher\">${\n this._data.publisher\n }</span>. Please check out\n directions at their website.\n </p>\n <a\n class=\"btn--small recipe__btn\"\n href=\"${this._data.sourceUrl}\"\n target=\"_blank\"\n >\n <span>Directions</span>\n <svg class=\"search__icon\">\n <use href=\"${icons}#icon-arrow-right\"></use>\n </svg>\n </a>\n </div>`;\n }", "getResults() {\n $.getJSON(\n `${\n universityData.root_url\n }/wp-json/university/v1/search?term=${this.searchField.val()}`,\n res => {\n this.resultsDiv.html(`\n <div class=\"row\">\n\n <div class=\"one-third\">\n <h3 class=\"search-overlay__section-title\">General Info</h3>\n ${\n res.generalInfo.length\n ? `\n <ul class=\"link-list min-list\">\n ${res.generalInfo\n .map(item => {\n return `<li><a class=\"a-flex\" href=\"${item.link}\"><span>${\n item.title\n }</span>\n ${\n item.img\n ? `<img style=\"height:100px; width:35%; object-fit:cover;\" src=\"${item.img}\"> `\n : \"\"\n }\n </a>\n </li>`;\n })\n .join(\"\")}\n </ul>`\n : \"Nothing found On General Info\"\n }\n \n </div>\n\n <div class=\"one-third\">\n <h3 class=\"search-overlay__section-title\">Programs</h3>\n ${\n res.programs.length\n ? `\n <ul class=\"link-list min-list\">\n ${res.programs\n .map(item => {\n return `<li><a class=\"a-flex\" href=\"${item.link}\"><span>${\n item.title\n }</span>\n ${\n item.img\n ? `<img style=\"height:100px; width:35%; object-fit:cover;\" src=\"${item.img}\"> `\n : \"\"\n }\n </a>\n </li>`;\n })\n .join(\"\")}\n </ul>`\n : \"Nothing found On Programs\"\n }\n \n <h3 class=\"search-overlay__section-title\">Professors</h3>\n ${\n res.professors.length\n ? `\n <ul class=\"link-list min-list\">\n ${res.professors\n .map(item => {\n return `<li><a class=\"a-flex\" href=\"${item.link}\"><span>${\n item.title\n }</span>\n ${\n item.img\n ? `<img style=\"height:100px; width:35%; object-fit:cover;\" src=\"${item.img}\"> `\n : \"\"\n }\n </a>\n </li>`;\n })\n .join(\"\")}\n </ul>`\n : \"Nothing found On Professors\"\n }\n \n </div>\n\n <div class=\"one-third\">\n <h3 class=\"search-overlay__section-title\">Campuses</h3>\n ${\n res.campuses.length\n ? `\n <ul class=\"link-list min-list\">\n ${res.campuses\n .map(item => {\n return `<li><a class=\"a-flex\" href=\"${item.link}\"><span>${\n item.title\n }</span>\n ${\n item.img\n ? `<img style=\"height:100px; width:35%; object-fit:cover;\" src=\"${item.img}\"> `\n : \"\"\n }\n </a>\n </li>`;\n })\n .join(\"\")}\n </ul>`\n : \"Nothing found On Campuses\"\n }\n \n <h3 class=\"search-overlay__section-title\">Events</h3>\n ${\n res.events.length\n ? `\n <ul class=\"link-list min-list\">\n ${res.events\n .map(item => {\n return `<li><a class=\"a-flex\" href=\"${item.link}\"><span>${\n item.title\n }</span>\n ${\n item.img\n ? `<img style=\"height:100px; width:35%; object-fit:cover;\" src=\"${item.img}\"> `\n : \"\"\n }\n </a>\n </li>`;\n })\n .join(\"\")}\n </ul>`\n : \"Nothing found On Events\"\n }\n\n </div>\n\n </div>\n `);\n }\n );\n }", "function appendExploreAlbum3(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <article onclick=\"showDetailView('${content.id}')\">\n <img src=\"${getFeaturedImageUrl(content)}\">\n </article>\n `;\n }\n document.querySelector('#explore3-class-container').innerHTML += htmlTemplate;\n}", "function appendExploreArtist5(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <article>\n <img src=\"${getFeaturedImageUrl(content)}\">\n <div>\n <h1>${content.title.rendered}</h1>\n <p>${content.excerpt.rendered}<p>\n <h3>Selected albums</h3>\n </div>\n </article>\n `;\n }\n document.querySelector('#explore5-container').innerHTML += htmlTemplate;\n}", "function renderHtml(...args) {\n\n //adding dynamic html that holds the pet info data from our query\n var searchPageHtml = `\n \n \n <!--what line 40 was before -> <h4 class = \"breedName\">Breed Name</h2> -->\n <h2 class = \"breedName\">${name.toUpperCase()}</h2>\n\n\n\n <div id=\"carousel\" class=\"carousel carousel-slider center\">`;\n\n\n for (let url of args) {\n searchPageHtml += `\n <div class=\"carousel-item white-text\" href=\"#one!\">\n <a><img class=\"responsive-img\" src=${url}></a>\n </div>\n `;\n }\n\n searchPageHtml += `\n </div>\n\n \n\n <p class = \"weight left-align\">Weight: ${weight} lbs</p>\n <p class = \"height left-align\">Height: ${height} inches</p>\n <p class = \"desc left-align\">${name}'s are categorized as a ${breedGroup.toLowerCase()} breed. Their origins are ${originArray[0]} and they have been primarily bred as dogs that are good for ${bredFor}. ${name}'s are a good match for those looking for dogs that are ${temperament}.</p>\n \n `\n\n //setting the description and data for the dog inside the div with id=\"petInfo\"\n $(\"#petInfo\").html(searchPageHtml)\n\n //Adding the javascript for the carousel slider\n $('.carousel.carousel-slider').carousel({\n fullWidth: true,\n indicators: true,\n dist: 0,\n duration: 200\n });\n\n\n //setting the dog name heading\n $(\".breedName\").text(name)\n\n }", "function appendExploreAlbum5(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <article onclick=\"showDetailView('${content.id}')\">\n <img src=\"${getFeaturedImageUrl(content)}\">\n </article>\n `;\n }\n document.querySelector('#explore5-class-container').innerHTML += htmlTemplate;\n}", "function appendExploreArtist3(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <article>\n <img src=\"${getFeaturedImageUrl(content)}\">\n <div>\n <h1>${content.title.rendered}</h1>\n <p>${content.excerpt.rendered}<p>\n <h3>Selected albums</h3>\n </div>\n </article>\n `;\n }\n document.querySelector('#explore3-container').innerHTML += htmlTemplate;\n}", "function showRecipes() {\n var selectedRecipes = [];\n data.forEach(function (recipe) { //could name it anything besides recipe.\n selectedTags.forEach(function (tag) {\n if (recipe.tags.includes(tag)) {\n selectedRecipes.push(recipe);\n return;\n }\n });\n });\n recipes.innerHTML = \"\";\n selectedRecipes.forEach(function (recipe) {\n var recipeListContainer = document.createElement('div');\n var recipePage = document.createElement('a');\n recipePage.href = 'javascript:recipePageFunction()'; // goes to line 75\n recipeListContainer.appendChild(recipePage); //\n var recipeLink = document.getElementsByClassName('recipe-link');\n recipeListContainer.className = \"recipe-link\";\n var img = document.createElement('img');\n img.setAttribute('src', recipe.images);\n var h = document.createElement('H1'); //this is recipe.recipeTitle\n var t = document.createTextNode(recipe.recipeTitle);\n h.appendChild(t);\n var p = document.createElement('P');\n p.innerText = recipe.tags;\n p.appendChild(h);\n h.appendChild(img);\n recipePage.append(img, h, p); // changed from recipeListContainer\n recipeListContainer.style.width = \"100VW\";\n recipeListContainer.style.height = \"100VW\";\n recipeListContainer.style.background = \"green\";\n document.getElementById('recipes').appendChild(recipeListContainer)\n {}\n });\n // header.onclick = function(){\n // console.log(\"im clicked\");\n // toggleSelectedRecipe(event);\n }", "function renderRecipes(doc){\n console.log('Rendering data...');\n let li = document.createElement('li');\n let name = document.createElement('span');\n let meal = document.createElement('span');\n let method = document.createElement('span');\n let time = document.createElement('span');\n let cuisine = document.createElement('span');\n let complex = document.createElement('span');\n \n \n li.setAttribute('id', doc.id);\n name.textContent = doc.data().Name;\n meal.textContent = doc.data().Meal;\n method.textContent = 'Method: ' + doc.data().Method;\n time.textContent = 'Time: '+ doc.data().Time + 'mins';\n cuisine.textContent = 'Cusine: '+ doc.data().Cuisine;\n complex.textContent = 'Complexity: ' + doc.data().Complexity;\n \n li.appendChild(name);\n li.appendChild(meal);\n li.appendChild(method);\n li.appendChild(time);\n li.appendChild(cuisine);\n li.appendChild(complex);\n \n list.appendChild(li);\n }", "function renderHTML(data) {\n\n let htmlStr = '';\n\n // loops through data and we get all obj from array\n for (let i = 0; i < data.length; i++) {\n htmlStr += \"<p>\" + data[i].name + ' ' + data[i].species + \"that likes to eat \";\n\n // loops obj and search keys\n for (let x = 0; x < data[i].foods.likes.length; x++) {\n if (x == 0) {\n htmlStr += data[i].foods.likes[x];\n } else {\n htmlStr += \" and \" + data[i].foods.likes[x];\n }\n }\n\n htmlStr += ' and dislikes ';\n\n // loops obj and search keys\n for (let x = 0; x < data[i].foods.dislikes.length; x++) {\n if (x == 0) {\n htmlStr += data[i].foods.dislikes[x];\n } else {\n htmlStr += \" and \" + data[i].foods.dislikes[x];\n }\n }\n\n htmlStr += '</p>';\n }\n // The insertAdjacentHTML method allows us to insert random HTML anywhere in the document, including between nodes!\n // The first argument tells were we want to put a text, second what content we add\n dataContainer.insertAdjacentHTML('beforeend', htmlStr);\n\n}", "function renderText(data) {\n let ul = document.createElement(\"ul\");\n nav.appendChild(ul);\n for (let key in data){\n let li = document.createElement(\"li\");\n li.textContent = big(key);\n li.addEventListener('click', function (e) {\n window.location.hash = small(e.target.textContent);\n\n getBreedImg();\n getSubBreed();\n });\n ul.appendChild(li);\n }\n }", "function getRecipe(queryURL) {\n\n \n //AJAX Call//\n \n \n $.ajax({\n url: queryURL,\n method: \"GET\"\n })\n .then(function(response) {\n console.log(response);\n\n var results = response.hits;\n for(var i = 0; i < results.length; i++) {\n console.log(results[i].recipe.label);\n\n // Parameters and attributes for the dynamic cardDiv\n var cardDiv = $(\"<div class='card'>\");\n cardDiv.attr(\"style\", \"width: 18rem;\");\n cardDiv.css(\"float\", \"left\");\n cardDiv.css(\"margin\", \"15px\");\n\n\n // Attributes for the image, links and title - within the card\n var image = $(\"<img>\");\n image.addClass(\"recipe-image\");\n image.attr(\"src\", results[i].recipe.image);\n\n var recipeLink = $(\"<a>\");\n recipeLink.attr(\"href\", results[i].recipe.shareAs);\n\n var recipeTitle = $(\"<p>\").text(results[i].recipe.label);\n recipeTitle.attr(\"class\", \"recipe-title\");\n recipeTitle.append(recipeLink);\n\n cardDiv.append(recipeTitle);\n cardDiv.append(image);\n \n // Function that appends \n $(\"#leftdiv\").append(cardDiv);\n\n };\n\n });\n\n }", "function renderMealResults(mealDetails) {\n $('#mealResults').html(\n `<a href=\"${mealDetails.strYoutube}\">\n <img src=\"${mealDetails.strMealThumb}\" alt=\"meal\" />\n <div class=\"card-content\">\n <h2>${mealDetails.strMeal}</h2>\n <p>${mealDetails.strInstructions}</p>\n </div>\n </a>`\n );\n}", "function appendArtists(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <a href=\"#explore\">\n <img src=\"${getFeaturedImageUrl(content)}\">\n </a>\n `;\n }\n document.querySelector('#artist-container').innerHTML += htmlTemplate;\n}", "function display(hits_out) {\n var htmlStr = \"\";\n htmlStr += \"<article class='result'>\";\n htmlStr += \"<p>The variable you selected is present in the dataset:</p>\";\n htmlStr += \"<h2>\" + hits_out[0].datasetName + \"</h2>\";\n htmlStr += \"<span class='result-label'>External dataset URL: </span> <a href='\" + hits_out[0].datasetUrl + \"'>\" + hits_out[0].datasetUrl + \"</a> <hr />\";\n htmlStr += \"<p><span class='result-label'>Publishing organization :</span>\" + hits_out[0].org + \"</p>\";\n htmlStr += \"<p><span class='result-label'>Tags :</span>\";\n if (hits_out[0].tagList != null) {\n\tfor(var jj = 0; jj < hits_out[0].tagList.length; jj++) {\n\t htmlStr += \"<span> \" + hits_out[0].tagList[jj] + \"&nbsp;&nbsp; </span>\"\n\t}\n }\n htmlStr += \"</p>\";\n htmlStr += \"<p><span class='result-label'>Available formats :</span>\";\n if (hits_out[0].formatList != null) {\n\tfor(var jj = 0; jj < hits_out[0].formatList.length; jj++) {\n htmlStr += \"<span> \" + hits_out[0].formatList[jj] + \"&nbsp;&nbsp; </span>\"\n\t}\n }\n htmlStr += \"</p>\";\n htmlStr += \"<p><span class='result-label'>Access dataset files directly from the following links:</span>\"\n if (hits_out[0].urlList != null) {\n\tfor(var jj = 0; jj < hits_out[0].urlList.length; jj++) {\n htmlStr += \"<div> <a href='\" + hits_out[0].urlList[jj] + \"'>\" + hits_out[0].urlList[jj] + \"&nbsp;&nbsp; </a></div>\"\n\t}\n }\n htmlStr += \"</p>\";\n htmlStr += \"</article>\";\n htmlStr += \"<article class='result'>\";\n htmlStr += \"<p><span class='result-label'>All variables in this dataset (count = \" + hits_out.length + \"):</span></p>\";\n for(var ii = 0; ii < hits_out.length; ii++ ) {\n htmlStr += hits_out[ii].name + \"<br />\"; \n }\n htmlStr += \"</article>\";\n $(\".results\").html(htmlStr);\n}", "function renderResults() {\n\n // Get the current recipe and the current movie.\n var recipe = currentPair.getCurrentRecipe();\n var movie = currentPair.getCurrentMovie();\n\n // Populate the recipe card elements with our current recipe. \n $(\"#recipe-result > img\").attr(\"src\", recipe.imgSrc);\n $(\"#recipe-title\").text(recipe.title);\n $(\"#recipe-source\").text(recipe.source);\n $(\"#view-recipe-button\").attr(\"href\", recipe.url);\n\n // Iterate through recipe's ingredients and append to hidden dropdown div.\n $.each(recipe.ingredients, function (i, ingredient) {\n var li = $(\"<li>\" + ingredient + \"</li>\");\n $(\"#ingredient-list\").append(li);\n });\n\n // Populate the movie card with the recommended movie\n $(\"#movie-title\").text(movie.title);\n $(\"#movie-year\").text(movie.year);\n $(\"#movie-result > img\").attr(\"src\", movie.imgSrc);\n $(\"#movieplot-text\").text(movie.plot); \n $(\"#view-movie-button\").attr(\"href\", \"https://play.google.com/store/search?q=\" + movie.title + \"&c=movies&hl=en\");\n\n}", "function searchRecipePup(alcohol) {\n\n fetch(\"https://recipe-puppy.p.rapidapi.com/?i=\" + alcohol + \"&q=meal\", {\n \"method\": \"GET\",\n \"headers\": {\n \"x-rapidapi-key\": \"75390b3d46msh2c16eb458cf4e24p18568ejsn950ca0042bd5\",\n \"x-rapidapi-host\": \"recipe-puppy.p.rapidapi.com\"\n }\n })\n .then(function (response) {\n return response.json();\n })\n .then(function (data) {\n console.log(data);\n\n\n // for loop to display recipe puppy results\n for (var i = 0; i < data.results.length; i++) {\n var puppyResults = $(\"<a>\", { \"class\": \"remove-a\" }).text(data.results[i].title);\n var list = $(\"<br>\")\n var link = data.results[i].href;\n console.log(data.results[i].href);\n puppyResults.attr(\"href\", link)\n puppyResults.attr(\"target\", \"_blank\")\n $(\"#drink-results\").append(puppyResults, list)\n\n }\n });\n}", "function renderHTML(data) {\n var htmlString = \"\";\n //for loop to concatinate each object info into a sentence\n for (var i = 0; i < data.length; i++) {\n htmlString += \"<p>\" + data[i].name + \" is a \" + data[i].species + \" that likes to eat \";\n\n for (var ii = 0; ii < data[i].foods.likes.length; ii++) {\n if (ii == 0) {\n htmlString += data[i].foods.likes[ii]\n\n }\n else {\n htmlString += \" and \" + data[i].foods.likes[ii]\n }\n }\n\n htmlString += \" and dislikes \";\n\n for (var ii = 0; ii < data[i].foods.dislikes.length; ii++) {\n if (ii == 0) {\n htmlString += data[i].foods.dislikes[ii]\n\n }\n else {\n htmlString += \" and \" + data[i].foods.dislikes[ii]\n }\n }\n\n htmlString += \".</p>\"\n }\n animals.insertAdjacentHTML('beforeend', htmlString);\n}", "function recipeSuccess(response) {\r\n\r\n $('#recipeResults').empty();\r\n\r\n // creating array to store search results\r\n const saveArray = [];\r\n // stores recipe data in array\r\n for (var i = 0; i < response.hits.length; i++) {\r\n saveArray.push(response.hits[i].recipe);\r\n }\r\n\r\n // declaring userid to use to validate if member is signed in\r\n const userId = $(\"#userId\").data(\"userid\");\r\n // console.log(\"user id for this saving\", userId);\r\n\r\n // maps the results of the search to use in our template literal\r\n response.hits.map((recipeResult, index) => {\r\n const {\r\n image,\r\n label,\r\n url,\r\n calories,\r\n yield,\r\n totalTime,\r\n ingredientLines,\r\n dietLabels,\r\n healthLabels\r\n } = recipeResult.recipe;\r\n\r\n // searches for value of #userID \r\n // displays public or member cards\r\n const recipeCardContent = `\r\n <div class=\"recipe-image card-img-top\" style=\"background: lightblue url(${image}) no-repeat center/cover\";></div>\r\n <div class=\"card-body\">\r\n <h5 class=\"recipe-name card-title\">${label}</h5>\r\n <p><a href=\"${url}\" target=\"_blank\" class=\"recipe-link\">View Recipe</a></p>\r\n <p>Number of Servings: <span class=\"yield\">${yield}</span></p>\r\n <p>Calories(per serving): <span class=\"calories\">${(calories / yield).toFixed()}</span></p>\r\n <p>Total Time: <span class=\"total-time\">${totalTime}</span></p>\r\n <p>Ingredients:</p>\r\n <ul class=\"ingredients-list\">\r\n ${ingredientLines.map(ingredient => (\r\n `<li>${ingredient}</li>`)).join(\"\")}\r\n </ul>\r\n <br>\r\n <p>Diet:</p>\r\n <ul class=\"diet-list\">\r\n ${dietLabels.map(diets => (\r\n `<li>${diets}</li>`)).join(\"\")}\r\n </ul>\r\n <br>\r\n <p>Health:</p>\r\n <ul class=\"health-list\">\r\n ${healthLabels.map(healths => (\r\n `<li>${healths}</li>`)).join(\"\")}\r\n </ul>\r\n <div id=${userId}></div>\r\n <a href=\"#\" id=\"${index}\"class=\"save-recipe-btn btn btn-primary show-toast\">Save</a>\r\n </div>\r\n `;\r\n\r\n //creating recipe card literals\r\n let recipeCard = $(\"<div>\")\r\n .addClass(\"recipe-card card d-flex flex-row\")\r\n .attr(\"id\", \"${index}\")\r\n .html(recipeCardContent);\r\n\r\n // \r\n recipeCard.find(\".save-recipe-btn\").on(\"click\", () => submitPost({\r\n image: image,\r\n label: label,\r\n url: url,\r\n calories: (calories / yield).toFixed(),\r\n totalTime: totalTime,\r\n ingredientLines: ingredientLines.join(),\r\n dietLabels: dietLabels.join(),\r\n healthLabels: healthLabels.join(),\r\n userId: userId\r\n }));\r\n\r\n $(\"#loader\").empty();\r\n\r\n // appends cards to page\r\n $(\"#recipeResults\").prepend(recipeCard);\r\n\r\n });\r\n $(\".save-recipe-btn\").on(\"click\", function (event) {\r\n event.preventDefault();\r\n\r\n let i = this.id;\r\n $(\"#\" + i).html(`<i class=\"fas fa-check\"></i>`)\r\n\r\n var q = saveArray[i].label.split(' ');\r\n\r\n let recipeCardContent = `\r\n <div class=\"recipe-card card d-flex flex-row\" id=${i + q[0]}>\r\n <div class=\"recipe-image card-img-top\" style=\"background: lightblue url(${saveArray[i].image}) no-repeat center/cover\";></div>\r\n <div class=\"card-body\">\r\n <h5 class=\"recipe-name card-title\">${saveArray[i].label}</h5>\r\n <p><a href=\"${saveArray[i].url}\" target=\"_blank\" class=\"recipe-link\">View Recipe</a></p>\r\n <p>Calories(per serving): <span class=\"calories\">${(saveArray[i].calories / saveArray[i].yield).toFixed()}</span></p>\r\n <p>Total Time: <span class=\"total-time\">${saveArray[i].totalTime}</span></p>\r\n <p>Ingredients:</p>\r\n <ul class=\"ingredients-list\">\r\n ${saveArray[i].ingredientLines.map(ingredient => (\r\n `<li>${ingredient}</li>`\r\n )).join(\"\")}\r\n </ul>\r\n <br>\r\n <p>Diet:</p>\r\n <ul class=\"diet-list\">\r\n ${saveArray[i].dietLabels.map(diets => (\r\n `<li>${diets}</li>`\r\n )).join(\"\")}\r\n </ul>\r\n <br>\r\n <p>Health:</p>\r\n <ul class=\"health-list\">\r\n ${saveArray[i].healthLabels.map(healths => (\r\n `<li>${healths}</li>`\r\n )).join(\"\")}\r\n </ul>\r\n <div id=${userId}></div>\r\n <button type=\"button\" id=\"${i + q[0]}\" class=\"btn delete-recipe-btn\" disabled>Check back soon</button>\r\n </div>\r\n </div>\r\n `;\r\n // Save cards to saved recipes tab\r\n $(\"#savedRecipes\").append(recipeCardContent);\r\n });\r\n\r\n $('#savedRecipes').on(\"click\", '.delete-recipe-btn', function (event) {\r\n event.preventDefault();\r\n var id = \"#\" + this.id;\r\n $(id).remove();\r\n let deleteId = $(this).data(\"recipeid\");\r\n\r\n var query = \"/api/savedRecipes/\" + deleteId;\r\n $.ajax({\r\n method: \"DELETE\",\r\n url: query\r\n }).then(function () {\r\n event.preventDefault();\r\n });\r\n });\r\n }", "function loadTag () {\n\n\n const ingredients = recipes.filter (recipe => {\n return tags.ingredients.every (tag => {\n return recipe[\"ingredients\"].some (t => tag.value.toLowerCase() === t.ingredient.toLowerCase())\n })\n })\n\n const ustensils = ingredients.filter (recipe => {\n return tags.ustensils.every (tag => {\n return recipe[\"ustensils\"].some (t => tag.value.toLowerCase() === t.toLowerCase())\n })\n })\n\n const data = ustensils.filter (recipe => {\n return tags.appareils.every (tag => {\n return recipe.appliance.toLowerCase() === tag.value.toLowerCase()\n })\n })\n\n recipes.map (recipe => {\n\n const recipeElement = document.getElementsByClassName(\"recipe-\"+recipe.id)[0]\n\n recipeElement.style.display = \"none\"\n\n })\n\n data.map (recipe => {\n const recipeElement = document.getElementsByClassName(\"recipe-\"+recipe.id)[0]\n\n recipeElement.style.display = \"\"\n })\n\n}", "function generateResolveHTML(listing) {\n\n // check if listing provided is valid\n if (!listing.categories || !listing.location.display_address ||\n !listing.url || !listing.image_url || !listing.name ||\n !listing.rating_img_url || !listing.review_count) {\n return null;\n }\n\n var categories = _.map(listing.categories, '[0]').join(', ');\n var address = listing.location.display_address.join(', ');\n\n var html =\n `<a style=\"text-decoration:none; color:inherit; display:block\" href=\"${listing.url}\">\n <div style=\"width:550px; height: 100px;margin:5px; padding:10px; border: 1px solid #99b0e1; border-radius:2px\">\n <div style=\"display:inline-block; float:left; margin-right:10px\">\n <img style=\"max-width:90px; max-height:90px\" src=\"${listing.image_url}\">\n </div>\n <div style=\"float:left; width:80%\">\n <div style=\"width:100%\">\n ${listing.name}\n </div>\n <img style=\"vertical-align:middle\" src=\"${listing.rating_img_url}\">\n <font style=\"font-size:12px; font-weight:normal; color:grey\">\n ${listing.review_count} Reviews\n </font> </br>\n <div style=\"width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis\">\n <font style=\"font-size:14px;font-weight:normal\">\n ${address}\n </font>\n </div>\n <font style=\"font-size:14px; font-weight:normal; color:grey\">\n ${categories}\n </font>\n <div style=\"font-family:proxima-nova, Avenir Next, Segoe UI, Calibri, Helvetica Neue, Helvetica, Arial, sans-serif; font-size:14px; font-weight:normal; color:#aab; margin-top:5px\">\n YELP.COM\n </div>\n </div>\n </div>\n </a>\n `\n return html;\n}", "displayDrinkWithIngredients(drinks){\n // Show the Results\n const resultsWrapper = document.querySelector('.results-wrapper');\n resultsWrapper.style.display = 'block';\n\n // Insert the Results\n const resultsDiv = document.querySelector('#results');\n // loop through the Drinks\n drinks.forEach( drink => {\n // Build The Template\n resultsDiv.innerHTML += `\n <div class=\"col-md-6\">\n <div class=\"card my-3\">\n <button type=\"button\" data-id=\"${drink.idDrink}\" class=\"favorite-btn btn btn-outline-info \">\n +\n </button>\n <img class=\"card-img-top\" src=\"${drink.strDrinkThumb}\" alt=\"${drink.strDrink}\" >\n \n <div class=\"card-body\">\n <h2 class=\"card-title text-center\">${drink.strDrink} </h2>\n <p class=\"card-text font-weight-bold\"> Instrucions :\n \n </p>\n <p class=\"card-text\">\n ${drink.strInstructions}\n </p>\n <p class=\"card-text\">\n <ul class=\"list-group\">\n <li class=\"list-group-item alert alert-danger\">Ingerdients</li>\n\n ${this.displayIngredients(drink)}\n\n\n </ul>\n\n </p>\n <p class=\"card-text font-weight-bold\"> Extra Information : </p>\n <p class=\"card-text\">\n <span class=\"badge badge-pill badge-success\">\n ${drink.strAlcoholic}\n </span>\n <span class=\"badge badge-pill badge-warning\">\n Category : ${drink.strCategory}\n </span>\n </p>\n\n </div>\n </div>\n </div>\n \n `;\n });\n this.isFavorite();\n }", "showHTML() { \n return `\n <div class='showRecipes'>\n <div>\n <h3>${this.recipeTitle}</h3> \n </div> \n <div>\n ${'Time: ' + this.recipeTime}\n </div>\n <div>\n ${this.recipeIngredients}\n </div>\n <div>\n ${this.recipeAllergies}</li>\n </div>\n </div>`\n }", "function formatMealData(data) {\n mealData = data;\n recipeNumber = mealData.hits.length;\n removeSearchDropdowns();\n\n for (i = 0; i < recipeNumber; i++) {\n recipeLabel = mealData.hits[i].recipe.label; \n recipeSourceName = mealData.hits[i].recipe.source; \n recipeImage = mealData.hits[i].recipe.image; \n recipeInstructionsLink = mealData.hits[i].recipe.url;\n foodSearchResultsBody.classList.remove('hide');\n showFoodCards(recipeImage, recipeLabel, recipeSourceName, recipeInstructionsLink);\n }\n}", "function rederHtml(data){\n\t\n\t// create a variable that will hold the html code\n\tvar htmlString = \"\";\n\t//loop though the data and show it using html\n\tfor(i=0; i< data.length; i++){\n\t\thtmlString += \"<p>\" + data[i].name + \" is a \" + data[i].species + \" that likes to eat \";\n\t\t\n\t\t// loop though the list favorites food likes\n\t\tfor(a =0; a< data[i].foods.likes.length; a++){\n\t\t\t// if it is the first element\n\t\t\tif(a == 0){\n\t\t\t\t\n\t\t\t\thtmlString +=\tdata[i].foods.likes[a];\n\t\t\t} else { // otherwise\n\t\t\t\thtmlString +=\t\" and \" + data[i].foods.likes[a];\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\thtmlString += ' and dislikes ';\n\t\t\t\n\t\t\t// loop though the list dislikes food\n\t\t\tfor(a =0; a< data[i].foods.dislikes.length; a++){\n\t\t\t\t// if it is the first element\n\t\t\t\tif(a == 0){\n\t\t\t\t\t\n\t\t\t\t\thtmlString +=\tdata[i].foods.dislikes[a];\n\t\t\t\t} else { // otherwise\n\t\t\t\t\thtmlString +=\t\" and \" + data[i].foods.dislikes[a];\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t}\n\t\thtmlString += \"</p> <hr />\";\n\t\t\n\t}\n\t\n\t// append html to the page\n\tanimalContainer.insertAdjacentHTML('beforeend', htmlString);\n}", "function useApiData(data) {\n document.querySelector(\"#content\").innerHTML = `\n <div id = \"cardscontainer\">\n <div class=\"row\">\n <div class=\"card\" style=\"width: 18rem;\">\n <img src=\"${data.hits[randomNum].recipe.image}\" class=\"card-img-top\" alt=\"...\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${data.hits[randomNum].recipe.label}</h5>\n <p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card's content.</p>\n <a href=\"${data.hits[randomNum].recipe.url}\" class=\"btn btn-primary\">Go somewhere</a>\n </div>\n </div>\n <div class=\"card\" style=\"width: 18rem;\">\n <img src=\"${data.hits[randomNum+1].recipe.image}\" class=\"card-img-top\" alt=\"...\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${data.hits[randomNum+1].recipe.label}</h5>\n <p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card's content.</p>\n <a href=\"${data.hits[randomNum+1].recipe.url}\" class=\"btn btn-primary\">Go somewhere</a>\n </div>\n </div>\n <div class=\"card\" style=\"width: 18rem;\">\n <img src=\"${data.hits[randomNum+2].recipe.image}\" class=\"card-img-top\" alt=\"...\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${data.hits[randomNum+2].recipe.label}</h5>\n <p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card's content.</p>\n <a href=\"${data.hits[randomNum+2].recipe.url}\" class=\"btn btn-primary\">Go somewhere</a>\n </div>\n </div>\n \n </div>\n\n </div>\n `\n\n\n \n}", "displayDrinks(drinks){\n // Show the Results\n const resultsWrapper = document.querySelector('.results-wrapper');\n resultsWrapper.style.display = 'block';\n\n // insert the Results\n const resultsDiv = document.querySelector('#results');\n\n // loop throught Drinks\n drinks.forEach( drink => {\n // Build the Template\n resultsDiv.innerHTML += `\n <div class=\"col-md-5\">\n <div class=\"card-my-3\">\n <button type=\"button\" data-id=\"${drink.idDrink}\" class=\"favorite-btn btn btn-outline-info \">\n +\n </button>\n <img class=\"card-img-top\" src=\"${drink.strDrinkThumb}\" alt=\"${drink.strDrink}\" >\n </div>\n <div class=\"card-body\">\n <h2 class=\"card-title text-center\">${drink.strDrink} </h2>\n <a data-target=\"#recipe\" class=\"btn btn-success get-recipe\" href=\"#\" data-toggle=\"modal\" data-id=\"${drink.idDrink}\">\n Get Recipe </a>\n </div>\n \n </div>\n \n `;\n });\n this.isFavorite();\n\n }", "function displayRecipe(response, content) { \n var ingredients = [];\n for(x=0; x<response.extendedIngredients.length; x++) {\n ingredients.push(response.extendedIngredients[x].name);\n }\n buttonCreate(content);\n recipeName(response);\n ingrList(ingredients);\n method(response);\n }", "function renderResults (data) {\n return `<div class=\"restaurant col-6\">\n <h3>${data.restaurant.name}</h3>\n <span class=\"website\">\n <a class=\"button-link\" href=\"${data.restaurant.url}\" target=\"_blank\">Information</a> \n <a class=\"button-link\" href=\"${data.restaurant.menu_url}\" target=\"_blank\">Menu</a>\n <p class=\"food-type\">${data.restaurant.cuisines}</p>\n </span>\n </div>`\n}", "function createContentFrom(obj){\n\n let frag = new DocumentFragment();\n\n let resultItem = document.createElement('li');\n resultItem.className = \"index-search-results--item\";\n\n let img = new Image();\n img.className = \"index-search-results--img\";\n img.src = `https://s3.amazonaws.com/aws-website-alecaaroncom-kjonn/img/${obj.img}`;\n\n // glue all the elements together to form a results-item component\n resultItem.appendChild(img);\n\n let h2 = document.createElement('h2');\n h2.textContent = obj.name;\n h2.className = \"index-search-results--title\";\n resultItem.appendChild(h2);\n\n let bio = document.createElement('p');\n bio.className = \"index-search-results--bio\";\n bio.textContent = obj.desc;\n\n let h3 = document.createElement('h3');\n h3.textContent = `${obj.name} has ${obj.countries} countries and animals such as:`;\n bio.appendChild(h3);\n console.log(h3);\n\n let animalList = document.createElement('ul');\n obj.animals.forEach( x => {\n let animalItem = document.createElement('li');\n animalItem.textContent = x.type;\n animalList.appendChild(animalItem);\n });\n bio.appendChild(animalList);\n\n //add the final peice tot he resultItem component and glue\n //it to the DOM\n resultItem.appendChild(bio);\n frag.appendChild(resultItem);\n\n //add the component to the DOM\n document.getElementsByClassName('index-search-results')[0].appendChild(frag);\n}", "function renderHTML(apidata){\r\n var html = \"\";\r\n var apidatalength = apidata.length; // reverse randering\r\n for (i = 0; i < apidatalength; i++){\r\n html += \"<div class='content-section'>\";\r\n html += \"<h2><a href=\" + apidata[apidatalength-i-1].link_url + \">\" + apidata[apidatalength-i-1].title + \"</a></h2>\";\r\n html += \"<img src=\" + apidata[apidatalength-i-1].img_url + \">\";\r\n html += \"</div>\";\r\n }\r\n newsContainer.insertAdjacentHTML('beforeend', html);\r\n}", "function CreateBadgeReqLinks() {\r\n //Find the div that holds the badge requirements, there might be 2\r\n var divs = document.getElementsByClassName(\"badge_description\");\r\n console.log(\"div num: \" + divs.length);\r\n \r\n for (var dl=0; dl<divs.length; dl++) {\r\n //Get each <li> list item from the <ul> unordered list inside the div\r\n var li = divs[dl].getElementsByTagName(\"li\");\r\n console.log(\"li num: \" + li.length);\r\n for (var num=0; num<li.length; num++) {\r\n //For each <li> list item, replace the innerHTML with the search code\r\n li[num].innerHTML = \"<a href='http://search2.bestbuylearninglounge.com/?q=\" + li[num].innerHTML + \";q1=eLearning;x=0;x1=type;y=0' style='color:blue;' target='_blank'>\" + li[num].innerHTML + \"</a>\";\r\n console.log(\"replaced html with link\");\r\n }\r\n }\r\n }", "async displaySearchResults(searchResults)\n {\n const displayResults = await searchResults.map(recipe => {\n return `<li> <button class=\"result\" id=\"${recipe.id}\" style=\"background-image: url(${recipe.image})\"> ${recipe.title}</button></li>`; });\n document.getElementById('results').innerHTML = displayResults.join(''); \n \n \n }", "function displaySearchResults(response, search) {\n var user_finder = new RegExp(search, 'i'),\n results_string = \"\",\n i,\n j;\n\n if(globe.getID(0)) {\n removeLink();\n }\n\n if (globe.search_type_name.checked) {\n for (i = 0; i < response.length; i += 1) {\n if (user_finder.test(response[i].toMake)) {\n\n results_string += \"<p id=\\\"\" + i.toString() + \"\\\">\" + response[i].toMake + \"</p>\";\n globe.addID(i.toString());\n }\n }\n } else {\n for (i = 0; i < response.length; i += 1) {\n for (j = 0; j < response[i].ingredients.length; j += 1) {\n if (user_finder.test(response[i].ingredients[j].ingredient)) {\n\n results_string += \"<p id=\\\"\" + i.toString() + \"\\\">\" + response[i].ingredients[j].ingredient + \"</p>\";\n globe.addID(i.toString());\n break;\n }\n }\n }\n }\n\n globe.hint_span.innerHTML = \"\";\n if (results_string === \"\") {\n results_string = \"<span>No results.</span>\";\n }\n globe.results_div.innerHTML = results_string;\n \n if (globe.getID(0)) {\n createLink();\n }\n}", "function displayResults(json) {\n let photographer = json;\n let heading = document.createElement('h1');\n section.appendChild(heading);\n heading.textContent = photographer;\n }", "function buildItem(json) {\n // Test for drill down data\n var drillDownCmds = findAndDel(json, \"DataCmd\");\n var drillDownId = findAndDel(json, \"DataId\");\n\n var html = \"<div class='table-item'>\";\n html += \"<h1 style='float: left'>\" + findAndDel(json, 'Title') + \"</h1>\";\n html += \"<img src='icons/\" + json['Visibility'].split(' ').join('').toLowerCase() + \".png' alt='\" + json['Visibility'] + \"' title='\" + json['Visibility'] + \"' style='padding-left: 0.5em'/>\";\n delete(json['Visibility']);\n html += \"<div style='float: right'><div style='text-align: right; margin-bottom: 1em;'><h2 style='margin: 0px'>Tags</h2>\";\n for (var tagKey in json['Tags']) {\n html += \"<div class='link' data-cmd='Cmd=search&Tags=\" + json['Tags'][tagKey]['Tag'] + \"'>\" + json['Tags'][tagKey]['Tag'] + \"</div>\";\n }\n delete(json['Tags']);\n html += \"</div>\";\n for (var imageKey in json['Images']) {\n html += \"<img style='width: 200px; margin-bottom: 1em; float: right; clear: right; border: 1px solid black' src='images/\" + json['Images'][imageKey]['FilenameServer'] + \"'/>\";\n }\n delete(json['Images']);\n html += \"</div>\";\n html += \"<div style='clear: left'></div>\"\n for (var partKey in json) {\n var value = json[partKey];\n if (\"string\" == typeof(value))\n value = value.split(\"\\n\").join(\"<br/>\");\n\n if (partKey != \"Author\") {\n if (value != \"\")\n html += \"<div><h2 class='header-cell'>\" + partKey + \"</h2><div class='data-cell'>\" + value + \"&nbsp;</div></div>\";\n } else {\n html += \"<div><h2 class='header-cell'>\" + partKey + \"</h2><div class='data-cell'>\" + value['Name'] + \"&nbsp;</div></div>\";\n }\n }\n html += \"</div>\";\n\n if ((drillDownCmds != undefined && drillDownId != undefined) && drillDownCmds.length > 0) {\n html += \"<div style='padding-top: 2em'><h2 class='header-cell'>Actions</h2><div class='data-cell'>\";\n for (var drillDownKey in drillDownCmds) {\n html += '<div class=\"link\" data-cmd=\"Cmd=' + drillDownCmds[drillDownKey]['cmd'] + '&ID=' + drillDownId + '\">' + drillDownCmds[drillDownKey]['text'] + '</div>';\n }\n html += \"</div></div>\"\n }\n html += '<div style=\"clear: right\"></div>'\n return html;\n}", "function hndlr (response) {\n for (var i = 0; i < response.items.length; i++) {\n let item = response.items[i];\n // in production code, item.htmlTitle should have the HTML entities escaped.\n document.getElementById(\"imgGoogle\").innerHTML += \"<br>\" + item.htmlTitle;\n }\n }", "function updateSearchResult(arr) {\n // declare empty string\n let html = \"\";\n // loop through array to build html\n for (var i = 0; i < arr.length; i++) { \n var category=\"\";\n var p=arr[i].product_type;\n if(arr[i].sku){ \n html += '<a class=\"result-detail noselect\" onclick=\"saveSearch()\" href=\"/medicine'+'/'+arr[i].handle+'\">';\n let img=\"/images/default-meds.svg\"; if(arr[i].image){img=arr[i].image}\n html += '<div class=\"result-image\"><div style=\"background-image:url('+img+')\"></div></div>';\n html += '<div class=\"result-title-price\">';\n html += '<div class=\"result-title\">' + arr[i].title +\"<br><span>\"+arr[i].variant_title+\"</span></div>\";\n html += '<div class=\"result-price\"> RM ' + arr[i].price.toFixed(2) + \"</div>\";\n html += \"</div>\";\n html +='<div class=\"result-buy-icon\">';\n html +='<svg viewBox=\"0 0 172 172\"><path d=\"M120.4,37.84v6.88h27.1975l0.3225,3.01l5.93658,51.94507c-2.3183,-1.00149 -4.7448,-1.79604 -7.2559,-2.36003l-5.23818,-45.71504h-20.9625v7.8475c2.05594,1.19594 3.44,3.37281 3.44,5.9125c0,3.80281 -3.07719,6.88 -6.88,6.88c-3.80281,0 -6.88,-3.07719 -6.88,-6.88c0,-2.53969 1.38406,-4.71656 3.44,-5.9125v-7.8475h-55.04v7.8475c2.05594,1.19594 3.44,3.37281 3.44,5.9125c0,3.80281 -3.07719,6.88 -6.88,6.88c-3.80281,0 -6.88,-3.07719 -6.88,-6.88c0,-2.53969 1.38406,-4.71656 3.44,-5.9125v-7.8475h-20.9625l-13.0075,113.52h89.26764c2.34666,2.61386 5.02006,4.92921 7.95417,6.88h-104.96181l0.43,-3.87l13.76,-120.4l0.3225,-3.01h27.1975v-6.88c0,-19.04094 15.35906,-34.4 34.4,-34.4c19.04094,0 34.4,15.35906 34.4,34.4zM162.11,172h-1.76181c0.55434,-0.36856 1.09938,-0.75014 1.63466,-1.14429zM58.48,37.84v6.88h55.04v-6.88c0,-15.35906 -12.16094,-27.52 -27.52,-27.52c-15.35906,0 -27.52,12.16094 -27.52,27.52z\"/><path d=\"M157.896,137.6c0,2.064 -1.376,3.44 -3.44,3.44h-13.416v13.416c0,2.064 -1.376,3.44 -3.44,3.44c-2.064,0 -3.44,-1.376 -3.44,-3.44v-13.416h-13.416c-2.064,0 -3.44,-1.376 -3.44,-3.44c0,-2.064 1.376,-3.44 3.44,-3.44h13.416v-13.416c0,-2.064 1.376,-3.44 3.44,-3.44c2.064,0 3.44,1.376 3.44,3.44v13.416h13.416c2.064,0 3.44,1.376 3.44,3.44zM172,137.6c0,18.92 -15.48,34.4 -34.4,34.4c-18.92,0 -34.4,-15.48 -34.4,-34.4c0,-18.92 15.48,-34.4 34.4,-34.4c18.92,0 34.4,15.48 34.4,34.4zM165.12,137.6c0,-15.136 -12.384,-27.52 -27.52,-27.52c-15.136,0 -27.52,12.384 -27.52,27.52c0,15.136 12.384,27.52 27.52,27.52c15.136,0 27.52,-12.384 27.52,-27.52z\"/></svg></div>';\n html += \"</a>\";\n console.log(arr[i])\n }//corporate check \n }\n //get container id and update result\n let result = document.getElementById(\"search-result\");\n result.innerHTML = html; \n }", "function appendMetal(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <article onclick=\"showDetailView('${content.id}')\">\n <img src=\"${getFeaturedImageUrl(content)}\">\n </article>\n `;\n }\n document.querySelector('#metal-container').innerHTML += htmlTemplate;\n document.querySelector('#friends-albums').innerHTML += htmlTemplate;\n}", "function renderHTML(data) {\r\n\t// create empty string\r\n\tvar htmlString = \"\";\r\n\r\n\t// loop through array\r\n\tfor (i = 0; i < data.length; i++){\r\n\t\thtmlString += \"<p>\" + data[i].name + \" is a \" + data[i].species + \" that likes to eat \"\r\n\t\tfor (ii = 0; ii < data[i].foods.likes.length; ii++){\r\n\t\t\tif (ii == 0){\r\n\t\t\t\thtmlString += data[i].foods.likes[ii];\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\thtmlString += \" and \" + data[i].foods.likes[ii];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\thtmlString += \" and dislikes \";\r\n\r\n\t\tfor (ii = 0; ii < data[i].foods.likes.length; ii++){\r\n\t\t\tif (ii == 0){\r\n\t\t\t\thtmlString += data[i].foods.likes[ii];\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\thtmlString += \" and \" + data[i].foods.likes[ii];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\thtmlString += '.</p>'\r\n\t}\r\n\r\n\tanimalContainer.insertAdjacentHTML('beforeend', htmlString)\r\n}", "function appendHipHop(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <article onclick=\"showDetailView('${content.id}')\">\n <img src=\"${getFeaturedImageUrl(content)}\">\n </article>\n `;\n }\n document.querySelector('#hiphop-container').innerHTML += htmlTemplate;\n}", "function renderModalSearchRecipe (recipes) {\n\n globalRecipe = []\n\n let edamamApiRecipe = {\n\n name: recipes.hits[0].recipe.label,\n\n calories: recipes.hits[0].recipe.calories,\n\n healthLabels: recipes.hits[0].recipe.healthLabels,\n\n source: recipes.hits[0].recipe.source,\n\n sourceUrl: recipes.hits[0].recipe.url,\n\n imgUrl: recipes.hits[0].recipe.image,\n\n ingredients: recipes.hits[0].recipe.ingredientLines,\n\n yield: recipes.hits[0].recipe.yield\n\n }\n\n globalRecipe.unshift(edamamApiRecipe)\n\n let ingredientsFormattedList = renderIngredient(edamamApiRecipe.ingredients)\n\n let preDbRecipeModal = (`\n\n <div class='modal modal-transparent fade tempModal' tabindex='-1' role='dialog' id='recipeModal'>\n\n <div class='modal-dialog'>\n\n <div class='recipe' data-recipe-id=''>\n\n <div class='col-md-12 recipeBox'>\n\n <div class='col-md-5 thumbnail'>\n\n <img src='${edamamApiRecipe.imgUrl}' alt='recipe image'>\n\n </div>\n\n <div class='col-md-6 caption'>\n\n <h4 class='inline-header'><strong>${edamamApiRecipe.name}</strong></h4>\n\n <p>via<a href='${edamamApiRecipe.sourceUrl}'> ${edamamApiRecipe.source}</a></p>\n\n <h4 class='inline-header'><strong>Ingredients:</strong></h4>\n\n <ul>${ingredientsFormattedList}</ul>\n\n <h4 class='inline-header'><strong>Yield:</strong></h4>\n\n <ul>${edamamApiRecipe.yield}</ul>\n\n <div class='bottom-align-buttons'>\n\n <button type='button' class='btn btn-primary add-recipe'><span class='icon'><i class='fa fa-plus'></i></span> Add This Recipe</button>\n\n <button type='button' class='btn btn-danger close-recipe'><span class='icon'><i class='fa fa-trash-o'></i></span> Not This Recipe</button>\n\n </div>\n\n </div>\n\n </div>\n\n </div>\n\n </div>\n\n </div>\n\n `)\n\n $('#modals').prepend(preDbRecipeModal)\n\n $('#recipeModal').modal('show')\n\n}", "function displayResults(responseObj){\n\t// console.log(\"calling inside displayResults\" , responseObj);\n\t\n\tconst works = responseObj.GoodreadsResponse.search.results.work;\n\tdocument.getElementById(\"results\").innerHTML = \"\";\n\t// console.log(works)\n\t works.forEach(function(work){\n\t \t\n\t \tconst author = work.best_book.author.name[\"#text\"]\n\t \tconst title = work.best_book.title[\"#text\"]\n\t \tconst imgUrl = work.best_book.image_url[\"#text\"]\n\t \tconsole.log(title, author, imgUrl)\n\t \t\n\t \tconst myListItem = document.createElement(\"li\");\n\t \tconst image = document.createElement(\"img\")\n\t \timage.setAttribute(\"src\" , imgUrl)\n\t \t\n\t \n\t \tmyListItem.innerHTML = title + \"by\" + author;\n\t \tdocument.getElementById(\"results\").appendChild(myListItem)\n \t \t\n\t \t// console.log(work)\n\t\t\n\t })\n\n\t\n\n}", "function createHTML(responseJson) {\n $('#results-list').empty();\n for (let i = 0; i < responseJson.data.length; i++){\n const physicalAddress = responseJson.data[i].addresses.find(addy => addy.type === 'Physical');\n $('#results-list').append(\n `<li><h3>${responseJson.data[i].fullName}</h3>\n <p>${responseJson.data[i].description}</p>\n <address>\n <p>${physicalAddress.line1}</p>\n <p>${physicalAddress.line2} ${physicalAddress.line3}</p>\n <p>${physicalAddress.city}, ${physicalAddress.stateCode} ${physicalAddress.postalCode}</p>\n </address>\n <p><a href='${responseJson.data[i].url}'>Click for More Info</a></p>\n </li>`\n );\n }\n $('#results').removeClass('hidden');\n}", "display_collection_photoData(results){\n for(var i=0;i<results.length;i++){\n const div = document.createElement(\"div\");\n const img = document.createElement(\"img\");\n const label = document.createElement(\"label\");\n const p = document.createElement(\"p\");\n const h4 = document.createElement(\"h4\");\n\n collection_section.appendChild(div);\n div.appendChild(h4)\n div.appendChild(img);\n div.appendChild(label);\n div.appendChild(p);\n\n h4.textContent = `${results[i].timestamp}`;\n div.classList.add(\"collect-section-2-div\");\n img.classList.add(\"collect-section-2-img\");\n\n if(`${results[i].label}` == \"\" || `${results[i].label}` == undefined){\n label.textContent = \"\";\n }else{\n label.textContent = `${results[i].label}`;\n }\n \n if(results[i].imageurl.split(\".\")[1] == \"cloudfront\"){\n img.setAttribute(\"src\", `${results[i].imageurl}`);\n }\n else{\n img.setAttribute(\"src\", `${results[i].imageurl}` + \"&w=500&h=300&dpr=2\");\n }\n \n if(results[i].description == null) {\n p.textContent = \"\"\n } else {\n p.textContent = `${results[i].description}`;\n }\n \n }\n }", "displayIngredients(drink){\n let ingredients = [];\n for(let i = 1; i <= 15; i++){\n const ingredientMeasure = {};\n if(drink [`strIngredient${i}`] !== null){\n ingredientMeasure.ingredient = drink[`strIngredient${i}`];\n ingredientMeasure.measure = drink[`strMeasure${i}`];\n ingredients.push(ingredientMeasure);\n }\n }\n //console.log(ingredients)\n // build template\n let ingredientsTemplate = '';\n ingredients.forEach(ingredient => {\n ingredientsTemplate += `\n <li class=\"list-group-item\">\n ${ingredient.ingredient} - ${ingredient.measure}\n </li>\n `;\n });\n return ingredientsTemplate;\n \n }", "function writeToDocument(type) {\n let resultsCount = document.getElementById(\"resultsCount\");\n let el = document.getElementById(\"data\");\n el.innerHTML = \"\";\n resultsCount.innerHTML = \"\";\n getData(type, function (data) { \n data = data.hits;\n console.dir(data);\n resultsCount.innerHTML = `<h3> ${data.length} Recipes for ${type}</h3>`;\n for (let item = 0; item < data.length; item++) {\n el.innerHTML += `\n <div class=\"recipe-card\">\n <img src=\"${data[item].recipe.image}\" alt=\"Dish Image\">\n <h5>${data[item].recipe.label}<span>By (${data[item].recipe.source})</span></h5>\n <div class=\"description\">\n <div class=\"item1 left-padding\"><p>Origin :<span>${data[item].recipe.cuisineType}</span></p></div>\n <div class=\"item2 left-padding\"><p>Course :<span>${data[item].recipe.dishType}</span></p></div>\n <div class=\"item3 left-padding\"><p>Calories : <span>${Math.floor(data[item].recipe.calories)} kcal</span></p></div>\n <div class=\"item4 left-padding\"><p>Number Of Serving :<span> ${data[item].recipe.yield}</span></p></div>\n </div>\n <div><a href=\"${data[item].recipe.url}\" target=\"_blank\"><button class=\"view\">Go To Recipe</button></a></div>\n </div>\n `;\n }\n \n });\n\n}", "function appendRock(contents) {\n let htmlTemplate = \"\";\n for (let content of contents) {\n htmlTemplate += /*html*/ `\n <article onclick=\"showDetailView('${content.id}')\">\n <img src=\"${getFeaturedImageUrl(content)}\">\n </article>\n `;\n }\n document.querySelector('#rock-container').innerHTML += htmlTemplate;\n}", "function displayRecipes(apiData, ingredient){\n clearRecipes();\n recipeList = [];\n \n // gives the user a message if no recipes return from ingredient search\n if(apiData.meals == null){\n var recipe = document.createElement(\"div\");\n recipe.id = \"recipe-card\";\n \n var recipeName = document.createElement(\"p\");\n recipeName.id = \"rec-name\";\n ingredient = ingredient.replace(\"_\",\" \");\n recipeName.textContent = \"There are presently no recipes including \" + ingredient + \".\";\n\n recipe.appendChild(recipeName);\n recipeListEl.appendChild(recipe);\n }\n else{\n for(i=0; i<apiData.meals.length; i++){\n recipeList.push(apiData.meals[i].strMeal);\n }\n // automatically displays all recipes if there are less than 6 associated with an ingredient\n if(recipeList.length < 6){\n for(i=0; i<recipeList.length; i++){\n var recipe = document.createElement(\"div\");\n recipe.id = \"recipe-card\";\n \n var recipeName = document.createElement(\"p\");\n recipeName.id = \"rec-name\";\n recipeName.textContent = recipeList[i];\n \n var recipeBtnEl = document.createElement(\"button\");\n recipeBtnEl.id = \"rec-detail-btn\";\n recipeBtnEl.classList.add(\"btn\");\n recipeBtnEl.textContent = \"Get Details\";\n \n recipe.appendChild(recipeName);\n recipe.appendChild(recipeBtnEl);\n recipeListEl.appendChild(recipe);\n } \n }\n else {\n largeRecNum(ingredient);\n }\n }\n}", "function getRecipeInstructions(recipeId, image_src, recipeName) {\n\n var queryURL = \"https://api.spoonacular.com/recipes/\" + recipeId + \"/analyzedInstructions?apiKey=3d8504ff72124b3790e1881e4619a59c\";\n // console.log(recipeId);\n\n $.ajax({\n url: queryURL,\n method: \"GET\"\n }).then(function (response) {\n console.log(response);\n // console.log(response[0].steps[0].number);\n // console.log(response[0].steps[0].step);\n console.log(response[0].steps[0].ingredients);\n\n var currentIngredients = response[0].steps[0].ingredients;\n $(\".recipe-ingredients\").html(\"\");\n for (var i=0; i<currentIngredients.length; i++) {\n $(\".recipe-ingredients\").append(\"<li>\" + currentIngredients[i].name + \"</li>\");\n $(\".recipe-ingredients\").val().toUpperCase();\n }\n\n // Add cooking instructions to the recipe modal.\n var stepsInstructions = response[0].steps;\n $(\".recipe-step\").html(\"\");\n for (j=0; j<stepsInstructions.length; j++) {\n $(\".recipe-step\").append(\"<p>\" +\n stepsInstructions[j].number + \". \" +\n stepsInstructions[j].step + \"</p>\");\n } // End of AJAX call for recipeId\n\n });\n}", "function generateCards(results) {\n\n var resultsDiv = document.querySelector('#card-append')\n resultsDiv.textContent = \"\";\n\n let generatedCards= '';\n //every time we are looping through the results, create a card using the format in the HTML\n results.map(result => {\n console.log(result)\n generatedCards +=\n `\n<div class=\"card column is-one-quarter\">\n <div class=\"card-image\">\n <figure class=\"image is-4by3\">\n \n <img src= \"${result.recipe.image}\" alt=\"Placeholder image\">\n </figure>\n </div>\n <div class=\"card-content\">\n <div class=\"media\">\n <div class=\"media-left\">\n </div>\n <div class=\"media-content\">\n <p class=\"title is-4\">${result.recipe.label}</p>\n </div>\n </div>\n \n <div class=\"calories\">\n <strong> Cuisine Type: </strong>${result.recipe.cuisineType}\n <br>\n <strong> Calories: </strong>${result.recipe.calories.toFixed(0)}\n <br>\n \n <a class=\"view-btn\" target=\"_blank\" href=\"${result.recipe.url}\">View Recipe</a> \n </div>\n </div>\n </div>\n`\n})\nsearchRecipe.innerHTML = generatedCards;\n}", "function extras(json) {\r\n\t\tlet link1 = document.createElement(\"a\");\r\n\t\tlet link2 = document.createElement(\"a\");\r\n\t\tdocument.getElementById(\"extra\").innerHTML = \"<span>For more information\"+\r\n\t\t\t\" if applicable, click below: </span></br>\";\r\n\r\n\t\tif(json.meals[0].strSource !=null) {\r\n\t\t\tlink1.innerHTML = \"Source </br>\";\r\n\t\t\tlink1.href = json.meals[0].strSource;\r\n\t\t}\r\n\t\tif(json.meals[0].strYoutube != null) {\r\n\t\t\tlink2.innerHTML = \"Youtube\";\r\n\t\t\tlink2.href = json.meals[0].strYoutube;\r\n\t\t}\r\n\t\tdocument.getElementById(\"extra\").appendChild(link1);\r\n\t\tdocument.getElementById(\"extra\").appendChild(link2);\r\n\t}", "function createMealImages (response) {\n response.meals.forEach(meal => {\n const foodImages = document.querySelector('#meal-recipe-images');\n const foodImageTag = document.createElement('img');\n\n foodImageTag.src = meal.strMealThumb;\n foodImages.insertBefore(foodImageTag, foodImages.firstChild);\n\n foodImageTag.addEventListener('click', e => { \n const mealDetails = document.getElementById('meal-recipe-detail');\n const mealDetailImgContainer = document.querySelector('#meal-recipe-detail > img');\n \n mealDetailImgContainer.src = meal.strMealThumb;\n \n const mealNameContainer = document.getElementById('meal-detail-name');\n mealNameContainer.textContent = meal.strMeal;\n\n const mealIngredientsContainer = document.getElementById('meal-ingredients');\n mealIngredientsContainer.innerHTML = '';\n\n for (let i=1; i<21; i++){\n if(meal[`strIngredient${i}`]){\n let mealIngredientLi = document.createElement('p');\n mealIngredientLi.textContent = meal[`strMeasure${i}`] + ' ' + meal[`strIngredient${i}`];\n mealIngredientsContainer.appendChild(mealIngredientLi);\n }\n }\n \n const mealInstructionsContainer = document.getElementById('meal-instructions');\n const mealInstructionsList = document.getElementById('meal-instructions-list');\n\n mealInstructionsList.textContent = `Instructions: ${meal['strInstructions']}`;\n });\n });\n}", "function showFoodCards(\n recipeImage,\n recipeLabel,\n recipeSourceName,\n recipeInstructionsLink\n) {\n searchResults.innerHTML += `\n <div class=\"card\" style=\"width: 18rem;\">\n <div class=\"card-body food-result\"> \n <img src=\"${recipeImage}\" class=\"card-img-top\" alt=\"image of desired food item\">\n <h5 class=\"card-title\">${recipeLabel}</h5>\n <p class=\"card-text\">${recipeSourceName}</p>\n <a href=\"${recipeInstructionsLink}\" target=\"_blank\" class=\"btn btn-primary recipeButton\">Go to Recipe</a>\n <button class=\"btn btn-primary resultsBtn saveBtn\">Save</button>\n </div> \n </div>\n `;\n // save food card to localstorage\n $(saveBtnEl).click(function (event) {\n event.preventDefault();\n event.stopPropagation();\n var foodName = $(this).siblings(\"h5\").text();\n var foodCard = $(this).parent(\"div\").html();\n localStorage.setItem(foodName, foodCard);\n });\n}", "function loadInformation() {\n \n var tdText =\n '<div class=\"container\"> <a href=\"' + item.link + '\" ><img class=\"img-food\" src=\"' + item.image + '\" class=\"image\" > <div class=\"overlay\"><div class=\"text\">' + item.name + ' <br> Price: $' + item.price + ' <br> Rating: ' + item.rating + '/5 <br> Category: ' + item.category + ' </div></div></a></div>'\n cell.innerHTML = tdText;\n \n \n \n }", "function renderOneDrink(drink) {\n var drink_name = drink.fields['Drinks'];\n var ingredients = drink.fields['Ingredients'];\n var drink_pics = drink.fields['Picture'];\n var drink_info = '';\n\n\n if (drink_name) {\n drink_info += '<h3><center><div class=\"panel-footer\">' + ingredients + '</div></center></h3>';\n drink_info +=`<div class=\"panel panel-default>`;\n drink_info +=`<div class=\"panel-body\">`;\n if (drink_pics) {\n $.each(drink_pics, function(i, pic){\n drink_info +=`<center><a href=\"detail.html?drinkID=${drink.id}\"><img src=\"${pic.url}\"></a></center>`;\n });\n }\n drink_info +=`</div>`;\n drink_info +=`</div>`;\n\n }\n $('.drink-detail').append(drink_info);\n}", "function displayResults(result){\n return `\n <div class=\"col s12 m4\">\n <div class=\"card\">\n <div class=\"card-image waves-effect waves-block waves-light\">\n <img class=\" activator js-img\" src=\"${result.recipe.image}\">\n <span class=\"card-title\">${result.recipe.label}</span>\n </div>\n <div class=\"card-content\">\n <span class=\"card-title activator grey-text text-darken-4\"><i class=\"material-icons right\">more_vert</i></span>\n </div>\n <div class=\"card-reveal\">\n <span class=\"card-title grey-text text-darken-4\"><i class=\"small material-icons right\">close</i></span>\n <p class=\"card-txt\">${result.recipe.dietLabels}</p>\n <p class=\"card-txt\" id=\"card-cal\">${Math.round(result.recipe.calories)} Calories</p>\n <p class=\"card-txt\" id=\"card-carb\">${Math.round(result.recipe.totalNutrients.CHOCDF.quantity)}<span>${result.recipe.totalNutrients.CHOCDF.unit} Carbs per serving</span></p>\n <p class=\"card-txt-lines\">${result.recipe.ingredientLines}</p>\n </div>\n <div class=\"card-action\">\n <a href=\"${result.recipe.url}\" target=\"_blank\">Try It Now!</a>\n <button type=\"submit\" aria-label=\"search\" class=\"save-button\" id=\"${result.recipe.label}\" data-imgurl=\"${result.recipe.image}\"> SAVE IT! </button>\n </div>\n </div>\n </div>\n </div>\n `\n }", "function getFoodCategory(category){\n $.ajax({\n url: \"./Content/getRandomRecipe.php\",\n dataType: \"json\",\n type: \"GET\",\n data: {category: category},\n success: function(data) {\n recipeData = data;\n foodCategory = category;\n var content = \"\";\n for (var y = 0; y < data.root.body.recipes.length; y++){\n if(y%2 == 0){\n content += \"<div class=\\\"row hidden-xs hidden-sm\\\"><div class=\\\"col-6\\\"><div id=\\\"breakfast\\\" class=\\\"container-fluid \\\">\"; \n content += \"<a onclick=\\\"getRecipeStep(\" + data.root.body.recipes[y].id + \")\\\"><img class=\\\"img-responsive border-outset\\\" src=\\\"\" + data.root.body.recipes[y].image + \"\\\"/>\";\n content += \"<div id=\\\"breakfastText\\\" class=\\\"container-fluid\\\"><h2>\" + data.root.body.recipes[y].title + \"</h2>\";\n content += \"</div>\";\n content += \"</a></div></div>\";\n } else {\n content += \"<div class=\\\"col-6\\\"><div id=\\\"breakfast\\\" class=\\\"container-fluid\\\">\"; \n content += \"<a onclick=\\\"getRecipeStep(\" + data.root.body.recipes[y].id + \")\\\"><img class=\\\"img-responsive border-outset\\\" src=\\\"\" + data.root.body.recipes[y].image + \"\\\"/>\";\n content += \"<div id=\\\"breakfastText\\\" class=\\\"container-fluid\\\"><h2>\" + data.root.body.recipes[y].title + \"</h2>\";\n content += \"</div>\";\n content += \"</a></div></div></div>\";\n }\n if(y == (data.root.body.recipes.length - 1)){\n if(y%2 ==0){\n content += \"</div>\";\n }\n }\n \n }\n for (var i=0; i < data.root.body.recipes.length; i++){\n content += \"<div id=\\\"favourite\\\" class=\\\"container-fluid hidden-md hidden-lg\\\">\"; \n content += \"<a onclick=\\\"getRecipeStep(\" + data.root.body.recipes[i].id + \")\\\"><img class=\\\"img-responsive border-outset-mini\\\" src=\\\"\" + data.root.body.recipes[i].image + \"\\\"/>\";\n content += \"<div id=\\\"breakfastText\\\" class=\\\"container-fluid\\\"><h3>\" + data.root.body.recipes[i].title + \"</h3>\";\n content += \"</div></a></div>\";\n }\n if(category === undefined){\n content += \"<button href=\\\"?Recipe.html\\\" class=\\\"btn-custom\\\" onclick='getFoodCategory(); return false;'>Show More</button>\";\n } else {\n content += \"<button href=\\\"?Recipe.html\\\" class=\\\"btn-custom\\\" onclick='getFoodCategory(\\\"\" + category + \"\\\"); return false;'>Show More</button>\";\n }\n $(\"#contentArea\").html(content);\n createView(\"Recipe.html&\" + recipeData.root.body.recipes[0].id + \"&\" + recipeData.root.body.recipes[1].id + \"&\" + recipeData.root.body.recipes[2].id + \"&\" + recipeData.root.body.recipes[3].id + \"&\" + recipeData.root.body.recipes[4].id, true);\n\n },\n error: function(jqXHR, textStatus, errorThrown) {\n $(\"#p1\").text(textStatus + \" \" + errorThrown\n + jqXHR.responseText);\n } \n\t});\n}" ]
[ "0.67163694", "0.6495173", "0.6326585", "0.63071424", "0.62476385", "0.617753", "0.61494863", "0.61387634", "0.6118738", "0.61071825", "0.6100399", "0.6098915", "0.60967654", "0.6058859", "0.6057945", "0.60541964", "0.6046508", "0.60142344", "0.6011751", "0.6005503", "0.60010684", "0.5998892", "0.59943485", "0.5990965", "0.5971509", "0.5964093", "0.5958097", "0.5951906", "0.59257174", "0.5922164", "0.589879", "0.5895695", "0.58939016", "0.5887511", "0.586261", "0.5858483", "0.5857345", "0.5856325", "0.5854507", "0.58414906", "0.5826833", "0.582431", "0.5818672", "0.5816178", "0.5813505", "0.5807238", "0.58064604", "0.5790765", "0.57869166", "0.5785374", "0.5784925", "0.57799417", "0.57713145", "0.5766088", "0.57371134", "0.573389", "0.57146037", "0.5713756", "0.5709846", "0.57059926", "0.5698605", "0.5690903", "0.56885743", "0.56826276", "0.56685245", "0.5662616", "0.5662532", "0.56605184", "0.56567425", "0.5652192", "0.56517357", "0.5635688", "0.56300807", "0.5624961", "0.5623112", "0.56222", "0.5619517", "0.55999273", "0.5589511", "0.5588176", "0.55879927", "0.5587301", "0.55853504", "0.55818063", "0.55726105", "0.556634", "0.5563662", "0.55612016", "0.55592775", "0.5558992", "0.5552838", "0.55501616", "0.5548787", "0.55330956", "0.5524529", "0.55185574", "0.5503003", "0.5487029", "0.54808986", "0.5480158" ]
0.6862389
0
Sets the map on all markers in the array.
function setAllMap(map) { for (var i = 0; i < markers.length; i++) { markers[i].setMap(map); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMapOnAll(map) {\n for (var i = 0; i < markersArray.length; i++) {\n markersArray[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\r\n for (var i = 0; i < markers.length; i++) {\r\n markers[i].setMap(map);\r\n }\r\n }", "function setMapOnAll(map){\n for (var i = 0; i < markers.length; i++){\n markers[i].setMap(map);\n }\n \n }", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function setAllMap(map) {\r\n for (var i = 0; i < markers.length; i++) {\r\n markers[i].setMap(map);\r\n }\r\n }", "function setMapOnAll(map) {\r\n for (var i = 0; i < markers.length; i++) {\r\n markers[i].setMap(map);\r\n }\r\n }", "function setMapOnAll(map) {\r\n for (var i = 0; i < markers.length; i++) {\r\n markers[i].setMap(map);\r\n }\r\n }", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function setMapOnAll(map) {\n\t\t for (var i = 0; i < markers.length; i++) {\n\t\t markers[i].setMap(map);\n\t\t }\n\t\t}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n\n }", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function setMapOnAll(map) {\n\t\t\tfor (var i = 0; i < markers.length; i++) {\n\t\t\t\tmarkers[i].setMap(map);\n\t\t\t}\n\t\t}", "function setMapOnAll(map) {\n\t\tfor (var i = 0; i < markers.length; i++) {\n\t\t\tmarkers[i].setMap(map);\n\t\t}\n\t}", "function setAllMap(map) {\n\t\t\t \n\t\t\t for (var i = 0; i < markers.length; i++) {\n\t\t\t\t\n\t\t\t\tmarkers[i].setMap(map);\n\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\t}", "function setMapOnAll(map) {\n\t\tfor (var i = 0; i < markers.length; i++) {\n\t\t markers[i].setMap(map);\n\t\t}\n\t}", "function setMapOnAll(map) {\n for (var i = 0; i < data_markers.length; i++) {\n data_markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\r\n for (var i = 0; i < markers.length; i++) {\r\n markers[i].setMap(map);\r\n }\r\n}", "function setMapOnAll(map) {\r\n for (var i = 0; i < markers.length; i++) {\r\n markers[i].setMap(map);\r\n }\r\n}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n\t\t\t\t for (var i = 0; i < markers.length; i++) {\n\t\t\t\t markers[i].setMap(map);\n\t\t\t\t }\n\t\t\t\t}", "function setAllMap(map) {\n for (var i = 0; i < markerArray.length; i++) {\n markerArray[i].setMap(map);\n }\n}", "function setAllMap(map) {\n\t for (var i = 0; i < markers.length; i++) {\n\t markers[i].setMap(map);\n\t }\n\t}", "function setMapOnAll(map) {\r\n for (var i = 0; i < markers.length; i++) {\r\n markers[i].setMap(map);\r\n }\r\n}", "function setMapOnAll(map) {\n\tfor (var i = 0; i < markers.length; i++) {\n\t\tmarkers[i].setMap(map);\n\t}\n}", "function setMapOnAll(map) {\n\tfor (var i = 0; i < markers.length; i++) {\n\t\tmarkers[i].setMap(map);\n\t}\n}", "function setMapOnAll(map) {\n for(let i = 0; i <markerArr.length; i++) {\n\n markerArr[i].setMap(map)\n }\n}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setAllMap(map) {\n\tfor (var i = 0; i < markers.length; i++) {\n\t\tmarkers[i].setMap(map); \n\t}\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setAllMap(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var j = 0; j < markers.length; j++) {\n markers[j].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setAllMap(map) {\n\n for (var i = 0; i < markers.length; i++) {\n\n markers[i].setMap(map);\n\n }\n\n}", "function setMapOnAll(map) {\n\t for (let i = 0; i < markers.length; i++) {\n\t\tmarkers[i].setMap(map);\n\t }\n\t}", "function setMapOnAll(map) {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function setMapOnAll(map) {\r\n //hace ciclo sobre los marcadores que hemos guardado en la variable markers\r\n for (var i = 0; i < markers.length; i++) {\r\n markers[i].setMap(map);\r\n }\r\n}", "function setAllMap(map) {\r\n for (var i = 0; i < mm.markers.length; i++) {\r\n mm.markers[i].setMap(map);\r\n }\r\n}", "function setMapOnAll(map) {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\n for (var i = 0; i < markers.length; ++i) {\n markers[i].setMap(map);\n locs[i].disp = true;\n }\n}", "function setMapOnAll(m) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(m);\n }\n}", "function setMapOnAll(map) {\n for(let i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n } \n}", "function setMapOnAllMarkers(map) {\n for (var i = 0; i < markersOnMap.length; i++) {\n markersOnMap[i].setMap(map);\n }\n}", "function setAllMap(map) {\n for (var i = 0; i < gmarkers.length; i++) {\n gmarkers[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\r\n for (var i = 0; i < searchMarkers.length; i++) {\r\n searchMarkers[i].setMap(map);\r\n }\r\n }", "function setMapOnAll(mapa) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(mapa);\n }\n}", "function setMapOnAll(map,markers) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function setMapOnAll(map) {\n for (var i = 0; i < $scope.markers.length; i++) {\n $scope.markers[i].setMap(map);\n }\n }", "function setMapOnAll(map) {\n for (let i = 0; i < originMarkersArray.length; i++) {\n originMarkersArray[i].setMap(map);\n }\n for (let i = 0; i < currentMarkersArray.length; i++) {\n currentMarkersArray[i].setMap(map);\n }\n for (var i = 0; i < destinationMarkersArray.length; i++) {\n destinationMarkersArray[i].setMap(map);\n }\n }", "function setMapOnAll(map) {\r\n for (var i = 0; i < MAP_MARKERS.length; i++) {\r\n MAP_MARKERS[i].setMap(map);\r\n }\r\n}", "function setMapOnAll(guhMap) {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(guhMap);\n }\n}", "function setAllMap(map)\n{\n for (var i = 0; i < markers.length; i++)\n {\n markers[i].setMap(map);\n }\n poly.setMap(map);\n}", "function setMapOnAll(map, markers) {\n\tfor (var i = 0; i < markers.length; i++) {\n\t\tmarkers[i].setMap(map);\n\t}\n}", "function setMapOnAll(map) {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n for (let i = 0; i < choiceMarkers.length; i++) {\n choiceMarkers[i].setMap(map);\n } \n for (let i = 0; i < searchResMarkers.length; i++) {\n searchResMarkers[i].setMap(map);\n } \n}//setMapOnAll", "function setMapAll(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n markMessage(i);\n }\n}" ]
[ "0.86419475", "0.8592096", "0.85918146", "0.8581791", "0.8581473", "0.85735416", "0.85723966", "0.857033", "0.857033", "0.85633993", "0.85626596", "0.8554875", "0.8554875", "0.8554875", "0.8554875", "0.85501784", "0.85501784", "0.8547008", "0.85301447", "0.8528565", "0.852266", "0.85212016", "0.85195374", "0.85195374", "0.8519071", "0.85145736", "0.8509597", "0.8503601", "0.85023063", "0.84962493", "0.84962493", "0.8490069", "0.84861", "0.84861", "0.84861", "0.84861", "0.84861", "0.84861", "0.84861", "0.84838307", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.84828955", "0.8481903", "0.8481903", "0.8481903", "0.8481903", "0.8473581", "0.8468", "0.8468", "0.8468", "0.8468", "0.8468", "0.8468", "0.8468", "0.8468", "0.8468", "0.8468", "0.8468", "0.8468", "0.8468", "0.844204", "0.8439633", "0.84381163", "0.8436488", "0.8433422", "0.8387098", "0.83840007", "0.83840007", "0.83668417", "0.83628327", "0.8350178", "0.8339411", "0.8336948", "0.83273566", "0.82962084", "0.82501817", "0.8247294", "0.82193077", "0.8188309", "0.8187457", "0.81860304", "0.8131121", "0.81289554", "0.8101937" ]
0.84972596
29
Removes the markers from the map, but keeps them in the array.
function clearMarkers() { setAllMap(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearMarkers() {\n markers.forEach(function(marker) {\n marker.removeFrom(mymap);\n });\n markers = [];\n}", "function remMarkerSez(){\n for (var x in markerArray){\n\t\t\tmarkerArray[x].setMap(null);\n\t\t }\n}", "function removeMarkers() {\n for (i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n }", "function removeMarkers() {\n for (i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n }", "function removeAllMarkers(){\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n}", "function deleteMarkers() {\r\n for (var i = 0; i < markers.length; i++) {\r\n markers[i].setMap(null);\r\n }\r\n\r\n markers = [];\r\n }", "function removeMarkers() {\n for (var i = 0; i < markers.length; i++) {\n if (markers[i]) {\n markers[i].setMap(null);\n }\n }\n markers = [];\n}", "function removeMarkers()\n{\n // for each marker, remove it from the map\n markers.forEach(function(marker) {\n marker.setMap(null);\n });\n \n // set the matches array length to 0 because: performance™\n markers.length = 0;\n}", "function removeMarkers(){\n for(i=0; i<gmarkers.length; i++){\n gmarkers[i].setMap(null);\n }\n }", "function removeMarkers(){\n for(var i=0; i<markers.length; i++){\n markers[i].setMap(null);\n }\n markers.length = 0;\n}", "function removeMarkers(){\n for(i=0; i<gmarkers.length; i++){\n gmarkers[i].setMap(null);\n }\n }", "function removeMarkers()\n{\n // TODO\n // удаление всех маркеров\n for (var i = 0, n = markers.length; i < n; i++) \n {\n markers[i].setMap(null);\n }\n \n // обнуление указателя размера массива существующих маркеров\n markers.length = 0;\n}", "function removeMarkers() {\n if (markersArray) {\n for (i in markersArray) {\n markersArray[i].setMap(null);\n markersArray.splice(i);\n }\n $(\"#Latitude\").val(\"\");\n $(\"#Longitude\").val(\"\");\n }\n}", "function deleteMarkers() {\n for (var i = 0; i < allMarkers.length; i++) {\n allMarkers[i].setMap(null);\n }\n allMarkers = [];\n}", "function deleteAllMarkers() {\r\n if (_markersArray) {\r\n for (i in _markersArray) {\r\n _markersArray[i].setMap(null);\r\n }\r\n _markersArray.length = 0;\r\n }\r\n }", "function deleteMarkers() {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n }", "function deleteMarkers() {\n var i;\n for (i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n }", "function deleteMarkers() {\r\n setMapOnAll(null);\r\n markers = [];\r\n }", "function deleteMarkers() {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n}", "function removeMarkers()\n{\n if (markers.length != 0)\n {\n for (let i = 0; i < markers.length;i++)\n {\n markers[i].remove();\n }\n }\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n // remove bounds values from boundsArray\n boundsArray = [];\n}", "function remove_markers() {\n\t//Loop through all the markers and remove\n for (var i = 0; i < map.markers.length; i++) {\n\t\t map.markers[i].setMap(null);\n }\n markers = [];\n}", "function clearMarkers() {\n for(var i=0; i<markersArray.length; i++){\n markersArray[i].setMap(null);\n }\n markersArray = [];\n}", "function deleteMarkers() {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n}", "function clearMarkers() {\n\tif (markersArray) {\n\t\tfor (i in markersArray) {\n\t\t\tmarkersArray[i].setMap(null);\n\t\t}\n\t\tmarkersArray.length = 0;\n\t}\n}", "clearMarkers() {\n for(let marker of this.mapMarkers) {\n marker.setMap(null);\n }\n\n this.mapMarkers = [];\n }", "function clearMarkers() {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n }", "function clearMarkers() {\n\tif (markersArray){\n\t\tfor(var i=1;i<markersArray.length;i++){\n\t\t\tmarkersArray[i].setMap(null);\n\t\t}\n\t}\n}", "function deleteMarkers() {\n clearMarkers()\n markerArr = []\n}", "function clearMarkers() {\n // Removes the markers from the map, but keeps them in the array.\n setMapOnAll(null);\n}", "function clearMarkersFromMap()\n{\n markers.forEach( function(element, index, array) {\n element.setMap(null);\n })\n}", "function deleteMarkers() {\n\tfor (var i = 0; i < markers.length; i++) {\n\t\tmarkers[i].setMap(null);\n\t}\n\n\tmarkers = [];\n}", "function removeAllMarkers() {\n for(var i = 0 ; i < allMarkers.length ; i++)\n map.removeLayer(allMarkers[i]);\n \n allMarkers = [];\n}", "function eraseAllLots() {\n markers.forEach(function (marker) {\n marker.setMap(null);\n });\n markers = [];\n}", "function clearMarkers() {\n for (let i = 0; i < activeMarkers.length; i++) {\n activeMarkers[i].setMap(null);\n }\n activeMarkers = [];\n }", "function removeMarkers()\n{\n setMapOnAll(null);\n \n // TODO\n function setMapOnAll(map){\n for (var i = 0; i < markers.length; i++)\n {\n markers[i].setMap(map);\n }\n }\n \n \n}", "clearMarkers()\n {\n while (this.markers.length > 0)\n {\n let marker = this.markers.pop();\n marker.setMap(null);\n }\n }", "function clearMarkers() {\n for (var i = 0; i < markers.length; i++ ) {\n if (markers[i]) {\n markers[i].setMap(null);\n }\n }\n\n // reset markers\n markers = []; \n }", "function clearMarkers() {\n setAllMap(null);\n markers = [];\n}", "function clearMarkers() {\n setAllMap(null);\n markers =[];\n }", "function clearMarkers() {\n for (let i = 0; i < markers.length; i++) {\n if (markers[i]) {\n markers[i].setMap(null);\n }\n }\n markers = [];\n}", "function clearMarkers() {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n}", "function clearMarkers() {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n}", "function clearMarkers() {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n}", "function clearMarkers() {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n}", "function clear_markers() {\n\tfor (var i = 0; i < activeMarkers.length; i++ ) {\n\t\tactiveMarkers[i].setMap(null);\n\t}\n\tactiveMarkers = [];\n}", "function clearMarkers() {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n}", "function clearMarkers() {\n for (var i = 0; i < markers.length; i++) {\n if (markers[i]) {\n markers[i].setMap(null);\n }\n }\n markers = [];\n}", "function clearMarkers() {\n for ( var i=0; i<markersArray.length; i++ ) {\n\tmarkersArray[i].setMap( null );\n\tmarkersArray[i].setVisible( false );\n }\n markersArray = new Array();\n}", "function clearMarkers() {\n for (let i = 0; i < markers.length; i++) {\n if (markers[i]) {\n markers[i].setMap(null);\n }\n }\n markers = [];\n}", "function clearMarkers() {\n setMapOnAll(null);\n markers = [];\n}", "function removeMarkers() {\n\tif(markers_arr.length > 0) {\n \tfor(var i = 0; i < markers_arr.length; i++) {\n\t\t markers_arr[i].setMap(null);\n\t\t}\n }\n if(markerCluster)\n markerCluster.clearMarkers(); \n}", "function deleteOverlays() {\n if (markersArray) {\n for (i in markersArray) {\n markersArray[i].setMap(null);\n }\n markersArray.length = 0;\n }\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n}", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n}", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n}", "function clearMarkers () {\n setMapOnAll(null);\n markersArray.length = 0;\n}", "function clearMarkers() {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n}", "function deleteOverlays() {\n if (markersArray) {\n for (i in markersArray) {\n markersArray[i].setMap(null);\n }\n markersArray.length = 0;\n }\n }", "function clearMarkers() {\n $.each(self.mapMarkers(), function(key, value) {\n value.marker.setMap(null);\n });\n self.mapMarkers([]);\n }", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n }", "function clearOldMarkers(){\n // Clear out the old markers.\n markers.forEach(function(marker) {\n marker.setMap(null);\n });\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function clearMarkers() {\n for (var i = 0; i < busstopMarkers.length; i++) {\n busstopMarkers[i].setMap(null);\n }\n busstopMarkers = [];\n}", "cleanMap() {\n this.savedMarker.forEach(marker => {\n marker.setMap(null);\n });\n this.savedMarker = new Array();\n }", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function removeAllMarkers() {\n displayAllMarkers(null);\n }", "function deleteMarkers() {\n clearMarkers();\n markers1 = [];\n }", "function removeTempMarkers(){\n for(var r = 0; r < temporary_markers.length; r++){\n temporary_markers[r].remove();\n }\n}", "function clearMarkers(markers) {\n // remove from map\n markers.forEach(function (marker) {\n marker.setMap(null);\n });\n\n // remove from array\n markers = [];\n}", "function removeOverlays(markersArray) {\n if (markersArray.length > 0) {\n for (i in markersArray) {\n markersArray[i].setMap(null);\n }\n }\n //markersArray = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function clearMarkers() {\r\n setAllMap(null);\r\n}", "function clearOverlays() {\n if (markersArray) {\n for (i in markersArray) {\n markersArray[i].setMap(null);\n }\n }\n }" ]
[ "0.83624744", "0.8339306", "0.8328489", "0.8328489", "0.8301215", "0.82779366", "0.8271111", "0.82512647", "0.82458705", "0.82372373", "0.82269716", "0.8213937", "0.8189744", "0.81634974", "0.8160817", "0.81574255", "0.81571305", "0.8154514", "0.81432164", "0.8132379", "0.8116505", "0.8114828", "0.8114404", "0.80883807", "0.8085052", "0.8076484", "0.806739", "0.8061222", "0.80518526", "0.805124", "0.80400586", "0.8025704", "0.80249727", "0.8024315", "0.8016552", "0.80109584", "0.80105853", "0.80060923", "0.79997504", "0.7983477", "0.7973709", "0.7967731", "0.7967731", "0.7967731", "0.7967731", "0.79669094", "0.79635805", "0.7956107", "0.79559994", "0.79463303", "0.7938971", "0.79252636", "0.7924838", "0.792366", "0.792366", "0.792366", "0.792366", "0.792366", "0.792366", "0.7921107", "0.7921107", "0.7921107", "0.7919505", "0.7918015", "0.79165316", "0.79164636", "0.7913357", "0.7913071", "0.7907974", "0.7906803", "0.7905889", "0.79024976", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.7899205", "0.78921396", "0.78864324", "0.7885442", "0.7883483", "0.7883355", "0.788089", "0.788089", "0.78794134", "0.78766185" ]
0.0
-1
Shows any markers currently in the array.
function showMarkers() { setAllMap(map); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showMarkers() {\n for (var i=0; i < markers.length; i++) {\n markers[i].setVisible(true);\n }\n }", "function showMarkers() {\n displayAllMarkers(map);\n }", "function showMarkers() {\n\t\t setMapOnAll(map);\n\t\t}", "function showMarkers() {\n\t\t setMapOnAll(map);\n\t\t}", "function showMarkers() {\n\t\t\t \n\t\t\t setAllMap(map);\n\t\t\t\n\t\t\t}", "function showMarkers() {\n setAllMap(map);\n }", "function showMarkers() {\n\t setMapOnAll(map);\n\t}", "function showMarkers() {\n\t\t\t\t setMapOnAll(map);\n\t\t\t\t}", "function showMarkers() {\n setMapOnAll(map);\n }", "function showMarkers() {\n setMapOnAll(map);\n }", "showAllMarkers() {\n\t\tthis.showMarkers(this.markers);\n\t}", "function showMarkers() {\n\tsetAllMap(map);\n}", "function showMarkers() {\r\n setMapOnAll(map);\r\n }", "function showMarkers() {\r\n setMapOnAll(map);\r\n }", "function showMarkers() {\n setMapOnAll(map);\n }", "function showMarkers() {\n setMapOnAll(map);\n }", "function showMarkers() {\n\t\t\tsetMapOnAll(map);\n\t\t}", "function displayMarkers(){\r\n for(var i=0; i<self.markerArray().length; i++){\r\n self.markerArray()[i][1].setVisible(true);\r\n\tself.markerArray()[i][1].setIcon(defaultIcon);\r\n }\r\n}", "function showMarkers() {\n setMapOnAll(map);\n \n }", "function showMarker() {\n for (var i = 0; i < self.markerArray().length; i++) {\n self.markerArray()[i][1].setVisible(true);\n }\n}", "function showMarkers() {\r\n setMapOnAll(map);\r\n }", "function showMarkers() {\n setAllMap(map);\n}", "function showMarkers() {\n setAllMap(map);\n}", "function showMarkers() {\n setAllMap(map);\n}", "function showMarkers() {\r\n setMapOnAll(map);\r\n}", "function showMarkers() {\r\n setMapOnAll(map);\r\n}", "function showMarkers() {\r\n setMapOnAll(map);\r\n}", "function showMarkers() {\n\tsetMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(ourMap);\n}", "function showMarkers() {\n setAllMap(map);\n}", "function showMarkers() {\r\n setMapOnAll(map);\r\n}", "function showAllMarkers() {\n\tsetAllMap(map);\n}", "function showMarkers() {\n setMapOnAll(mainMap);\n}", "function showMarkers(markers) {\n for (var i = 0; i < markers.length; i++) {\n addMarker(markers[i]);\n }\n }", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(map);\n}", "function showMarkers() {\n setMapOnAll(mapa);\n}", "function showMarkers() {\n setMapOnAll(guhMap);\n}", "function showAllMarkers(){\n\tcenterMap();\n\tfor (var i=0, len = mapMarkers.length; i < len; i++){\n\t\tmapMarkers[i].setVisible(true);\n\t}\n\n}", "function showOverlays() {\n if (markersArray) {\n for (i in markersArray) {\n markersArray[i].setMap(map);\n }\n }\n}", "function showOverlays() {\n if (markersArray) {\n for (i in markersArray) {\n markersArray[i].setMap(map);\n }\n }\n}", "function displayAllMarkers(map) {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function showMarkers() {\n\n setAllMap(map);\n\n}", "function showMarkers (marker_array, map) {\n for (var j in marker_array) {\n marker_array[j].marker.setMap(map);\n }\n}", "function showMarkers(){\n for(var i=0;i<self.restaurantList().length;i++){\n var m = self.restaurantList()[i].marker.marker;\n m.setAnimation(null);\n m.setVisible(true);\n }\n }", "function showOverlays() {\n if (manualMarkersArray) {\n for (i in manualMarkersArray) {\n manualMarkersArray[i].setMap(map);\n }\n }\n }", "function showMarkers() {\n // setMapOnAll(map);\n removeLine();\n}", "function showListings() {\n for (var z = 0; z < markers.length; z++) {\n markers[z].setMap(map);\n }\n }", "function displayAllMarkers(map) {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }", "function showMarkers(markers) {\n setMapOnAll(map,markers);\n }", "function setMarkersVisible() {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n}", "function displayMarkers(map) {\n if (self.markers().length > 0) {\n for (i = 0; i < self.markers().length; i++) {\n self.markers()[i].setMap(map);\n }\n }\n }", "function showMarkers(map) {\n setAllMap(map);\n}", "function showMarkers(locations) {\n setMapOnAll(map, locations);\n}", "function showOverlays(map) {\n if (markersArray) {\n for (var i=0; i<markersArray.length; i++) {\n markersArray[i].setMap(map);\n }\n }\n}", "function showHotelOverlays() {\n if (markersArray) {\n for (var i in markersArray) {\n markersArray[i].setMap(gmap);\n }\n }\n}", "function displayMarker(filterMarkers) {\n\tfor (i = 0; i < markers.length; i++) {\n\t\tif (filterMarkers.includes(markers[i])) {\n\t\t\tmarkers[i].setMap(map);\n\t\t} else {\n\t\t\tmarkers[i].setMap(null);\n\t\t}\n\t}\n}", "function clearMarkers() {\n for (var i=0; i < markers.length; i++) {\n markers[i].setVisible(false);\n }\n }", "function showMarkers(markersArray, map) {\n return markersArray.map((elem) => {\n return elem.setMap(map);\n });\n}", "function showMarkers(){\n // Show all markers when the app is open\n markers.forEach(function(marker, index){\n marker.setMap(map);\n });\n}", "function showMarkers() {\r\n myVModel.sQuery('');\r\n var bLimit = new google.maps.LatLngBounds();\r\n for (var x = 0; x < markers.length; x++) {\r\n markers[x].setMap(map);\r\n bLimit.extend(markers[x].position);\r\n }\r\n map.fitBounds(bLimit);\r\n}", "function displayMarkersPlace(place){\r\n for(var i=0;i<self.markerArray().length; i++){\r\n if(place.location.lat == self.markerArray()[i][0].lat && place.location.lng == self.markerArray()[i][0].lng){\r\n self.markerArray()[i][1].setVisible(true);\r\n\t self.markerArray()[i][1].setIcon(defaultIcon);\r\n }\r\n }\r\n}", "function showMarkers() {\n marker.setMap(map);\n}", "function showAllMarkers() {\n setMarkersOnMap(map);\n map.setZoom(12);\n map.setCenter(new google.maps.LatLng(49.246292, -123.116226));\n}", "function showSelectedMarkers() {\n // locations = initMaps();\n\n var count;\n\n for (count = 0; count < locations.length; count++) {\n\n marker = new google.maps.Marker({\n position: new google.maps.LatLng(locations[count][1], locations[count][2]),\n map: map,\n title: locations[count][0],\n animation: google.maps.Animation.DROP\n });\n\n map.setZoom(12);\n\n\n //Attach click event to the marker.\n (function (marker) {\n google.maps.event.addListener(marker, \"click\", function (e) {\n //Wrap the content inside an HTML DIV in order to set height and width of InfoWindow.\n infoWindow.setContent(\"<div style = 'width:200px;min-height:40px'>\" + marker.title + \"</div>\");\n infoWindow.open(map, marker);\n });\n })(marker);\n\n markers.push(marker);\n }\n}", "function setMarkersInvisible() {\n for (var i = 0; i < markersArray.length; i++) {\n markersArray[i].setVisible(false);\n }\n}", "function showListings() {\n let bounds = new google.maps.LatLngBounds();\n // Extend the boundaries of the map for each marker and display the marker\n for (let i = 0; i < markersArray.length; i++) {\n markersArray[i].setMap(map);\n bounds.extend(markersArray[i].position);\n }\n map.fitBounds(bounds);\n}", "function drawAllMarkers(){\n\tfor(var i=0;i<results.length;i++){\n\t\tdrawMarker(results[i],i);\n\t}\n}", "function showItems() {\n \"use strict\";\n var bounds, i;\n if (markers.length > 0) {\n bounds = new google.maps.LatLngBounds();\n\n // Extend the boundaries of the map for each marker\n // and display the marker\n for (i = 0; i < markers.length; i += 1) {\n markers[i].setMap(map);\n bounds.extend(markers[i].position);\n }\n map.fitBounds(bounds);\n } else {\n // no markers - just blank map at initial zoom level\n map.setZoom(13);\n }\n}", "function hideMarkers() {\n\tfor(var i = 0; i < markers.length; i++) {\n\t\tmarkers[i].setVisible(false);\n\t}\n}", "function showMarkers(tipo) {\n for (var i = 0; i < markers.length; i++) {\n if (republicas[i].tipo == tipo) {\n markers[i].setMap(MAP);\n }\n }\n}", "showMarkers(markers, emitVisibleItems) {\n\t\tthis.hideAllMarkers();\n\n\t\tmarkers.forEach((marker) => {\n\t\t\tthis.showMarker(marker.id);\n\t\t});\t\t\t\t\t\n\t}", "function showAllMarker() {\n if (!checkIfAllCategoriesSelected()) {\n var els = new Array();\n for (var i = 0; i < mapTopics.result.topics.length; i++) {\n els.push(mapTopics.result.topics[i].id);\n }\n showTopicFeatures(els, \"\");\n //\n selectAllCategories();\n }\n }", "function hideMarkers(currentMarkers) {\n for (var i = 0; i < currentMarkers.length; i++) {\n currentMarkers[i].setVisible(false);\n }\n} //end setMapOnAll", "function showAllMarkers() {\n var bounds = new google.maps.LatLngBounds();\n // Extend the boundaries of the map for each marker and display the marker\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n markers[i].setAnimation(google.maps.Animation.DROP);\n bounds.extend(markers[i].position);\n }\n google.maps.event.addDomListener(window, 'resize', function() {\n map.fitBounds(bounds); // `bounds` is a `LatLngBounds` object\n });\n map.fitBounds(bounds);\n}", "function setVisible(array) {\n markerList.forEach(function (marker) {\n var title = marker.title;\n\n if (array.indexOf(title) >= 0) {\n marker.setVisible(true);\n } else\n marker.setVisible(false);\n })\n }", "function clearMarkers() {\n displayMarkers(null);\n }" ]
[ "0.83660954", "0.8186145", "0.814078", "0.814078", "0.81302625", "0.81292725", "0.8116352", "0.81025255", "0.8095168", "0.8091384", "0.8081748", "0.8078595", "0.80732024", "0.8072171", "0.8071884", "0.8071884", "0.801003", "0.79556906", "0.7946402", "0.7925289", "0.7904578", "0.78892815", "0.78892815", "0.78892815", "0.7870744", "0.7870744", "0.7870744", "0.7839127", "0.7820163", "0.7820163", "0.7820163", "0.7820163", "0.7820163", "0.7820163", "0.7820163", "0.7820163", "0.7820163", "0.7820163", "0.7820163", "0.77772385", "0.77737594", "0.7752082", "0.7748077", "0.7747005", "0.7745107", "0.77323216", "0.77323216", "0.77323216", "0.77323216", "0.77323216", "0.77323216", "0.77323216", "0.77323216", "0.77323216", "0.77323216", "0.77323216", "0.77323216", "0.77323216", "0.7716334", "0.7716154", "0.7715833", "0.7695004", "0.7695004", "0.7678329", "0.76729435", "0.76162255", "0.7615833", "0.7579134", "0.7577012", "0.7522681", "0.75041795", "0.7498066", "0.7455627", "0.74544555", "0.741316", "0.7385248", "0.7325083", "0.7316724", "0.7311838", "0.72802347", "0.7262185", "0.7255085", "0.7185827", "0.7140218", "0.7100891", "0.7076395", "0.7069294", "0.7067537", "0.7042381", "0.70394427", "0.7037401", "0.7019258", "0.70192385", "0.69896424", "0.6985034", "0.6970434", "0.6965729", "0.6944554", "0.69077057" ]
0.81549734
3
Deletes all markers in the array by removing references to them.
function deleteMarkers() { clearMarkers(); markers = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteMarkers() {\n clearMarkers();\n markers = [];\n // remove bounds values from boundsArray\n boundsArray = [];\n}", "function deleteMarkers() {\n clearMarkers()\n markerArr = []\n}", "function deleteAllMarkers() {\r\n if (_markersArray) {\r\n for (i in _markersArray) {\r\n _markersArray[i].setMap(null);\r\n }\r\n _markersArray.length = 0;\r\n }\r\n }", "function deleteMarkers() {\n for (var i = 0; i < allMarkers.length; i++) {\n allMarkers[i].setMap(null);\n }\n allMarkers = [];\n}", "function deleteMarkers() {\r\n for (var i = 0; i < markers.length; i++) {\r\n markers[i].setMap(null);\r\n }\r\n\r\n markers = [];\r\n }", "function deleteMarkers() {\n\tfor (var i = 0; i < markers.length; i++) {\n\t\tmarkers[i].setMap(null);\n\t}\n\n\tmarkers = [];\n}", "function removeMarkers()\n{\n // TODO\n // удаление всех маркеров\n for (var i = 0, n = markers.length; i < n; i++) \n {\n markers[i].setMap(null);\n }\n \n // обнуление указателя размера массива существующих маркеров\n markers.length = 0;\n}", "function deleteMarkers() {\n var i;\n for (i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n }", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n}", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n}", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n}", "function deleteMarkers() {\r\n setMapOnAll(null);\r\n markers = [];\r\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n marker_count = 0;\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n}", "function deleteMarkers() {\n\t\t clearMarkers();\n\t\t markers = [];\n\t\t}", "function deleteMarkers() {\n clearMarkers();\n markers1 = [];\n }", "function clearMarkers() {\n markers.forEach(function(marker) {\n marker.removeFrom(mymap);\n });\n markers = [];\n}", "removeAllMarkers() {\n\t\tthis.markers.forEach( marker => marker.delete() );\n\t\tthis.markers = [];\n\t\tif( this.markerClusterer ) {\n\t\t\tthis.markerClusterer.clearMarkers();\n\t\t}\n\t}", "function deleteMarkers() {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n }", "function deleteMarkers() {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n markers = [];\n}", "function borrarMarcadores() {\n for (var i = 0; i < markersArray.length; ++i) {\n markersArray[i].setMap(null);\n }\n markersArray = new Array();\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n}", "function remMarkerSez(){\n for (var x in markerArray){\n\t\t\tmarkerArray[x].setMap(null);\n\t\t }\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers.length = 0;\n}", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n }", "function removeMarkers()\n {\n var next;\n while (markerHead)\n {\n next = markerHead[marker].prev;\n delete markerHead[marker];\n markerHead = next;\n }\n }", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n }", "function deleteMarkers() {\n\tclearMarkers();\n\tmarkers = [];\n}", "function deleteMarkers() {\n\tclearMarkers();\n\tmarkers = [];\n}", "function deleteMarkers() {\n\n clearMarkers();\n markers = [];\n\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function removeMarkers()\n{\n // for each marker, remove it from the map\n markers.forEach(function(marker) {\n marker.setMap(null);\n });\n \n // set the matches array length to 0 because: performance™\n markers.length = 0;\n}", "function deleteMarkers() {\n\t\t\tclearMarkers();\n\t\t\tmarkers = [];\n\t\t}", "function deleteMarkers() {\n\t\t\t clearMarkers();\n\t\t\t markers = [];\n\t\t\t}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function clearMarkers() {\n\tif (markersArray) {\n\t\tfor (i in markersArray) {\n\t\t\tmarkersArray[i].setMap(null);\n\t\t}\n\t\tmarkersArray.length = 0;\n\t}\n}", "function deleteMarkers() {\n\t\t\t\t clearMarkers();\n\t\t\t\t markers = [];\n\t\t\t\t}", "function deleteMarkers() {\n clearMarkers();\n clearRows();\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n choiceMarkers = [];\n searchResMarkers = [];\n}//deleteMarkers", "function clearMarkers() {\n for(var i=0; i<markersArray.length; i++){\n markersArray[i].setMap(null);\n }\n markersArray = [];\n}", "function eraseAllLots() {\n markers.forEach(function (marker) {\n marker.setMap(null);\n });\n markers = [];\n}", "function deleteMarker(){\n\n for (var i = 0; i < markerArray.length; i++) {\n markerArray[i].setMap(null);\n }\n\n}", "function removeTempMarkers(){\n for(var r = 0; r < temporary_markers.length; r++){\n temporary_markers[r].remove();\n }\n}", "function ClearMarkers() \n{\n\tfor (var i = 0; i < markersArray.length; i++ ) {\n\t\tmarkersArray[i].setMap(null);\n\t}\n\tmarkersArray = []\n}", "function clearMarkers(markers) {\n // remove from map\n markers.forEach(function (marker) {\n marker.setMap(null);\n });\n\n // remove from array\n markers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n infoViews = [];\n}", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n for(i = 0; i < heatmaps.length; i++){\r\n heatmaps[i].setMap(null)\r\n }\r\n heatmaps = [];\r\n crimeID = [];\r\n }", "function deleteMarkers() {\n clearMarkers();\n markers = [];\n }", "function deleteMarkers() {\n setMapOnAll(null);\n markers.length = 0;\n locations.length = 0;\n console.log(markers);\n}", "function deleteOverlays() {\n if (markersArray) {\n for (i in markersArray) {\n markersArray[i].setMap(null);\n }\n markersArray.length = 0;\n }\n }", "function deleteMarkers() {\n\n // for (var i = 0; i < markers.length; i++) {\n // markers[i].setMap(null);\n // }\n // markers = [];\n\n while (markers.length) {\n var pop = markers.pop();\n pop.setMap(null);\n }\n\n if (markerCluster) {\n markerCluster.clearMarkers();\n }\n\n console.debug(\"Markers cleared\");\n}", "function clearAllMarkers() {\n for (var i = 0; i < googleMarkersArray.length; i++) {\n googleMarkersArray[i].setMap(null);\n }\n googleMarkersArray.length = 0;\n}", "function deleteMarkers() {\n displayAllMarkers(null);\n markers = [];\n }", "function deleteOverlays() {\n if (markersArray) {\n for (i in markersArray) {\n markersArray[i].setMap(null);\n }\n markersArray.length = 0;\n }\n }", "function clearMarkers() {\n\tif (markersArray){\n\t\tfor(var i=1;i<markersArray.length;i++){\n\t\t\tmarkersArray[i].setMap(null);\n\t\t}\n\t}\n}", "function removeMarkers() {\n\tif(markers_arr.length > 0) {\n \tfor(var i = 0; i < markers_arr.length; i++) {\n\t\t markers_arr[i].setMap(null);\n\t\t}\n }\n if(markerCluster)\n markerCluster.clearMarkers(); \n}", "function deleteOverlays() {\n if (markersArray) {\n for (i in markersArray) {\n markersArray[i].setMap(null);\n }\n markersArray.length = 0;\n }\n}", "function deleteOverlays() {\n if (markersArray) {\n for (i in markersArray) {\n markersArray[i].setMap(null);\n }\n markersArray.length = 0;\n }\n}" ]
[ "0.79807633", "0.79240143", "0.7880661", "0.77787656", "0.77312356", "0.7722471", "0.77152866", "0.76681226", "0.76642114", "0.76642114", "0.76642114", "0.766018", "0.7659618", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.764948", "0.76480204", "0.7636397", "0.763061", "0.7626263", "0.7614999", "0.7604691", "0.76030827", "0.76016057", "0.7600516", "0.7600516", "0.7600516", "0.7600516", "0.7600516", "0.7600516", "0.7600516", "0.7600516", "0.7600516", "0.7600516", "0.7600516", "0.7600516", "0.7600516", "0.7595864", "0.75904244", "0.75904244", "0.75904244", "0.75904244", "0.75904244", "0.75904244", "0.75842685", "0.75772077", "0.7573727", "0.75665784", "0.75651723", "0.75651723", "0.7564931", "0.7561892", "0.75548816", "0.75541824", "0.7552345", "0.7545058", "0.7544545", "0.7544545", "0.7530711", "0.75268877", "0.7516893", "0.7516501", "0.74973613", "0.7495912", "0.7494547", "0.7489171", "0.74873173", "0.74818146", "0.7467013", "0.7466037", "0.7460269", "0.74598324", "0.7455205", "0.7447144", "0.74465376", "0.7436392", "0.743105", "0.742482", "0.7422995", "0.7412948", "0.7412948" ]
0.7611798
40
Create a new BrowserWindow when `app` is ready
function createWindow () { //window state keeper let state = windowStateKeeper({ defaultWidth: 500, defaultHeight: 650 }); mainWindow = new BrowserWindow({ x: state.x, y: state.y, width: state.width, height: state.height, minWidth: 350, maxWidth: 650, minHeight: 300, webPreferences: { nodeIntegration: true }, show: false }) // Load index.html into the new BrowserWindow mainWindow.loadFile('renderer/main.html'); //manage the window state with state keeper state.manage(mainWindow); // Open DevTools - Remove for PRODUCTION! //mainWindow.webContents.openDevTools(); // Listen for window being closed mainWindow.on('closed', () => { mainWindow = null }) mainWindow.once('ready-to-show', mainWindow.show); appMenu.currentMenu(mainWindow.webContents); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_initWindow() {\n this._window = new BrowserWindow({\n focusable: false,\n show: false\n });\n\n this._window.loadURL(Notifier.PathToWindow);\n }", "function createMainWindow() {\n mainWindow = new BrowserWindow({\n width: WIDTH,\n height: HEIGHT,\n icon: path.join(__dirname, \"resource/icon.ico\")\n })\n mainWindow.on(\"close\", () => {\n mainWindow = null;\n })\n // Load init page\n mainWindow.loadURL(url.format({\n pathname: path.join(__dirname, \"index.html\"),\n protocol: \"file:\",\n slashes: true\n }))\n}", "function createWindow() {\n mainWindow = new BrowserWindow( { width: 800, height: 600 } );\n\n mainWindow.on('closed', () => {\n //console.log(\"mainwindow closed!\");\n mainWindow = null;\n });\n\n let loadURL = url.format({\n pathname: path.join(__dirname, 'index.html'),\n protocol: 'file:',\n slashes: true,\n });\n\n //console.log(\"loading \" + loadURL.toString());\n mainWindow.loadURL(loadURL);\n}", "function createWindow() {\n\tdisplay = electron.screen.getPrimaryDisplay();\n\twidth = display.bounds.width;\n\theight = display.bounds.height;\n\t// Create the browser window.\n\twin = new BrowserWindow({\n\t\twidth: 100,\n\t\theight: 50,\n\t\tmovable: false,\n\t\tresizable: false,\n\t\tx: width - 20,\n\t\ty: height - 20,\n\t\tframe: false,\n\t\tautoHideMenuBar: true,\n\t\talwaysOnTop: true\n\t});\n\n\t// and load the index.html of the app.\n\twin.loadFile('app/index.html');\n}", "function createWindow() {\n mainWindow = new BrowserWindow({ width: 680, height: 520, titleBarStyle: 'hidden', title: 'elabel' ,icon: iconPath });\n mainWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'index.html'),\n protocol: 'file:',\n slashes: true\n }));\n //abre o devtools do browser, em produção isso deve estar comentado\n if (process.env.MODE == \"dev\") {\n mainWindow.webContents.openDevTools();\n } \n\n //ao acionar o fechamento da janela executar\n mainWindow.on('closed', () => {\n mainWindow = null;\n });\n\n //chamada de metodo ao finalizar o carregamento da janela\n mainWindow.webContents.on('did-finish-load', () => {\n //disparar a ação estabelecida em render ao terminar o carregamento\n mainWindow.webContents.send('did-finish-load');\n });\n}", "function createWindow() {\n // Create the browser window.\n win = new BrowserWindow({ width: 1920, height: 1080, minWidth: 1024, minHeight: 576 });\n win.maximize();\n\n // and load the index.html of the app.\n win.loadURL(url.format({\n pathname: path.join(__dirname, 'index.html'),\n protocol: 'file:',\n slashes: true\n }));\n //Remove the top menu bar\n //win.setMenu(null);\n //Set maximized\n}", "function createWindow() {\n // Create the browser window.\n\n // Make sure content is always shown on big screen, never collapsed together\n // Windows adds the scrollbar inside of the window\n // mainWindow = new BrowserWindow(});\n\n // and load the index.html of the app.\n if (isDev) {\n mainWindow.loadURL('http://localhost:4200');\n mainWindow.webContents.openDevTools();\n } else {\n mainWindow.loadURL('file://' + __dirname + '/build_client/index.html');\n }\n\n // Emitted when the window is closed.\n mainWindow.on('closed', function() {\n // Dereference the window object, usually you would store windows\n // in an array if your app supports multi windows, this is the time\n // when you should delete the corresponding element.\n mainWindow = null;\n });\n\n require('./electron/menu');\n}", "function createWindow() {\r\n // create the browser window prefrence\r\n main_window = new BrowserWindow({\r\n width: 700, height: 600,\r\n webPreferences:{\r\n // nodeIntegration : false is the default value from electron 5 and over\r\n nodeIntegration : false,\r\n // contextIsolation : true protect against prototype pollution\r\n contextIsolation : true,\r\n // turn off remote\r\n enableRemoteModule: false,\r\n // use preload to connect html to main script\r\n preload: path.join(__dirname, \"preload.js\")\r\n }\r\n });\r\n // load the html file to make the window\r\n main_window.loadFile(path.join(__dirname, \"index.html\"));\r\n}", "function createWindow() {\n win = new BrowserWindow();\n win.loadURL(url.format({\n pathname: path.join(__dirname, \"/client/index.html\"),\n protocol: \"file\",\n slashes: true\n }));\n\n win.on(\"closed\", function () {\n win = null\n });\n\n createServer();\n createSocketServer();\n}", "constructor(application, settings = {}) { \n this.application = application\n this.settings = settings\n this.browserWindow = null\n // const {appHomePath, pathToOpen} = settings\n\n const options = {\n show: true,\n title: 'Morning',\n backgroundColor: \"#fff\",\n width: 800,\n height: 600\n }\n\n this.browserWindow = new BrowserWindow(options)\n this.browserWindow.loadURL('https://www.google.com.hk')\n\n // this.application.addWindow(this)\n\n this.handleEvents()\n\n // loadSettings.appHome = process.env.MORNING_HOME\n \n \n // this.browserWindow.on('window:loaded' , function () {\n\n // })\n }", "function createWindow() {\n mainWindow = new BrowserWindow({width: 1200, height: 768});\n mainWindow.loadURL('file://' + __dirname + '/index.html');\n\n mainWindow.on('closed', function() {\n mainWindow = null;\n });\n}", "function createWindow () {\n console.log('starting up browser window');\n const win = new BrowserWindow({\n width: 800,\n height: 600,\n webPreferences: {\n nodeIntegration: true\n }\n });\n const view = new BrowserView();\n\n console.log('setting browserview')\n win.setBrowserView(view);\n view.setBounds({ x: 0, y: 0, width: 600, height: 400 });\n view.webContents.loadURL('https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_a_target');\n //view.webContents.openDevTools({mode: 'detach'});\n\n win.loadFile('index.html');\n}", "function createWindow()\n{\n const mainWindow = new BrowserWindow(\n {\n minWidth: 400,\n minHeight: 500,\n maxWidth: 400,\n maxHeight: 500,\n width:400,\n height:500,\n frame: false,\n webPreferences: {\n nodeIntegration: true,\n contextIsolation: false,\n enableRemoteModule: true\n }\n })\n mainWindow.webContents.openDevTools();\n\n /*\n So im going to use a tab system, which will be handled in the HTML/css i think\n I would /like/ multiple windows but i havent figured that out yet\n */\n // what should be displayed\n mainWindow.loadFile('v2.html')\n\n //historyWindow.loadFile('historyPane.html')\n // ctrl+r to reload app\n\n}", "function createMainWindow() {\n // Create the browser window.\n mainWindow = new BrowserWindow({\n width: 1100,\n height: 800,\n kiosk: false,\n frame: true,\n })\n\n // Load app index page.\n mainWindow.loadURL(url.format({\n pathname: path.join(__dirname, '../../main_window/index.html'),\n protocol: 'file:',\n slashes: true\n }))\n\n // Open the DevTools.\n if (DEV_MODE)\n mainWindow.webContents.openDevTools()\n\n // Emitted when the window is closed.\n mainWindow.on('closed', function () {\n mainWindow = null\n app.quit()\n })\n}", "createWindow() {\n this.win = new BrowserWindow({\n width: 800,\n height: 460,\n useContentSize: true,\n minimizable: false,\n resizable: false,\n fullscreenable: false,\n show: false,\n backgroundColor: '#c4c6c4',\n icon: path.join(__dirname, '../assets/icons/cookie-jar.png'),\n webPreferences: {\n nodeIntegration: true,\n enableRemoteModule: true,\n contextIsolation: false\n }\n });\n this.win.loadFile('view/welcome.html');\n\n this.win.once('ready-to-show', () => {\n this.win.show();\n });\n\n this.win.on('close', function(e){\n const choice = dialog.showMessageBoxSync(this,\n {\n type: 'question',\n buttons: ['Yes', 'No'],\n title: 'Confirm',\n message: 'Are you sure you want to quit? All unsaved sessions will be lost!'\n });\n if(choice == 1){\n e.preventDefault();\n }\n });\n }", "function createWindow () {\n\n let win = new BrowserWindow({\n width: 800,\n height: 600,\n webPreferences: {\n nodeIntegration: true\n }\n })\n\n // html injection point\n win.loadFile('./app/index.html')\n\n // dev Tools\n win.webContents.openDevTools()\n}", "function createWindow() {\r\n\t//studio-app's html\r\n\thome_win = new BrowserWindow({width: 800, height:600})\r\n\thome_win.loadFile('test-index.html')\r\n\t\r\n\t//project #1's home page html\r\n\ttest_win = new BrowserWindow({parent: home_win, show: false})\r\n\ttest_win.loadFile('project1/test.html')\r\n\t\r\n\thome_win.webContents.openDevTools()\r\n\t\r\n\thome_win.on('closed', () => {\r\n\t\thome_win = null\t\r\n\t})\r\n}", "function createWindow(){\n\twin = new BrowserWindow({width: 800, height: 600, minHeight: 500, minWidth: 400})\n\n//The line below tells the window to maximize on startup\t\n\twin.maximize();\n\n/*The block below is for determining the html sequence. \nIf it is the user's first time opening the app, it will load the welcome page and then ask to create a team,\ninput staff and players, and input practices/games. \nIf it is not the first time, it will load the home page.\n*/\n\tif (appstate[\"State\"] === \"First Time\") {\n\t\twin.loadURL(`file://${__dirname}/index.html`);\n\t\tappstate[\"State\"] = \"Not First Time\";\n\t\t\n\t\tfs.writeFile(\"Data Storage/appstate.JSON\", JSON.stringify(appstate, null, \"\\t\"), function (err) {\n\t\t\tif (err != undefined) {\n\t\t\t\talert(err.message,\"State Save error\")\n\t\t\t}\n\t\t});\n\t}\n\telse {\n\t\twin.loadURL(`file://${__dirname}/home.html`);\n\t}\n\n\n\twin.on('closed', () => {\n\t\twin=null\n\t});\n}", "function createBrowserWindow() {\n // create the browser window\n const currentWindow = new BrowserWindow({\n width: 1380,\n height: 700\n });\n\n // maximize the window\n currentWindow.maximize();\n\n // load the index file of the application\n currentWindow.loadFile('./public/index.html');\n //open dev tools\n // currentWindow.webContents.openDevTools();\n }", "function createWindow(){\n //Create Browser window\n mainWindow = new BrowserWindow({width: 800, height: 600, icon: __dirname+'assets/icons/egress.png' });\n\n //load index.html\n mainWindow.loadURL(url.format({\n protocol: \"file:\",\n slashes: true,\n pathname: path.join(__dirname, 'index.html')\n }));\n\n //load devtools\n //win.webContents.openDevTools();\n\n //Setting the Mainmenu\n const mainMenu = Menu.buildFromTemplate(mainMenuTemplate)\n\n //Start IPFS node\n startIpfsDaemon();\n\n mainWindow.on('closed', ()=>{\n app.quit();\n });\n}", "function CreateWindow()\n{\n // Create browser window\n window = new BrowserWindow(\n {\n width: 1400,\n height: 600,\n minWidth: 1000,\n minHeight: 600,\n center: true,\n icon: __dirname + '\\\\Assets\\\\Images\\\\Icon\\\\[email protected]',\n frame: false\n });\n\n // Load index.html\n window.loadURL(url.format(\n {\n pathname: path.join(__dirname, '../../index.html'),\n protocol: 'file',\n slashes: true\n }));\n\n // Open devtools\n window.webContents.openDevTools();\n\n window.on('closed', () =>\n {\n window = null;\n });\n}", "function createWindow() {\n // Create the browser window.\n mainWindow = new BrowserWindow({\n width: 800,\n height: 300,\n frame: false\n })\n\n // and load the index.html of the app.\n mainWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'index.html'),\n protocol: 'file:',\n slashes: true\n }))\n\n mainWindow.setResizable(false);\n\n // Open the DevTools.\n //mainWindow.webContents.openDevTools()\n\n // Emitted when the window is closed.\n mainWindow.on('closed', function() {\n // Dereference the window object, usually you would store windows\n // in an array if your app supports multi windows, this is the time\n // when you should delete the corresponding element.\n logger.log('debug', \"App was closed\");\n mainWindow = null\n })\n\n}", "function createWindow() {\n // Create the browser window.\n mainWindow = new BrowserWindow({ width: 1200, height: 900 })\n mainWindow.setResizable(false);\n mainWindow.setMaximizable(false);\n mainWindow.setTitle(\"Suveer Jacob -- 10406838\");\n\n mainWindow.loadURL('http://localhost:3000/');\n\n // Open the DevTools.\n //mainWindow.webContents.openDevTools({ mode: \"undocked\" });\n\n\n // Emitted when the window is closed.\n mainWindow.on('closed', function () {\n // Dereference the window object, usually you would store windows\n // in an array if your app supports multi windows, this is the time\n // when you should delete the corresponding element.\n mainWindow = null;\n })\n }", "function bootWindow(){\n const win = new BrowserWindow({\n show: false,\n title: 'Tic Tac Toe'\n });\n win.loadFile('game/html/index.html');\n win.on('ready-to-show', () => win.maximize());\n\n win.webContents.on('new-window', (event, url) => {\n event.preventDefault();\n shell.openExternal(url);\n });\n win.webContents.openDevTools();\n}", "function createWindow() {\n let window = new BrowserWindow({\n width: 800,\n height: 600,\n title: 'Live Telemetry - Einstein Motorsport',\n autoHideMenuBar: true,\n icon: path.join(__dirname, 'img/logo-black-128x128.png'),\n webPreferences: {\n nodeIntegration: true\n }\n });\n\n // Load index.html file as main entry\n window.loadFile('index.html');\n}", "function createWindow() {\n\n // Create window\n win = new BrowserWindow({\n backgroundColor: '#ffffff',\n icon: `file://${__dirname}/dist/assets/logo.png`,\n });\n\n win.maximize();\n\n // Load window\n // win.loadURL(`file://${__dirname}/dist/index.html`);\n if (serve) {\n\n // Reload app on changes\n require('electron-reload')(__dirname, {\n electron: require(`${__dirname}/../node_modules/electron`),\n });\n\n // Load Angular serve URL\n win.loadURL('http://localhost:4201');\n\n } else {\n\n // Load already built index.html\n win.loadURL(url.format({\n pathname: path.join(__dirname, 'public/index.html'),\n protocol: 'file:',\n slashes: true\n }));\n }\n\n // Uncomment if want to open Chromium DevTools during Development\n win.webContents.openDevTools();\n\n // Event when window is closed\n win.on('closed', function () {\n win = null;\n });\n\n}", "function createWindow() {\n\n\n mainWindow = new BrowserWindow({\n width: 1000,\n height: 700,\n webPreferences: {\n experimentalFeatures: true,\n },\n })\n\n // and load the index.html of the app.\n mainWindow.loadURL(url.format({\n pathname: path.join(__dirname, './main-window/index.html'),\n protocol: 'file:',\n slashes: true\n }))\n\n // Open the DevTools.\n\n mainWindow.webContents.openDevTools()\n\n // Emitted when the window is closed.\n mainWindow.on('closed', function () {\n mainWindow = null\n app.quit()\n })\n}", "function createWindow() {\n //\n // Create Main Window ...\n mainWindow = new BrowserWindow({\n show: false,\n icon: iconPath,\n width: isDevelopment ? 1200 : 800,\n height: isDevelopment ? 800 : 600,\n webPreferences: {\n nodeIntegration: true,\n },\n });\n\n //\n mainWindow.webContents.on('new-window', function(e, url) {\n e.preventDefault();\n shell.openExternal(url);\n });\n\n //\n mainWindow.webContents.on('will-navigate', function(e, url) {\n e.preventDefault();\n mainWindow.loadURL(mainUrl);\n });\n\n //\n // Prepare Main Url ...\n mainUrl = url.format({\n pathname: path.join(__dirname, '/www/index.html'),\n protocol: 'file',\n slashes: true,\n });\n\n //\n // Load Content on Main Window ...\n mainWindow.loadURL(\n mainUrl\n );\n\n //\n // Remove Browser Window Default menu ...\n mainWindow.removeMenu();\n\n //\n // Open Dev Tools on Development environment ...\n if (isDevelopment) {\n mainWindow.webContents.openDevTools();\n }\n\n //\n // Handle Window Closed ...\n mainWindow.on('closed', () => {\n mainWindow = null;\n });\n\n //\n // Handle Window Close ...\n mainWindow.on('close', (e) => {\n //\n if (!app.isClosing) {\n //\n e.preventDefault();\n mainWindow.hide();\n }\n\n //\n return true;\n });\n}", "function createWindow() {\n // Create the browser window.\n mainWindow = new BrowserWindow({\n width: 1000,\n height: 800,\n webPreferences: {\n nodeIntegration: true\n },\n show: false\n })\n\n mainWindow.maximize()\n\n mainWindow.loadFile('index.html')\n // Build menu from template\n const mainMenu = Menu.buildFromTemplate(mainMenuTemplate)\n // Insert menu\n Menu.setApplicationMenu(mainMenu)\n\n mainWindow.once('ready-to-show', () => {\n mainWindow.show()\n })\n\n // Emitted when the window is closed.\n mainWindow.on('closed', function () {\n // Dereference the window object, usually you would store windows\n // in an array if your app supports multi windows, this is the time\n // when you should delete the corresponding element.\n app.quit()\n })\n}", "function createWindow() {\n win = new BrowserWindow({\n minHeight: 1000,\n minWidth: 1200,\n maxHeight: 1000,\n maxWidth: 1200,\n title: 'Blockchain Analytics',\n backgroundColor: '#edeeee',\n icon: path.join(__dirname, 'assets/icons/png/64x64.png'), //load and display dock icon (need to make one)\n show: false,\n webPreferences: {\n blinkFeatures: 'CSSStickyPosition'\n }\n });\n //load the single-page application html doc (which, in turn, loads scripts/aux.js and styles.css)\n win.loadURL(url.format({\n pathname: path.join(__dirname, 'index.html'),\n protocol: 'file:',\n slashes: true\n }));\n\n // Open the DevTools.\n //win.webContents.openDevTools()\n\n //when display elements are ready, show and focus on the window\n win.on('ready-to-show', function() {\n win.show();\n win.focus();\n win.maximize();\n });\n\n //when the window is closed, terminate the window, user, and lastSession variables\n win.on('closed', () => {\n win = null\n user = {}\n lastSession = {}\n });\n}", "function createWindow() {\n mainWindow = new BrowserWindow({\n width: 900,\n height: 680,\n icon: `${__dirname}/images/logo.png`,\n titleBarStyle: 'hidden',\n backgroundColor: '#282c34',\n darkTheme: true,\n webPreferences: {\n nodeIntegration: true,\n enableRemoteModule: true,\n },\n })\n\n // mainWindow.maximize()\n mainWindow.menuBarVisible = false\n\n // Loading the web application\n mainWindow.loadURL(\n isDev\n ? 'http://localhost:3000'\n : `file://${path.join(__dirname, '../build/index.html')}`,\n )\n\n if (isDev) {\n mainWindow.webContents.openDevTools()\n }\n\n mainWindow.once('ready-to-show', () => {\n if (!mainWindow) {\n throw new Error('\"mainWindow\" is not defined')\n }\n if (process.env.START_MINIMIZED) {\n mainWindow.minimize()\n } else {\n mainWindow.show()\n mainWindow.focus()\n }\n })\n\n // Open urls in the user's browser\n mainWindow.webContents.on('new-window', (event, url) => {\n event.preventDefault()\n shell.openExternal(url)\n })\n\n mainWindow.on('closed', () => {\n mainWindow = null\n })\n}", "function createWindow() {\n win = new BrowserWindow({\n x: config.position.x,\n y: config.position.y,\n width: config.position.width,\n height: config.position.height,\n frame: false,\n show: false,\n fullscreen: false && config.fullscreen,\n webPreferences: {\n nodeIntegration: true,\n webviewTag: true\n }\n })\n\n if (!isProd) {\n win.webContents.openDevTools()\n }\n\n // if (isProd)\n // win.setAlwaysOnTop(true, 'screen-saver')\n global.__dirname = __dirname\n win.loadURL(path.join('file://', __dirname, './index.html'))\n\n win.webContents.session.clearCache()\n\n win.webContents.on('did-finish-load', () => {\n win.setTitle(app.name)\n win.show()\n })\n\n win.on('closed', () => {\n win = null\n app.quit()\n })\n\n let timerId\n\n win.on('minimize', () => {\n timerId = setTimeout(() => {\n win.restore()\n }, config.expanding * 1000)\n })\n\n win.on('restore', () => {\n clearTimeout(timerId)\n })\n}", "function createAddWindow(){\r\n //Create new window\r\n addWindow=new BrowserWindow({\r\n parent:mainWindow,\r\n width:300,\r\n height:200,\r\n modal:true,\r\n show:false,\r\n title:'Add Shopping List Item',\r\n webPreferences: {\r\n nodeIntegration: true\r\n }\r\n });\r\n //Load hyml into window\r\n addWindow.loadURL(url.format({\r\n pathname:path.join(__dirname,'addItem.html'),\r\n protocol:'file',\r\n slashes:true\r\n }));\r\n //Set menu to null\r\n addWindow.setMenu(null);\r\n\r\n addWindow.once('ready-to-show', () => {\r\n addWindow.show()\r\n })\r\n\r\n //Garbage collection handle\r\n addWindow.on('close',function(){\r\n addWindow=null;\r\n });\r\n}", "function createWindow() {\n // Create the browser window.\n mainWindow = new BrowserWindow({ width: 1000, height: 700 })\n\n // Load app index page.\n mainWindow.loadURL(url.format({\n pathname: path.join(__dirname, './main_window.html'),\n protocol: 'file:',\n slashes: true\n }))\n\n // Open the DevTools.\n // Open the DevTools.\n if (DEV_MODE) {\n mainWindow.webContents.openDevTools()\n }\n mainWindow.webContents.openDevTools()\n\n // Emitted when the window is closed.\n mainWindow.on('closed', function () {\n mainWindow = null\n app.quit()\n })\n}", "function createWindow() {\n var widthsize = ElectronConfig.width;\n var heightsize = ElectronConfig.height;\n mainWindow = new BrowserWindow({\n backgroundColor: ElectronConfig.backgroundColor,\n width: widthsize,\n height: heightsize,\n resizable: ElectronConfig.resizeable,\n titleBarStyle: ElectronConfig.titleBar,\n hasShadow: ElectronConfig.shadow,\n frame: ElectronConfig.frame,\n show: ElectronConfig.show\n });\n mainWindow.on(\"ready-to-show\", function() {mainWindow.show()});\n mainWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'index.html'),\n protocol: 'file:',\n slashes: true\n }));\n mainWindow.on(\"closed\", function() {mainWindow = null});\n}", "function createWindow() {\n\twin = new BrowserWindow({width: 800, height: 600}); // Create the browser window\n\twin.loadURL(\"file://\" + __dirname + \"/index.html\"); // Load the page of the app\n\twin.webContents.openDevTools(); // Open the developer tools\n\n\twin.on(\"closed\", function() { // The user closed the window\n\t\twin = null; // Discard our reference to the window object\n\t});\n}", "function mainWindow()\n{\n\n\twin = new BrowserWindow({\n\t\twidth: 2048,\n\t\theight: 864,\n\t\tframe: false\n\t});\n\n\twin.loadURL('http://localhost:' + process.env.PORT + '/');\n\n\twin.on('closed', () => {\n\t\twin = null\n\t});\n\n\twin.webContents.openDevTools();\n\n\twin.webContents.on('devtools-opened', () => {\n\t\twin.webContents.closeDevTools();\n\t});\n}", "function createWindow () {\r\n mainWindow = new BrowserWindow({\r\n show: false,\r\n backgroundColor: '#000',\r\n width: 1024,\r\n height: 768,\r\n })\r\n\r\n // mainWindow.setMenu(null)\r\n\r\n mainWindow.once('ready-to-show', () => {\r\n mainWindow.show()\r\n })\r\n\r\n // display the index.html file\r\n mainWindow.loadURL(`file://${ __dirname }/index.html`)\r\n\r\n // open dev tools by default so we can see any console errors\r\n mainWindow.webContents.openDevTools()\r\n\r\n mainWindow.on('closed', () => {\r\n mainWindow = null\r\n })\r\n}", "async function createWindow() {\n // install react dev tools if we are in development mode\n // this will happen before creating the browser window. it returns a Boolean whether the protocol of scheme 'app://' was successfully registered and a file (index-prod.html) was sent as the response\n protocol.registerBufferProtocol(Protocol.scheme, Protocol.requestHandler);\n\n // Create the browser window.\n win = new BrowserWindow({\n // full screen\n width: 1920,\n height: 1080,\n\n minWidth: 980,\n // window title\n title: 'ReacType',\n // the browser window will not display initially as it's loading\n // once the browser window renders, a function is called below that hides the splash screen and displays the browser window\n show: false,\n webPreferences: {\n zoomFactor: 0.7,\n // enable devtools when in development mode\n devTools: true,\n // crucial security feature - blocks rendering process from having access to node modules\n nodeIntegration: true,\n // web workers will not have access to node\n nodeIntegrationInWorker: false,\n // disallow experimental feature to allow node.js support in sub-frames (i-frames/child windows)\n nodeIntegrationInSubFrames: true,\n // runs electron apis and preload script in a separate JS context\n // separate context has access to document/window but has it's own built-ins and is isolate from changes to global environment by located page\n // Electron API only available from preload, not loaded page\n contextIsolation: true,\n // disables remote module. critical for ensuring that rendering process doesn't have access to node functionality\n enableRemoteModule: true,\n // path of preload script. preload is how the renderer page will have access to electron functionality\n preload: path.join(__dirname, 'preload.js'),\n nativeWindowOpen: true\n }\n });\n\n // Splash screen that appears while loading\n // const hideSplashscreen = initSplashScreen({\n // mainWindow: win,\n // icon: resolve('app/src/public/icons/png/64x64.png'),\n // url: OfficeTemplate,\n // width: 500,\n // height: 300,\n // brand: 'OS Labs',\n // productName: 'ReacType',\n // logo: resolve('app/src/public/icons/png/64x64.png'),\n // color: '#3BBCAF',\n // website: 'www.reactype.io',\n // text: 'Initializing ...',\n // });\n // Load app\n if (isDev) {\n // load app from web-dev server\n win.loadURL(selfHost);\n } else {\n // load local file if in production\n win.loadURL(`${Protocol.scheme}://rse/index-prod.html`);\n }\n\n // load page once window is loaded\n win.once('ready-to-show', () => {\n win.show();\n });\n\n // automatically open DevTools when opening the app\n // Note: devtools is creating many errors in the logs at the moment but can't figure out how to resolve the issue\n if (isDev) {\n win.webContents.once('dom-ready', () => {\n debug();\n win.webContents.openDevTools();\n });\n }\n\n // Emitted when the window is closed.\n win.on('closed', () => {\n // Dereference the window object, usually you would store windows\n // in an array if your app supports multi windows, this is the time\n // when you should delete the corresponding element.\n app.quit();\n });\n\n menuBuilder = MenuBuilder(win, 'ReacType');\n menuBuilder.buildMenu();\n\n // Removed this security feature for now since it's not being used\n // https://electronjs.org/docs/tutorial/security#4-handle-session-permission-requests-from-remote-content\n // TODO: is this the same type of sessions that have in react type\n // Could potentially remove this session capability - it appears to be more focused on approving requests from 3rd party notifications\n const ses = session;\n\n const partition = 'default';\n ses\n .fromPartition(partition)\n .setPermissionRequestHandler((webContents, permission, callback) => {\n const allowedPermissions = []; // Full list here: https://developer.chrome.com/extensions/declare_permissions#manifest\n\n if (allowedPermissions.includes(permission)) {\n callback(true); // Approve permission request\n } else {\n console.error(\n `The application tried to request permission for '${permission}'. This permission was not whitelisted and has been blocked.`\n );\n\n callback(false); // Deny\n }\n });\n\n // https://electronjs.org/docs/tutorial/security#1-only-load-secure-content;\n // The below code can only run when a scheme and host are defined, I thought\n // we could use this over _all_ urls\n ses\n .fromPartition(partition)\n .webRequest.onBeforeRequest(\n { urls: ['http://localhost./*'] },\n (listener) => {\n if (listener.url.indexOf('http://') >= 0) {\n listener.callback({\n cancel: true\n });\n }\n }\n );\n}", "function createWindow(){\r\n //create window and open index web page\r\n win = new BrowserWindow({width: 800, height: 600});\r\n win.loadFile('index.html');\r\n\r\n win.webContents.openDevTools();//open dev tools\r\n\r\n win.on('closed', () => {\r\n //if win is array then delete all elements to clear all windows\r\n win = null;\r\n });\r\n}", "function createWindow() {\n\n // Create a browser window\n var win = new BrowserWindow({\n show: false,\n width: 8000,\n height: 8000,\n webPreferences: {\n nodeIntegration: true\n }\n });\n\n // Load index.html \n win.loadURL('file://' + __dirname + '/index.html');\n\n}", "function createWindow () {\n /**\n * Initial window options\n */\n mainWindow = new BrowserWindow({\n height: 563,\n useContentSize: true,\n width: 1000,\n frame: false,\n webPreferences: {\n nodeIntegrationInWorker: true,\n webSecurity: false\n },\n icon: require('path').join(__static, 'icon.png'),\n show: false,\n backgroundColor: '#3050ff',\n minWidth: 1000,\n minHeight: 563\n })\n\n mainWindow.loadURL(winURL)\n mainWindow.on('ready-to-show', () => {\n mainWindow.show()\n })\n mainWindow.on('closed', () => {\n mainWindow = null\n })\n}", "function createMainWindow() {\n //Crétion de la novelle fenêtre\n mainWindow = new BrowserWindow({\n icon: path.join(__dirname, '/img/mainIco.png'),\n width: 870,\n height: 565,\n webPreferences: {\n nodeIntegration: true\n },\n transparent: true,\n frame: false,\n });\n\n //Chargement la page HTML dans l'application\n mainWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'views/accueil.html'),\n protocol: 'file:',\n slashes: true\n }));\n\n\n\n //Quit app when closed\n //fermer toutes les fenetres à la fermeture de la fenêtre mere\n mainWindow.on('closed', function () {\n // Dereference the window object, usually you would store windows\n // in an array if your app supports multi windows, this is the time\n // when you should delete the corresponding element.\n mainWindow = null\n app.quit();\n });\n\n // Open the DevTools.\n //mainWindow.webContents.openDevTools();\n\n //Construction du menu\n //const mainMenu = Menu.buildFromTemplate(mainMenuTemplate);\n //Insertion du l'item dans le menu\n //Menu.setApplicationMenu(mainMenu);\n}", "function createWindow() {\n mainWindow = new BrowserWindow({\n width: 1200,\n minWidth: 1200,\n height: 800,\n minHeight: 800,\n frame: false,\n transparent: true,\n webPreferences: {\n nodeIntegration: true,\n contextIsolation: false,\n enableRemoteModule: true,\n },\n });\n\n const registerProtocols = require('./protocols');\n\n registerProtocols();\n\n mainWindow.loadFile('/');\n\n mainWindow.on('closed', function () {\n mainWindow = null;\n });\n\n const menu = electronDefaultMenu(app, shell);\n\n // Set application menu\n Menu.setApplicationMenu(Menu.buildFromTemplate(menu));\n\n // mainWindow.webContents.openDevTools();\n}", "function createWindow () {\n win = new BrowserWindow({ width: 1730, height: 900 })\n win.loadFile('./public/render/index.html')\n// win.webContents.openDevTools()\n win.on('closed', () => {\n win = null\n })\n}", "function createWindow() {\n mainWindow = new BrowserWindow({ width: 650, height: 500 });\n\n //This method load the file relative to the path\n // mainWindow.loadFile('index.html');\n\n mainWindow.loadURL(\n url.format({\n pathname: path.join(__dirname, 'index.html'),\n protocol: 'file:',\n slashes: true,\n }),\n );\n\n //Adding the menu to the window\n const menu = Menu.buildFromTemplate(mainMenu);\n //Inserting the menu to the app\n Menu.setApplicationMenu(menu);\n\n mainWindow.on('closed', () => app.quit());\n}", "function createMainWindow(){\n\tmainWindow = new BrowserWindow({\n\t\twidth:800, \n\t\theight:600, \n\t\tresizable:false,\n\t\tfullscreen:false,\n\t\tfullscreenable :false,\n\t\ttitle: \"Password Keeper\",\n\t\ticon: path.join(__dirname, 'assets/icons/png/64x64.png')\n\t})\n\n\t//Disable default menu\n\tmainWindow.setMenu(null)\n\n\t//Load index.html\n\tmainWindow.loadURL(url.format({\n\t\tpathname: path.join(__dirname, 'index.html'),\n\t\tprotocol: 'file:',\n\t\tslashes:true\n\t}))\n\t//Show Chrome dev tools\n\t// mainWindow.webContents.openDevTools()\n\n\t//free memory when windows is closed\n\tmainWindow.on('closed', () => {\n\t\tmainWindow = null\n\t})\n\n}", "function createWindow() {\n // Create the browser window.\n const mainWindow = new BrowserWindow({\n width: 800,\n height: 600,\n webPreferences: {\n preload: path.join(__dirname, 'preload.js')\n }\n });\n\n // Crash reporter init and start\n // crashReporter.init();\n // crashReporter.start();\n\n // and load the index.html of the app.\n mainWindow.loadURL(formatUrl({\n pathname: path.join(__dirname, 'index.html'),\n protocol: 'file',\n slashes: true\n }))\n\n // create channel\n createChannel();\n\n // build app menu\n appMenu.create(mainWindow);\n\n // create tray\n tray.setTray();\n\n // register global shortcuts\n globalShortcuts.registerShortcuts();\n\n // updater.init();\n\n // Open the DevTools.\n mainWindow.webContents.openDevTools();\n}", "function createWindow() {\n window = new BrowserWindow({\n width: 800,\n height: 600,\n webPreferences: {\n //'false' - evitar riscos de segurança (devido correr localmente)\n nodeIntegration: false\n }\n })\n\n \n //se estiver em development mode, abre chrome devtools\n if (is.development) {\n window.loadURL(config.LOCAL_WEB_URL);\n } else {\n window.loadURL(config.PRODUCTION_WEB_URL);\n }\n\n //true em development abre chrome devtools\n if (is.development) {\n window.webContents.openDevTools();\n }\n\n //CSP em production, true se nao estiver development\n if (!is.development) {\n setContentSecurityPolicy(`\n default-src 'none';\n script-src 'self';\n img-src 'self' https://www.gravatar.com;\n style-src 'self' 'unsafe-inline';\n font-src 'self';\n connect-src 'self' ${config.PRODUCTION_API_URL};\n base-uri 'none';\n form-action 'none';\n frame-ancestors 'none';\n `);\n }\n\n //quando se fecha window, reset ao window obj\n window.on('closed', () => {\n window = null;\n });\n\n}", "function createWindow () {\n /**\n * 初始窗口选项\n * 创建和控制浏览器窗口\n */\n mainWindow = new BrowserWindow({\n // frame: false,\n // 窗口宽度,单位像素. 默认是 800\n width: 1366,\n // 窗口高度,单位像素. 默认是 600\n height: 768,\n // 窗口最小宽度,默认为 0\n minWidth: 1366,\n // 窗口最小高度,默认为 0\n minHeight: 768,\n // 窗口默认title. 默认 \"Electron\"\n title: '思普锯业ERP',\n // 使用web网页size, 这意味着实际窗口的size应该包括窗口框架的size,稍微会大一点\n useContentSize: true,\n show: false\n })\n mainWindow.once('ready-to-show', () => {\n mainWindow.show()\n })\n mainWindow.loadURL(winURL)\n // mainWindow.webContents.openDevTools()\n mainWindow.on('closed', () => {\n mainWindow = null\n })\n}", "function createWindow() {\n\n //Initialize sql database when window is created\n const server = require('./javascript/dbService')\n \n // Create Main window with custom size\n win = new BrowserWindow({\n width: 900,\n height: 680,\n webPreferences: {\n nodeIntegration: true\n }\n })\n\n bookmarkWindow = new BrowserWindow({\n width: 400,\n height: 380,\n parent: win,\n show: false,\n webPreferences: {\n nodeIntegration: true\n }\n })\n\n newBookmarkWindow = new BrowserWindow({\n width: 400,\n height: 380,\n parent: win,\n show: false,\n webPreferences: {\n nodeIntegration: true\n }\n })\n\n // load selected html file on the main window\n win.loadFile('./src/index.html')\n bookmarkWindow.loadFile('./src/bm.html')\n newBookmarkWindow.loadFile('./src/newbookmark.html')\n // Open the DevTools.\n win.webContents.openDevTools()\n\n //disable webconsole\n //win.webContents.on(\"devtools-opened\", () => { win.webContents.closeDevTools()})\n\n/*\n bookmarkWindow.webContents.on('did-finish-load', () => {\n bookmarkWindow.webContents.send('ping', 'pong')\n })*/\n\n \n // Clear variable when application window is closed\n win.on('closed', () => {\n win = null\n })\n\n bookmarkWindow.on('close', (e) => {\n e.preventDefault()\n bookmarkWindow.hide()\n })\n\n newBookmarkWindow.on('close', (e) => {\n e.preventDefault()\n newBookmarkWindow.hide()\n })\n\n\n}", "function createWindow () {\n // Create the browser window.\n win = new BrowserWindow({width: 800, height: 600, icon: __dirname + '/printer.ico',webPreferences: {\n nodeIntegration: false } })\n \n // and load the index.html of the app.\n win.loadURL(url.format({\n pathname: readConfigURL(),\n protocol: 'http:',\n slashes: true\n }))\n\n\t//remove default menu\n\twin.setMenu(null);\n\n\t}", "function createWindow () {\n\n mainWindow = new BrowserWindow({\n show: false,\n width: 1000, height: 800,\n minWidth: 1000, minHeight:500,\n titleBarStyle: 'hidden',\n icon: '../img/icon.png',\n webPreferences: {\n sandbox: false,\n nodeIntegration: true }\n })\n\n secWindow = new BrowserWindow({\n show: false,\n alwaysOnTop:true,\n width: 600, height: 750,\n resizable: false,\n titleBarStyle: 'hidden',\n parent:mainWindow,\n modal:true,\n webPreferences: { \n nodeIntegration: true }\n })\n\n\n // Load index.html into the new BrowserWindow\n\n secWindow.loadFile('views/privacyact.ejs')\n secWindow.once(\"ready-to-show\",()=> {secWindow.show() })\n \n mainWindow.loadFile('views/index.ejs')\n mainWindow.once(\"ready-to-show\",()=> {mainWindow.show() })\n\n\n\n // Open DevTools - Remove for PRODUCTION!\n //mainWindow.webContents.openDevTools();\n\n // Listen for window being closed\n mainWindow.on('closed', () => {\n mainWindow = null\n })\n\n secWindow.on('closed', () => {\n secWindow = null\n })\n}", "function createWindow() {\n mainWindow = new BrowserWindow({\n height: 800,\n webPreferences: {\n nodeIntegration: true\n },\n width: 1200\n });\n\n mainWindow.loadURL(\n url.format({\n pathname: path.join(__dirname, \"../dist/index.html\"),\n protocol: \"file:\",\n slashes: true\n })\n );\n\n mainWindow.on(\"closed\", () => {\n // Dereference the window object, usually you would store windows\n // in an array if your app supports multi windows, this is the time\n // when you should delete the corresponding element.\n mainWindow = null;\n });\n}", "function createAddWindow() {\n addWindow = new BrowserWindow({\n width: 400,\n height: 400,\n title: 'Add Shopping List Item',\n webPreferences: {\n nodeIntegration:true,\n contextIsolation: false,\n }\n });\n //load html into window\n addWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'addWindow.html'),\n protocol: 'file:',\n slashes: true\n }));\n //Garbage collection handle (for optimize)\n addWindow?.on('close', function (){\n addWindow = null;\n });\n}", "function createTicketWindow() {\n ticketwindow = new BrowserWindow({\n title: \"Reçu de vente\",\n parent: mainWindow,\n minimizable: true,\n resizable: false,\n modal: false,\n width: 400,\n height: 500,\n webPreferences: {\n nodeIntegration: true,\n },\n });\n\n //Load html file into a window\n ticketwindow.loadFile(\"views/ticketwindow.html\");\n\n ticketwindow.setMenu(null);\n\n //Garbage collection handle\n ticketwindow.on(\"close\", function () {\n addWindow = null;\n });\n}", "function createWindow() {\n\n win = new BrowserWindow({\n show:false,\n height:150,width:500,\n frame:false\n });\n win.loadURL(url.format({\n pathname:path.join(__dirname,'index.html'),\n protocol:'file',\n slashes:true\n }));\n\n win.once(\"ready-to-show\",()=>{\n win.show();\n });\n\n //开启devtools\n\n //win.webContents.openDevTools();\n\n win.on(\"close\",()=>{\n win = null;\n });\n}", "function createWindow () {\n // Create the browser window.\n // and load the index.html of the app.\n loadAsync(optparse.srom).then(([temp, meta]) => {\n extract(optparse.srom, {dir: temp}).then(() => {\n lines = [\n `Name: ${meta.name}`,\n `Author: ${meta.author}`,\n `Version: ${meta.version}`\n ].join(\"\\n\")\n console.log(lines)\n title = \"ScratchEMU - '\" + meta.name + \"'\"\n const mainWindow = new BrowserWindow({\n width: 1280,\n height: 800,\n webPreferences: {\n preload: path.join(__dirname, \"preloaderscratch.cjs\"),\n contextIsolation: false\n },\n title\n })\n var meno = new Menu()\n meno.append(new MenuItem({\n label: \"Take Screenshot\",\n click(){\n mainWindow.webContents.mainFrame.executeJavaScript(\"preload()\")\n }\n }))\n mainWindow.setMenu(meno)\n dialog.info(lines, \"About ROM\", 0, \n function(code, retVal, stderr){});\n mainWindow.loadURL(`file://${path.join(temp, 'index.html')}`)\n mainWindow.on('page-title-updated', function(e) {\n e.preventDefault()\n });\n if(existsSync(path.join(temp, 'icon.png'))){\n mainWindow.setIcon(path.join(temp, 'icon.png'))\n }\n \n })\n })\n\n // Open the DevTools.\n}", "function createMainWindow(){\n //Get device width and height\n const { width, height } = screen.getPrimaryDisplay().workAreaSize;\n mainWin = new BrowserWindow({\n width,\n height,\n minWidth: 1280,\n minHeight: 720,\n webPreferences: {\n nodeIntegration: true,\n enableRemoteModule: true\n },\n });\n\n //Hides menu bar\n //mainWin.setMenuBarVisibility(false);\n\n //Create the window\n mainWin.maximize();\n mainWin.loadURL(url.format({\n pathname: path.join(__dirname, \"../html/index.html\"),\n protocol: \"file\",\n slashes: true\n }));\n\n //If closed, quit the whole app\n mainWin.on(\"closed\", () => {\n app.quit();\n });\n\n //Open devtools\n //mainWin.webContents.openDevTools();\n}", "function createWindow() {\n mainWindow = new BrowserWindow({ width: 1200, height: 800, icon: iconpath })\n\n\n // and load the index.html of the app.\n mainWindow.loadFile('index.html')\n\n\n tray = new Tray(iconpath);\n //quit app on close\n mainWindow.on('close', function () {\n app.quit();\n })\n //minimizes to tray\n mainWindow.on('minimize', function (event) {\n event.preventDefault()\n mainWindow.hide()\n })\n\n mainWindow.on('show', function () {\n tray.setHighlightMode('always')\n })\n\n\n //app settings when minimzed\n const contextMenu = Menu.buildFromTemplate([\n {\n label: 'Show App', click: function () {\n mainWindow.show()\n }\n },\n {\n label: 'Quit', click: function () {\n app.isQuiting = true\n app.quit()\n }\n },\n\n\n\n ])\n //open from tray when double clicked the icon\n tray.on('double-click', () => {\n mainWindow.show()\n })\n app.on('window-all-closed', () => {\n if (process.platform !== 'darwin') {\n app.quit()\n }\n })\n tray.setContextMenu(contextMenu)\n\n const mainMenu = Menu.buildFromTemplate(mainMenuTemplate);\n // Insert menu\n Menu.setApplicationMenu(mainMenu);\n\n}", "function createWindow() {\n \n // Create the browser window.\n Window.mainWindow = new BrowserWindow({\n width: 800,\n height: 600,\n frame: false,\n webPreferences: {\n nodeIntegration: true\n }\n });\n\n // and load the index.html of the app.\n //Window.mainWindow.loadFile('index.html');\n Window.mainWindow.loadURL('http://localhost:2777');\n\n // Open the DevTools.\n Window.mainWindow.webContents.openDevTools();\n\n // Emitted when the window is closed.\n Window.mainWindow.on('closed', () => {\n // Dereference the window object, usually you would store windows\n // in an array if your app supports multi windows, this is the time\n // when you should delete the corresponding element.\n Window.mainWindow = null\n });\n}", "function createAddWindow(){\r\n //Create new window\r\n addWindow = new BrowserWindow({\r\n width: 300,\r\n height: 200,\r\n title:'Add Shopping List Item'\r\n });\r\n // Load html into window\r\n addWindow.loadURL(url.format({\r\n pathname: path.join(__dirname, 'addWindow.html'),\r\n protocol: 'file:',\r\n slashes: true\r\n }));\r\n // Garbage collection handle\r\n addWindow.on('close', function(){\r\n addWindow = null;\r\n });\r\n}", "openWindowTo(url){\n if (!this.windows.mainWindow){\n var mainWindow = new BrowserWindow({width: 800, height: 600, darkTheme: true});\n mainWindow.on('close', (function(_this){\n return function(){\n _this.emit(\"braintrust:close-main-window\");\n };\n })(this));\n\n this.windows.mainWindow = mainWindow;\n\n if(this.devMode){\n this.windows.mainWindow.webContents.openDevTools();\n }\n }\n else {\n this.windows.mainWindow.show();\n }\n\n this.windows.mainWindow.loadURL(url);\n app.dock.show();\n }", "function createAddWindow() {\n addWindow = new BrowserWindow({\n width: 300,\n height: 200,\n title: 'Add New Todo',\n webPreferences: {\n nodeIntegration: true,\n contextIsolation: false\n }\n });\n addWindow.loadURL(`file://${__dirname}/about.html`);\n // allow garbage collection\n addWindow.on('closed', () => addWindow = null);\n}", "function createWindow () {\n\n //BrowserWindow represente une fenetre\n mainWindow = new BrowserWindow({\n width: 1024,\n height: 500,\n icon: './assets/IT-Akademy.png',\n title: 'login', //'Task Organiser & Deployment Of',\n center: true//,\n //frame: false, //bordure de la fenetre\n //show: false\n }); // on définit une taille pour notre fenêtre\n\n mainWindow.loadURL(`file://${__dirname}/main.html`); // on doit charger un chemin absolu\n\n mainWindow.on('closed', () => {\n mainWindow = null;\n });\n\n //mainWindow.show();\n\n const childWindow = new BrowserWindow({\n parent: mainWindow,\n width: 810,\n height: 456,\n //x: 400,\n //y: 400,\n icon: '/assets/logo.png',\n title: 'enfant',\n show: false\n //frame: false\n });\n\n childWindow.loadURL(`file://${__dirname}/start.html`);\n\n childWindow.on('close', function(event){\n childWindow.hide();\n event.preventDefault();\n //mainWindow.show();\n });\n\n}", "function createWindow() {\n const width = app.isPackaged ? 1200 : 2400;\n\n const mainWindow = new BrowserWindow({\n width: width,\n height: 800,\n // Set the path of an additional \"preload\" script that can be used to\n // communicate between node-land and browser-land.\n webPreferences: {\n preload: path.join(__dirname, \"preload.js\"),\n },\n });\n\n // In production, set the initial browser path to the local bundle generated\n // by the Create React App build process.\n // In development, set it to localhost to allow live/hot-reloading.\n const appURL = app.isPackaged\n ? url.format({\n pathname: path.join(__dirname, \"index.html\"),\n protocol: \"file:\",\n slashes: true,\n })\n : \"http://127.0.0.1:3000\";\n mainWindow.loadURL(appURL);\n\n // Automatically open Chrome's DevTools in development mode.\n if (!app.isPackaged) {\n mainWindow.webContents.openDevTools();\n }\n\n const menuBuilder = new MenuBuilder(mainWindow);\n menuBuilder.buildMenu();\n}", "function createaddwindow(){\n //create new window\n addWindow=new BrowserWindow({\n width:300,\n height:200,\n title:'Add Shopping Item'\n });\n //load html file into the window\n addWindow.loadURL(url.format({\n pathname:path.join(__dirname,'addwindow.html'),\n protocol:'file:',\n slashes:true\n }));\n //garbage collection handle \n addWindow.on('close',function(){\n addWindow=null;\n })\n}", "function newSoWindow() {\n addWindow = new BrowserWindow({\n width: 900,\n height: 1100,\n title: 'Edit Inventory Item',\n webPreferences: {\n nodeIntegration: true\n }, \n show: false\n })\n addWindow.maximize()\n\n addWindow.loadFile('fileWindows/newSoWindow.html')\n\n addWindow.once('ready-to-show', () => {\n addWindow.show()\n })\n\n addWindow.on('closed', function () {\n\n addWindow = null\n })\n}", "function createNewRegistro(){\r\n newRegistroWindow= new BrowserWindow({\r\n width:500,\r\n height:780,\r\n title:'Nuevo activo fijo',\r\n icon:path.join(__dirname,'data/ico32.png'),\r\n webPreferences: {\r\n nodeIntegration: true\r\n } \r\n });\r\n //newRegistroWindow.setMenu(null);\r\n newRegistroWindow.loadURL(url.format({\r\n pathname: path.join(__dirname,'views/new-equipo.html'),\r\n protocol:'file',\r\n slashes:true\r\n }));\r\n newRegistroWindow.on('closed',()=>{\r\n newRegistroWindow=null;\r\n })\r\n}", "function createAddWindow(){\n addWindow = new BrowserWindow({\n width: 300,\n height: 180,\n title: 'Add Shopping List Item'\n });\n\n addWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'addWindow.html'),\n protocol: 'file:',\n slashes: true\n }));\n\n // Garbage collection\n addWindow.on('close', function(){\n addWindow = null;\n });\n}", "function createCreateAddWindow (){\n addWindow = new BrowserWindow({\n width : 500,\n height: 300,\n maxWidth: 500,\n maxHeight: 300,\n minHeight:200,\n minWidth:400,\n maximizable: false,\n title: 'Add an item',\n parent: mainWindo,\n modal: true,\n webPreferences: {\n nodeIntegration: true\n },\n autoHideMenuBar: true\n });\n\n // Load the html file for the app renderer\n addWindow.loadURL(url.format({\n pathname: path.join(__dirname, \"addWindow.html\"),\n protocol: 'file:',\n slashes: true\n }));\n\n // Gabage handler\n addWindow.on('closed', ()=>{\n addWindow = null;\n });\n}", "_init() {\r\n app.whenReady().then(() => {\r\n this.setLoadingWindow();\r\n this.setWindowMain();\r\n });\r\n this.beforeCloseFunctions();\r\n }", "function createAddWindow() {\n addWindow = new BrowserWindow({\n parent: mainWindow,\n modal: true,\n width: 350,\n height: 430,\n title: \"Ajouter nouveau produit\",\n resizable: false,\n minimizable: false,\n webPreferences: {\n nodeIntegration: true,\n },\n });\n\n //Load html file into a window\n addWindow.loadFile(\"views/addwindow.html\");\n\n addWindow.setMenu(null);\n\n //Garbage collection handle\n addWindow.on(\"close\", function () {\n addWindow = null;\n });\n}", "function createAddWindow() {\r\n addWindow = new BrowserWindow({\r\n webPreferences: {\r\n nodeIntegration: true\r\n },\r\n width: 800,\r\n height: 500,\r\n title: \"Add Menu item\"\r\n });\r\n //load html file into window\r\n addWindow.loadURL(\r\n url.format({\r\n pathname: path.join(__dirname, \"addWindow.html\"),\r\n protocol: \"file:\",\r\n slashes: true\r\n })\r\n );\r\n\r\n addWindow.on(\"close\", function() {\r\n addWindow = null;\r\n });\r\n}", "function createAddWindow(){\n//Create a new window\ncreateAddWindow = new BrowserWindow({\n width: 300,\n height: 200,\n title: 'Add Item to List',\n //The lines below solved the issue\n webPreferences: {\n nodeIntegration: true\n }\n});\n\n//load main html into window\ncreateAddWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'addWindow.html'),\n protocol: 'file:',\n slashes: true\n}));\n//Nullify Garbage collection\naddWindow.on('close', function(){\n addWindow = null;\n});\n\n}", "function NewProjectMenu(){\n newProjectWindow = new BrowserWindow({\n webPreferences: {\n worldSafeExecuteJavaScript: true,\n nodeIntegration: true,\n safeDialogs: true,\n enableRemoteModule: true\n\n },\n width: 400,\n height: 370,\n resizable: false,\n title: \"make new project\"\n });\n\n //load html file into window\n newProjectWindow.loadURL(url.format({\n pathname: path.join(app.getAppPath(), 'newProjectWindow.html'),\n protocol:'file:',\n slashes: true\n }));\n\n //garbage collection\n newProjectWindow.on('close', function(){\n newProjectWindow=null;\n });\n}", "function rebuildWindow(instanceURL) {\n console.log(instanceURL)\n mainWindow.close() // there must be a better way to do this lol\n mainWindow = new BrowserWindow({\n width: 900,\n height: 600,\n webPreferences: {\n preload: path.join(__dirname, 'preload.js')\n }\n })\n\n mainWindow.loadURL(instanceURL)\n}", "function $$init() {\n let windowAllClosed = false;\n\n /**\n * creates a window\n */\n function createStartupWindow() {\n // startup window will shown immediately after created regardless of the preference\n createWindow(`${appProtocol}://${appHostname}${appStartupPath}`, null, true);\n }\n\n // quit application when all windows are closed\n app.on('window-all-closed', () => {\n // on macOS it is common for applications to stay open until the user explicitly quits\n windowAllClosed = true;\n if (process.platform !== 'darwin') {\n app.quit();\n }\n });\n\n app.on('activate', () => {\n // on macOS it is common to re-create a window even after all windows have been closed\n if (windowAllClosed) {\n createStartupWindow();\n windowAllClosed = false;\n }\n });\n\n createStartupWindow();\n }", "onActivate() {\n if (BrowserWindow.getAllWindows().length === 0) {\n this.createWindow();\n }\n }", "function newVendWindow() {\n // Create the browser window.\n addWindow = new BrowserWindow({\n parent: mainWindow,\n modal: true,\n width: 800,\n height: 1000,\n title: 'Add Inventory Item',\n webPreferences: {\n nodeIntegration: true\n }\n })\n\n addWindow.loadFile('fileWindows/addVendWindow.html')\n\n addWindow.once('ready-to-show', () => {\n addWindow.show()\n })\n\n addWindow.on('closed', function () {\n\n addWindow = null\n })\n}", "function createWindow() {\n mainWindow = new BrowserWindow({\n height: 725,\n width: 1450,\n // resizable: false,\n webPreferences: { nodeIntegration: true }\n });\n\n // Load index.html into the new BrowserWindow\n mainWindow.loadFile(\"index.html\");\n\n // Open DevTools - Remove for PRODUCTION!\n // mainWindow.webContents.openDevTools();\n\n // Listen for window being closed\n mainWindow.on(\"closed\", () => {\n mainWindow = null;\n });\n}", "function createAddWindow(){\n // create new window\n addWindow = new BrowserWindow({\n width: 300,\n height: 200,\n title: 'Add Shopping List Item'\n });\n // load html into window\n addWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'addWindow.html'),\n protocol: 'file:',\n slashes: true\n }));\n\n // Garbage collection handler\n addWindow.on('close', function(){\n addWindow = null\n })\n}", "function createElectronShell() {\n runMake();\n win = new BrowserWindow({width: 800, height: 600, titleBarStyle: \"hidden\", webPreferences: {\n webSecurity: false,\n nodeIntegration: true,\n enableRemoteModule: true\n }});\n win.loadURL(isDev ? 'http://localhost:3000/' : `file://${path.join(__dirname, '../build/index.html')}`);\n win.on('close', () => { appShell = null});\n if (isDev)\n win.webContents.openDevTools();\n}", "function createAddAlimentWindow() {\n //création de la fenêtre\n addAlimentWindow = new BrowserWindow({\n width: 400,\n height:450,\n title: 'Ajout d\\'un aliment',\n webPreferences: {\n nodeIntegration: true\n },\n transparent: true,\n frame: false,\n //icon: __dirname+'img/mainIco.svg'\n icon: path.join(__dirname, '/img/mainIco.png')\n });\n //Insérer le code html\n addAlimentWindow.loadURL(url.format(\n {\n pathname: path.join(__dirname, 'views/addAliment.html'),\n protocol: 'file:',\n slashes: true\n }\n ));\n //\n //addListWindow.webContents.openDevTools();\n\n addAlimentWindow.on('close', function () {\n //addListWindow = null;\n addAlimentAlreadyInstencied = false;\n })\n\n}", "function runApp() {\r\n chrome.app.window.create('html/live-view.html', {'id': 'goodWindowID', state: \"fullscreen\", \"resizable\": false},\r\n function(createdWindow) {\r\n createdWindow.fullscreen();\r\n }\r\n );\r\n}", "function createWindowManager() {\n var dimen = getWidowDimensions();\n var xpos = dimen.width/2 - (800/2) - 100;\n \n // Create the browser window.\n win = new BrowserWindow({\n width: 1024,\n height: 650,\n frame: false,\n x: xpos,\n y: 50,\n resizable: true,\n movable: true,\n minimizable: true,\n fullscreen: false,\n transparent: false,\n backgroundColor: '#16191e',\n icon: __dirname + '/logo.ico',\n });\n \n console.log('x:' + xpos);\n\n // and load the index.html of the app.\n win.loadURL(url.format({\n pathname: path.join(__dirname, 'src/manager.html'),\n protocol: 'file:',\n slashes: true\n }));\n\n \n // Open the DevTools.\n win.webContents.openDevTools()\n\n // Emitted when the window is closed.\n win.on('closed', () => {\n win = null\n });\n}", "function createBnWindow(){\n let bnWindow = new BrowserWindow({width: 800, height: 600})\n\n bnWindow.loadURL('file://' + __dirname + '/views/bnWindow/bnWindow.html');\n secondaryWindows.push(bnWindow);\n bnWindow.show();\n\n // Emitted when the window is closed.\n bnWindow.on('closed', function () {\n // Dereference the window object.\n bnWindow = null\n })\n\n return bnWindow;\n }", "function openWindow() {\n //initiallize the new window with height and with properties\n window = new BrowserWindow({\n width: 800,\n height: 600,\n icon: path.join(__dirname,\"assets/img/icon.png\"),\n });\n\n //load the index html file when it loads\n window.loadURL(url.format({\n pathname: path.join(__dirname,'intro.html'),\n protocol: 'file:',\n slashes: true\n }));\n\n //when the window closes\n window.on('closed', () => {\n window = null;\n });\n\n app.on('active', () => {\n if(window === null) {\n openWindow();\n }\n });\n\n //build custom menu from template\n const mianMenu = Menu.buildFromTemplate(menuTemplate);\n\n Menu.setApplicationMenu(mianMenu)\n}", "function createWindow() { // This function will create the window which we talked about on line 9.\n let mainWindow = new BrowserWindow({ // A new variable config of the \"BrowserWindow\" element of electron.\n width: 700, // Width of the browser window.\n height: 350, // Height of the browser window.\n resizable: false, // Makes the window non resizable.\n titleBarStyle: \"hidden\", // Hides the title bar.\n webPreferences: {\n nodeIntegration: true // Enables Node Integration\n },\n autoHideMenuBar: true, // Hides the menu bar.\n center: true // Makes the app, when turned on, shows on the center of the screen.\n })\n\n mainWindow.loadURL(`file:///${join(__dirname, \"./public/index.html\")}`) // Loads the \"index.html\" file in a browser with the configs above.\n}", "function createNewProductWindow2() {\r\n newProductWindow2 = new BrowserWindow({\r\n width: 1020,\r\n height: 700,\r\n minWidth: 1280,\r\n minHeight:800,\r\n title: 'About',\r\n \r\n \r\n webPreferences: {\r\n contextIsolation:true,\r\n webviewTag: true,\r\nnodeIntegration:true,\r\n\r\n \r\n \r\n \r\n\r\n }\r\n });\r\n newProductWindow2.setMenu(null);\r\n\r\n newProductWindow2.loadURL(url.format({\r\n pathname: path.join(__dirname, '/../../munich-interface/settings/about.html'),\r\n protocol: 'file',\r\n slashes: true\r\n }));\r\n newProductWindow2.on('closed', () => {\r\n newProductWindow2 = null;\r\n });\r\n}", "function createWindow()\n{\n\t//加载配置\n\tdatapath = app.getPath('userData');\n\tdatapath = path.join(datapath, \"config.json\");\n\ttry{\n\t\tif(fs.existsSync(datapath))\n\t\t{\n\t\t\tconfig = JSON.parse(fs.readFileSync(datapath));\n\t\t}else{\n\t\t\tconfig = {};\n\t\t\tfs.writeFileSync(datapath, \"{}\");\n\t\t}\n\t}catch(e){\n\t\tconfig = {};\n\t\tconsole.log(\"Error: readConfig error\", e);\n\t}\n\t// console.log(app.getPath('pepperFlashSystemPlugin'));\n\t// //tes\n\t// var vwin = new BrowserWindow({width: 1028, height: 800, frame:false,\n\t// \t'webPreferences': {\n\t// \t 'plugins': true\n\t// \t}\n\t// });\n\t// vwin.loadFile(WEBURL+'video.html');\n\t// vwin.webContents.once('did-finish-load', function() {\n\t// \tvwin.webContents.send(\"data\", {url:\"https://www.iqiyi.com/v_19rrc17tj8.html\"});\n\t// });\n\t// vwin.webContents.openDevTools();\n\t// return;\n\t//初始化窗口\n\twin = new BrowserWindow({width: 1028, height: 800, frame:true,\n\t\t'webPreferences': {\n\t\t 'plugins': true\n\t\t}\n\t });\n\tif(WEBURL)\n\t{\n\t\twin.loadURL(WEBURL+'login.html')\n\t}else{\n\t\twin.loadFile('login.html');\n\t}\n\twin.webContents.once('did-finish-load', function() {\n\t\twin.webContents.send(\"configdata\", config);\n\t});\n\t\n\t//设置菜单\n\tvar menu = new Menu();\n\t// var fileMenu = new MenuItem({label:\"文件\", click:()=>{ }, submenu:new Menu()})\n\t// fileMenu.submenu.append(new MenuItem({label:\"退出\", click:()=>{app.exit();}}))\n\t// menu.append(fileMenu)\n\n\n\t// var webmenu = new MenuItem({label:\"网页\", click:()=>{ }, submenu:new Menu()});\n\t// webmenu.submenu.append(new MenuItem({label:\"主页\", click:()=>{win.webContents.send(\"web\", \"main\") }}));\n\t// webmenu.submenu.append(new MenuItem({label:\"后退\", click:()=>{win.webContents.send(\"web\", \"pre\") }}));\n\t// webmenu.submenu.append(new MenuItem({label:\"前进\", click:()=>{win.webContents.send(\"web\", \"next\") }}));\n\t// webmenu.submenu.append(new MenuItem({label:\"刷新\", click:()=>{win.webContents.send(\"web\", \"refush\") }}));\n\t// webmenu.submenu.append(new MenuItem({label:\"清除历史\", click:()=>{win.webContents.send(\"web\", \"clear\") }}));\n\t// if(!WEBURL)\n\t// {\n\t// \twebmenu.submenu.append(new MenuItem({type: 'separator'}));\n\t// \twebmenu.submenu.append(new MenuItem({label:\"打开开发者工具\", click:()=>{win.webContents.openDevTools(); }}));\n\t// }\n\t// menu.append(webmenu);\n\t\n\n\t// var settingMenu = new MenuItem({label:\"设置\", click:()=>{}, submenu:new Menu()});\n\t// menu.append(settingMenu);\n\t// menu.append(new MenuItem({label:\"说明\", click:()=>{ win.webContents.send(\"abuout\", \"use\") }}));\n\t// menu.append(new MenuItem({label:\"关于\", click:()=>{ win.webContents.send(\"abuout\", \"made\") }}));\n\tMenu.setApplicationMenu(menu)\n\n\t\n\t// regedit.createKey('HKCU\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\FreeVideo', function(err) {\n\t// \tconsole.log(err);\n\t// })\n\t// var name = os.hostname();\n\t// var usinfo = os.userInfo();\n}", "function createWindow() {\n mainWindow = new BrowserWindow({\n // width: 1000,\n // height: 800,\n webPreferences: { nodeIntegration: true },\n transparent: true,\n // minWidth: 992,\n // minHeight: 600,\n });\n\n // Load index.html into the new BrowserWindow\n mainWindow.loadFile('index.html');\n\n // Open DevTools - Remove for PRODUCTION!\n mainWindow.webContents.openDevTools();\n\n // Listen for window being closed\n mainWindow.on('closed', () => {\n mainWindow = null;\n });\n\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir);\n }\n}", "function windowCreate(json) {\n if (!json.windowOptions.webPreferences) {\n json.windowOptions.webPreferences = {}\n }\n json.windowOptions.webPreferences.contextIsolation = false\n json.windowOptions.webPreferences.nodeIntegration = true\n elements[json.targetID] = new BrowserWindow(json.windowOptions)\n windowOptions[json.targetID] = json.windowOptions\n if (typeof json.windowOptions.proxy !== \"undefined\") {\n elements[json.targetID].webContents.session.setProxy(json.windowOptions.proxy)\n .then(() => windowCreateFinish(json))\n } else {\n windowCreateFinish(json)\n }\n}", "function createWindow () {\n // debugger\n mainWindow = new BrowserWindow({\n width: 1800,\n height: 1200,\n icon: path.join(__dirname, './resources/electron/icons/64x64.png')\n })\n mainWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'www/index.html'),\n protocol: 'file:',\n slashes: true,\n nodeIntegration: false\n }))\n\n if (process.env.NODE_ENV === 'development') {\n const client = require('electron-connect').client\n client.create(mainWindow)\n mainWindow.toggleDevTools()\n }\n mainWindow.on('closed', function () {\n mainWindow = null\n })\n}", "function createUserWindow(){\n addWindow = new BrowserWindow({\n width: 1200,\n height:800,\n title:'Add Shopping List Item'\n });\n addWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'iniciosesion.html'),\n protocol: 'file:',\n slashes:true\n }));\n // Handle garbage collection\n addWindow.on('close', function(){\n addWindow = null;\n });\n\n const userWindowMenu = Menu.buildFromTemplate(mainMenuTemplate)\n Menu.setApplicationMenu( userWindowMenu)\n}", "setWindowMain() {\r\n this.mainWindow = new BrowserWindow({\r\n width: settings.size.width || 1800,\r\n height: settings.size.height || 1020,\r\n webPreferences: {\r\n nodeIntegration: true,\r\n spellcheck: true,\r\n enableRemoteModule: true,\r\n contextIsolation: false\r\n }\r\n });\r\n this.mainWindow.hide();\r\n this.mainWindow.loadURL(path.join(__dirname, \"/public/index.html\"));\r\n this.mainWindow.removeMenu();\r\n\r\n const webContents = this.mainWindow.webContents;\r\n\r\n webContents.once(\"dom-ready\", () => {\r\n this.mainWindow.show();\r\n this.loadingWindow.close();\r\n this.showUpdateMessage();\r\n this.autoupdate();\r\n this.registerAutoShortcut();\r\n this.setSpellChecking();\r\n });\r\n\r\n webContents.on(\"dom-ready\", () => {\r\n this.mainWindow.webContents.send(\r\n \"isReadOnly:response\",\r\n this.isReadOnly\r\n );\r\n });\r\n\r\n /**\r\n * Where the controllers get initialized\r\n */\r\n this.notesController = new NotesController(\r\n ipcMain,\r\n this.mainWindow,\r\n storage,\r\n settings\r\n );\r\n this.classController = new ClassController(\r\n ipcMain,\r\n this.mainWindow,\r\n storage,\r\n settings\r\n );\r\n this.settingsController = new SettingsController(\r\n ipcMain,\r\n this.mainWindow,\r\n settings\r\n );\r\n\r\n /**\r\n * Sets all of the controller listeners\r\n */\r\n this.notesController.setAll();\r\n this.classController.setAll();\r\n this.settingsController.setAll();\r\n\r\n this.registerUtilityListners();\r\n }", "function createAddWindow(){\n\t// Create new window\n\taddWindow = new BrowserWindow({\n\t\twidth: 600,\n\t\theight: 600,\n\t\t\n\t\t// solves: Uncaught ReferenceError: require is not defined when loading page with devTools\n\t\twebPreferences: {\n\t\t\tnodeIntegration: true\n\t\t}\n\t\t});\n\n\t// Load html for addwindow option\n\taddWindow.loadFile('addWindow.html')\n\t\n\t// Build the menu from the template\n\tconst mainMenu = Menu.buildFromTemplate(mainMenuTemplate);\n\t// Insert menu option\n\tMenu.setApplicationMenu(mainMenu);\n\n\t// Garbage collection handle (optmization)benclear\n\taddWindow.on('close', function(){\n\t\taddWindow = null;\n\t});\n}", "function createAddWindow(){\n // Create new window\n addWindow = new BrowserWindow({\n width: 300,\n height: 200,\n title: 'Enter Steam ID'\n });\n // Load hmtl into window\n addWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'steamID.html'),\n protocol:'file',\n slashes: true\n }));\n //Garbage collection handle\n addWindow.on('closed', function(){\n addWindow = null;\n });\n}", "setLoadingWindow() {\r\n this.loadingWindow = new BrowserWindow({\r\n width: 500,\r\n height: 300,\r\n frame: false\r\n });\r\n this.loadingWindow.loadURL(path.join(__dirname, \"public/loading.html\"));\r\n }", "function waitForLoad (app, t) {\n return app.start().then(function () {\n return app.client.waitUntilWindowLoaded()\n }).then(function () {\n // Switch to the main window\n return app.client.windowByIndex(0)\n }).then(function () {\n return app.client.waitUntilWindowLoaded()\n })\n}" ]
[ "0.7439638", "0.74264365", "0.7401286", "0.72882456", "0.7224521", "0.7200428", "0.71505237", "0.7126082", "0.71174705", "0.71149224", "0.70915836", "0.7076883", "0.70563895", "0.7045518", "0.7023594", "0.7009553", "0.6988202", "0.69839144", "0.69720095", "0.6957637", "0.69455916", "0.69190526", "0.6917929", "0.69174874", "0.6910933", "0.690823", "0.69066846", "0.69017226", "0.6896822", "0.6895395", "0.6888333", "0.68823004", "0.68641865", "0.6861374", "0.68585896", "0.6835533", "0.68355286", "0.6823258", "0.68196476", "0.6815021", "0.6808594", "0.6798594", "0.67958397", "0.6790339", "0.67902195", "0.67891186", "0.67820054", "0.6763827", "0.6756809", "0.67490643", "0.6724758", "0.6716687", "0.671249", "0.6704974", "0.6702673", "0.66782296", "0.6677664", "0.6677547", "0.6675504", "0.6671154", "0.66694486", "0.6660827", "0.66507125", "0.6650663", "0.6638326", "0.6635697", "0.66334426", "0.66286224", "0.659738", "0.6572579", "0.6555384", "0.6553123", "0.6546189", "0.65444195", "0.6538532", "0.65316916", "0.65291995", "0.65151614", "0.6510549", "0.6500033", "0.6493375", "0.64823884", "0.64753854", "0.64612466", "0.64604574", "0.64501506", "0.6444036", "0.6438321", "0.6431299", "0.64287287", "0.64242345", "0.6407642", "0.6391915", "0.6384209", "0.63806856", "0.63675255", "0.6361824", "0.6346599", "0.63444066", "0.631262" ]
0.68745583
32
must redefine noop each time so it doesn't inherit from previous arbitrary classes
function noop() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function Noop() {}", "function Noop() {}", "function Noop() {}" ]
[ "0.7526021", "0.7526021", "0.7526021", "0.7526021", "0.7526021", "0.7526021", "0.7526021", "0.7474873", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.739682", "0.73048776", "0.73048776", "0.73048776" ]
0.0
-1
V imeniku isce po podanih stolpcih za iskanim nizom Iskani niz obarva rdece s rumenim ozadjem in ga podcrta znotraj vrstice Izpise samo vrstice, kjer je bil iskani niz najden
async function lookForPeople(phonebook, header, searchFields, searchFilter) { let noMatch = true; // ali je sploh katera oseba v imeniku najdena? phonebook.forEach(person => { // Preleti osebe v imeniku, in glede na izbrana iskalna polja in filtre isci in izpisuj let personPrint = ""; // String katerega sestavljamo za osebo, ce je bilo kaj najdeno let personMatch = false; // Ali se iskani niz pojavi pri osebi? for (var col in header) { let i = header[col]; // index stolpca if (searchFields.includes(col)) { // Uporabnik zeli iskati po tem polju // Spremeni v string in indeksiraj stringe person[i] = person[i].toString() let pos = 0; let oldPos = 0; let indices = []; // Isci po celem stringu kje se nahajajo pozicije while ((pos = person[i].indexOf(searchFilter, oldPos)) > -1) { indices.push(pos); oldPos = pos + searchFilter.length; } oldPos = 0; // Barvaj stringe, kjer so bile najdene pozicije for (let j=0; j<indices.length; j++) { personMatch = true; noMatch = false; // Pridobi substr od nepobarvanega dela personPrint += person[i].substr(oldPos, indices[j] - oldPos); // Pridobi del, ki ga je treba pobarvat personPrint += chalk.yellow( chalk.underline( chalk.bold( chalk.bgMagenta( person[i].substr(indices[j], searchFilter.length) )))); // Popravi staro pozicijo na zaden char zapisan v newPerson oldPos = indices[j] + searchFilter.length; } // V kolikor je za zadnjo najdeno pozicijo se kaj, dodaj v string (nepobarvano) if (oldPos < person[i].length) { personPrint += person[i].substr(oldPos, person[i].length - oldPos); } personPrint += " " } else { // Vseeno dodaj stolpec v string, v primeru da se isce po ostalih stolpcih personPrint += person[i] + " "; } } if (personMatch) { // Izpisi trenuten personPrint kot zadetek (pobarvani deli vkljuceni) console.log(personPrint); } }); // Obvesti ali je bil kdo najden let result = {"noMatch": noMatch}; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jelKenta(niz)\n{\n\t/* make a set from an array */\n\tvar skup = napraviSet(niz);\n\tvar tmpn = Array.from(skup);\n\ttmpn.sort();\n\n\tif(skup.size === 5)\n\t{\n\t\tconsole.log(tmpn[4]);\n\t\t/* kandidat za kentu */\n\t\tif((tmpn[4] - tmpn[0]) === 4)\n\t\t{\n\t\t\t/* velika ili mala kenta? */\n\t\t\tif(tmpn[0] === 1)\n\t\t\t\treturn 75;\n\t\t\telse\n\t\t\t\treturn 80;\n\t\t}\n\t\telse\n\t\t\treturn 0;\n\t}\n\telse\n\t\treturn 0;\n\n}", "function pokreniKviz(){\r\n // niz koji popunjavamo tekstom pitanja i ponudjenim odgovorima\r\n // niz ce sadrzati HTML elemente\r\n const output = [];\r\n // prolazimo petljom kroz sve elemente niza pitanja\r\n // uzimamo pitanje koje je aktuelno u trenutnoj iteraciji i njegov indeks\r\n pitanja.forEach(function(trenutnoPitanje, pitanjeInd){\r\n // niz koji cemo popuniti odgovorima na trenutno pitanje\r\n const odgovori = []; \r\n // petlja koja prolazi svim odgovorima trenutnog pitanja\r\n for(slovo in trenutnoPitanje.odgovori){\r\n // u niz odgovora dodajemo HTML kod za prikaz ponudjenog odgovora\r\n // inputi za odgovor na isto pitanje moraju imati isti name atribut\r\n // odradjujemo da svaki od njih ima name=\"odogovor\"+indeks_trenutnog_pitanja\r\n // na taj nacin ce svi ponudjeni odgovori na pitanje sa indeksom 1 imati name=\"odgovor1\"\r\n // vrijednost odgovora je upravo ono slovo pod kojim je on i ponudjen\r\n // tekst je oblika: \" a : tekst_odgovora \"\r\n odgovori.push(\r\n `<label>\r\n <input type=\"radio\" name=\"odgovor${pitanjeInd}\" value=\"${slovo}\" >\r\n ${slovo} : ${trenutnoPitanje.odgovori[slovo]}\r\n </label>`\r\n );\r\n }\r\n // na kraju u output niz koji sadrzi sva pitanja i ponudjene odgovore dodajemo trenutno\r\n // trenutnoPitanje.pitanje je tekst pitanja\r\n // funkcija join od niza pravi string\r\n output.push(\r\n `\r\n <div class=\"pitanje\">${trenutnoPitanje.pitanje}</div>\r\n <div class=\"odgovori\"> ${odgovori.join('')} </div>\r\n `\r\n );\r\n });\r\n // na kraju popunjavamo div za prikaz pitanja i odgovora\r\n kvizDiv.innerHTML = output.join('');\r\n}", "function obliczPunkty(dane)\n{\n var ro = 1.21; // gęstośc czynnika\n var stosunek_et = [0.86, 0.98, 1, 0.966, 0.86]; // stosunek sprawności izentropowych\n\n var mi0 = (1 - (Math.sqrt(Math.sin(dane.beta2 * (Math.PI / 180))) / (Math.pow(dane.z, 0.7)))).toPrecision(3); // współczynnik zmniejszenia mocy wentylatora\n var u2 = ((dane.D2 * Math.PI * dane.n) / 60).toPrecision(3); // prędkość obwodowa wirnika\n var c2u = ((dane.deltapzn * 1000) / (ro * u2 * dane.etazn)).toPrecision(3); // prędkość zależna od ułopatkowania wirnika\n var fi2r = ((c2u * Math.tan(dane.alfa2 * Math.PI / 180)) / u2).toPrecision(3); // wskaźnik prędkości koła wirnikowego\n var fi2r0 = ((mi0 * fi2r) / (mi0 - (c2u / u2))).toPrecision(3); // wartośc wskaznika prędkości koła wirnikowego dla wartości zerowej charakterystyki koła wirnikowego\n var Qmax = (dane.Qzn * (fi2r0 / fi2r)).toPrecision(3); // przepływ maksymalny\n\n var krok = 0.6;\n\n var daneDoWykresu = {};\n daneDoWykresu.deltap = []; // tablica wartości sprężu (deltap)\n daneDoWykresu.Q = []; // tablica wartości wydajności\n daneDoWykresu.Q = []; // tablica wartości wydajności\n daneDoWykresu.eta = []; // etazn * stosunek_et\n\tdaneDoWykresu.wspQ = []; //współczynnik Q: 1-Q/Qmax\n\tdaneDoWykresu.mp = [] ; // tablica wartości mocy pobieranej\n\t\n /* obliczanie punktów charakterystyk */\n\t\n for (var i = 0; i < 5; i++)\n\t{\n daneDoWykresu.Q[i] = krok * dane.Qzn;\n daneDoWykresu.wspQ[i] = 1 - (daneDoWykresu.Q[i] / Qmax);\n daneDoWykresu.eta[i] = dane.etazn * stosunek_et[i];\n\t\tdaneDoWykresu.deltap[i] =((293/(273+dane.tc))*((ro * (Math.pow(u2, 2)) * mi0 * daneDoWykresu.wspQ[i] * daneDoWykresu.eta[i])) / 1000); // kPa\n\t\tdaneDoWykresu.mp[i] = ((daneDoWykresu.Q[i]*daneDoWykresu.deltap[i])/(daneDoWykresu.eta[i]*dane.etas))/100; // kW/100\n krok += 0.2;\n }\n return daneDoWykresu;\n}", "function kiekReiketuTapetuRulonuKambariui(ilgis, plotis, aukstis) {\n const vienasRulonas = 10;\n \n // debugger\n // gauti visus sienu ir lubu plota\n let sienos = kambarioSienuPlotas(ilgis, plotis, aukstis);\n let grindysLubos = kabarioLubosGrindys(ilgis, plotis);\n // pagal gauta plota paskaiciuoti kiek rulonu reikes \n let kiekRulonu = (sienos + grindysLubos) / vienasRulonas;\n\n return kiekRulonu;\n}", "function jelYamb(niz)\n{\n\tvar skup = napraviSet(niz);\n\n\t/* ako je velicina skupa 1 imamo yamb */\n\tif(skup.size === 1)\n\t\treturn 5*niz[0] + 80;\n\telse\n\t\treturn 0;\n\t\n}", "function zmien_ocene(ruch_t)\n{\n let nr_bierki_p = szachownica.pola[ruch_t.wiersz_p][ruch_t.kolumna_p];\n let nr_bierki_k = szachownica.pola[ruch_t.wiersz_k][ruch_t.kolumna_k];\n\n if(nr_bierki_k !== 0)\n zmien_ocene_usun(ruch_t.wiersz_k, ruch_t.kolumna_k);\n\n szachownica.ocena.tablice += wartosc_tabela(ruch_t.wiersz_k, ruch_t.kolumna_k, nr_bierki_p) - wartosc_tabela(ruch_t.wiersz_p, ruch_t.kolumna_p, nr_bierki_p);\n szachownica.ocena.tablice_koncowka += wartosc_tabela_konc(ruch_t.wiersz_k, ruch_t.kolumna_k, nr_bierki_p) - wartosc_tabela_konc(ruch_t.wiersz_p, ruch_t.kolumna_p, nr_bierki_p);\n}", "function wykonaj_ruch_SI()\n{\n let ruchy = generuj_ruchy(), ruch_t;\n\n // sprawdzanie czy jest mat/pat\n if(ruchy.ruchy.length + ruchy.zbicia.length === 0)\n {\n if(czy_szach(szachownica.biale_ruch))\n {\n // mat, SI przegralo\n napisz_wynik(szachownica.biale_ruch ? 2 : 1);\n }\n else\n {\n // pat, remis\n napisz_wynik(3);\n }\n\n zablokowane = true;\n\n return;\n }\n\n // sprawdzanie pozostalych remisow\n if(szachownica.liczba_polowek_od_r > 100 || poprzednie_pozycje[szachownica.hash] >= 3 || !czy_wystarczajacy_material())\n {\n napisz_wynik(3);\n\n szachownica.biale_ruch = !szachownica.biale_ruch;\n zablokowane = true;\n\n return;\n }\n\n tablica_transp = new Map();\n\n let nr = Math.floor(Math.random() * (ruchy.ruchy.length + ruchy.zbicia.length));\n\n if(nr < ruchy.ruchy.length)\n ruch_t = ruchy.ruchy[nr];\n else\n ruch_t = ruchy.zbicia[nr - ruchy.ruchy.length];\n\n wykonaj_ruch(ruch_t);\n if(szachownica.pola[ruch_t.wiersz_k][ruch_t.kolumna_k] === 6 && ruch_t.wiersz_k === 7)\n {\n // promocja biale\n promuj_piona(ruch_t.wiersz_k, ruch_t.kolumna_k, Math.floor(Math.random() * 4) + 2);\n }\n else if(szachownica.pola[ruch_t.wiersz_k][ruch_t.kolumna_k] === 12 && ruch_t.wiersz_k === 0)\n {\n // promocja czarne\n promuj_piona(ruch_t.wiersz_k, ruch_t.kolumna_k, Math.floor(Math.random() * 4) + 8);\n }\n\n narysuj();\n}", "function ocen_statycznie()\n{\n return szachownica.ocena.material + (szachownica.ocena.faza_gry * szachownica.ocena.tablice + (70 - szachownica.ocena.faza_gry) * szachownica.ocena.tablice_koncowka) * 0.03;\n}", "function obrisi_sekvencu(kliknuta_kartica) {\r\n\t// koji igrac zeli ponovo da popuni kombinaciju\r\n\tvar br_igraca = nadji_igraca(kliknuta_kartica);\r\n\tif (br_igraca == 1) {\r\n\t\tlocalStorage.setItem(\"sekvenca_zemalja1\", \"\");\r\n\t\t//sekvenca_zemalja1 = [];\r\n\t}\r\n\r\n\tif (br_igraca == 2) {\r\n\t\tlocalStorage.setItem(\"sekvenca_zemalja2\", \"\");\r\n\t\t//sekvenca_zemalja2 = [];\r\n\t}\r\n\r\n\t//dohvati sve kartice kako bi ih sve obrisao\r\n\tvar _niz = document.querySelectorAll(\"div.kartica\");\r\n\r\n\r\n\tvar vracen_fokus_na_prvu_karticu = 0;\r\n\t// 4 za po svakog igraca posto smo dohvatili sve kartice, a zelimo da brisemo samo za jednog\r\n\tfor (let i = 0; i < 8; i++) {\r\n\t\tlet vlasnik__niz = nadji_igraca(_niz[i]);\r\n\t\tif (vlasnik__niz != br_igraca) continue;\r\n\t\telse {\r\n\t\t\t// kada obrise sekvencu da se ispise ? na kartici\r\n\t\t\t_niz[i].innerHTML = \"<img class='icon' src='skocko-dodatno/upitnik2.png' alt='?'>\";\r\n\t\t\t_niz[i].classList.remove(mesto_fokusa[br_igraca]);\r\n\r\n\t\t\t// prva na koju naidjemo je zapravo prva kartica od tog igraca i na nju treba da se vratimo kada sve obrisemo\r\n\t\t\tif (vracen_fokus_na_prvu_karticu == 0) {\r\n\t\t\t\t_niz[i].classList.add(mesto_fokusa[br_igraca]);\r\n\t\t\t\tvracen_fokus_na_prvu_karticu = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "async function naVrsti() {\n // Preveri za konec igre\n let zm = await zmagovalec();\n if (zm != \"undefined\") {\n if (Number(zm) == igralec) {\n location.replace('/igra/zmaga');\n } else {\n location.replace('/igra/zguba');\n }\n return;\n }\n\n // Posodobi stanje bitke\n await zapolniTabelo();\n\n lahkoNapada = true;\n\n document.getElementById(\"besedilo\").innerText = \"Tunkaj ladje!\";\n document.getElementById(\"hnapad\").classList.add(\"border-info\");\n document.getElementById(\"hdomace\").classList.remove(\"border-info\");\n }", "function tukarBesarKecil(kalimat) {\n // INISIALISASI VARIABEL LIBRARY ABJAD DAN INDEKS ABJAD\n var lowAbjad = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];\n\n var upAbjad = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];\n\n var indexAbjad = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26];\n\n var i = 0;\n\n var resultOfTransform = [];\n\n // FUNCTION MENGECEK HURUF LOWERCASE\n function isItLowercase(huruf) {\n for (let i=0; i<lowAbjad.length; i++) {\n if (huruf === lowAbjad[i]) {\n return true;\n }\n }\n }\n\n // FUNCTION MENGECEK HURUF UPPERCASE\n function isItUppercase(huruf) {\n for (let i=0; i<upAbjad.length; i++) {\n if (huruf === upAbjad[i]) {\n return true;\n }\n }\n }\n\n // MENGAMBIL HURUF DARI ARRAY KALIMAT DAN MELAKUKAN PENGECEKAN UP/LOW CASE\n for (i; i<kalimat.length; i++) {\n // find indexAbjad of kalimat[i]\n var character = kalimat[i];\n //console.log(character);\n if (isItUppercase(character) === true) {\n // check indeks abjad\n for (var j=0; j<upAbjad.length; j++) {\n if (character === upAbjad[j]) {\n // transform to lowercase\n resultOfTransform.push(lowAbjad[j]);\n }\n }\n } else if (isItLowercase(character) === true) {\n for (var k=0; k<lowAbjad.length; k++) {\n if (character === lowAbjad[k]) {\n // transform to uppercase\n resultOfTransform.push(upAbjad[k]);\n }\n }\n } else { // mengembalikan nilai kalimat[i] sesuai nilai asal\n resultOfTransform.push(kalimat[i]);\n }\n }\n\n // merubah array resToString ke dalam bentuk STRING\n var resToString = resultOfTransform.toString();\n var finalResult = '';\n\n // membuang setiap tanda koma hasil dari transform array ke string\n for (var m=0; m<resToString.length; m++) {\n if (resToString[m] !== ',') {\n finalResult += resToString[m];\n }\n }\n\n // mengembalikan hasil\n return finalResult;\n}", "function jelFul(niz)\n{\n\tvar skup = napraviSet(niz);\n\t\t\n\t/* ako je velicina skupa 2, kandidat za full */\n\tif(skup.size === 2)\n\t{\n\t\tvar tmp = 0;\n\n\t\t/* since we dont have [] operator for sets in java script */\n\t\tvar tmpn = Array.from(skup);\n\n\t\t/* koji ful? */\n\t\tfor(var i=0; i<niz.length; ++i)\n\t\t{\n\t\t\tif(tmpn[0] === niz[i])\n\t\t\t\t++tmp;\n\t\t}\n\n\t\t//console.log(\"148 \" + tmp);\n\n\t\tif(tmp === 2)\n\t\t{\n\t\t\treturn tmp*tmpn[0] + 3*tmpn[1] + 40;\n\t\t}\n\n\t\tif(tmp === 3)\n\t\t{\n\t\t\treturn tmp*tmpn[0] + 2*tmpn[1] + 40;\n\t\t}\n\t}\n\telse\n\t\treturn 0;\n\n}", "function zwrocUnikSlowaIwielkFontow() {\n \n let wszyskieTytuly = listOfMovies.map((film) => getTitle(film));\n let wszystkieSlowaZtytulow = zwrocSlowaZtytulow(wszyskieTytuly);\n let unikalneSlowa = getUniqueWords(wszystkieSlowaZtytulow);\n\n // nie bylo czy sortowac rosnaco, czy malejaco\n // 'slowa uporzadkuj alfabetycznie' (rosnaco czy malejaco)\n // damy rosnaco\n unikalneSlowa = unikalneSlowa.sort((a, b) => a.localeCompare(b));\n \n //liczymy liczbe wystapien slowa\n let liczbWystSlowa = [];\n\n for (let i = 0; i < unikalneSlowa.length; i++) {\n\t// tmp - zawiera dane unikalne slowo powtorzone tyle razy \n\t// ile wystapilo w tytulach, np. [\"ala\", \"ala\", \"ala\"], czy [\"kot\"]\n\tlet tmp = wszystkieSlowaZtytulow.filter((slowo) => slowo == unikalneSlowa[i]);\n\tliczbWystSlowa.push(tmp.length);\n }\n \n // dodamy na poczatku ten tag \"wszystkie tagi\" do wyswietlanie wszystkich filmow\n // lepiej wygladalby przycisk, no ale zadanie to zadanie\n // bedzie jednak \"wszystkie tagi\" bo inaczej tytul w stylu: \n // \"wszystkie psy ida do nieba\" bedzie klopotliwy\n unikalneSlowa.unshift(\"wszystkie tagi\");\n liczbWystSlowa.unshift(4); \t// a to da w efekcie czcionke = 20px\n \n // obliczmy wielkosci czcionek\n let wielkosciCzcionek = \n\tliczbWystSlowa.map((wystapienie) => zwrocRozmCzcionki(wystapienie));\n\n return [unikalneSlowa, wielkosciCzcionek];\n}", "function rimuovi(){\n\n\tvar j = 0;\n\n\t// Per ogni elemento controllo la condizione\n\t// Se è idoneo, copio elemento in J\n\n\tfor(var i = 0; i<persone.length; i++){\n\t\tif(persone[i].altezza > 1.5) {\n\t\t\tpersone[j++] = persone[i];\n\t\t}\n\t}\n\t// Aggiorno array con valori nuovi messi in J\n\tpersone.length = j;\n\n\t// Visualizzo\n\tvisualizzaPersone();\n}", "function zmien_ocene_dodaj(wiersz, kolumna, nr_bierki)\n{\n szachownica.ocena.material += wartosci[nr_bierki];\n szachownica.faza_gry += wartosci_faza_gry[nr_bierki];\n\n if(szachownica.faza_gry > 70)\n szachownica.faza_gry = 70;\n\n szachownica.ocena.tablice += wartosc_tabela(wiersz, kolumna, nr_bierki);\n szachownica.ocena.tabele_koncowka += wartosc_tabela_konc(wiersz, kolumna, nr_bierki);\n}", "function liczbaZnakow(zdanie, litera) {\n\n\n var policz = 0;\n\n for (i = 0; i < zdanie.length; i++) {\n\n if (zdanie[i] == litera) {\n policz++;\n }\n }\n return \"Litera \" + litera + \" wystepuje \" + policz + \" razy w zdaniu : \" + zdanie ;\n}", "liikuta(nimi, suunta){\n for (var i = 0; i < this.hahmot.length; i++){\n var h = this.hahmot[i];\n if (h.nimi == nimi) {\n if (suunta == suunnat.OIKEA) {\n if (this.onkoEtanoita(h.x + 1,h.y)) return;\n if (++h.x >= this.leveys) {\n h.x = 0;\n }\n }\n if (suunta == suunnat.VASEN) {\n if (this.onkoEtanoita(h.x - 1,h.y)) return;\n if (--h.x < 0) {\n h.x = this.leveys - 1;\n }\n }\n if (suunta == suunnat.YLOS) {\n if (this.onkoEtanoita(h.x,h.y - 1)) return;\n if (--h.y < 0) {\n h.y = 0;\n }\n }\n if (suunta == suunnat.ALAS) {\n if (this.onkoEtanoita(h.x, h.y + 1)) return;\n if (++h.y >= this.korkeus) {\n h.y = this.korkeus - 1;\n }\n }\n }\n } \n if (typeof this.pelihahmo == 'undefined') return;\n var h = this.pelihahmo;\n if (h.nimi == nimi) {\n if (suunta == suunnat.OIKEA) {\n if (++h.x >= this.leveys) {\n h.x = 0;\n }\n pisteet++;\n }\n if (suunta == suunnat.VASEN) {\n if (--h.x < 0) {\n h.x = this.leveys - 1;\n }\n pisteet--;\n }\n if (suunta == suunnat.YLOS) {\n if (--h.y < 0) {\n h.y = 0;\n }\n }\n if (suunta == suunnat.ALAS) {\n if (++h.y >= this.korkeus) {\n h.y = this.korkeus - 1;\n }\n }\n }\n }", "function graczOberwal() {\r\n\r\n\t\t\t\t//zabieranie rebulla:\r\n\t\t\t\tif (DD_predkoscPocztkowaGracza >= 250) {\r\n\t\t\t\t\tDD_predkoscPocztkowaGracza -= 125;\r\n\t\t\t\t\tgracz.twoway(DD_predkoscPocztkowaGracza); //redukuj predkosc gracza\r\n\t\t\t\t\tDD_obrazeniaPocikskowGracz -= 0.05; //zredukuj obrazenia zadawane przez pociski gracza\r\n\r\n\t\t\t\t\t//dodaj napis o redukcji rebulla:\r\n\t\t\t\t\tvar bonusTekst = Crafty.e(\"2D, Canvas, Text, Delay, Motion\")\r\n\t\t\t\t\t\t.attr({ x: gracz.x - 25, y: gracz.y, z: 98 })\r\n\t\t\t\t\t\t.text('- REBULL')\r\n\t\t\t\t\t\t.textColor('gray')\r\n\t\t\t\t\t\t.textFont({ size: '15px', weight: 'bold' })\r\n\t\t\t\t\t\t.bind('EnterFrame', function (e) {\r\n\t\t\t\t\t\t\tthis.alpha -= 0.01;\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.delay(function () {\r\n\t\t\t\t\t\t\tthis.destroy();\r\n\t\t\t\t\t\t}, 1500, 0)\r\n\t\t\t\t\t\t;\r\n\t\t\t\t\tbonusTekst.velocity().y = -50;\r\n\r\n\t\t\t\t}\r\n\t\t\t\tif (DD_buforStrzalu <= 5) {\r\n\t\t\t\t\tDD_buforStrzalu += 1; //redukuj szybkosztrzelnosc\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//czerwona maska przy oberwaniu od przeciwnika:\r\n\t\t\t\tvar boli = Crafty.e('2D, Canvas, Image, Renderable, Delay')\r\n\t\t\t\t\t.attr({ x: 0, y: 0, w: 500, h: 300 })\r\n\t\t\t\t\t.image(\"assets/obrazki/ouch2.png\", \"no-repeat\")\r\n\t\t\t\t\t.delay(function () {\r\n\t\t\t\t\t\tthis.destroy();\r\n\t\t\t\t\t}, 150, 0)\r\n\t\t\t\t\t;\r\n\t\t\t\t// intensywnosc maski zalezy od ilosci pozostalego zycia:\r\n\t\t\t\tboli.alpha = (1 / gracz.zycie) * DD_fala;\r\n\t\t\t\treturn;\r\n\t\t\t}", "async function naCakanju() {\n lahkoNapada = false;\n document.getElementById(\"besedilo\").innerText = \"Cakaj nasprotnika!\";\n document.getElementById(\"hdomace\").classList.add(\"border-info\");\n document.getElementById(\"hnapad\").classList.remove(\"border-info\");\n\n // Zacni cakanje da je igralec na vrsti\n zacniCakanje(`/igra/naVrsti/${id_igre}/${igralec}`, naVrsti, (el) => el != 'false');\n }", "function fl_outToOznei_aman ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.maza.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.beiza.alpha=1\n\t\t\tthis.hazeret.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.gvina.alpha=1\n\t\t\tthis.dvash.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t\tthis.mishloah.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.chanuka_btn.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.pesach_btn.alpha=1\n\t\t this.shavuot_btn.alpha=1\n\t\t this.rosh_ha_shana_btn.alpha=1\n\t\t this.bible_btn.alpha=1\n\t\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t\n\t\t}}", "function preberiMeritveVitalnihZnakov() {\n\tsessionId = getSessionId();\n \n \n\tvar ehrId = $(\"#meritveVitalnihZnakovEHRid\").val();\n\t\n\t// Spodaj poskrbimo da so vrednosti ponovno \"\", ko izberemo drugega pacienta\n\t//prav tako ponovno skrijemo vrednosti, tako da se pokazejo sele ob pritisku na gumb\n document.getElementById(\"wikiTextBloodPressure\").innerHTML = \"\";\n document.getElementById(\"wikiTextDeath\").innerHTML = \"\";\n document.getElementById(\"wikiTextItm\").innerHTML = \"\";\n document.getElementById(\"wikiTextTveganja\").innerHTML = \"\";\n document.getElementById(\"wikiTextZdravje\").innerHTML = \"\";\n $(\"#wikiTextTveganja2\").html(\"\"); //lazje kot document.getelement blabla\n $(\"#wikiDetails\").hide();\n\n\tif (!ehrId || ehrId.trim().length == 0 ) {\n\t\t$(\"#preberiMeritveVitalnihZnakovSporocilo\").html(\"<span class='obvestilo \" +\n \"label label-warning fade-in'>Prosim vnesite zahtevan podatek!\");\n\t} else {\n\t \n\t\n\t\t$.ajax({\n\t\t\turl: baseUrl + \"/demographics/ehr/\" + ehrId + \"/party\",\n\t \ttype: 'GET',\n\t \theaders: {\"Ehr-Session\": sessionId},\n\t \tsuccess: function (data) {\n\t\t\t\tvar party = data.party;\n\t\t\t\t\n\n\t\t\t\t//pridobimo srcni utrip\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t url: baseUrl + \"/view/\" + ehrId + \"/\" + \"pulse\",\n\t\t\t\t\t type: 'GET',\n\t\t\t\t\t headers: {\"Ehr-Session\": sessionId},\n\t\t\t\t\t success: function (res) {\n\t\t\t\t var hintUtrip = \"<br>\";\n\t\t\t\t \n\t\t\t\t if (res[res.length-1].pulse > 100)\n\t\t\t\t \thintUtrip += \"<p class='bg-danger'>Vaš srčni utrip je povišan. Optimalen srčni utrip znaša 50 - 100 /min</p>\"\n\t\t\t\t \telse if (res[res.length-1].pulse < 50)\n\t\t\t\t hintUtrip += \"<p class='bg-danger'>Vaš srčni utrip je nizek. Optimalen srčni utrip znaša 50 - 100 /min/p>\"\n\t\t\t\t else\n\t\t\t\t \thintUtrip += \"<p class='bg-success'> Vaš srčni utrip je optimalen </p>\"\n\t\t\t\t \n\t\t\t\t\t document.getElementById('utrip').innerHTML = \"Vaš srčni utrip znaša \" + res[res.length-1].pulse + \" /min\" + hintUtrip;\n\t\t\t\t\t document.getElementById('utripNumber').innerHTML = res[res.length-1].pulse;\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t preveri() //pri vsakem klicu gremo v funkcijo \"preveri\", katera caka da se izvedejo vsi tej klici, potem pa nadaljuje z graficnim prikazom\n\t\t\t\t\t \n\t\t\t\t\t },\n\t\t\t\t\t});\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//zacetek ajaxa za tezo\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t url: baseUrl + \"/view/\" + ehrId + \"/\" + \"weight\",\n\t\t\t\t\t type: 'GET',\n\t\t\t\t\t headers: {\"Ehr-Session\": sessionId},\n\t\t\t\t\t success: function (res) {\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t document.getElementById('teza').innerHTML = \"<p class='bg-info'>Vaša teža znaša \" + res[res.length-1].weight + \" kg </p>\"\n\t\t document.getElementById('tezaNumber').innerHTML = res[res.length-1].weight;\n\t\t preveri()\n\t\t\t\t\t },\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t//zacetek ajaxa za zgornji tlak\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t url: baseUrl + \"/view/\" + ehrId + \"/\" + \"blood_pressure\",\n\t\t\t\t\t type: 'GET',\n\t\t\t\t\t headers: {\"Ehr-Session\": sessionId},\n\t\t\t\t\t success: function (res) {\n\t\t\t\t\t var hintTlak = \"<br>\";\n\t\t\t\t\t \n\t\t\t\t\t \tif (res[res.length-1].systolic > 140)\n\t\t\t\t\t \t\thintTlak += \" <p class='bg-danger'>Vaš zgornji krvni tlak je povišan. Optimalen sistolični tlak znaša 100 - 140 mm Hg</p>\"\n\t\t\t\t\t \telse if (res[res.length-1].systolic < 100)\n\t\t\t\t\t \t\thintTlak += \" <p class='bg-danger'>Vaš zgornji krvni tlak je nizek. Optimalen sistolični tlak znaša 100 - 140 mm Hg</p>\"\n\t\t\t\t\t \telse\n\t\t\t\t\t \t\thintTlak += \"<p class='bg-success'>Vaš zgornji krvni tlak je optimalen </p>\"\n\t\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t document.getElementById('zgornjiTlak').innerHTML = \"Vaš zgornji krvni pritisk znaša \" + res[res.length-1].systolic + \" mm Hg\" + hintTlak\n\t\t document.getElementById(\"zgornjiTlakNumber\").innerHTML = res[res.length-1].systolic;\n\t\t preveri()\n\t\t \n\t\t\t\t\t },\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t//zacetek ajaxa za spodnji tlak\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t url: baseUrl + \"/view/\" + ehrId + \"/\" + \"blood_pressure\",\n\t\t\t\t\t type: 'GET',\n\t\t\t\t\t headers: {\"Ehr-Session\": sessionId},\n\t\t\t\t\t success: function (res) {\n\t\t\t\t\t \tvar hintSpodnji = \"<br>\"\n\t\t\t\t\t \t\n\t\t\t\t\t \tif (res[res.length-1].diastolic > 90)\n\t\t\t\t\t \t\thintSpodnji += \" <p class='bg-danger'>Vaš spodnji krvni tlak je povišan. Optimalen diastolični tlak znaša 60 - 90 mm Hg</p>\"\n\t\t\t\t\t \telse if (res[res.length-1].systolic < 60)\n\t\t\t\t\t \t\thintSpodnji += \" <p class='bg-danger'>Vaš spodnji krvni tlak je nizek. Optimalen diastolični tlak znaša 60 - 90 mm Hg</p>\"\n\t\t\t\t\t \telse\n\t\t\t\t\t \t\thintSpodnji += \"<p class='bg-success'>Vaš spodnji krvni tlak je optimalen </p>\"\n\t\t document.getElementById('spodnjiTlak').innerHTML = \"Vaš spodnji krvni pritisk znaša \" + res[res.length-1].diastolic + \" mm Hg\" + hintSpodnji\n\t\t document.getElementById(\"spodnjiTlakNumber\").innerHTML = res[res.length-1].diastolic;\n\t\t preveri()\n\t\t\t\t\t },\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t//zacetek ajaxa za višino\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t url: baseUrl + \"/view/\" + ehrId + \"/\" + \"height\",\n\t\t\t\t\t type: 'GET',\n\t\t\t\t\t headers: {\"Ehr-Session\": sessionId},\n\t\t\t\t\t success: function (res) {\n\t\t\t\t\t \n\t\t document.getElementById('visina').innerHTML = \"<p class='bg-info'>Vaša višina znaša \" + res[res.length-1].height + \" cm</p>\"\n\t\t document.getElementById(\"visinaNumber\").innerHTML = res[res.length-1].height;\n\t\t preveri()\n\t\t\t\t\t },\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t$(\"#overall, #details, #friendlyTip\").show();\n\t\t\n\t\t\t\n\t\n\t\t\t\t\n\t \t},\n\t \n\t\t});\n\t}\n\t\n}", "function jelPoker(niz)\n{\n\tvar skup = napraviSet(niz);\n\n\t/* since we dont have [] operator for sets in java script */\n\tvar tmpn = Array.from(skup);\n\n\t/* ako je velicina skupa 1, imamo yamb sto je vec poker */\n\tif (skup.size === 1)\n\t{\n\t\treturn 4*tmpn[0] + 50;\n\t}\n\n\t\t\n\t/* ako je velicina skupa 2, kandidat za poker */\n\tif(skup.size === 2)\n\t{\n\t\tvar tmp = 0;\n\n\n\t\t/* koji poker? */\n\t\tfor(var i=0; i<niz.length; ++i)\n\t\t{\n\t\t\tif(tmpn[0] === niz[i])\n\t\t\t\t++tmp;\n\t\t}\n\n\t\t//console.log(\"148 \" + tmp);\n\n\t\tif(tmp === 1)\n\t\t{\n\t\t\treturn 4*tmpn[1] + 50;\n\t\t}\n\t\telse if(tmp === 4)\n\t\t{\n\t\t\treturn tmp*tmpn[0] + 50;\n\t\t}\n\t\telse\n\t\t\treturn 0;\n\t}\n\telse\n\t\treturn 0;\n\n}", "function gra()\n{\n\t\n\t// klasa weza\n\tfunction Waz(imie, nr)\n\t{\n\t\tthis.imie = imie;\n\t\tthis.nr = nr;\n\t\tthis.waz;\n\t\t\n\t\tthis.stworz = function(plansza, init) \n\t\t{\n\t\t\tthis.kierunek = 'p';\n\t\t\tthis.punkty = 0;\n\t\t\tthis.predkosc = 100;\t\n\t\t\tthis.waz = new Array(init);\n\t\t\t\n\t\t\t// wyloowanie pozycji dla glowy weza\n\t\t\tvar wspolrzedne = losowanieWspolrzednych();\n\t\t\t\n\t\t\t// --> plansza[x][y] == 5 oznacza jedzenie, 1 lub 2 i kolejne to oznacza, ze waz sie tam znajduje\n\t\t\t// sprawdzenie czy wylosowana pozycja glowy pozwoli na zmieszczenie reszty czlonow weza\n\t\t\twhile (((wspolrzedne[0] - this.waz.length) < 0) || ( plansza[wspolrzedne[0]][wspolrzedne[1]] == this.nr)\n\t\t\t\t\t|| ( plansza[wspolrzedne[0]][wspolrzedne[1]] ==5)) \n\t\t\t\twspolrzedne[0] = losowanieX();\n\t\t\t\n\t\t\t// wpisanie weza na plansze zaczynajac od glowy\n\t\t\tfor (var i = 0; i < this.waz.length; i++)\n\t\t\t{\n\t\t\t\tthis.waz[i] = { x: wspolrzedne[0] - i, y: wspolrzedne[1] };\n\t\t\t\t//console.log(this.waz[0].x);\n\t\t\t\tplansza[wspolrzedne[0] - i][wspolrzedne[1]] = this.nr;\n\t\t\t}\t \n\t\t\treturn plansza;\n\t\t}\n\t\t\n\t\tthis.rysuj = function(plansza) \n\t\t{\t\t\t\n\t\t\t// przejscie po kazdym elemencie weza, zaczynam od jego ostatniego czlonu\n\t\t\tfor (var i = this.waz.length - 1; i >= 0; i--) \n\t\t\t{\t\t\t\n\t\t\t\t// ---> roznica miedzy porownaniem ===, a == jest taka, ze === nie konwertuje typow\n\t\t\t\t// przesuwam glowe weza zgodnie z jego kierunkiem poruszania sie\n\t\t\t\tif (i === 0) {\n\t\t\t\t\tswitch(this.kierunek) {\n\t\t\t\t\t\tcase 'p': // Right\n\t\t\t\t\t\t\tthis.waz[0] = { x: this.waz[0].x + 1, y: this.waz[0].y }\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'l': // Left\n\t\t\t\t\t\t\tthis.waz[0] = { x: this.waz[0].x - 1, y: this.waz[0].y }\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'g': // Up\n\t\t\t\t\t\t\tthis.waz[0] = { x: this.waz[0].x, y: this.waz[0].y - 1 }\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'd': // Down\n\t\t\t\t\t\t\tthis.waz[0] = { x: this.waz[0].x, y: this.waz[0].y + 1 }\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t \n\t\t\t\t\t// sprawdzenie czy glowa weza nie wyszla poza zakres planszy gry\n\t\t\t\t\tif (this.waz[0].x < 0 || this.waz[0].x >= ilSzerokosc || \tthis.waz[0].y < 0 ||\tthis.waz[0].y >= ilWysokosc)\n\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\tprzegrana(this.imie);\n\t\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t// jesli waz wszedl na jedzenie to zwiekszam il. punktow\n\t\t\t\t\tif (plansza[this.waz[0].x][this.waz[0].y] === 5) \n\t\t\t\t\t{\n\t\t\t\t\t\tthis.punkty += 1;\n\t\t\t\t\t\tplansza = losowanieJedzenia(plansza); // wylosowanie nowego miejsca dla jedzenia\t \n\t\t\t\t\t\t// oraz dodaje nowy czlon weza\n\t\t\t\t\t\tthis.waz.push({ x: this.waz[this.waz.length - 1].x, y: this.waz[this.waz.length - 1].y });\n\t\t\t\t\t\tplansza[this.waz[this.waz.length - 1].x][this.waz[this.waz.length - 1].y] = this.nr;\t \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// sprawdzenie czy waz nie uderzyl sam w siebie\n\t\t\t\t\t} else if (plansza[this.waz[0].x][this.waz[0].y] === this.nr)\n\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\tprzegrana(this.imie);\n\t\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t\t} else if (plansza[this.waz[0].x][this.waz[0].y] === 2)\n\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t// wygral adam\n\t\t\t\t\t\twaz1.punkty+=5;\n\t\t\t\t\t\tvar ilosc = waz2.waz.length/2;\n\t\t\t\t\t\tif(ilosc < 2) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tprzegrana(waz2.imie);\t\n\t\t\t\t\t\t\treturn;\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(var i=0; i<ilosc; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tplansza[waz2.waz[waz2.waz.length-1].x][waz2.waz[waz2.waz.length-1].y] = null;\n\t\t\t\t\t\t\twaz2.waz.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t} else if (plansza[this.waz[0].x][this.waz[0].y] === 1)\n\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t// wygral dawid\n\t\t\t\t\t\twaz2.punkty+=5;\n\t\t\t\t\t\tvar ilosc = waz1.waz.length/2;\n\t\t\t\t\t\tif(ilosc < 2) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tprzegrana(waz1.imie);\t\n\t\t\t\t\t\t\treturn;\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(var i=0; i<ilosc; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tplansza[waz1.waz[waz1.waz.length-1].x][waz1.waz[waz1.waz.length-1].y] = null;\n\t\t\t\t\t\t\twaz1.waz.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t// wpisanie nowej pozycji glowy weza do planszy\n\t\t\t\t\tplansza[this.waz[0].x][this.waz[0].y] = this.nr;\n\t\t\t\t} else // dla wszystkich czlonow weza oprocz glowy\n\t\t\t\t{\n\t\t\t\t\t// zwolnienie ostatniego czlonu weza\n\t\t\t\t\tif (i === (this.waz.length - 1))\n\t\t\t\t\t\tplansza[this.waz[i].x][this.waz[i].y] = null;\t\t\t\t\n\t\t \n\t\t\t\t\t// przypisanie miejsca wczesniejszego czlonu weza do czlonu i\n\t\t\t\t\tthis.waz[i] = { x: this.waz[i - 1].x, y: this.waz[i - 1].y };\n\t\t\t\t\tplansza[this.waz[i].x][this.waz[i].y] = this.nr;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn plansza;\t\t\n\t\t}\n\n\t}\n\t\n\t// tworze obiekt canvas ze standardu HTML 5 do rysowania na nim gry\n\tvar canvas = document.createElement('canvas'),\n\t\tcontext = canvas.getContext('2d'),\n\t ilWezy = 0,\n\t\tpredkosc = 100,\n\t\tgra = false; // czy gra jest aktywna\t\n\t\n\t// wyliczenie ilosc pol do gry w zaleznosci od rozdzieloczosc okna\n\t// --->> \"-1\" zeby plansza gry nie wychodzila poza obszar ekranu\n\tvar ilSzerokosc = parseInt(window.innerWidth / 20) - 1;\n\tvar ilWysokosc = parseInt(window.innerHeight / 20) - 2 ;\t\n\t\t\t\n\t// wymiary ramki do planszy\n\tcanvas.width = ilSzerokosc*20;\t\t\t\t\n\tcanvas.height = ilWysokosc*20;\n\t\n\t// stworzenie planszy o dwoch wymiarach \n\tvar plansza = new Array(ilSzerokosc);\n\tfor (var i = 0; i < plansza.length; i++)\t\n\t\tplansza[i] = new Array(ilWysokosc);\n\t\n\t\n\t// dodanie dwoch graczy lokalnych\n\tilWezy++;\n\tvar waz1 = new Waz(\"Adam\", ilWezy);\n\tplansza = waz1.stworz(plansza, 8);\t\n\tilWezy++;\n\tvar waz2 = new Waz(\"Dawid\", ilWezy);\n\tplansza = waz2.stworz(plansza, 8); \n\tgra = true;\n\t\n\t// wygenerowanie pozycji pierwszego punktu\n\tplansza = losowanieJedzenia(plansza);\n\t\n\t/* cos nie chce zadzialac\n\t// stworzenie zmiennej do przechowania stylow css\n\tvar css = 'punktacja { font-size:30px;}';\n\tvar style = document.createElement('style');\n\tstyle.type = 'text/css';\n\tif (style.styleSheet){\n\t style.styleSheet.cssText = css;\n\t} else {\n\t style.appendChild(document.createTextNode(css));\n\t}\n\tdocument.getElementsByTagName('head')[0].appendChild(style); */\n\t\t\n\t// pobranie referencji do obiekty body ze strony HTML\n\t// --->pobieram [0], zeby otrzymac jeden element, a nie cala liste,\n\t// --->bo getElementsBtTagName() zwraca zawsze liste\n\tvar body = document.getElementsByTagName('body')[0];\t\n\tvar punktacja = document.createTextNode(\"Punkty: \" + waz1.punkty);\n\t// dodanie obiektu punktacji i planszy (canvas) do ciala strony\t\n\tbody.appendChild(punktacja);\t\n\tbody.appendChild(canvas);\n\t\n\t// wywolanie f. odpowiedzialnej za rysowanie gry\n\trysowanie(plansza);\n\t\n\t// nasluchiwanie wcisniecia przyciskow strzalek do sterowania wezem\n\twindow.addEventListener('keydown', function(event) {\n if (event.keyCode === 38 && waz1.kierunek !== 'd') {\n waz1.kierunek = 'g'; // Up\n } else if (event.keyCode === 40 && waz1.kierunek !== 'g') {\n waz1.kierunek = 'd'; // Down\n\t\t} else if (event.keyCode === 39 && waz1.kierunek !== 'l') {\n waz1.kierunek = 'p'; // Right\n } else if (event.keyCode === 37 && waz1.kierunek !== 'p') {\n waz1.kierunek = 'l'; // Left\n\t\t} else if (event.keyCode === 87 && waz2.kierunek !== 'g') {\n waz2.kierunek = 'g'; // Up\n } else if (event.keyCode === 83 && waz2.kierunek !== 'g') {\n waz2.kierunek = 'd'; // Down\n\t\t} else if (event.keyCode === 68 && waz2.kierunek !== 'l') {\n waz2.kierunek = 'p'; // Right\n } else if (event.keyCode === 65 && waz2.kierunek !== 'p') {\n waz2.kierunek = 'l'; // Left\n\t\t}\n });\t\n\t\n\t// rysowanie kolejnych elementow gry\n\tfunction rysowanie()\n\t{\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height); // wyczyszczenie planszy\n\t\trysujRamke(); // narysowanie ramki i wypisanie punktacji\t\t\t\n\t\t\n\t\tplansza = waz1.rysuj(plansza);\n\t\tplansza = waz2.rysuj(plansza);\n\t\t\n\t\t// narysowanie wezy i jedzenia\n for (var x = 0; x < ilSzerokosc ; x++) {\n for (var y = 0; y < ilWysokosc; y++) {\n if (plansza[x][y] == 5) {\n context.fillStyle = 'red';\n context.fillRect(x * 20, y * 20, 20, 20);\n } else if (plansza[x][y] === 1) {\n context.fillStyle = 'green';\n context.fillRect(x * 20, y * 20, 20, 20); \n } else if (plansza[x][y] === 2) {\n context.fillStyle = 'blue';\n context.fillRect(x * 20, y * 20, 20, 20); \n }\n }\n }\n\t\t\n\t\t// wywolanie funkcji rysowania z opoznieniem w ms okreslonym zmienna prekosc\n if(gra) setTimeout(rysowanie, 200); \n\t}\n\t\n\tfunction rysujRamke() \n\t{\t\t\n\t\tcontext.fillStyle = 'black'; // okresla kolor ramki\n\t\tcontext.lineWidth = 5; // okresla szerekosc ramki\n\t\t//narysowanie ramki planszy\n\t\tcontext.strokeRect(0, 0, canvas.width, canvas.height);\n\t\t\n\t\t// uaktualnienie ilosc punktow gracza\n\t\tvar tekst = waz1.imie+ \" zdobyl \" + waz1.punkty + \" punkty/ow. \"\n\t\t\t\t + waz2.imie+ \" zdobyl \" + waz2.punkty + \" punkty/ow\";\n\t\tpunktacja.nodeValue = tekst;\n\t\tpunktacja.fontsize=20;\t\n\t\t// --> aleternatywne wypisanie punktow\n\t\t//context.font = '20px arial';\n\t\t//context.fillText(imie, 10, 30);\n\t\t//context.fillText(\"Punktacja: \" + punkty, 300, 30);\t\n\t}\t\n\t\n\tfunction losowanieJedzenia(plansza)\n\t{\n // wylosowanie wspolrzednych dla jedzenia\n var wspolrzedne = losowanieWspolrzednych();\n\t\t\n // sprwadzenie czy wylosowana pozycja jedzenia nie naklada sie z cialem weza\n while (plansza[wspolrzedne[0]][wspolrzedne[1]] === 1 || plansza[wspolrzedne[0]][wspolrzedne[1]] === 2) \n wspolrzedne = losowanieWspolrzednych();\n \n\t\t// wpisanie jedzenia do planszy\n plansza[wspolrzedne[0]][wspolrzedne[1]] = 5; \n return plansza;\t\n\t}\n\t\n\tfunction przegrana(imie)\n\t{\n\t\tgra = false;\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height); // wyczyszczenie ekranu gry\n\t\tcontext.fillStyle = 'red';\n\t\tcontext.font = '20px arial';\t\t\n\t\tcontext.fillText(imie+ ' przegral !', canvas.width / 2 , 50);\n\t}\n\tfunction losowanieX()\n\t{\n\t\treturn Math.round(Math.random() * (ilSzerokosc-1));\n\t}\n\n\tfunction losowanieWspolrzednych()\n\t{\n\t\tvar tab = [];\n\t\ttab[0] = losowanieX();\n\t\ttab[1] = Math.round(Math.random() * ilWysokosc-3);\n\t\treturn tab;\n\t}\t\n\n}", "function zmien_ocene_usun(wiersz, kolumna)\n{\n let nr_bierki = szachownica.pola[wiersz][kolumna];\n\n if(nr_bierki === 0)\n return;\n \n szachownica.ocena.material -= wartosci[nr_bierki];\n szachownica.faza_gry -= wartosci_faza_gry[nr_bierki];\n\n szachownica.ocena.tablice -= wartosc_tabela(wiersz, kolumna, nr_bierki);\n szachownica.ocena.tablice_koncowka -= wartosc_tabela_konc(wiersz, kolumna, nr_bierki);\n\n if(szachownica.faza_gry < 0)\n szachownica.faza_gry = 0;\n}", "function fl_outToSelek ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.maza.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.beiza.alpha=1\n\t\t\tthis.hazeret.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.gvina.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dvash.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t\tthis.mishloah.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.chanuka_btn.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.purim_btn.alpha=1\n\t\t this.pesach_btn.alpha=1\n\t\t this.shavuot_btn.alpha=1\n\t\t this.bible_btn.alpha=1\n\t\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t\n\t\t}}", "function hitungLuasLingkaran(jariJari){\n return 3.14 * jariJari ^ 2 \n}", "function fl_outToGvina ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.maza.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.beiza.alpha=1\n\t\t\tthis.hazeret.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dvash.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t\tthis.mishloah.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.chanuka_btn.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.purim_btn.alpha=1\n\t\t this.pesach_btn.alpha=1\n\t\t this.rosh_ha_shana_btn.alpha=1\n\t\t this.bible_btn.alpha=1\n\t\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t}}", "function swieta_ruchome(year) \n{\n //wielkanoc\n var poniedzialek_wielkanocny_dzien, poniedzialek_wielkanocny_miesiac, boze_cialo_dzien, boze_cialo_miesiac,\n luty = l_dni(1, year), \n dzien_roku = 31 + luty, \n f = Math.floor,\n\t\tG = year % 19,\n\t\tC = f(year / 100),\n\t\tH = (C - f(C / 4) - f((8 * C + 13)/25) + 19 * G + 15) % 30,\n\t\tI = H - f(H/28) * (1 - f(29/(H + 1)) * f((21-G)/11)),\n\t\tJ = (year + f(year / 4) + I + 2 - C + f(C / 4)) % 7,\n\t\tL = I - J,\n\t\tmonth = 3 + f((L + 40)/44),\n day = L + 28 - 31 * f(month / 4);\n\n if( day==31 && month==3 )\n {\n poniedzialek_wielkanocny_dzien = 1;\n poniedzialek_wielkanocny_miesiac = 3;\n }\n else\n {\n poniedzialek_wielkanocny_dzien = day + 1;\n poniedzialek_wielkanocny_miesiac = month - 1;\n }\n\n if( month==3 )\n {\n dzien_roku += day;\n }\n else\n {\n dzien_roku = dzien_roku + 31 + day;\n }\n\n dzien_roku += 60;\n\n if( luty==28 && dzien_roku<=151)\n {\n boze_cialo_dzien = dzien_roku - 120;\n boze_cialo_miesiac = 4;\n }\n else if( luty==29 && dzien_roku<=152 )\n {\n boze_cialo_dzien = dzien_roku - 121;\n boze_cialo_miesiac = 4;\n }\n else if( luty==29 )\n {\n boze_cialo_dzien = dzien_roku - 152;\n boze_cialo_miesiac = 5;\n }\n else\n {\n boze_cialo_dzien = dzien_roku - 151;\n boze_cialo_miesiac = 5;\n }\n\n return [poniedzialek_wielkanocny_dzien, poniedzialek_wielkanocny_miesiac, boze_cialo_dzien, boze_cialo_miesiac];\n}", "popuniIzvjestaj() {\n this.vrijednost = Util.getRandomFloatIn(2, 10);\n this.vrijemeObroka = Util.randomDate(new Date(2012, 0, 1), new Date());\n }", "function indovina(){\n\n gino = get(posIniX, posIniY, beholder.width, beholder.height);\n classifier.classify(gino, gotResult);\n mappa = aCheAssimiglia(gino, daMappare);\n\n}", "function uspjesnost() {\n let brojRijesenih = 0;\n let procenat = 0;\n\n zadaci.forEach(zadatak => {\n if (zadatak.zavrsen === true) {\n brojRijesenih++;\n }\n })\n procenat = ((brojRijesenih / zadaci.length) * 100).toFixed(2);\n\n if (procenat < 50) {\n document.getElementById(\"uspesnost\").style.color = \"#DC143C\";\n } else {\n document.getElementById(\"uspesnost\").style.color = \"#00AD56\";\n }\n if (zadaci.length == 0) {\n document.getElementById('uspesnost').innerHTML = '';\n } else {\n document.getElementById('uspesnost').innerHTML = '<h6>Uspjesnost: ' + procenat + '%</h6>';\n }\n}", "posZahtMet()\n {\n this.posZah=!this.posZah;\n }", "function hitungLuasSegiEmpat(sisi){\n //tidak ada nilai balik\n var luas = sisi * sisi\n return luas\n}", "function fl_outToBeiza ()\n\t\t{\n\t\t\tif (freez=='false'){\n\t\t console.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.maza.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.hazeret.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.gvina.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dvash.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t\tthis.mishloah.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.chanuka_btn.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.purim_btn.alpha=1\n\t\t this.shavuot_btn.alpha=1\n\t\t this.rosh_ha_shana_btn.alpha=1\n\t\t this.bible_btn.alpha=1\n\t\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t\t\t }\n\t\t\n\t\t}", "nuevoCiclo() {\n let suma = 0;\n for (let i = 0; i < this.vecinos.length; i++) {\n if (this.vecinos[i].estado === 1) {\n suma++;\n }\n }\n\n // Aplicamos las normas\n this.estadoProx = this.estado; // Por defecto queda igual\n\n // Vida: tiene 3 vecinos\n if (this.estado === 0 && suma === 3) {\n this.estadoProx = 1;\n }\n\n // Muerte: menos de 2(soledad) o mas de 3 (inanicion)\n if (this.estado == 1 && (suma < 2 || suma > 3)) {\n this.estadoProx = 0;\n }\n }", "function fl_outToKarpas ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.maza.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.beiza.alpha=1\n\t\t\tthis.hazeret.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.gvina.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dvash.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t\tthis.mishloah.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.chanuka_btn.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.purim_btn.alpha=1\n\t\t this.shavuot_btn.alpha=1\n\t\t this.rosh_ha_shana_btn.alpha=1\n\t\t this.bible_btn.alpha=1\n\t\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t\n\t\t}}", "function obojiZauzecaImpl(\n kalendarRef,\n mjesec,\n sala,\n vrijemePocetka,\n vrijemeKraja\n ) {\n //ako postoje zauzete sale od prije, trebaju se osloboditi\n var td = kalendarRef.getElementsByTagName(\"td\");\n for (var i = 0; i < td.length; i++) {\n if (td[i].className == \"zauzeta\") td[i].className = \"slobodna\";\n }\n\n var date = new Date(trenutnaGodina, trenutniMjesec, 1);\n var prviDan = date.getDay();\n var brojDana = new Date(trenutnaGodina, trenutniMjesec + 1, 0).getDate();\n if (prviDan == 0) prviDan = 6;\n else prviDan--;\n var brojReda;\n for (var i = 0; i < periodicna.length; i++) {\n brojReda = 2;\n if (\n vrijemePocetka.length > 0 &&\n vrijemeKraja.length > 0 &&\n sala == periodicna[i].naziv &&\n !(\n periodicna[i].kraj <= vrijemePocetka ||\n vrijemeKraja <= periodicna[i].pocetak\n ) &&\n // periodicna[i].pocetak >= vrijemePocetka &&\n // periodicna[i].kraj <= vrijemeKraja &&\n (((trenutniMjesec >= 9 || trenutniMjesec == 0) &&\n periodicna[i].semestar == \"zimski\") ||\n (trenutniMjesec >= 1 &&\n trenutniMjesec <= 5 &&\n periodicna[i].semestar == \"ljetni\"))\n ) {\n if (periodicna[i].dan < prviDan) brojReda++;\n for (var j = 0; j < prviDan + brojDana; j++) {\n if (j % 7 == 0) {\n if (brojReda >= kalendarRef.getElementsByTagName(\"tr\").length)\n break;\n var tr = kalendarRef.getElementsByTagName(\"tr\")[brojReda++];\n if (periodicna[i].dan >= tr.getElementsByTagName(\"td\").length)\n break;\n var td = tr.getElementsByTagName(\"td\")[periodicna[i].dan];\n td.className = \"zauzeta\";\n }\n }\n }\n }\n\n for (var i = 0; i < vanredna.length; i++) {\n var dd = vanredna[i].datum.substr(0, 2);\n var mm = vanredna[i].datum.substr(3, 2);\n var yyyy = vanredna[i].datum.substr(6, 4);\n if (\n vrijemePocetka.length > 0 &&\n vrijemeKraja.length > 0 &&\n sala == vanredna[i].naziv &&\n mm - 1 == mjesec &&\n yyyy == trenutnaGodina &&\n !(\n vanredna[i].kraj <= vrijemePocetka ||\n vrijemeKraja <= vanredna[i].pocetak\n )\n // vanredna[i].pocetak >= vrijemePocetka &&\n // vanredna[i].kraj <= vrijemeKraja\n ) {\n date = new Date(yyyy, mm - 1, 1);\n prviDan = date.getDay();\n if (prviDan == 0) prviDan = 6;\n else prviDan--;\n var td;\n if ((prviDan + parseInt(dd)) % 7 == 0)\n tr = kalendarRef.getElementsByTagName(\"tr\")[\n parseInt((parseInt(dd) + prviDan) / 7) + 1\n ];\n else\n tr = kalendarRef.getElementsByTagName(\"tr\")[\n parseInt((parseInt(dd) + prviDan) / 7) + 2\n ];\n\n var pozicija = ((parseInt(dd) + prviDan) % 7) - 1;\n if (pozicija == -1) pozicija = 6;\n var td = tr.getElementsByTagName(\"td\")[pozicija];\n td.className = \"zauzeta\";\n }\n }\n }", "function wyzerujOdp() {\n for (var i = 0; i < liczbapytan; i++) {\n odpUzytkownika[i] = \"\";\n czyOdpowiedziano[i] = false;\n }\n}", "function fl_outToSufgania ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.maza.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.beiza.alpha=1\n\t\t\tthis.hazeret.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.gvina.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dvash.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t\tthis.mishloah.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.purim_btn.alpha=1\n\t\t this.pesach_btn.alpha=1\n\t\t this.shavuot_btn.alpha=1\n\t\t this.rosh_ha_shana_btn.alpha=1\n\t\t this.bible_btn.alpha=1\n\t\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t\n\t\t}}", "function obli_ecli(njd){\n\n // calcola l'obliquità dell'eclittica.\n // per l'equinozio della data.\n // T= numero di secoli giuliani dallo 0.5 gennaio 1900.\n\n var T=(njd-2415020.0)/36525;\n\n var obli_eclittica=23.452294-0.0130125*T-0.00000164*T*T+0.000000503*T*T*T;\n\nreturn obli_eclittica; //obliquità in gradi\n\n}", "function tarkistaPari() {\r\n let ovatPari = ekaKortti.dataset.kehys === tokaKortti.dataset.kehys;\r\n //jos kortit ovat pari estetään niitä kääntymästä ja\r\n //jos kortit eivät ole pari käännetään ne takaisin\r\n ovatPari ? disable() : unflip();\r\n}", "function cruzamiento(poblacion,seleccion,ciudades,elite)\n\t\t\t{\n\t\t\t\tvar numPobla = poblacion.length;\n\t\t\t\tvar indice1,indice2;\n\t\t\t\tvar k = 0;\n\t\t\t\tvar new_poblation = new Array();\n\t\t\t\t/*Genero nueva poblacion*/\n\t\t\t\twhile(k < parseInt(numPobla / 2))\n\t\t\t\t{\n\t\t\t\t\t//Escogo el metodo de seleccion para tener dos PADRES\n\t\t\t\t\tswitch(seleccion)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Torneo\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t\tindice1 = torneo(poblacion,elite);\n\t\t\t\t\t\t\t\tindice2 = torneo(poblacion,elite);\n\t\t\t\t\t\t\t}while(indice1 == indice2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t//Ranking\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t//Aleatorio\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t\tindice1 = parseInt( Math.random() * numPobla*elite);\n\t\t\t\t\t\t\t\tindice2 = parseInt( Math.random() * numPobla*elite);\n\t\t\t\t\t\t\t}while(indice1 == indice2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//console.log(indice1);\n\t\t\t\t\t//console.log(indice2);\n\t\t\t\t\t/*Padres*/\n\t\t\t\t\tvar dad = poblacion[indice1].recorrido; \n\t\t\t\t\tvar mom = poblacion[indice2].recorrido;\n\t\t\t\t\t/*Camino para Hijos*/\n\t\t\t\t\tvar camino1 = new Array();\n\t\t\t\t\tvar camino2 = new Array();\n\t\t\t\t\t/*Numero entre 0 y numero de ciudades menos 1*/\n\t\t\t\t\tbp = parseInt( Math.random() * ciudades ); /*Punto de roptura*/\n\n\t\t\t\t/*-----------Genero 2 nuevos caminos-----------*/\n\t\t\t\t\t//Respaldo caminos de papa y mama hasta bp\n\t\t\t\t\tfor(var i = 0; i < bp; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcamino1.push(dad[i]);\n\t\t\t\t\t\tcamino2.push(mom[i]);\n\t\t\t\t\t}\n\t\t\t\t\tfor(var i = 0; i < ciudades; i++)\n\t\t\t\t\t{\t\n\t\t\t\t\t\t//Tomo el elemento a buscar en el segundo vector\n\t\t\t\t\t\tvar busca1 = mom[i];\n\t\t\t\t\t\tvar busca2 = dad[i];\n\t\t\t\t\t\tfor(var j = bp; j < ciudades; j++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(busca1 == dad[j])\n\t\t\t\t\t\t\t\tcamino1.push(busca1);\n\t\t\t\t\t\t\tif(busca2 == mom[j])\n\t\t\t\t\t\t\t\tcamino2.push(busca2); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*Hijos generados*/\n\t\t\t\t\tvar hijo1 = {recorrido: camino1, distancia: aptitud(camino1,region)}\n\t\t\t\t\tvar hijo2 = {recorrido: camino2,distancia : aptitud(camino2,region)}\n\n\t\t\t\t\tnew_poblation.push(hijo1);\n\t\t\t\t\tnew_poblation.push(hijo2);\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t\treturn new_poblation;\n\t\t\t}", "function hitungLuasSegitiga(alas,tinggi) {\n var luas = 1/2 * alas * tinggi;\n\n return luas;\n\n}", "function prikaziRezultat(){\r\n // na samom pocetku nije imao tacnih odgovora\r\n let brTacnih = 0;\r\n const listaPitanja = document.querySelectorAll(\".pitanje\")\r\n // prolazimo kroz globalni niz svih pitanja\r\n // tu poredimo odgovor koji je igrac dao na to pitanja sa tacnim odgovorom pitanja \r\n pitanja.forEach(function(trenutnoPitanje, pitanjeInd){\r\n // selektor koji trazi cekirani input na trenutno pitanje\r\n const selektor = `input[name=odgovor${pitanjeInd}]:checked`;\r\n // igrac je odgovorio ono sto je vrijednost cekiranog input-a (radio button-a)\r\n const odgovoreno = (document.querySelector(selektor) || {} ).value;\r\n\r\n // ako je ono sto je igrac odgovorio jednako tacnom odgovoru na trenutno pitanje\r\n // to znaci da je igrac tacno odgovorio i povecavamo ukupan broj tacnih odgovora\r\n \r\n if(odgovoreno === trenutnoPitanje.tacanOdgovor){\r\n brTacnih = brTacnih + 1;\r\n\r\n /* DOMACI */\r\n listaPitanja[pitanjeInd].style.color = \"green\"\r\n }else {\r\n listaPitanja[pitanjeInd].style.color = \"red\" \r\n } /* DOMACI */\r\n\r\n\r\n });\r\n // na kraju samo popunjavamo div za prikaz rezultata\r\n rezultatDiv.innerHTML = `rezultat: <h3>${brTacnih} od ${pitanja.length}</h3>`; \r\n}", "function chercheCaseVide () {\n let objet;\n for (let i = 0; i < plateau.length; i++) {\n for (let j = 0; j < plateau.length; j++) {\n if (plateau[i][j] === 16) {\n $('.row' + i + ' .cas' + j).addClass(\"celluleVide\");\n $('.row' + i + ' .cas' + j).text(\" \");\n objet = {\"i\":i,\"j\":j};\n } else {\n $('.row' + i + ' .cas' + j).removeClass(\"celluleVide\");\n }\n }\n } return objet;\n }", "function TinhTheoLoaiXe(sokm, tgcho, giaLoai1, giaLoai2, giaLoai3, tgChoTheoLoai) {\n var tien = 0;\n if (sokm <= 1) {\n tien = sokm * giaLoai1 + tgcho * tgChoTheoLoai;\n // console.log(tien);\n } else if (sokm > 1 && sokm < 21) {\n tien = giaLoai1 + (sokm - 1) * giaLoai2 + tgcho * tgChoTheoLoai;\n // console.log(tien);\n } else if (sokm >= 21) {\n tien = giaLoai1 + 19 * giaLoai2 + (sokm - 20) * giaLoai3 + tgcho * tgChoTheoLoai;\n // console.log(tien);\n }\n return document.getElementById('xuatTien').innerHTML = tien + ' vnđ';\n}", "function tentukanDeretGeometri(arr) {\n var hasilBagi = arr[1] / arr[0] // selisih dari hasil bagi\n var hitung = 0;\n var cek;\n for(var i = 0; i < arr.length-1; i++){\n \thitung = arr[i+1] / arr[i];\n \t//console.log(hitung); //cek hasil hitungan\n }\n cek = hitung === hasilBagi;\n return cek;\n}", "function beratBadanWanita(tinggi){\r\n let ideal = (tinggi - 100) - (tinggi -100) * 0.15\r\n return `Wanita = ${ideal} Kg`; \r\n}", "function getImonesPelnas( ) {\n let ats = imonesPajamos - imonesIslaidos - tomoAtlyginimas - antanoAtlyginimas - poviloAtlyginimas;\n return ats;\n}", "function kiemTra(X, Y, viTriMoi){\n X = viTriX + X;\n Y = viTriY + Y;\n viTriMoi = viTriMoi || ViTriXoay; // khi xoay khoi co bi qua ngoai man hinh khong\n\n\n\n for ( var y = 0; y < 4; ++y ) {\n for ( var x = 0; x < 4; ++x ) {\n if ( viTriMoi [ y ][ x ] ) {\n if ( typeof bangGiaTri[ y + Y ] == 'undefined' // kiem tra cac Dk cua khoi co kha thi hay khong, khong ra ngoai khung hinh\n || typeof bangGiaTri[ y + Y ][ x + X ] == 'undefined'\n || bangGiaTri[ y + Y ][ x + X ]\n || x + X < 0\n || y + Y >= dongBang\n || x + X>= cotBang ) {\n if (Y == 1) \n\t\t\t\t\t{\n\t\t\t\t\t\tThua = true; // neu khoi dang o dong tren cung thi thua\n\t\t\t\t\t\t\n\t\t\t\t\t}\n return false;\n }\n }\n }\n }\n return true;\n}", "getResultatCodificat(){ // SI EL MÈTODE NO PASSA ALGUN VALOR, SE LI POSSA this. MÉS EL ATRIBUT CORRESPONENT.\n this.eliminarEspaisBlanc();\n this.senseAccent();\n for (var i = 0; i < this._entrada.length; i++){\n\n // IGUALEM LA LLARGADA DE LA CLAU A LA DE L'ENTRADA\n var y = 0;\n var max_lenght = this._entrada.length;\n while (this._entrada.length != this._clau.length){\n\n this._clau = this._clau + this._clau[y];\n\n if(y >= max_lenght){\n\n y = 0;\n }\n else{\n\n y++;\n }\n }\n\n // BUSQUEM ON ESTAN SITUATS TANT LA LLETRA DE L'ENTRADA COM DE LA CLAU\n var posicio_lletra_entrada = this._alfabet.indexOf(this._entrada[i]);\n var posicio_lletra_clau = this._alfabet.indexOf(this._clau[i]);\n\n // SUMEM LES DUES POSICIONS\n var suma_posicions = posicio_lletra_entrada + posicio_lletra_clau;\n\n // ANEM RESTANT MENTRE QUE EL MOD SIGUI MÉS GRAN QUE EL LENGTH DEL ABECEDARI\n while (suma_posicions >= this._alfabet.length){\n\n suma_posicions = suma_posicions - this._alfabet.length;\n }\n \n // ARA BUSQUEM LA LLETRA AMB LA QUAL SUBSTITUIREM L'ENTRADA\n this._resultat = this._resultat + this._alfabet[suma_posicions];\n }\n\n // RETORNEM EL RESULTAT\n return (document.form.sortida.value = this._resultat);\n }", "function hitungLuasPersegi(sisi) {\n var luas = sisi * sisi;\n return luas;\n}", "function upisNajaFunc()\n{\n\t/* ako je br bacanja veci od 1, nije najavljeno nedozvoljen upis */\n\tif (brojBacanja > 1 && indNajave < 1)\n\t{\n\t\talert(\"Niste najavili!\");\n\t\treturn;\n\t}\n\t/* u suprotnom u prvom smo bacanju i zelimo da najavimo */\n\telse if (brojBacanja == 1 && indNajave < 1)\n\t{\n\t\tindNajave = Number(this.id.slice(1, ));\n\n\t\t/* manipulate css for different background color */\n\t\tvar elm = document.getElementById(this.id);\n\t\telm.className = (elm.className == \"najaKlik\") ? \"polje naja\" : \"najaKlik\";\n\t\treturn;\n\t}\n\telse if (brojBacanja === 0)\n\t\treturn;\n\n\t/* get the value of the field clicked */\n\tvar vred = Number(this.id.slice(1, ));\n\n\t/* if not equal, user did not announce that field */\n\tif (vred != indNajave)\n\t{\n\t\talert(\"Niste TO najavili!\");\n\t\treturn; \n\t}\n\t\n\n\t///* see if the previous field is not -1 */\n\t///* else disable writting to preserve order */\n\t//if(vred < 12 && kNaja[vred] < 0)\n\t//{\n\t//\talert(\"Nedozvoljen upis!\");\n\t//\treturn;\n\t//}\n\t\n\t/* did we already write into this field */\n\tif(kNaja[vred-1] >= 0)\n\t{\n\t\talert(\"Vec ste upisali u ovo polje!\");\n\t\treturn;\n\t}\n\n\tvar tmp = 0;\n\tvar tmpNiz = [];\n\n\t/* splice izabraneKockice and baceneKockice */\n\tfor(var i=0; i<5; ++i)\n\t{\n\t\tif (Number(izabraneKockice[i].innerText))\n\t\t\ttmpNiz.push(Number(izabraneKockice[i].innerText));\n\t}\n\n\tfor(var i=0; i<5; ++i)\n\t{\n\t\tif (Number(baceneKockice[i].innerText))\n\t\t\ttmpNiz.push(Number(baceneKockice[i].innerText));\n\t}\n\n\tif(tmpNiz.length != 5)\n\t\talert(\"Niz nije 5! vec: \" + tmpNiz.length);\n\n\t/* decide which field was clicked: broj, maxmin ili igra */\n\tswitch(vred)\n\t{\n\t\tcase 1:\n\t\tcase 2:\n\t\tcase 3:\n\t\tcase 4:\n\t\tcase 5:\n\t\tcase 6:\n\t\t\tfor(var i=0; i<5; ++i)\n\t\t\t{\n\t\t\t\tif(tmpNiz[i] == vred)\n\t\t\t\t\ttmp += tmpNiz[i]\n\t\t\t}\n\t\t\tkNaja[vred-1] = tmp;\n\t\t\tsumaKolFunc(kNaja, \"suma4\");\n\t\t\tsumaRazFunc(kNaja, \"suma8\")\n\t\t\tbreak;\n\t\tcase 7:\n\t\tcase 8:\n\t\t\ttmp = zbir(tmpNiz);\n\t\t\tkNaja[vred-1] = tmp;\n\t\t\t/* suma8 */\n\t\t\tsumaRazFunc(kNaja, \"suma8\")\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\ttmp = jelFul(tmpNiz);\n\t\t\tkNaja[vred-1] = tmp;\n\t\t\tsumaIgFunc(kNaja, \"suma12\");\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\ttmp = jelPoker(tmpNiz);\n\t\t\tkNaja[vred-1] = tmp;\n\t\t\tsumaIgFunc(kNaja, \"suma12\");\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\ttmp = jelKenta(tmpNiz);\n\t\t\tkNaja[vred-1] = tmp;\n\t\t\tsumaIgFunc(kNaja, \"suma12\");\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\ttmp = jelYamb(tmpNiz);\n\t\t\tkNaja[vred-1] = tmp;\n\t\t\tsumaIgFunc(kNaja, \"suma12\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\t/* write number of vred thrown */\n\tdocument.getElementById(this.id).innerText=Number(tmp);\n\n\t/* manipulate css for different background color */\n\tvar elm = document.getElementById(this.id);\n\telm.className = (elm.className == \"najaKlik\") ? \"polje naja\" : \"najaKlik\";\n\tindNajave = 0;\n\tresetuj(izabraneKockice, baceneKockice);\n\n}", "function fl_outToLevivot ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.maza.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.beiza.alpha=1\n\t\t\tthis.hazeret.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.gvina.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dvash.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t\tthis.mishloah.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.purim_btn.alpha=1\n\t\t this.pesach_btn.alpha=1\n\t\t this.shavuot_btn.alpha=1\n\t\t this.rosh_ha_shana_btn.alpha=1\n\t\t this.modern_btn.alpha=1\n\t\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t\n\t\t}}", "function optimal_compos_golden(adr)//mam sklad 7, szukam czy ktos na lawce sie nadaje//szukanie lepszego perfo-nie roz problem\n{\n if(adr==1)\n {\n \ttea = team1;//z tempo odczyt, a do tempz zapisuje;\n }\n else \n {\n \ttea = team2;//z tempo odczyt, a do tempz zapisuje;\n }\n//console.log(changes);\n var all_lawka = [];\n var item1 = [];\n var item2 = [];\n var item3 = [];\n var item4 = [];\n for(var i=1;i<=6;i++)//mam gwaracje, że przejdzie przez każdego R na ławce, ale dalej zawsze wybierze najlepszego\n {\t\n tea[0]=Array(0,0,0,0,0,0,0,0,0,0,0,0);\n item1 = [];item2 = [];item3 = [];item4 = [];\n\t\t\tfor(var j=8;j<=12;j++)\n\t\t\t{\n\t\t\t //item = [];\n if(tea[j][4]==\"R\" && i == 1)// i = 1 - sprawdzam każdego z ławki konkretnie za R\n\t\t\t {\n\t\t\t \tif(tea[j][11] > (tea[i][11]+1))\n {\n nadwyzka = tea[j][11] - tea[i][11];nadwyzka = zaokr(nadwyzka); \n item1 = [j, i, nadwyzka];\n all_lawka.unshift(item1);// \n }\n\t\t\t }\n if(tea[j][4]==\"A\" && i == 4)// i = 4\t\n\t\t\t {\n\t\t\t \tif(tea[j][6] > (tea[i][6]+1))\n {\n nadwyzka = tea[j][6] - tea[i][6];nadwyzka = zaokr(nadwyzka);\n item2 = [j, i, nadwyzka];\n all_lawka.unshift(item2);// \n }\n\t\t\t }\n item3 =[];\n if(tea[j][4]==\"P\" && (i == 2 || i == 5))// i = 2; i =5;\n\t\t\t {\n\t\t\t \tif( (tea[j][6]+tea[j][7])/2 > ((tea[i][6]+tea[i][7])/2)+1)\n {\n nadwyzka = (tea[j][6]+tea[j][7])/2 - ((tea[i][6]+tea[i][7])/2);nadwyzka = zaokr(nadwyzka);\n item3=[];\n item3 = [j, i, nadwyzka];\n test = all_lawka.unshift(item3);//\n //alert(\"test-length: \"+test+\" item: \"+item3);\n }\n\t\t\t }\n if(tea[j][4]==\"S\" && (i == 3 || i == 6))// i = 3; i =6;\n\t\t\t {\n\t\t\t \tif( (tea[j][6]+tea[j][9])/2 > ((tea[i][6]+tea[i][9])/2)+1)\n {\n nadwyzka = (tea[j][6]+tea[j][9])/2 - ((tea[i][6]+tea[i][9])/2);nadwyzka = zaokr(nadwyzka);\n item4 = [j, i, nadwyzka];\n all_lawka.unshift(item4);// \n }\n\t\t\t }\n } //end of for j=8..12\n //console.log(all_lawka);\n }//end of for i=1..6\n //sortowanie\n for(u=0; u<all_lawka.length; u++)\n {\n for(w=1; w<all_lawka.length; w++)\n {\n if(all_lawka[w][2] > all_lawka[w-1][2])\n {\n temp = all_lawka[w-1];\n all_lawka[w-1] = all_lawka[w];\n all_lawka[w] = temp;\n }\n }\n }\n //próba wykoanania zmiany\n for(u=0; u<all_lawka.length; u++)\n {\n out_id = all_lawka[u][1];\n in_id = all_lawka[u][0];\n out_nr = tea[out_id][3]; //na indeksie 1 mam wyznaczonego do zejścia - nr dla funkcji possible_change\n in_nr = tea[in_id][3]; //\n if(adr == 1)\n {\n if(possible_change(adr, out_nr, in_nr) < 6)\n {\nvar fffv = document.getElementById(\"screen3\").innerHTML;\ndocument.getElementById(\"screen3\").innerHTML=fffv+\"<br>(\"+pkt1+\":\"+pkt2+\") \"+tea[in_id][5]+\" za: \"+tea[out_id][5]+\" (stan: \"+mm1+\" : \"+mm2+\") \";\n//2021-01-13: nowy screen do zapisu zmian na czas seta\nvar fffv = document.getElementById(\"change_info1\").innerHTML;\ndocument.getElementById(\"change_info1\").innerHTML=fffv+\"<br>(\"+pkt1+\":\"+pkt2+\") \"+tea[in_id][5]+\" za \"+tea[out_id][5];\n change1(out_id,in_id); flag_golden1 = 1; return 0;\n }\n }\n else\n {\n if(possible_change(adr, out_nr, in_nr) < 6)\n {\nvar fffv = document.getElementById(\"screen6\").innerHTML;\ndocument.getElementById(\"screen6\").innerHTML=fffv+\"<br>(\"+pkt1+\":\"+pkt2+\") \"+tea[in_id][5]+\" za: \"+tea[out_id][5]+\" (stan: \"+mm1+\" : \"+mm2+\") \";\n//2021-01-13: nowy screen do zapisu zmian na czas seta\nvar fffv = document.getElementById(\"change_info2\").innerHTML;\ndocument.getElementById(\"change_info2\").innerHTML=fffv+\"<br>(\"+pkt1+\":\"+pkt2+\") \"+tea[in_id][5]+\" za \"+tea[out_id][5];\n change2(out_id,in_id); flag_golden2 = 1; return 0;\n }\n }\n }\n\n\n if(adr==1)\n {\n team1 = tea;\n }\n else \n {\n team2 = tea;\n }\n\n banch_ins();\n return 1;\n}", "function pos_pianeti(njd,np){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) novembre 2010\n // calcola la posizione dei pianeti \n // njd= numero del giorno giuliano della data in T.U.\n // np= numero identificativo del pianeta 0,1,2,3,4,5,6,7,8 mercurio,venere... 2 per la Terra\n // coordinate geocentriche del pianeta riferite all'equinozio della data (njd).\n // calcola le principali perturbazioni planetarie.\n\n // new Array(Periodo , Long_media , Anomalia_media , Long_perielio , eccentr , Semiasse , Inclinazione , Long_nodo , dim_ang , magnitudine);\n // 0 1 2 3 4 5 6 7 8 9\n\n var tempo_luce=t_luce(njd,np);\n \n njd=njd-tempo_luce; // correzione per il tempo luce.\n\n var el_orb=orb_plan(njd,np); // recupera gli elementi orbitali del pianeta.\n\n var periodo= el_orb[0]; // periodo.\n var L= el_orb[1]; // longitudine media all'epoca.\n var AM_media= el_orb[2]; // anomalia media. \n var long_peri= el_orb[3]; // longitudine del perielio.\n var eccent= el_orb[4]; // eccentricità dell'orbita.\n var semiasse= el_orb[5]; // semiasse maggiore.\n var inclinaz= el_orb[6]; // inclinazione.\n var long_nodo= el_orb[7]; // longitudine del nodo.\n var dimens= el_orb[8]; // dimensioni apparenti.\n var magn= el_orb[9]; // magnitudine.\n\n \n var correzioni_orb=pos_pianeticr(njd,np); // calcolo delle correzioni per il pianeta (np).\n \n// Array(Delta_LP , Delta_R , Delta_LL , Delta_AS , Delta_EC , Delta_MM , Delta_LAT_ELIO);\n// 0 1 2 3 4 5 6 \n// lperiodo, rvett long. assemagg ecc M lat\n\n// CORREZIONI \n\n L=L+correzioni_orb[0]; // longitudine media.\n AM_media= AM_media+correzioni_orb[5]; // anomalia media + correzioni..\n semiasse= semiasse+correzioni_orb[3]; // semiasse maggiore.\n eccent= eccent+correzioni_orb[4]; // eccentricità.\n\n // LONGITUDINE ELIOCENTRICA DEL PIANETA ***************************************************** inizio:\n\n var M=AM_media; // anomalia media \n \n M=gradi_360(M); // intervallo 0-360;\n\n var E=eq_keplero(M,eccent); // equazione di Keplero.E[0]=Anomalia eccentrica E[1]=Anomalia vera in radianti.\n \n var rv=semiasse*(1-eccent*Math.cos(E[0])); // calcolo del raggio vettore (distanza dal Sole).\n rv=rv+correzioni_orb[1]; // raggio vettore più correzione.\n\n\n var U=gradi_360(L+Rda(E[1])-M-long_nodo); // argomento della latitudine.\n\n var long_eccliticay=Math.cos(Rad(inclinaz))*Math.sin(Rad(U));\n var long_eccliticax=Math.cos(Rad(U));\n\n var long_ecclitica=quadrante(long_eccliticay,long_eccliticax)+long_nodo;\n var l=gradi_360(long_ecclitica);\n l=l+correzioni_orb[2]; // longitudine del pianeta + correzione.\n\n // LONGITUDINE ELIOCENTRICA DEL PIANETA ********************************************************* fine: \n\n var b=Rda(Math.asin(Math.sin(Rad(U))*Math.sin(Rad(inclinaz)))); // latitudine ecclittica in gradi (b)\n\n // LONGITUDINE E RAGGIO VETTORE DEL SOLE *** inizio:\n\n njd=njd+tempo_luce; \n\n var eff_sole=pos_sole(njd);\n var LS=eff_sole[2]; // longitudine geocentrica del Sole.\n var RS=eff_sole[4]; // raggio vettore.\n \n // LONGITUDINE E RAGGIO VETTORE DEL SOLE *** fine: \n\n // longitudine geocentrica.\n\n var Y=rv*Math.cos(Rad(b))*Math.sin(Rad(l-LS));\n var X=rv*Math.cos(Rad(b))*Math.cos(Rad(l-LS))+RS;\n\n var long_geo=gradi_360(quadrante(Y,X)+LS); // longitudine geocentrica.\n\n var dist_p=Y*Y+X*X+(rv*Math.sin(Rad(b)))*(rv*Math.sin(Rad(b))); \n dist_p=Math.sqrt(dist_p); // distanza del pianeta dalla Terra.\n\n var beta=(rv/dist_p)*Math.sin(Rad(b));\n var lat_geo=Rda(Math.asin(beta));\n lat_geo=lat_geo+correzioni_orb[6]; // latitudine + correzione.\n\n \n// fase del pianeta.\n\nvar fase=0.5*(1+Math.cos(Rad(long_geo-long_ecclitica)));\n fase=fase.toFixed(2);\n\n// parallasse del pianeta in gradi.\n\nvar pa=(8.794/dist_p)/3600;\n\nvar coo_pl=trasf_ecli_equa(njd,long_geo,lat_geo); // coordinate equatoriali. \n\n // diametro apparente in secondi d'arco.\n\nvar diam_app=dimens/dist_p; \n\n// magnitudine del pianeta.\n\nvar magnitudine=(5*(Math.log(rv*dist_p/(magn*Math.sqrt(fase))))/2.302580)-27.7;\n magnitudine=magnitudine.toFixed(1);\n\nif (magnitudine==Infinity) {magnitudine=\"nd\"; }\n\nvar elongaz=elong(coo_pl[0],coo_pl[1],eff_sole[0],eff_sole[1]); // elongazione in gradi dal Sole.\n \n // calcolo dell'angolo di fase in gradi . \n\n var Dpt= dist_p; // distanza pianeta-terra.\n var Dts= RS; // distanza terra-sole.\n var Dps= rv; // distanza pianeta-sole.\n\n // teorema del coseno\n\n var delta_fase=(Dts*Dts+Dps*Dps-Dpt*Dpt)/(2*Dps*Dts);\n delta_fase=Math.acos(delta_fase); \n delta_fase=Rda(delta_fase);\n\n var angolo_fase=180-Math.abs(elongaz)-delta_fase; // angolo di fase in gradi.\n \nvar dati_pp= new Array(coo_pl[0],coo_pl[1],fase,magnitudine,dist_p,diam_app,elongaz,LS,RS,long_ecclitica,pa,rv,angolo_fase);\n// 0 1 2 3 4 5 6 7 8 9 10 11 12 \n\n\n\n// risultati: ARetta,Declinazione,fase,magnitudine,distanza pianeta,diametro apparente, elongazione, long. sole,raggio vettore Terra, longituddine elio. pianeta, parallase,dist sole-pianeta. \n\nreturn dati_pp;\n}", "function ispisCene(){\n \n let ispisCena=racunajCenu(findDestPrice(dest),brOsoba);\n document.querySelector(\"#cena\").innerHTML = `${ispisCena}&euro;`;\n }", "function dvakrat(cislo) {\r\n return cislo * 2;\r\n}", "function ucitajPodatkeImpl(periodicna, vanredna){\r\n //ucitavanje podataka\r\n glavniNizP=periodicna;\r\n glavniNizV=vanredna;\r\n }", "function ispisiKateogorijeProizvoda(kat, katProizvod, deoStrane){\n let html = \"\";\n\n kat.forEach(k => {\n let katPoId = katProizvod.filter(el => el.idKat == k.id);\n html += `<h5 class=\"text-center pt-2 pb-2\">${k.naziv}</h5>\n ${chbFilterKategorije(katPoId)} `; \n \n });\n html += chbFilterPaketAkcija();\n\n $(\"[name='paket']\").click(filtrirajPoPaketima);\n $(\"[name='popust']\").click(filtrirajPoPopustu);\n \n $(deoStrane).html(html);\n $(\"[name='kategorije']\").click(filterPoKategorijama);\n}", "function odredi_izabranu_zemlju(kartica) {\r\n\tvar zemlja = new RegExp(\"Srbija\");\r\n\tif (zemlja.test(kartica.innerHTML)) return 1;\r\n\tvar zemlja = new RegExp(\"Španija\");\r\n\tif (zemlja.test(kartica.innerHTML)) return 2;\r\n\tvar zemlja = new RegExp(\"USA\");\r\n\tif (zemlja.test(kartica.innerHTML)) return 3;\r\n\tvar zemlja = new RegExp(\"JKoreja\");\r\n\tif (zemlja.test(kartica.innerHTML)) return 4;\r\n\tvar zemlja = new RegExp(\"Kanada\");\r\n\tif (zemlja.test(kartica.innerHTML)) return 5;\r\n\tvar zemlja = new RegExp(\"Palestina\");\r\n\tif (zemlja.test(kartica.innerHTML)) return 6;\r\n\treturn 0;\r\n}", "function kaliTerusRekursif(angka) {\r\n // you can only write your code here!\r\n let angkaString = angka.toString();\r\n let hasil = kaliRekursif(angka);\r\n let hasilString = hasil.toString();\r\n if(hasilString.length > 1){\r\n hasil = kaliTerusRekursif(hasil);\r\n }\r\n return hasil;\r\n \r\n}", "function getPelnas(pajamos, mokesciai, mokesciai2){\nvar pelnas = (pajamos - (pajamos * mokesciai)) - (pajamos - (pajamos * mokesciai)) * mokesciai2;\n return pelnas;\n}", "function Deplacement_ennemiLimitrophe(Territoire){\r\n\tif (Territoire.army < 2) {return false}\r\n for (var i=0 ; i < Territoire.voisins.length ; i++){\r\n if (Territoire.proprietaire != Territoire.voisins[i].proprietaire ){\r\n return true\r\n }\r\n }\r\n return false\r\n}", "function afase_luna(njd){\n\n // calcola l'angolo di fase della luna per la data (njd)\n // gennaio 2012\n\n var dati_luna=pos_luna(njd); // recupero fase/elongazione (1)\n var dati_sole=pos_sole(njd);\n\n var elongazione1=dati_luna[4]; // elongazione in gradi sessadecimali.\n var dist_luna=dati_luna[7]/149597870; \n var dist_sole=dati_sole[4]; // distanza del sole in UA.\n\n elongazione=Math.abs(elongazione1)*1;\n\n var dist_sl=dist_luna*dist_luna+dist_sole*dist_sole-2*dist_luna*dist_sole*Math.cos(Rad(elongazione)); // distanza sole-luna\n dist_sl=Math.sqrt(dist_sl);\n\n // calcolo dell'angolo di fase in gradi . \n\n var Dpt= dist_luna; // distanza pianeta-terra.\n var Dts= dist_sole; // distanza terra-sole.\n var Dps= dist_sl; // distanza pianeta-sole.\n\n // teorema del coseno\n\n var delta_fase=(Dts*Dts+Dps*Dps-Dpt*Dpt)/(2*Dps*Dts);\n delta_fase=Math.acos(delta_fase); \n delta_fase=Rda(delta_fase);\n\n var angolo_fase=180-elongazione-delta_fase; // angolo di fase in gradi.\n\n if(elongazione1<0) {angolo_fase=-angolo_fase; }\n\n return angolo_fase;\n\n}", "function prikaziRezultat(){\n\n const tajmer = document.querySelector('#tajmer'); \n tajmer.style.display = \"none\";\n clearInterval(interval);\n\n let brTacnih=0;\n //const sviOdgovori = kvizDiv.querySelectorAll('.odgovori');\n\n pitanja.forEach(function(trenutnoPitanje, pitanjeIdn){\n const selektor = `input[name=odgovor${pitanjeIdn}]:checked`;\n const odgovoreno = (document.querySelector(selektor) || {}).value;\n\n console.log(odgovoreno, trenutnoPitanje.tacanOdgovor);\n\n //smjestanje pitanja u niz i pozivanje pojedinacnog\n const nizPitanja = document.querySelectorAll('.pitanje');\n const pojedinacnoPitanje = nizPitanja[pitanjeIdn];\n\n if(odgovoreno === trenutnoPitanje.tacanOdgovor){\n brTacnih++;\n pojedinacnoPitanje.classList.add('tacno_pitanje'); \n } else {\n pojedinacnoPitanje.classList.add('netacno_pitanje'); \n }\n });\n\n\n rezultatDiv.innerHTML = `Rezultat: <h3>${brTacnih} od ${pitanja.length}</h3>`\n}", "function hitungLuasSegiTiga(alas,tinggi){\n var luas = 0.5 * alas * tinggi\n return luas\n}", "function kreirajEHRzaBolnika() {\n\tsessionId = getSessionId();\n\n\tvar ime = $(\"#kreirajIme\").val();\n\tvar priimek = $(\"#kreirajPriimek\").val();\n\n\tif (!ime || !priimek || ime.trim().length == 0 ||\n priimek.trim().length == 0 ) {\n\t\t$(\"#kreirajSporocilo\").html(\"<span class='obvestilo label \" +\n \"label-warning fade-in'>Prosim vnesite zahtevane podatke!</span>\");\n\t} else {\n\t\t$.ajaxSetup({\n\t\t headers: {\"Ehr-Session\": sessionId}\n\t\t});\n\t\t$.ajax({\n\t\t url: baseUrl + \"/ehr\",\n\t\t type: 'POST',\n\t\t success: function (data) {\n\t\t var ehrId = data.ehrId;\n\t\t var partyData = {\n\t\t firstNames: ime,\n\t\t lastNames: priimek,\n\t\t partyAdditionalInfo: [{key: \"ehrId\", value: ehrId}]\n\t\t };\n\t\t $.ajax({\n\t\t url: baseUrl + \"/demographics/party\",\n\t\t type: 'POST',\n\t\t contentType: 'application/json',\n\t\t data: JSON.stringify(partyData),\n\t\t success: function (party) {\n\t\t if (party.action == 'CREATE') {\n\t\t $(\"#kreirajSporocilo\").html(\"<span class='obvestilo \" +\n \"label label-success fade-in'>Uspešno kreiran EHR '\" +\n ehrId + \"'.</span>\");\n\t\t $(\"#preberiEHRid\").val(ehrId);\n\t\t }\n\t\t },\n\t\t error: function(err) {\n\t\t \t$(\"#kreirajSporocilo\").html(\"<span class='obvestilo label \" +\n \"label-danger fade-in'>Napaka '\" +\n JSON.parse(err.responseText).userMessage + \"'!\");\n\t\t }\n\t\t });\n\t\t }\n\t\t});\n\t}\n}", "function luoPuput_taso3(palkkiJakoLkm) {\n var kohde = document.querySelector('body');\n var canvasV = document.createElement('canvas');\n var canvasO = document.createElement('canvas');\n var img = document.createElement('img');\n img.src = \"bunny.png\";\n img.setAttribute('class','imgPupu');\n canvasV.setAttribute('class','canvasPupuVasen');\n canvasV.style.zIndex = getZ(PUPUOFFSET);\n canvasO.setAttribute('class','canvasPupuOikea');\n canvasO.style.zIndex = getZ(PUPUOFFSET);\n kohde.appendChild(canvasV);\n kohde.appendChild(canvasO);\n\n // Animaatiolaskuri. Toivottavasti 64-bittia riittaa, ennen kuin ohjelma loppuu. Silloin tulee z-day.\n // Joku oikea kello olisi ollut parempi, varsinkin jos tehdaan monimutkaisempaa animaatiota, eika haluta \n // animaation tokkivan.\n var lkm = 0;\n\n var piirtoFunctioPupuV = () => {\n var ctx = canvasV.getContext('2d');\n var ctx2 = canvasO.getContext('2d');\n var palkinKorkeus = img.height/palkkiJakoLkm;\n\n // Tehdaan nyt animaatio piirtamalla pupu siivuittain ja venyttelemalla siivuja pystysuorassa.\n\n // Hahaa. Haskelia javascriptilla. Huonoa Haskelia siis :(.\n // Trigonometrista magiaa. En viitsi selittaa tata liikaa, muuten joku viela patentoi taman. Ehka silmukka olisi parempi kuin listojen \n // pyorittely, ainakin jos haluaa tehoa. Tassa se ei nyt haittaa.\n var sy = [...Array(palkkiJakoLkm).keys()].map(x => img.height/palkkiJakoLkm*x); \n var venytettysy = [...Array(palkkiJakoLkm).keys()].map(x=>x+lkm);\n venytettysy = venytettysy.map(x => palkinKorkeus/2.0 + (palkinKorkeus/4.0)*Math.sin(0.4*x/6.0)); \n lkm = lkm + 1;\n var sum = venytettysy.reduce((x,y) => x + y);\n venytettysy = venytettysy.map(x => Math.floor(x));\n\n // Imagen pituus puolitettuna.\n var oWidth = img.width/2.0;\n // Seuraavan piirrettavan y-koordinaatin kohta.\n var nextTargetY = 0;\n\n // Puhdistetaan canvakset.\n ctx.clearRect(0,0,canvasV.width, canvasV.height);\n ctx2.clearRect(0,0,canvasO.width, canvasO.height);\n\n // Piirretaan kumpikin pupun puoliskon palkit silmukassa.\n for (let x=0; x<sy.length; x++) {\n ctx.drawImage(img, 0, sy[x] , oWidth , palkinKorkeus, \n 0, nextTargetY, canvasV.width , venytettysy[x]); \n \t\t\t \n ctx2.drawImage(img, oWidth, sy[x], oWidth, palkinKorkeus, \n 0, nextTargetY, canvasV.width , venytettysy[x]);\n\n // Lasketaan seuraavan palkin y-koordinaatti (alkamiskohta).\n nextTargetY = nextTargetY + venytettysy[x];\n }\n // Halutaan etta tata piirretaan jatkossakin.\n requestAnimationFrame(piirtoFunctioPupuV);\n };\n requestAnimationFrame(piirtoFunctioPupuV);\n}", "function sortirajSveRastuce() {\r\n let tempNiz = nizPrikazanihProizvoda;\r\n tempNiz.sort((a,b) => {\r\n if(a.cena == b.cena)\r\n return 0;\r\n return a.cena < b.cena ? -1 : 1;\r\n });\r\n prikaziProizvode(tempNiz);\r\n}", "function pos_sole(njd){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) dicembre 2009\n // funzione per il calcolo della posizione del sole.\n // njd= numero dei giorni giuliani per il T.U. di Greenwich.\n // la data di riferimento per gli elementi orbitali è l'equinozio della data.\n\n var T=(njd-2415020.0)/36525;\n\n // Elementi orbitali per l'equinozio della data.\n \n Long_epoca=279.69668+36000.76892*T+0.0003025*T*T;\n\n ecc_orbita=0.01675104-0.0000418*T-0.000000126*T*T;\n\n M=358.47583+35999.04975*T-0.000150*T*T-0.0000033*T*T*T;\n\n Long_perigeo=gradi_360(Long_epoca-M);\n\n \n // correzioni ***************\n\n var A=153.23+22518.7541*T;\n var B=216.57+45037.5082*T;\n var C=312.69+32964.3577*T;\n var D=350.74+445267.1142*T-0.00144*T*T;\n var E=231.19+20.20*T;\n var H=353.40+65928.7155*T;\n\n // angoli in radianti.\n\n A=Rad(A); \n B=Rad(B); \n C=Rad(C); \n D=Rad(D); \n E=Rad(E); \n H=Rad(H); \n\n // correzione per la longitudine.\n\n var delta_L=0.00134*Math.cos(A)\n +0.00154*Math.cos(B)\n +0.00200*Math.cos(C)\n +0.00179*Math.sin(D)\n +0.00178*Math.sin(E);\n\n // correzioni per il raggio vettore.\n\n var delta_R=0.00000543*Math.sin(A)\n +0.00001575*Math.sin(B)\n +0.00001627*Math.sin(C)\n +0.00003076*Math.cos(D) \n +0.00000927*Math.sin(H);\n \nvar semiasse=0.999996;\n\n // calcolo Equazione di Keplero\n\n M=gradi_360(M); // intervallo 0-360;\n\n var E=eq_keplero(M,ecc_orbita); // equazione di Keplero.\n\n var anomalia_vera =E[1]; // restituisce l'anomalia vera in radianti.\n\n // calcola il valore del raggio vettore. \n \n var distanzas=semiasse*(1-ecc_orbita*Math.cos(E[0])); \n distanzas=distanzas+delta_R; // correzione per il raggio vettore.\n\n // calcola il diametro apparente del Sole in secondi d'arco.\n\n var diam_app=1919.22/distanzas;\n diam_app=diam_app.toFixed(1);\n\n // parallasse diurna del Sole in gradi.\n\n var parallasse=(8.794/3600)/distanzas;\n\n var longitudine_sole=Rda(anomalia_vera)+Long_perigeo; \n\n longitudine_sole=gradi_360(longitudine_sole+delta_L); // longitudine ecclittica del sole + correzione.\n\n\n // coordinate ecclittiche: longitudine_sole,0 per la latitudine.\n \nvar coord_sole=trasf_ecli_equa(njd,longitudine_sole,0); // trasforma le coordinate ecclittiche in equatoriali: AR,DEC.\n\n // ELENCO delle variabili restituite dalla funzione [pos_sole]. \n\n // coord_sole[0]=ascensione retta in ore decimali (già diviso * 15). calcolate dalla funzione trasf_ecli_equa.\n // coord_sole[1]=declinazione in gradi sessadecimali.\n coord_sole[2]=longitudine_sole; // longitudine in gradi sessadecimali.\n coord_sole[3]=M; // anomalia media.\n coord_sole[4]=distanzas; // distanza in U.A.\n coord_sole[5]=diam_app; // diametro apparente del Sole.\n coord_sole[6]=parallasse; // parallasse diurna in gradi. \n\nreturn coord_sole;\n\n}", "function hitungLuasPersegiPanjang (panjang,lebar){\n //tidak ada nilai balik\n var luas = panjang * lebar\n return luas\n}", "function dibujar_protesis_fija(canvas){\r\n\tif (i_inic<=i_final){\r\n\t//var px=87;\r\n\t//var py=129;\r\n\t//var numi=0;\r\n\t\r\n\tvar i= i_inic+1;\r\n\t var i_inic_s= i_inic+1;\r\n\t \r\n\t//dibujar diente sano antes de convencion\r\n\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic);\r\n\tdibujar_diente_sano (canvas,cara1,i_inic);\r\n\tdibujar_diente_sano (canvas,cara2,i_inic);\r\n\tdibujar_diente_sano (canvas,cara3,i_inic);\r\n\tdibujar_diente_sano (canvas,cara4,i_inic);\r\n\tdibujar_diente_sano (canvas,cara5,i_inic);\r\n \r\n\t//dibujar diente sano en dientes medios\r\n\tfor ( i_inic_s; i_inic_s<i_final; i_inic_s++) {\r\n\t\t//dibujar diente sano antes de convencion\r\n\t\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara1,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara2,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara3,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara4,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara5,i_inic_s);\r\n\t\t\r\n\t\t\r\n\t}\r\n\t//dibujar diente sano antes de convencion\r\n\tdibujar_diente_sano_alr(canvas,pxf, pyf,i_final);\r\n\tdibujar_diente_sano (canvas,cara1,i_final);\r\n\tdibujar_diente_sano (canvas,cara2,i_final);\r\n\tdibujar_diente_sano (canvas,cara3,i_final);\r\n\tdibujar_diente_sano (canvas,cara4,i_final);\r\n\tdibujar_diente_sano (canvas,cara5,i_final);\r\n\t\r\n\t//dibujar protesis fija en diente inicial\r\n\tdibujar_protesis_fija_inicial(canvas,protesisim,i_inic);\r\n\t\r\n\t//dibujar protesis fija en dientes medios\r\n\tfor ( i; i<i_final; i++) {\r\n\t\r\n\t\t//dibujar convencion\r\n\t\tdibujar_protesis_fija_media(canvas,protesisim,i);\r\n\t\t\r\n\t}\r\n\t\r\n\t//dibujar protesis fija en diente final\r\n\tdibujar_protesis_fija_final(canvas,protesisf,i_final);\r\n\t//\r\n\t\r\n\t\r\n\ti=0;\r\n\ti_inic=0;\r\n\ti_final=0;\r\n\tpxi=0;\r\n\tpxf=0;\r\n\tpyi=0;\r\n\tpyf=0;\r\n\tsw_punto_inic =false;\r\n\tsw_punto_final =false;\r\n\tsector_inicial=0;\r\n\tsector_final=0;\r\n\t//protesisf.length=0;\r\n\t//protesisim.length=0;\r\n\t\r\n\t\r\n\t}else{\r\n\t\tvar i= i_final+1;\r\n\t\tvar i_inic_s= i_final+1;\r\n\t\t \r\n\t\t//dibujar diente sano antes de convencion\r\n\t\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara1,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara2,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara3,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara4,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara5,i_inic);\r\n\t \r\n\t\t//dibujar diente sano en dientes medios\r\n\t\tfor ( i_inic_s; i_inic_s<i_inic; i_inic_s++) {\r\n\t\t\t//dibujar diente sano antes de convencion\r\n\t\t\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara1,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara2,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara3,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara4,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara5,i_inic_s);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t//dibujar diente sano antes de convencion\r\n\t\tdibujar_diente_sano_alr(canvas,pxf, pyf,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara1,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara2,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara3,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara4,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara5,i_final);\r\n\t\t//dibujar protesis fija en diente inicial\r\n\t\tdibujar_protesis_fija_inicial(canvas,protesisim,i_final);\r\n\t\t\r\n\t\t//dibujar protesis fija en dientes medios\r\n\t\tfor ( i; i<i_inic; i++) {\r\n\t\t\tdibujar_protesis_fija_media(canvas,protesisim,i);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//dibujar protesis fija en diente final\r\n\t\tdibujar_protesis_fija_final(canvas,protesisf,i_inic);\r\n\t\ti=0;\r\n\t\ti_inic=0;\r\n\t\ti_final=0;\r\n\t\tpxi=0;\r\n\t\tpxf=0;\r\n\t\tpyi=0;\r\n\t\tpyf=0;\r\n\t\tsw_punto_inic =false;\r\n\t\tsw_punto_final =false;\r\n\t\tsector_inicial=0;\r\n\t\tsector_final=0;\r\n\t\t//protesisf.length=0;\r\n\t\t//protesisim.length=0;\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\r\n}", "function zapisiSePodatke(ehrId){\n \t\t $.ajaxSetup({\n \t\t headers: {\"Ehr-Session\": sessionId}\n \t\t });\n \t\t \tvar podatki = {\n \t\t\t// Struktura predloge je na voljo na naslednjem spletnem naslovu:\n // https://rest.ehrscape.com/rest/v1/template/Vital%20Signs/example\n \t\t \"ctx/language\": \"en\",\n \t\t \"ctx/territory\": \"SI\",\n \t\t \n \t\t \"vital_signs/height_length/any_event/body_height_length\": visina,\n \t\t \"vital_signs/body_weight/any_event/body_weight\": teza,\n \t\t \"vital_signs/pulse/any_event/rate|magnitude\": srcniUtrip,\n \t\t \"vital_signs/pulse/any_event/rate|unit\":\"/min\",\n \t\t \"vital_signs/blood_pressure/any_event/systolic\": zgornjiTlak,\n \t\t \"vital_signs/blood_pressure/any_event/diastolic\": spodnjiTlak,\n \t\t};\n \t\tvar parametriZahteve = {\n \t\t ehrId: ehrId,\n \t\t templateId: 'Vital Signs',\n \t\t format: 'FLAT',\n \t\t // committer: merilec\n \t\t};\n \t\t$.ajax({\n \t\t url: baseUrl + \"/composition?\" + $.param(parametriZahteve),\n \t\t type: 'POST',\n \t\t contentType: 'application/json',\n \t\t data: JSON.stringify(podatki),\n \t\t success: function (res) {\n \t\t document.getElementById(\"kreiraniEHRji\").innerHTML += \"<p class='bg-success'> <b>Generiran vpis:</b> \"+ime+\" \"+priimek+\",<b> EHR-Id:</b> \"+ ehrId + \"</p>\"\n \t\t },\n \t\t \n \n \t\t });\n \t\t }", "function marks() \n{\n\tvar m = testObjekat.ocenePolaznika;\n\n\tfor (var i = 0; i < m.length; i++)\n\t{\n\t\tm[i] = m[i] + '/10';\n\t}\n\treturn m;\n\n}", "function segitiga(n, posisi){\n\n\n let deret = ''\n\n if(posisi == 'bawah'){\n\n for(let i = 1 ; i <= n ; i++){\n for(let j = 0 ; j < i ; j++){\n\n deret += '*'\n\n }\n\n if( i !== n ){\n\n \n deret += '\\n'\n\n\n }\n }\n\n\n }\n\n\n\n else if(posisi == 'atas'){\n\n\n for(let i = 1 ; i <= n ; i++){\n \n for(let j = 1 ; j <= i ; j++){\n\n deret += ' '\n\n }\n \n for(let k = n ; k >= i ; k--){\n\n deret += '*'\n\n }\n\n if( i !== n ){\n\n \n deret += '\\n'\n\n\n }\n\n }\n\n\n }\n\n\n\n return deret\n\n\n\n}", "function fl_outToHazeret ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.maza.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.beiza.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.gvina.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dvash.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t\tthis.mishloah.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.chanuka_btn.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.purim_btn.alpha=1\n\t\t this.shavuot_btn.alpha=1\n\t\t this.rosh_ha_shana_btn.alpha=1\n\t\t this.bible_btn.alpha=1\n\t\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t}}", "function trasf_equa_azim(njd,Ar,De,Long,Lat){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) giugno 2013\n // njd= numero del giorno giuliano dell'istante da calcolare riferito al T.U.\n // Ar= ascensione retta in ore decimali.\n // De= declinazione in gradi sessadecimali\n // Long= Longitudine dell'osservatore =- per ovest rispetto a Greenwich\n // Lat= Latitudine dell'osservatore.\n\nvar ang_H=angolo_H(njd,Ar,Long); // calcolo dell'angolo orario H.\n\n // trasformare gli angoli sessadecimali in radianti.\n\n ang_H=Rad(ang_H*15); \n Ar= Rad(Ar*15); \n De= Rad(De); \n Long=Rad(Long); \n Lat= Rad(Lat); \n \n // angolo_a=altezza sull'orizzonte dell'astro. \n\nvar angolo_a=Math.sin(De)*Math.sin(Lat)+Math.cos(De)*Math.cos(Lat)*Math.cos(ang_H);\n angolo_a=Math.asin(angolo_a); // in radianti.\n angolo_a=Rda(angolo_a); // altezza dell'astro in gradi. \n \nvar azimut=(Math.sin(De)-Math.sin(Lat)*Math.sin(Rad(angolo_a)))/(Math.cos(Lat)*Math.cos(Rad(angolo_a)));\n azimut=Math.acos(azimut); \n azimut=Rda(azimut);\n\nazimut=(Math.sin(ang_H)<0) ? (azimut=azimut):(azimut=360-azimut); // operatore ternario.\n\nvar coord_azimut= new Array(angolo_a,azimut) ; // restituisce 2 valori: altezza e azimut.\n\nreturn coord_azimut;\n\n// NOTE SUL CALCOLO: \n// Se il seno di ang_H(angolo orario) è negativo (>180°) azimut=azimut, se positivo azimut=360-azimut\n\n}", "function szigoruanNovekvoE(){\n let ertekTomb2 = [];\n for (i = 0; i <= 10; i++){\n ertekTomb2.push(randomMinMax(1,100));\n }\n let eredmeny = 'x';\n for (i = 0; i <= ertekTomb2.length-1; i++){\n if(ertekTomb2[i] >= ertekTomb2[i+1]){\n return eredmeny = 'Nem növekszik szigorúan';\n } else {\n eredmeny = 'Szigorúan növekszik';\n }\n }\n}", "function vietuSukeitimas (i, j) {\n if (i >= 0 && j >= 0 && i !== j){\n var x = prekiautojai[i];\n prekiautojai[i] = prekiautojai[j];\n prekiautojai[j] = x;\n console.log(prekiautojai);\n } else {\n return \"Iveskite 0, teigiama reiksme ir skirtingas reiksmes\"\n }\n}", "function PrzedmiotKsztalceniaSzczegoly(PrzedmiotyKsztalceniaService, ZajeciaService, $stateParams, $state) {\n\t\t\t/*jshint validthis: true */\n this.przedmiot = {nazwaPrzedmiotu: undefined, opiekunPrzedmiotu: undefined };\n var vm = this;\n var id = $stateParams.id;\n vm.id = id;\n\n vm.load = function() {\n if (id.match(/^\\d+$/)) {\n PrzedmiotyKsztalceniaService.get({id: id}).$promise.then(function(response) {\n vm.przedmiot = {\n id: response.id,\n nazwaPrzedmiotu: response.nazwaPrzedmiotu,\n opiekunPrzedmiotu: response.opiekunPrzedmiotu.email,\n kodyZajec: _.map(\n _.filter(response.zajecia, function(z) {return z.kodZajec != null}),\n function(zajecie) {\n return zajecie.kodZajec\n }).join(', ')\n };\n }, function(reason) {\n console.log(\"fail get(1)\");\n vm.error = 'global_problem_server';\n });\n\n ZajeciaService.getKursy(id).then(function(response) {\n console.log(\"kursy = \", response);\n vm.kursy = response;\n }, function(reason) {\n console.log(\"Blad = \", reason);\n vm.error_kursy = 'global_problem_server';\n });\n\n ZajeciaService.getGrupaKursow(id).then(function(response) {\n console.log(\"grupa kursow = \", response);\n vm.grupaKursow = response;\n }, function(reason) {\n console.log(\"blad = \", reason);\n vm.error_grupa = 'global_problem_server';\n vm.grupaKursow = undefined;\n });\n }\n };\n\n\n vm.selectKurs = function(kurs) {\n vm.selectedKurs = kurs;\n };\n\n vm.deleteKurs = function(id) {\n // TODO Modal\n console.log('usun zajecie = ', id);\n ZajeciaService.deleteZajecie(id).then(function(response) {\n console.log('Usunieto zajecia');\n vm.load();\n }, function (reason) {\n console.log('Blad = ', reason);\n });\n };\n\n vm.deleteGrupa = function(id) {\n vm.deleteKurs(id);\n };\n\n this.selectPrzedmiot = function(przedmiot) {\n vm.selectedPrzedmiot = przedmiot;\n };\n\n this.deletePrzedmiot = function(id) {\n PrzedmiotyKsztalceniaService.delete({id: id}).$promise.then(function (response) {\n console.log('usunieto');\n $state.go('przedmioty-ksztalcenia');\n }, function (reason) {\n console.log('problem = ', reason);\n });\n };\n\n vm.load();\n\n }", "function skft()\n{\n\t// uzima izabranu temu iz baze (ako nije izabrana, podrazumevana je paleta servis)\n\tvar tema = GM_getValue(\"tema\", \"servis\");\n\n\t// na osnovu izbora postavlja predefinisane boje\n\tswitch (tema)\n\t{\n\tcase \"lp\":\n\t\t// laki pingvini\n\t\tvar b1 = \"#711B6C\"; // tamna pozadina zaglavlja + okviri\n\t\tvar b2 = \"#91238B\"; // svetla pozadina zaglavlja\n\t\tvar b3 = \"#E9A2E5\"; // tekst zaglavlja + pozadina info boxa\n\t\tvar b4 = \"#FCECFB\"; // pozadina poruke\n\t\tvar t1 = \"#400F3D\"; // tekst\n\t\tvar t2 = \"#95268F\"; // link\n\t\tvar t3 = \"#FF00FC\"; // aktivan link\n\t\tbreak;\n\tcase \"gray\":\n\t\t// siva\n\t\tvar b1 = \"#444\"; // tamna pozadina zaglavlja + okviri\n\t\tvar b2 = \"#555\"; // svetla pozadina zaglavlja\n\t\tvar b3 = \"#DDD\"; // tekst zaglavlja + pozadina info boxa\n\t\tvar b4 = \"#EEE\"; // pozadina poruke\n\t\tvar t1 = \"#222\"; // tekst\n\t\tvar t2 = \"#000\"; // link\n\t\tvar t3 = \"#FF7400\"; // aktivan link\n\t\tbreak;\n\tcase \"web20\":\n\t\t// WEB 2.0 boje\n\t\tvar b1 = \"#3F4C6B\"; // tamna pozadina zaglavlja + okviri\n\t\tvar b2 = \"#356AA0\"; // svetla pozadina zaglavlja\n\t\tvar b3 = \"#C3D9FF\"; // tekst zaglavlja + pozadina info boxa\n\t\tvar b4 = \"#F9F7ED\"; // pozadina poruke\n\t\tvar t1 = \"#36393D\"; // tekst\n\t\tvar t2 = \"#4096EE\"; // link\n\t\tvar t3 = \"#008C00\"; // aktivan link\n\t\tbreak;\n\tdefault:\n\t\t// servis (podrazumevana)\n\t\tvar b1 = \"#004000\"; // tamna pozadina zaglavlja + okviri\n\t\tvar b2 = \"#008000\"; // svetla pozadina zaglavlja\n\t\tvar b3 = \"#D0F3B6\"; // tekst zaglavlja + pozadina info boxa\n\t\tvar b4 = \"#F9F7ED\"; // pozadina poruke\n\t\tvar t1 = \"#008000\"; // tekst\n\t\tvar t2 = \"#004000\"; // link\n\t\tvar t3 = \"#800040\"; // aktivan link\n\t}\n\n\t// definise selektore sa predefinisanom temom boja\n\tvar css = \"body, .page { color: \"+t1+\"; }\" +\n\t\t\"a:link, a:visited { color: \"+t2+\"; }\" +\n\t\t\"a:hover, a:active { color: \"+t3+\"; }\" +\n\t\t\".tborder { background: white; color: \"+b1+\"; border: 1px solid \"+b1+\"; }\" +\n\t\t\".thead { background: \"+b1+\"; color: \"+b4+\"; }\" +\n\t\t\".tcat, .vbmenu_control, .tfoot { background: \"+b2+\"; color: \"+b4+\"; }\" +\n\t\t\".alt1, .alt1Active, .panelsurround, .wysiwyg { background: \"+b4+\" !important; color: \"+t1+\" !important; border: none !important; }\" +\n\t\t\".alt2, .controlbar, .imagebutton, .panel { background: \"+b3+\"; color: \"+t1+\"; border: none !important; }\" +\n\t\t\"div.page {width: 100% !important; padding: 0; margin: 0;}\" +\n\t\t\"input, textarea {color: \"+t2+\"}\";\n\n\t// primenjuje CSS na stranu\n\tGM_addStyle(css);\n\t\n\t// nizovi sa IDovima redakcije, saradnika i moderatora\n\tvar skft_red = new Array(\"1\", \"3\", \"5\", \"6\", \"8\", \"10\", \"14\", \"19\", \"115\", \"242\"); // redakcija\n\tvar skft_sar = new Array(\"4\", \"7\", \"15\", \"18\", \"21\", \"22\", \"62\", \"113\", \"128\", \"268\", \"312\", \"321\", \"353\", \"1734\", \"2486\", \"2526\", \"4049\", \"21855\"); // saradnici\n\tvar skft_mod = new Array(\"121\", \"123\", \"169\", \"185\", \"192\", \"216\", \"222\", \"245\", \"395\", \"452\", \"589\", \"600\", \"624\", \"773\", \"990\", \"1365\", \"1756\", \"1945\", \"2243\", \"2588\", \"2833\", \"3052\", \"4029\", \"5035\", \"10390\"); // moderator\n\n\t// procesiram sve slike na strani\n\tvar slike = document.getElementsByTagName('img');\n\n\tfor (i = 0; i < slike.length; i++)\n\t{\n\t\t// debug → GM_log(\"i = \" + i + \": src = \" + slike[i].src);\n\t\t// ako profil ima avatar\n\t\tif ( slike[i].alt.match(\"Avatar\") ) {\n\t\t\t// vidi da li je promenjen SRC slike ili je original\n\t\t\tif ( slike[i].src.match(\"u=\") ) {\n\t\t\t\t// odredi status clana (cin) na osnovu uzmi UID-a iz URL-a slike avatara\n\t\t\t\tskft_uid = slike[i].src.split(\"=\")[1].split(\"&\")[0];\n\t\t\t\tif ( skft_red.in_array(skft_uid) ) { // redakcija\n\t\t\t\t\tskft_cin = \"redakcija\";\n\t\t\t\t} else if ( skft_sar.in_array(skft_uid) ) { // saradnici\n\t\t\t\t\tskft_cin = \"saradnik\";\n\t\t\t\t} else if ( skft_mod.in_array(skft_uid) ) { // moderator\n\t\t\t\t\tskft_cin = \"moderator\";\n\t\t\t\t}\n\t\t\t} else if ( slike[i].src.match(\"AVATAR-\") ) {\n\t\t\t\t// odredi status clana (cin) na osnovu uzmi UID-a iz URL-a slike avatara\n\t\t\t\tskft_uid = slike[i].src.split(\"-\")[1];\n\t\t\t\tif ( skft_red.in_array(skft_uid) ) { // redakcija\n\t\t\t\t\tskft_cin = \"redakcija\";\n\t\t\t\t} else if ( skft_sar.in_array(skft_uid) ) { // saradnici\n\t\t\t\t\tskft_cin = \"saradnik\";\n\t\t\t\t} else if ( skft_mod.in_array(skft_uid) ) { // moderator\n\t\t\t\t\tskft_cin = \"moderator\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// posto je SRC promenjen, uzmi cin iz URL-a slike avatara\n\t\t\t\tskft_cin = slike[i].src.split(\"-\")[2];\n\t\t\t}\n\t\t\t// promeni avatar\n\t\t\tskft_avatar = skft_av_url + \"AVATAR-sk-\" + skft_cin + \"-\" + tema + \".png\";\n\t\t\t// debug → GM_log(\"Menjam sliku avatara: \"+skft_avatar);\n\t\t\tslike[i].src = skft_avatar;\n\t\t} else if ( slike[i].src.match(\"lastpost.gif\") || slike[i].src.match(\"/lastpost-\") ) {\n\t\t\tslike[i].src = skft_av_url + \"lastpost-\" + tema + \".gif\";\n\t\t} else if ( slike[i].src.match(\"firstnew.gif\") || slike[i].src.match(\"/firstnew-\") ) {\n\t\t\tslike[i].src = skft_av_url + \"firstnew-\" + tema + \".gif\";\n\t\t} else if ( slike[i].src.match(\"trashcan_small.gif\") || slike[i].src.match(\"/trashcan_small-\") ) {\n\t\t\tslike[i].src = skft_av_url + \"trashcan_small-\" + tema + \".gif\";\n\t\t// dugmad\n\t\t} else if ( slike[i].src.match(\"edit.gif\") || slike[i].src.match(\"/edit-\") ) {\n\t\t\tslike[i].src = skft_av_url + \"edit-\" + tema + \".gif\";\n\t\t} else if ( slike[i].src.match(\"multiquote_off.gif\") || slike[i].src.match(\"/multiquote_off-\") ) {\n\t\t\tslike[i].src = skft_av_url + \"multiquote_off-\" + tema + \".gif\";\n\t\t} else if ( slike[i].src.match(\"post_thanks.gif\") || slike[i].src.match(\"/post_thanks-\") ) {\n\t\t\tslike[i].src = skft_av_url + \"post_thanks-\" + tema + \".gif\";\n\t\t} else if ( slike[i].src.match(\"quickreply.gif\") || slike[i].src.match(\"/quickreply-\") ) {\n\t\t\tslike[i].src = skft_av_url + \"quickreply-\" + tema + \".gif\";\n\t\t} else if ( slike[i].src.match(\"quote.gif\") || slike[i].src.match(\"/quote-\") ) {\n\t\t\tslike[i].src = skft_av_url + \"quote-\" + tema + \".gif\";\n\t\t} else if ( slike[i].src.match(\"reply.gif\") || slike[i].src.match(\"/reply-\") ) {\n\t\t\tslike[i].src = skft_av_url + \"reply-\" + tema + \".gif\";\n\t\t}\n\t\t\n\t}\n}", "function etsiLajiHavainnot(laji){\n\t\tvar aputaulukko=[];\n\t\tfor(var i in havainnotTaulukko){ \t\t\t\t//käydään kaikki havainnot läpi yksi kerrallaan\n\t\t\tif (havainnotTaulukko[i].laji==laji){\t\t//jos objektin lajinimi vastaa parametrina saatua nimeä\n\t\t\t\taputaulukko.push(havainnotTaulukko[i]);\t//objekti aputaulukkoon\n\t\t\t}\n\t\t}\n\t\thavainnotTaulukko=aputaulukko;\t\t\t\t\t//havaintoTaulukosta lajikohtainen\n\t}", "function screw(ilgis, zingsnis, pasukimas) {\n const sriegiai = ilgis / zingsnis;\n const laipsniai = sriegiai * 360;\n const ats = laipsniai / pasukimas;\n return ats;\n}", "function skaiciuotiVidurki(mas) {\n var suma = 0;\n for (var i = 0; i < mas.length; i++) {\n suma += mas[i];\n }\n // return Math.round(suma / mas.length);\n var ats = suma / mas.length;\n ats = Math.round(ats);\n return ats;\n}", "function instruerenSchroef(object){\n\tvar schroefDraai = 0;\n\tvar schroeven = [];\n\tvar schroefNummer = 0;\n\n\t$(\"[class*='schroefgat-\"+object.id+\"']\").each(function(i){\n\t\tschroeven.push(this);\n\t});\n\n\tvar pijlPosY = $(schroeven[schroefNummer]).attr(\"position\").y + 2;\n\t$(\"#schroevendraaier-icoon\").attr({\"position\": ''+$(schroeven[schroefNummer]).attr(\"position\").x+' '+$(schroeven[schroefNummer]).attr(\"position\").y+' '+$(schroeven[schroefNummer]).attr(\"position\").z+'', \"visible\": \"true\"});\n\t$(\"#pijl\").attr({\"position\": ''+$(schroeven[schroefNummer]).attr(\"position\").x+' '+pijlPosY+' '+$(schroeven[schroefNummer]).attr(\"position\").z+'', \"visible\": \"true\", \"rotation\": \"0 0 -90\"});\n\n\t$(\"#schroevendraaier-icoon\").mousedown(function(){\n\t\tif(schroevendraaierObject == true){\n\t\t\tif(schroefNummer < schroeven.length){\n\t\t\t\tafspelenGeluid(\"aandraaien\");\n\t\t\t\tschroefDraai++;\n\t\t\t\t$(\"#schroevendraaier-icoon\").attr(\"src\", '#schroevendraaier-icoon-'+schroefDraai+'-img');\n\t\t\t\tif(schroefDraai == 3){\n\t\t\t\t\tschroefNummer++;\n\t\t\t\t\tschroefDraai = 0;\n\t\t\t\t\t$(\"#schroevendraaier-icoon\").attr(\"src\", '#schroevendraaier-icoon-'+schroefDraai+'-img');\n\t\t\t\t}\n\t\t\t\tif(schroeven.length == schroefNummer){\n\t\t\t\t\tschroefNummer = 0;\n\t\t\t\t\tschroeven = [];\n\t\t\t\t\t$(\"#schroevendraaier-icoon\").attr({\"position\": '0 0 0', \"visible\": \"false\"});\n\t\t\t\t\t$(\"#pijl\").attr({\"position\": '0 0 0', \"visible\": \"false\"});\n\t\t\t\t\tvoltooienObject();\n\t\t\t\t\tif(objectenCompleet == 9){\n\t\t\t\t\t\tloslatenObject(draagObject);\n\t\t\t\t\t\tvoltooienSpel();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar pijlPosY = $(schroeven[schroefNummer]).attr(\"position\").y + 2;\n\t\t\t\t\t$(\"#schroevendraaier-icoon\").attr({\"position\": ''+$(schroeven[schroefNummer]).attr(\"position\").x+' '+$(schroeven[schroefNummer]).attr(\"position\").y+' '+$(schroeven[schroefNummer]).attr(\"position\").z+'', \"visible\": \"true\"});\n\t\t\t\t\t$(\"#pijl\").attr({\"position\": ''+$(schroeven[schroefNummer]).attr(\"position\").x+' '+pijlPosY+' '+$(schroeven[schroefNummer]).attr(\"position\").z+'', \"visible\": \"true\", \"rotation\": \"0 0 -90\"});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}", "function fl_outToMishloah ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.maza.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.beiza.alpha=1\n\t\t\tthis.hazeret.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.gvina.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dvash.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.chanuka_btn.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.pesach_btn.alpha=1\n\t\t this.shavuot_btn.alpha=1\n\t\t this.rosh_ha_shana_btn.alpha=1\n\t\t this.modern_btn.alpha=1\n\t\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t\n\t\t}}", "function paz(){\n\tDepartamento = new Array('<p>La Paz</p>');\n\tHistoria = new Array('<p class=\"text-justify\">La Paz es un departamento de El Salvador ubicado en la zona oriental del país. Limita al Norte con la república de Honduras; al Sur y al Oeste con el departamento de San Miguel, y al Sur y al Este con el departamento de La Unión. Su cabecera departamental es San Francisco. Morazán comprende un territorio de 1 447 km² y cuenta con una población de 181 285 habitantes.</p>');\n\t/*Declaracion de Variable Interna para recorrer el arreglo de Municipios,\n\tde la Misma manera para recorrer los elementos de otros arreglos*/\n\tvar Municipioss, Municipioss2, rios, lagos, volcanes, centertour, personaje;\n\tMunicipioss = \"\";\n\tMunicipios = new Array('<ol><span class=\"glyphicon glyphicon-home\"></span> La Union</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> Yucuaiquin</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> Intipuca</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> El Carmen</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> Bolivar</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> Santa Rosa de Lima</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> Anamoros</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> Concepcion de Oriente</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> Lislique </ol>');\n\tfor(i = 0; i < Municipios.length; i++){\n\t\tMunicipioss += Municipios[i];\n\t}\n\tMuniciipios2 = new Array('<ol><span class=\"glyphicon glyphicon-home\"></span> San Alejo</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> Conchagua</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> San Jose</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> Yayantique</ol>','<ol><span class=\"glyphicon glyphicon-home\"></span> Meanguera del Golfo</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> Pasaquina</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> Nueva Esparta</ol>', '<ol><span class=\"glyphicon glyphicon-home\"></span> Poloros</ol>');\n\tfor(m = 0; m< Municiipios2.length; m++){\n\t\tMunicipioss2 += Municiipios2[m];\n\t}\n\tRios = new Array('<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> PLaya El Jaguey</ol>', '<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> Playa Blanca</ol>');\n\trios = \"\";\n\tfor(j = 0; j < Rios.length; j++){\n\t\trios += Rios[j];\n\t}\n\tVolcanes = new Array('<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> Volcan Conchagua</ol>');\n\tPersonajes = new Array('<ol><span class=\"glyphicon glyphicon-ok\"></span> Antonio Grau Mora</ol>', '<ol><span class=\"glyphicon glyphicon-ok\"></span> Maria Cegarra Salcedo</ol>', '<ol><span class=\"glyphicon glyphicon-ok\"></span> Asensio Saez</ol>');\n\tpersonaje = \"\";\n\tfor(k = 0; k < Personajes.length; k++){\n\t\tpersonaje += Personajes[k];\n\t}\n\tCentroTour = new Array('<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> Parque de la Familia</ol>', '<ol class=\"text-center\"><span class=\"glyphicon glyphicon-ok\"></span> Bosque Conchagua</ol>');\n\tcentertour = \"\";\n\tfor(c = 0; c < CentroTour.length; c++){\n\t\tcentertour += CentroTour[c];\n\t}\n\n\tdocument.getElementById(\"Departament\").innerHTML = Departamento[0];\n\tdocument.getElementById(\"History\").innerHTML = Historia[0];\n\tdocument.getElementById(\"Municipio\").innerHTML = Municipioss;\n\tdocument.getElementById(\"Municipio2\").innerHTML = Municipioss2;\n\tdocument.getElementById(\"centro\").innerHTML = centertour;\n\tdocument.getElementById(\"Persons\").innerHTML = personaje;\n\tdocument.getElementById(\"river\").innerHTML = rios;\n\tdocument.getElementById(\"volca\").innerHTML = Volcanes[0];\n}", "async function zapolniTabelo() {\n /**\n * Funkcija ki pobarva celico\n * @param {HTMLElement} el Element celice ki jo barvamo\n * @param {String} tip Tip celice ki nam pove kako naj pobarvamo\n */\n function pobarvajPolje(el, tip) {\n switch (tip) {\n case \".\": el.classList = \"bg-info\"; el.innerText = \"\"; break;\n case \"#\": el.classList = \"bg-secondary\"; el.innerText = \"#\"; break;\n case \"X\": el.classList = \"bg-danger\"; el.innerText = \"X\"; break;\n case \"O\": el.classList = \"bg-info\"; el.innerText = \"O\"; break;\n }\n }\n\n // Pridobi podatke iz streznika in jih preberi\n const sb = JSON.parse(await stanjeBojisca());\n const domace = sb.domace;\n const tuje = sb.tuje[0];\n\n // Ustrezno pobarvaj obe tabeli\n for (let y = 0; y < 15; y++) {\n for (let x = 0; x < 15; x++) {\n let el_napad = at(napadalnaTabela, x, y);\n let el_domace = at(domacaTabela, x, y);\n\n pobarvajPolje(el_napad, tuje[y][x]);\n pobarvajPolje(el_domace, domace[y][x]);\n }\n }\n }", "function provjera(aktivnostiSpisak, pocetak, kraj) {\n for (var i = 0; i < aktivnostiSpisak.length; i++) {\n let p = aktivnostiSpisak[i].pocetak;\n let k = aktivnostiSpisak[i].kraj;\n if (((pocetak <= p) && (kraj > p) && (kraj <= k)) ||\n ((pocetak >= p) && (pocetak < k) && (kraj >= k)) ||\n ((pocetak > p) && (kraj < k)) ||\n ((pocetak < p) && (kraj > k)) ||\n ((pocetak == p) && (kraj == k))) {\n return true;\n }\n\n }\n return false;\n }", "function naikAngkot(arrPenumpang) {\n var rute = ['A', 'B', 'C', 'D', 'E', 'F'];\n var a = 0;\n var b = 0;\n var final = [];\n\n for (i = 0; i < arrPenumpang.length; i++) {\n for (k = 0; k < rute.length; k++) {\n if (rute[k] === arrPenumpang[i][1]) {\n a = k;\n // console.log(a);\n } else if (rute[k] === arrPenumpang[i][2]) {\n b = k;\n // console.log(b);\n }\n }\n final.push({\n penumpang: arrPenumpang[i][0],\n naikDari: arrPenumpang[i][1],\n tujuan: arrPenumpang[i][2],\n bayar: (b - a) * 2000\n });\n }\n return final;\n}", "function fl_outToRimon ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.maza.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.beiza.alpha=1\n\t\t\tthis.hazeret.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.gvina.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dvash.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t\tthis.mishloah.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.chanuka_btn.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.purim_btn.alpha=1\n\t\t this.pesach_btn.alpha=1\n\t\t this.shavuot_btn.alpha=1\n\t\t this.bible_btn.alpha=1\n\t\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t\n\t\t\n\t\t}}", "function ohodnot(frm)\r\n{\r\n\t// \r\n\t// nazov class pomocou ktorej sa hladaju input elementy\r\n\tvar MOZNOST_CLASS_NAME = 'odpoved';\r\n\r\n\t//\r\n\t// nazov triedy, ktorou bude oznaceny rodicovsky element spravnej odpovede\r\n\tvar SPRAVNA_CLASS_NAME = 'spravna';\r\n\t\r\n\t//\r\n\t// nazov triedy, ktorou bude oznaceny rodicovsky element spravnej odpovede\r\n\tvar NESPRAVNA_CLASS_NAME = 'nespravna';\t\r\n\r\n\r\n\t// \r\n\t// najdi vsetky odpovede\r\n\tvar odpovede = document.getElementsByClassName( MOZNOST_CLASS_NAME, frm);\r\n\t\r\n\t//\r\n\t// ziskaj z nich unique zoznam \"name\"\r\n\tvar nazvy = Array();\r\n\todpovede.each(function (item) { \r\n\t\tnazvy.push(item.name); \r\n\t});\r\n\tnazvy = nazvy.uniq();\r\n\t\r\n\t// \r\n\t// over ci su vsetky zaskrtnute\r\n\tfor (var i=0; i<nazvy.length; i++) {\r\n\t\tvar nazov = nazvy[i];\r\n\t\t\r\n\t\t\t\t\r\n\t\t// zoznam item v nich\r\n\t\tvar moznosti = frm.getInputs('radio', nazov);\r\n\t\t\r\n\t\t// prelistuj ich a zisti ci je aspon 1 zaskrtnuty (viac nemoze byt, lebo maju rovnake meno)\r\n\t\tvar zaskrtnute = false;\r\n\t\tvar spravne_moznosti = 0;\r\n\t\tmoznosti.each(function (moznost) {\r\n\t\t\tif (moznost.checked) {\r\n\t\t\t\tzaskrtnute = true;\r\n\t\t\t}\r\n\t\t\tif (moznost.value == 1) {\t\r\n\t\t\t\tspravne_moznosti++;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t// ak nie je zakrtnuty, tak zrus validaciu\r\n\t\tif (!zaskrtnute) {\r\n\t\t\talert('Musíte zodpovedať všetky otázky!');\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\t\tdocument.getElementById(nazov).style.visibility = 'visible';\r\n\t\t//\r\n\t\t// ak otazka nema ani jednu spravnu odpoved v kode, alebo ma viac moznosti\r\n\t\t// upozorni autora\r\n\t\tif (spravne_moznosti != 1) {\r\n\t\t\tif (spravne_moznosti > 1) {\r\n\t\t\t\talert('Otazka s parametrom name: '+ nazov + ' musi mat len 1 spravnu odpoved!');\r\n\t\t\t} else {\r\n\t\t\t\talert('Otazka s parametrom name: '+ nazov + ' musi mat 1 spravnu odpoved !');\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t};\r\n\t\r\n\t//\r\n\t// statistiky vyhodnocovania\r\n\tvar pocet_otazok = nazvy.length;\r\n\tvar pocet_nespravnych = 0;\r\n\tvar pocet_spravnych = 0;\r\n\t\r\n\t// \r\n\t// vyhodnot jednotlive moznosti\r\n\tnazvy.each(function (nazov) {\r\n\t\t\r\n\t\t// zoznam item v nich\r\n\t\tvar moznosti = frm.getInputs('radio', nazov);\r\n\t\t\r\n\t\t// prelistuj a ohodnot\r\n\t\tmoznosti.each(function (moznost) {\r\n\t\t\tif (moznost.checked) {\r\n\t\t\t\tif (moznost.value == 1) {\r\n\t\t\t\t\tpocet_spravnych++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpocet_nespravnych++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\t\r\n\t// \r\n\t// zvyrazni spravne a nespravne vysledky\r\n\tnazvy.each(function (nazov) {\r\n\t\t\r\n\t\t// zoznam item v nich\r\n\t\tvar moznosti = frm.getInputs('radio', nazov);\r\n\t\t\r\n\t\t// prelistuj a ohodnot\r\n\t\tmoznosti.each(function (moznost) {\r\n\t\t\r\n\t\t\t// odstran predchadzajuce\r\n\t\t\tmoznost.parentNode.removeClassName(SPRAVNA_CLASS_NAME);\t\t\t\r\n\t\t\tmoznost.parentNode.removeClassName(NESPRAVNA_CLASS_NAME);\r\n\t\t\t\r\n\t\t\tif (moznost.checked) {\r\n\t\t\t\tif (moznost.value == 1) {\r\n\t\t\t\t\t// spravna odpoved + celkovo spravna\r\n\t\t\t\t\tmoznost.parentNode.addClassName(SPRAVNA_CLASS_NAME);\r\n\t\t\t\t\tmoznost.parentNode.parentNode.removeClassName(NESPRAVNA_CLASS_NAME);\r\n\t\t\t\t\tmoznost.parentNode.parentNode.removeClassName('otazka');\r\n\t\t\t\t\tmoznost.parentNode.parentNode.addClassName('otazka'+SPRAVNA_CLASS_NAME);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// nespravna odpoved + celkovo nespravna\r\n\t\t\t\t\tmoznost.parentNode.addClassName(NESPRAVNA_CLASS_NAME);\r\n\t\t\t\t\tmoznost.parentNode.parentNode.removeClassName(SPRAVNA_CLASS_NAME);\r\n\t\t\t\t\tmoznost.parentNode.parentNode.removeClassName('otazka');\r\n\t\t\t\t\tmoznost.parentNode.parentNode.addClassName('otazka'+NESPRAVNA_CLASS_NAME);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (moznost.value == 1) {\r\n\t\t\t\t\t// spravna odpoved\r\n\t\t\t\t\tmoznost.parentNode.addClassName(SPRAVNA_CLASS_NAME);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\t\r\n\t//\r\n\t// zobraz vysledok za pomoci alert\r\n\tif (pocet_otazok == pocet_spravnych) {\r\n\t\talert('Gratulujem !!!, zodpovedali ste všetky otázky správne!');\r\n\t} else {\r\n\t\talert('Zodpovedali ste správne ' + pocet_spravnych + ' otázok z ' + pocet_otazok + ' možných.');\r\n\t}\r\n\t\r\n\t// \r\n\t// allways return false - do not redirect\r\n\treturn false;\r\n}", "function sortirajSveOpadajuce() {\r\n let tempNiz = nizPrikazanihProizvoda;\r\n tempNiz.sort((a,b) => {\r\n if(a.cena == b.cena)\r\n return 0;\r\n return a.cena > b.cena ? -1 : 1;\r\n });\r\n prikaziProizvode(tempNiz);\r\n}", "jubilar() {\n let jubilacion = this.edad >= 45 ? true : false;\n\n return (\"\" + jubilacion);\n }", "function naikAngkot(arrPenumpang) {\n rute = ['A', 'B', 'C', 'D', 'E', 'F'];\n //your code here\n if (arrPenumpang.length === 0) {\n \treturn '[]';\n }\n var daftarPenumpang = [];\n for (var i = 0; i < arrPenumpang.length; i++) {\n \tvar dataPenumpang = {};\n \tdataPenumpang.penumpang = arrPenumpang[i][0];\n \tdataPenumpang.naikDari = arrPenumpang[i][1];\n \tdataPenumpang.tujuan = arrPenumpang[i][2];\n \tdataPenumpang.bayar = (rute.indexOf(arrPenumpang[i][2])-rute.indexOf(arrPenumpang[i][1]))*2000;\n \tdaftarPenumpang.push(dataPenumpang);\n }\n return daftarPenumpang;\n}", "function fl_outToMaza ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.hasa.alpha=1\n\t\t\tthis.beiza.alpha=1\n\t\t\tthis.hazeret.alpha=1\n\t\t\tthis.mamtak.alpha=1\n\t\t\tthis.gvina.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dvash.alpha=1\n\t\t\tthis.dag.alpha=1\n\t\t\tthis.sumsum.alpha=1\n\t\t\tthis.perot.alpha=1\n\t\t\tthis.mishloah.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.chanuka_btn.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.purim_btn.alpha=1\n\t\t this.shavuot_btn.alpha=1\n\t\t this.rosh_ha_shana_btn.alpha=1\n\t\t this.modern_btn.alpha=1\n\t\t\t\t\t this.arrow_btn.alpha=0\n\t\tthis.arrowAside_mc.alpha=0\n\t\tthis.gvina_explain.alpha=0\n\t\tthis.mishloah_explain.alpha=0\n\t\tthis.sufgania_explain.alpha=0\n\t\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t\n\t\t}}", "function hitungVolumedanLuasPermukaanBalok(panjang, lebar, tinggi) {\n luasPermukaanBalok = 2 * ( (panjang * lebar) + (panjang * tinggi) + (lebar * tinggi) );\n volumeBalok = panjang * lebar * tinggi;\n document.write(\"Panjang : \" + panjang + \"<br/>\");\n document.write(\"Lebar : \" + lebar + \"<br/>\");\n document.write(\"Tinggi : \" + tinggi + \"<br/>\" + \"<br/>\");\n document.write(\"Volume Balok : \" + volumeBalok + \"<br/>\");\n document.write(\"Luas Permukaan Balok : \" + luasPermukaanBalok + \"<br/>\");\n}", "bouger()\r\n {\r\n this.gauche += Math.cos(this.angle) * this.vitesseX;\r\n this.haut += Math.sin(this.angle) * this.vitesseY;\r\n\r\n //Fonctions annexes\r\n this.limite();\r\n this.majHTML();\r\n }", "function getRaspored() {\n var data, dataL;\n data = fetchRasp(smjena);\n dataL = data.length;\n trajanje = trajanjeFn(data[0]);\n\n // Biranje između učenika i profesora\n if (osoba == \"Učenik\") {\n getUcenik(data, dataL);\n } else if (osoba == \"Profesor\" && smjena != \"A/B\") {\n getProfesor(data, dataL);\n } else {\n getProfesorAB(data);\n }\n }", "function orb_plan(njd,np){\n\n // elementi orbitali dei pianeti per l'equinozio della data.\n\n\n var T=(njd-2415020.0)/36525;\n \n var L=new Array (); // Longitudine media dei pianeti.\n\n L[0]=178.179078+149474.07078*T+0.0003011*T*T; // Mercurio.\n L[1]=342.767053+58519.211910*T+0.0003097*T*T; // Venere.\n L[2]= 99.696680+36000.768920*T+0.0003025*T*T; // Terra.\n L[3]=293.737334+19141.695510*T+0.0003107*T*T; // Marte.\n L[4]=238.049257+3036.3019860*T+0.0003347*T*T-0.00000165*T*T*T; // Giove.\n L[5]=266.564377+1223.5098840*T+0.0003245*T*T-0.00000580*T*T*T; // Saturno.\n L[6]=244.197470+429.86354600*T+0.0003160*T*T-0.00000060*T*T*T; // Urano.\n L[7]= 84.457994+219.88591400*T+0.0003205*T*T-0.00000060*T*T*T; // Nettuno.\n L[8]= 93.48+144.96*T; // Plutone.\n\n\n\n var M=new Array (); // Anomalia media dei pianeti.\n\n M[0]=102.27938+149472.51529*T+0.000007*T*T; // Mercurio.\n M[1]=212.60322+ 58517.80387*T+0.001286*T*T; // Venere.\n M[2]=178.47583+35999.049750*T-0.000150*T*T-0.0000033*T*T*T; // Terra.\n M[3]=319.51913+ 19139.85475*T+0.000181*T*T; // Marte.\n M[4]=225.32829+ 3034.69202*T-0.000722*T*T; // Giove.\n M[5]=175.46616+ 1221.55147*T-0.000502*T*T; // Saturno.\n M[6]= 72.64878+ 428.37911*T+0.000079*T*T; // Urano.\n M[7]= 37.73063+ 218.46134*T-0.000070*T*T; // Nettuno.\n M[8]=0; // Plutone.\n\n\n var a= new Array( 0.3870986, 0.7233316, 0.999996, 1.523688300, 5.20256100, 9.5547470, 19.2181400, 30.1095700, 39.48168677); // \n var p= new Array(0.24085000, 0.6152100, 1.000040, 1.8808900, 11.8622400, 29.457710, 84.0124700, 164.7955800, 248.09);\n var m= new Array(0.000001918, 0.00001721, 0.0000000, 0.000004539, 0.000199400, 0.000174000, 0.00007768, 0.000075970, 0.000004073);\n var d= new Array( 6.74, 16.92, 0, 9.36, 196.74, 165.60, 65.80, 62.20, 3.20); \n \n var e= new Array(); // Eccentricità delle orbite planetarie.\n\n e[0]=0.20561421+0.00002046*T-0.000000030*T*T; // Mercurio. \n e[1]=0.00682069-0.00004774*T+0.000000091*T*T; // Venere.\n e[2]=0.01675104-0.00004180*T-0.000000126*T*T; // Terra. \n e[3]=0.09331290+0.000092064*T-0.000000077*T*T; // Marte. \n e[4]=0.04833475+0.000164180*T-0.0000004676*T*T-0.00000000170*T*T*T; // Giove.\n e[5]=0.05589232-0.000345500*T-0.0000007280*T*T+0.00000000074*T*T*T; // Saturno.\n e[6]=0.04634440-0.000026580*T+0.0000000770*T*T; // Urano.\n e[7]=0.00899704+0.000006330*T-0.0000000020*T*T; // Nettuno. \n e[8]=0.24880766; // Plutone. \n\n var i= new Array(); // Inclinazione dell'orbita\n\n i[0]=7.002881+0.0018608*T-0.0000183*T*T;\n i[1]=3.393631+0.0010058*T-0.0000010*T*T;\n i[2]=0;\n i[3]=1.850333-0.0006750*T+0.0000126*T*T;\n i[4]=1.308736-0.0056961*T+0.0000039*T*T;\n i[5]=2.492519-0.0039189*T-0.00001549*T*T+0.00000004*T*T*T;\n i[6]=0.772464+0.0006253*T+0.0000395*T*T;\n i[7]=1.779242-0.0095436*T-0.0000091*T*T;\n i[8]=17.14175;\n\n var ap= new Array(); // Argomento del perielio.\n\n ap[0]=28.753753+0.3702806*T+0.0001208*T*T; // Mercurio\n ap[1]=54.384186+0.5081861*T-0.0013864*T*T;\n ap[2]=gradi_360(L[2]-M[2]+180); // Terra\n ap[3]=285.431761+1.0697667*T+0.0001313*T*T+0.00000414*T*T*T;\n ap[4]=273.277558+0.5994317*T+0.00070405*T*T+0.00000508*T*T*T;\n ap[5]=338.307800+1.0852207*T+0.00097854*T*T+0.00000992*T*T*T;\n ap[6]=98.071581+0.9857650*T-0.0010745*T*T-0.00000061*T*T*T;\n ap[7]=276.045975+0.3256394*T+0.00014095*T*T+0.000004113*T*T*T;\n ap[8]=113.76329; // Plutone\n\n \n var nd= new Array(); // Longitudine del nodo.\n\n nd[0]=47.145944+1.1852083*T+0.0001739*T*T; // Mercurio. \n nd[1]=75.779647+0.8998500*T+0.0004100*T*T; // Venere.\n nd[2]=0; // Terra\n nd[3]=48.786442+0.7709917*T-0.0000014*T*T-0.00000533*T*T*T; // Marte.\n nd[4]=99.443414+1.0105300*T+0.00035222*T*T-0.00000851*T*T*T; // Giove.\n nd[5]=112.790414+0.8731951*T-0.00015218*T*T-0.00000531*T*T*T; // Saturno.\n nd[6]=73.477111+0.4986678*T+0.0013117*T*T; // Urano.\n nd[7]=130.681389+1.0989350*T+0.00024987*T*T-0.000004718*T*T*T; // Nettuno.\n nd[8]=110.30347; // Plutone.\n\n\n\n var Long_media=gradi_360(L[np]);\n var Anomalia_media=gradi_360(M[np]);\n var Semiasse=a[np];\n var Periodo=p[np];\n var Inclinazione=i[np];\n var Long_perielio=gradi_360(ap[np]+nd[np]);\n var Long_nodo=nd[np];\n var eccentr=e[np];\n var dim_ang=d[np];\n var magnitudine=m[np];\n\n if(np==8) {Anomalia_media=gradi_360(Long_media-ap[8]-nd[8]); }\n\n\n var elem_orb=new Array(Periodo , Long_media , Anomalia_media , Long_perielio , eccentr , Semiasse , Inclinazione , Long_nodo , dim_ang , magnitudine);\n\nreturn elem_orb;\n\n}" ]
[ "0.67079115", "0.66086614", "0.6588543", "0.6503447", "0.6411943", "0.6401569", "0.6375653", "0.63005114", "0.6274444", "0.6266517", "0.615698", "0.61478424", "0.6111749", "0.6070658", "0.60660726", "0.6035492", "0.60261947", "0.6001451", "0.5998673", "0.59914774", "0.59622514", "0.59215784", "0.59156924", "0.5913976", "0.58641464", "0.5848618", "0.5830952", "0.58271027", "0.58201873", "0.58167607", "0.57981837", "0.57807964", "0.5776188", "0.57551587", "0.5747186", "0.574062", "0.5736527", "0.57350683", "0.5734085", "0.57336724", "0.572674", "0.5722739", "0.5718501", "0.57171166", "0.571522", "0.57134557", "0.570435", "0.5698195", "0.5686885", "0.56866074", "0.5674728", "0.56719345", "0.5666907", "0.5665994", "0.56579256", "0.56564164", "0.565375", "0.5645134", "0.5642834", "0.5640987", "0.56336135", "0.56298006", "0.5617974", "0.5613774", "0.5611264", "0.559254", "0.55899245", "0.558809", "0.55878353", "0.5587189", "0.5574104", "0.55702347", "0.55655545", "0.5562486", "0.5562072", "0.5560229", "0.5559524", "0.55524105", "0.55471", "0.55386186", "0.55314535", "0.55301934", "0.55253804", "0.55152625", "0.55075246", "0.55053973", "0.550527", "0.55048823", "0.55020994", "0.54998136", "0.54978424", "0.5490751", "0.54866314", "0.54851264", "0.54802537", "0.54771477", "0.5476599", "0.54660994", "0.5462051", "0.54598725", "0.5459317" ]
0.0
-1
Redraws the library conflicts
function updateLibraryConflicts(){ var list = $("#library-list"); list.html(""); for(var id in lib_conflicts) { var c = lib_conflicts[id]; var conflict = $("<div class='library-conflict'>"); var name = $("<div class='library-conflict-name'>").html(c.name); var years = $("<div class='library-conflict-years'>").html(c.years); var remove = $("<button class='button'>").html("Remove"); remove.attr("onclick", "removeConflict("+id+")"); //remove.attr("onclick", ); conflict.append(name).append(years).append(remove); list.append(conflict); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "redrawTheme() {\n this._refreshStyleSheet();\n this._drawLogo();\n }", "function reset_highlight() {\n\t$('.imj_highlightDependencies').removeClass(\"imj_highlightDependencies\");\n}", "function forceRedraw() {\n var tempStyleSheet = document.createElement('style');\n document.body.appendChild(tempStyleSheet);\n document.body.removeChild(tempStyleSheet);\n }", "loadExternalLibraries()\n\t{\n\t\tlet i;\n\t\tlet libraries = this.settings.inject_libraries;\n\n\t\tfor (i = 0; i < libraries.length; i++) {\n\t\t\tif (externalLibraries.hasOwnProperty(libraries[i])) {\n\t\t\t\tlet id = 'Turbo-eCommerce-' + Str.ucfirst(libraries[i]);\n\t\t\t\t\n\t\t\t\tif (! DOM.find(id)) {\n\t\t\t\t\tDOM.addLinkedStyle(id, externalLibraries[libraries[i]]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function patchResDeps() {\n [\"rescript\"].concat(bsconfig[\"bs-dependencies\"]).forEach((bsDep) => {\n fs.writeFileSync(`./node_modules/${bsDep}/index.js`, \"\");\n const json = require(`./node_modules/${bsDep}/package.json`);\n json.main = \"index.js\";\n fs.writeFileSync(\n `./node_modules/${bsDep}/package.json`,\n JSON.stringify(json, null, 2)\n );\n });\n}", "resetDependencies() {\n\n // we only need to resolve new dependencies if we're an automatic custos\n if (this.auto)\n this.needsLayout = true;\n }", "function re_init()\n{\n //Thickbox reinit.\n $(\"body a.thickbox\").unbind();\n if(typeof(tb_init) != \"undefined\"){tb_init($(\"body a.thickbox\"));}\n //Rhohub Modal reinit.\n RhohubModalInit();\n //Rhohub Help Popovers.\n $.RhohubPopover();\n Init.ProjectLinks();\n}", "function afterInstall(ars) {\n var ln = ars?ars.length:0;\n if (ln>0) {\n var rs = ars[ln-1];\n if (rs) { // rs will be undefined if there was an error in installation \n var inst = !(rs.__autonamed__);// && !noInst; // instantiate directly built fellows, so as to share their code\n var ovr = installOverrides(rs);\n var ws = __pj__.set(\"ws\",om.DNode.mk());\n if (inst) {\n var frs = rs.instantiate();\n } else {\n frs = rs;\n }\n ws.set(rs.__name__,frs); // @todo rename if necessary\n om.root = draw.wsRoot = frs;\n page.codeBuilt = !(frs.__saveCount__);\n draw.enabled = !inspectDom &&!frs.notStandalone;\n var standalone = draw.enabled;\n showTopNote();\n if (standalone) {\n om.overrides = ovr;\n frs.deepUpdate(ovr);\n \n var bkc = frs.backgroundColor;\n if (!bkc) {\n frs.backgroundColor=\"white\";\n }\n }\n } else {\n om.root ={__installFailure__:1};\n }\n } else {\n // newItem\n om.root = draw.wsRoot = __pj__.set(\"ws\",geom.Shape.mk());\n om.root.backgroundColor=\"white\";\n standalone = true;\n page.codeBuilt = false;\n }\n setFselOptions(); \n \n \n page.genMainPage(standalone,function () {\n if (!wssrc) {\n page.setSaved(false);\n }\n if (!om.root.__about__) {\n aboutBut.hide();\n }\n var ue = om.updateErrors && (om.updateErrors.length > 0);\n if (ue) {\n var lb = mpg.lightbox;\n lb.pop();\n lb.setHtml(\"<div id='updateMessage'><p>An error was encountered in running the update function for this item: </p><i>\"+om.updateErrors[0]+\"</i></p></div>\");\n }\n //om.clearDataSources(om.root); //put this in someday under some conditions, if the data sources should be reloaded\n om.loadTheDataSources(om.root,function () {\n if (standalone || inspectDom) om.root.deepUpdate(ovr);\n tree.initShapeTreeWidget();\n var isVariant = !!(om.root.__saveCount__);\n if (inspectDom) {\n var doc = om.root.document;\n if (doc) {\n var dmf = doc.domify();\n canvasDiv.addChild(dmf);\n dmf.install();\n }\n \n } else if (standalone) {\n var tr = om.root.transform;\n var cdims = om.root.__canvasDimensions__;\n\n if (tr && cdims) {\n draw.mainCanvas.adjustTransform(draw.mainCanvas.transform(),cdims);\n } else {\n if (!isVariant || !tr) {\n //draw.mainCanvas.refresh();// so that text can be given bounds\n tr = draw.mainCanvas.fitTransform();\n om.root.set(\"transform\",tr);\n }\n }\n draw.refresh();\n\n }\n tree.openTop();\n tree.adjust();\n });\n });\n \n }", "reDrawArchs() {\n if (glb != null && glb != undefined) {\n glb.playCurve();\n }\n }", "function styleUpdate(){\n hide('.intro');\n show('.mode');\n\n $('body').removeClass('initial');\n $('body').addClass('light-body');\n\n $('.container').addClass('light');\n}", "function applyStandardVersion() {\n\t\t//hide avoid areas\n\t\t$('#avoidAreas').hide();\n\t\t\n\t\t//hide import/export features\n\t\t$('#exportImport').hide();\n\t\t\n\t\t//hide accessibility analysis\n\t\t$('#accessibilityAnalysis').hide();\n\t}", "function refresh () {\n\t\n\t\tbindingMap.imagebox.refresh ();\n\t\tbindingMap.imageselection.hide ();\n\t\tupdateUndoBroadcasters ();\n\t}", "function fixReferences() {\n this.$ = this.jQuery = window.jQuery;\n }", "function no_overlib() { return ver3fix; }", "function Libraries() {\n this._registry = [];\n this._coreLibIndex = 0;\n }", "function Libraries() {\n this._registry = [];\n this._coreLibIndex = 0;\n }", "function updateShapes() {\n\trebuildLines();\t\n}", "function loadLibraries() {\n gapi.load('client:auth2', {'callback': onClientLoad});\n gapi.load('picker', {'callback': () => { pickerApiLoaded = true; }});\n}", "function renderUpdateComplete() {\n autotrace.renderUpdateRunning = false;\n $loadingBar.css('opacity', 0);\n }", "conflicts() {\n this.log('conflicts');\n }", "revert() {\n lib.restore();\n }", "function updateGraphics() {\n\t\tupdateGraphicsHelper(false, false, false);\n\t}", "function applyExtendedVersion() {\n\t\t//show avoid areas\n\t\t$('#avoidAreas').show();\n\t\t\n\t\t//show import/export features\n\t\t$('#exportImport').show();\n\t\t\n\t\t//show accessibility analysis\n\t\t$('#accessibilityAnalysis').show();\n\t}", "function override () {\n shell.cd(path_lib);\n // For Custom Helper - e.g. `apps/navigation`\n shell.cp(\"override/spec.js\", `${path_ghost}/current/node_modules/gscan/lib/`);\n // For Chinese Language\n shell.cp(\"override/zh.json\", `${path_ghost}/current/core/server/translations/`);\n shell.cp(\"override/i18n.js\", `${path_ghost}/current/core/server/lib/common/`);\n}", "function reloadOutBrainModules() {\n if (typeof(OBR) !== \"undefined\" && typeof(OBR.extern) !== \"undefined\" &&\n typeof(OBR.extern.researchWidget) !== \"undefined\") {\n OBR.extern.researchWidget(\"http://\" + document.location.hostname + document.location.pathname);\n }\n}", "function unuseAllThemes() {\n _Registry__WEBPACK_IMPORTED_MODULE_1__[\"registry\"].themes = [];\n}", "function doClearImportFromLib(molname) {\n var molL = molLibrary(molname);\n var molCom = molComments(molname);\n if (arenaVar == 0) {\n removeAllNodes();\n document.getElementById(\"molyoulookat\").innerHTML = molL; \n document.getElementById(\"comments\").innerHTML = molCom; \n } else {\n document.getElementById(\"molyoulookat\").innerHTML = \"\"; \n if (molname != \"arena\") {\n fightersVar += 1;\n if (fightersVar <= 1) { \n var versusAdd = \"<br>\"; \n } else {\n var versusAdd = versusVar;\n }\n document.getElementById(\"comments\").innerHTML += versusAdd + molname;\n } \n }\n importMolFromLib(molL);\n}", "function reSetMarkers() {\n // if (myNewLayer != null) { // check for missing baseLayers\n hideAllInfoWindows();\n hideAllKiezatlasFeatures(); // and popups\n deSelectAllCategories();\n // }\n }", "configureIconLib() {\n if (this.preserveDefaults) {\n this.iconLibrary = this.$thisvui.iconLib;\n } else {\n let parent = this.$parent;\n let pIconLib = parent && parent.$props ? parent.$props.iconLib : null;\n this.iconLibrary = this.iconLib\n ? this.iconLib\n : parent && pIconLib\n ? pIconLib\n : this.$thisvui.iconLib;\n }\n }", "function redefine() {\n\t\theaders = getHeaders();\n\t\treset()\n\t\trebuild();\n\t}", "function removeDependencies() {\n\tif (!fs.existsSync(DIST_LIB_PATH)) {\n\t\treturn;\n\t}\n\n\tfs.writeFileSync(DIST_PACKAGE_PATH,\n\t\tJSON.stringify(\n\t\t\t{\n\t\t\t\t...getPackage(DIST_PACKAGE_PATH),\n\t\t\t\tdependencies: undefined,\n\t\t\t},\n\t\t\tnull,\n\t\t\tINDENTATION,\n\t\t),\n\t);\n}", "function updateBricks() {\n if (!gBricks.length) {\n if (gDebugging) console.log(\"VOCÊ VENCEU!!!!\");\n clear();\n }\n}", "checkLibraries() {\n const constructor = this;\n const regex = /__[^_]+_+/g;\n let unlinkedLibraries = constructor.binary.match(regex);\n\n if (unlinkedLibraries !== null) {\n unlinkedLibraries = unlinkedLibraries\n .map((\n name // Remove underscores\n ) => name.replace(/_/g, \"\"))\n .sort()\n .filter((name, index, arr) => {\n // Remove duplicates\n if (index + 1 >= arr.length) {\n return true;\n }\n\n return name !== arr[index + 1];\n })\n .join(\", \");\n\n const error = `${\n constructor.contractName\n } contains unresolved libraries. You must deploy and link the following libraries before you can deploy a new version of ${\n constructor.contractName\n }: ${unlinkedLibraries}`;\n\n throw new Error(error);\n }\n }", "function reapplyStyle()\n\t{\n//\t\tvar script = \"select all;\" +\n//\t\t _styleScripts[style];\n\t\t// regenerate visual style script\n\t\tvar script = _scriptGen.generateVisualStyleScript(_selection, _chain, _options);\n\n\t\t// regenerate highlight script\n\t\tscript = script.concat(generateHighlightScript(_highlighted));\n\n\t\t// convert array to a single string\n\t\tscript = script.join(\" \");\n\t\t_3dApp.script(script);\n\t}", "checkLibraries() {\n const constructor = this;\n const regex = /__[^_]+_+/g;\n let unlinkedLibraries = constructor.binary.match(regex);\n\n if (unlinkedLibraries !== null) {\n unlinkedLibraries = unlinkedLibraries\n .map(\n (\n name // Remove underscores\n ) => name.replace(/_/g, \"\")\n )\n .sort()\n .filter((name, index, arr) => {\n // Remove duplicates\n if (index + 1 >= arr.length) {\n return true;\n }\n\n return name !== arr[index + 1];\n })\n .join(\", \");\n\n const error = `${constructor.contractName} contains unresolved libraries. You must deploy and link the following libraries before you can deploy a new version of ${constructor.contractName}: ${unlinkedLibraries}`;\n\n throw new Error(error);\n }\n }", "function redraw_sidebar(){\n\n}", "function redrawFix() {\n\tvar element = document.getElementsByTagName(\"body\")[0];\n\telement.className = element.className;\n}", "function renderOverride() {\n o = {};\n\n if (isChecked($main_tgl))\n o.main = $main.val();\n if (isChecked($dependencies_tgl) && !$.isEmptyObject(dependencies))\n o.dependencies = dependencies;\n if (isChecked($format_tgl))\n o.format = $format.val();\n\n if (isChecked($directories_tgl)) {\n if (isChecked($lib_tgl)) {\n o.directories = {}\n if (isChecked($lib_tgl))\n o.directories.lib = $lib.val();\n }\n }\n\n if (isChecked($files_tgl) && files.length > 0)\n o.files = files;\n if (isChecked($ignore_tpl) && ignore.length > 0)\n o.ignore = ignore;\n if (isChecked($map_tgl) && !$.isEmptyObject(map))\n o.map = map;\n\n if (isChecked($shim_tgl)) {\n if (isChecked($shim_file_tgl)) {\n $shim_file.parent().siblings().removeClass('hidden');\n o.shim = {};\n var shim_key = $shim_file.val();\n o.shim[shim_key] = {}\n var shim_obj = o.shim[shim_key];\n if (isChecked($deps_tgl) && deps.length > 0 || isChecked($exports_tgl)) {\n if (isChecked($deps_tgl) && deps.length > 0)\n shim_obj.deps = deps;\n if (isChecked($exports_tgl))\n shim_obj.exports = $exports.val();\n }\n } else {\n $shim_file.parent().siblings().addClass('hidden');\n }\n }\n\n if (!$.isEmptyObject(o)) {\n var override_out = JSON.stringify(o, null, 2);\n override_out = syntaxHighlight(override_out)\n $override_out.html(override_out);\n\n var reg = $('input[name=\"endpoint\"]:checked').val()\n , pkg = $package.val();\n if (reg && pkg) {\n var cli_out = 'jspm install ' + reg + '/' + pkg + ' -o ' + JSON.stringify(o);\n $cli_out.html(cli_out);\n } else {\n $cli_out.html('');\n }\n } else {\n $override_out.html('');\n $cli_out.html('');\n }\n\n}", "function main() {\n renders.renderInitial();\n api.getItems()\n .then((items) => {\n items.expanded = false;\n items.forEach((item) => library.addLibraryItem(item));\n });\n}", "function rengoering() {\n\n\n\n\t\tif (jQuery(ren).hide) {\n\t\t\tfor (var i = 0; i < ren.length; i++) {\n\t\t\t\tjQuery(mod[i]).hide();\n\t\t\t\tjQuery(ren[i]).show();\n\t\t\t\tjQuery(sam[i]).hide();\n\t\t\t\tjQuery(fors[i]).hide();\n\n\t\t\t}\n\t\t\trv.scrollIntoView(true);\n\t\t}\n\n\t}", "function doogie() {\n\t\tthemeFactory.updateTheme(themeFactory.DOOGIE_THEME);\n\t\tmusicFactory.updateAudio();\n\t}", "static actualize() {\n for (let i = 0; i < refs.length ; ++i) {\n const ref = refs[i];\n if (ref.isOutdated()) {\n ref.remove();\n refs.splice(i--, 1);\n }\n }\n }", "function forceRepaint() {\n\t\t\tself.impl.needsRender = true;\n\t\t\tself.removeEventListener(zv.GEOMETRY_LOADED_EVENT, forceRepaint);\n\t\t}", "function updateAllTheGeometry() {\n\n if (config.enableSelection) {\n\n toggleVisibility(HaloBranch,config.showPaths, 0.5);\n toggleVisibility(HaloSelect,config.showHalos, 0.05);\n } else{\n displayHaloData();\n }\n\n\n}", "function look_ruby_reinitiate_function() {\r\n\r\n //remove event handle\r\n look_ruby.html.off();\r\n look_ruby.document.off();\r\n\r\n //trigger load\r\n look_ruby.window.trigger('load');\r\n\r\n //reload function\r\n look_ruby_document_reload();\r\n }", "function updateAllWidgets() {\n\tduplicateRemovedEvents = removeDuplicateEvents(allEvents);\n\tupdateMarkers(duplicateRemovedEvents);\n\tupdateScroller(duplicateRemovedEvents);\n}", "function updateJQuery($) {\n if (!$ || ($ && $.bridget)) {\n return;\n }\n $.bridget = jQueryBridget;\n }", "function updateJQuery($) {\n if (!$ || ($ && $.bridget)) {\n return;\n }\n $.bridget = jQueryBridget;\n }", "function iconsRedraw() {\n setTimeout(function(){\n if(instance.network)\n instance.network.redraw();\n if(instance.legend)\n instance.legend.redraw();\n }, 250);\n }", "function overlib() {\n\tDDK.error(\"overlib is not enabled. To enable overlib, use the DDK Configuration Dashboard: amengine.aspx?config.mn=DDK2_Config\");\n}", "function refreshHighlight()\n\t{\n\t\tvar script = generateHighlightScript(_highlighted);\n\n\t\t// convert array to a single string\n\t\tscript = script.join(\" \");\n\n\t\t// send script string to the app\n\t\t_3dApp.script(script);\n\t}", "function loader (fs) { //We are going to load what we need!\nconsole.log('Initiated at '+ new Date());\n\nif (navigator.onLine) {\n// First of all, we need to get info about the latest version, path, etc. from Google\n// this is done through one XMLHttpRequest\n// The response is parsed and the information is stored in localStorage.\n\n// let's start:\n\n$(\"#sandbox\").load(\"https://developers.google.com/speed/libraries/devguide?uid=\" + uniqueId() + \" #gc-content div\", function () {\n\t\n\tlibraries = $(\"div\");\n\tlibraries.splice(-2,2);\n\tlibraries.splice(0,3); // we now have an array with all the libraries\n\tsrc = [];\n\tsrc_u = [];\n\tnewLibs = [];\n\tnewLibCount = 0;\n//When we display the names, we want them to look nice.\n\tUI_name = []\n\tUI_name['jquery'] = 'jQuery';\n\tUI_name['jqueryui'] = 'jQuery UI';\n\tUI_name['jquery-ui'] = 'jQuery UI'; //Quick fix. Google sometimes changes the name of the jquery ui div.\n\tUI_name['prototype'] = 'Prototype';\n\tUI_name['scriptaculous'] = 'script.aculo.us';\n\tUI_name['mootools'] = 'MooTools';\n\tUI_name['dojo'] = 'Dojo';\n\tUI_name['swfobject'] = 'SWFObject';\n\tUI_name['angularjs'] = 'Angular JS';\n\tUI_name['webfont'] = 'WebFont Loader';\n\tUI_name['ext-core'] = 'Ext Core';\n\t\n\t\n\t\nfor (i=0; i <= libraries.length - 1; i++) { // loop through all libraries\n\n\t\tversion = $(\"#\" + libraries[i].id + \" dl dd:eq(2) span.versions\").text(); //get all existing versions.\n\t\tversion = version.split(\" \").join(\"\");\n\t\tversion = version.split(\",\"); //Separate them.\n\t\tversion = version[0]; //The version we are interested in is the latest version.\n\t\t\tif (version != \"\") {\n\t\t\t\tif (version != localStorage[libraries[i].id + \"_version\"] && libraries[i].id != \"chrome-frame\") { // if this is a new version:\n\t\t\t\t\tnewLibs[newLibCount] = libraries[i].id; //Save what library is being updated.\n\t\t\t\t\tnewLibCount = newLibCount + 1; //add one to the count.\n\t\t\t\t\tlocalStorage[libraries[i].id + \"_version\"] = version; //Save the new version.\n\t\t\t\t\t\n\t\t\t\t\t\tif (localStorage[\"desktop\"] == \"true\") {\n\t\t\t\t\t\t\tvar notification = webkitNotifications.createNotification(\n\t\t\t\t\t\t\t'icon128.png',\n\t\t\t\t\t\t\t'A new library has been downloaded!',\n\t\t\t\t\t\t\tUI_name[libraries[i].id] + ' has been updated to version ' + version\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tnotification.show();\n\t\t\t\t\t\t\tsetTimeout(function () {notification.cancel();}, 5000);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\tsite = site = $(\"#\" + libraries[i].id + \" dl dd:eq(1)\").text();\n\t\tsite = site.split(\"site:\");\n\t\tlocalStorage[libraries[i].id + \"_site\"] = $.trim(site[1]); //Get the library's site\n\t\t\n\t\tpath = $(\"#\" + libraries[i].id + \" dl dd:eq(0) code\").text();\n\t\tpath = path.slice(25, -11);\n\t\tpath = \"http://\" + path;\n\t\tsrc[libraries[i].id] = path; //Get the path to Google's CDN copy of the library.\n\t\tlocalStorage[libraries[i].id + '_src'] = src[libraries[i].id];\n\t\t\n\t\tconsole.log(i, libraries[i].id, version); \n\t\tconsole.log(src[libraries[i].id]);\n\t\tconsole.log(site);\n\t\tif (src_u[libraries[i].id]) console.log(src_u[libraries[i].id]);\n\t\tconsole.log('\\n');\n\t\t//Logging all the info we just got about the library.\n}\n\nif (newLibCount >= 1) { //If there are new libraries,\n\tif (localStorage[\"badge\"] != \"false\") { //And the user wants badge notifications\n\t\tchrome.browserAction.setBadgeText({\"text\": (newLibCount).toString()}); //Show the number of new libraries.\n\t}\n}\n\nlocalStorage[\"newLibs\"] = newLibs.join(','); //Save the new libraries to localStorage\n//We have now got all the metadata we need.\n\n// We then request the actual library, once again through an XMLHttpRequest for each\n\nfor (i=0; i <= newLibs.length - 1; i++) { //for all new libraries\n\tif (localStorage[\"load_\" + newLibs[i]] != \"false\") { //if the user wants this library\n\t\n\tconsole.log(\"loading \" + newLibs[i]);\n\t\n\t\tloadContent(src[newLibs[i]], newLibs[i] + \"_min\", fs); //The path and the file name are sent to the function which loads the file.\n\t\t\tif (src_u[newLibs[i]]) { //This is here in case Google supplies a development, unminified version.\n\t\t\t//They used to do this, but stopped doing it in the middle of the development of this extension.\n\t\t\t//I decided to keep all the code taking care of the unminified libraries, just in case Google starts supplying them again.\n\t\t\t//It doesn't really interfere with anything else, so it is here, but isn't running.\n\t\t\t\tloadContent(src_u[newLibs[i]], newLibs[i], fs);\n\t\t\t}\n\t}\n}\n});\n}\n\n} // function loader", "function finalDraw() {\n Registry.getComponentMethod('shapes', 'draw')(gd);\n Registry.getComponentMethod('images', 'draw')(gd);\n Registry.getComponentMethod('annotations', 'draw')(gd);\n Registry.getComponentMethod('legend', 'draw')(gd);\n Registry.getComponentMethod('rangeslider', 'draw')(gd);\n Registry.getComponentMethod('rangeselector', 'draw')(gd);\n Registry.getComponentMethod('sliders', 'draw')(gd);\n Registry.getComponentMethod('updatemenus', 'draw')(gd);\n }", "function finalDraw() {\n Registry.getComponentMethod('shapes', 'draw')(gd);\n Registry.getComponentMethod('images', 'draw')(gd);\n Registry.getComponentMethod('annotations', 'draw')(gd);\n Registry.getComponentMethod('legend', 'draw')(gd);\n Registry.getComponentMethod('rangeslider', 'draw')(gd);\n Registry.getComponentMethod('rangeselector', 'draw')(gd);\n Registry.getComponentMethod('sliders', 'draw')(gd);\n Registry.getComponentMethod('updatemenus', 'draw')(gd);\n }", "function handleConflict(activity) {\n activity.toggleAttribute('disabled');\n $(activity).parent().toggleClass('js-grey-out'); // switch to jQuery to use its toggleClass method\n}", "function myLibraryPageMarkupUpdate() {\n refs.header.classList.remove('header__background-home');\n refs.header.classList.add('header__background-myLibrary');\n refs.gallery.innerHTML = '';\n refs.homeBtn.classList.remove('current');\n refs.mylibraryBtn.classList.add('current');\n}", "patch() {\n }", "function darkReferenceStyles() {\r\n if (!GM_config.get('dark_reference_view') || !onReferencePage) {\r\n return;\r\n }\r\n // www.w3schools.com/colors/colors_picker.asp\r\n // background color\r\n addGlobalStyles('#nav-search-form {background: #d9d9d9}');\r\n addGlobalStyles('#wrapper, #pagecontent, .recently-viewed {background-color: #000000}');\r\n addGlobalStyles('.aux-content-widget-2 {background: #191919}');\r\n addGlobalStyles('#imdbscout_header, #imdbscoutsecondbar_header, #imdbscoutthirdbar_header, .article, .cast_list tr, .titlereference-list tr {background-color: #191919 !important}');\r\n addGlobalStyles('.add-image-container {background-color: #262626}');\r\n // border color\r\n addGlobalStyles('.article, .aux-content-widget-2, .cast_list tr, .titlereference-list tr, .recently-viewed .item {border-color: #323232 !important}');\r\n addGlobalStyles('hr, .answers-widget__question, .answers-widget__see-more {border-color: #666666}');\r\n addGlobalStyles('.recently-viewed {border-color: #000000}');\r\n // font color\r\n addGlobalStyles('h3[itemprop=\"name\"], .titlereference-title-year a {color: #f5c20a}');\r\n addGlobalStyles('.titlereference-original-title-label {color: #cc0000}');\r\n addGlobalStyles('.ipl-rating-star__rating {font-weight: bold; color: #00b300;}');\r\n addGlobalStyles('.article, .aux-content-widget-2, .cast_list tr td {color: #cccccc !important}');\r\n addGlobalStyles('.ipl-list-title, #sidebar h4, .ipl-list-title::after {color: #c49b08}');\r\n addGlobalStyles('.ipl-list-title::after {border-color: #7a6105}');\r\n}", "function finalDraw() {\n\t Registry.getComponentMethod('shapes', 'draw')(gd);\n\t Registry.getComponentMethod('images', 'draw')(gd);\n\t Registry.getComponentMethod('annotations', 'draw')(gd);\n\t Registry.getComponentMethod('legend', 'draw')(gd);\n\t Registry.getComponentMethod('rangeslider', 'draw')(gd);\n\t Registry.getComponentMethod('rangeselector', 'draw')(gd);\n\t Registry.getComponentMethod('sliders', 'draw')(gd);\n\t Registry.getComponentMethod('updatemenus', 'draw')(gd);\n\t }", "afterInstall() {\n let { ui, root } = this.project;\n\n updatePackageJson(root);\n updateTravisYml(root);\n\n return this.addPackagesToProject([\n { name: 'husky', target: '^0.14.3' },\n { name: '@addepar/eslint-config' },\n { name: '@addepar/prettier-config' },\n { name: '@addepar/sass-lint-config' },\n ])\n .then(() => {\n return this.addAddonsToProject({\n packages: ['@addepar/style-toolbox'],\n });\n })\n .then(() => formatAll(ui));\n }", "function updateAndShow(src,forceFit) {\n om.root.removeComputed();\n om.root.deepUpdate(om.overrides);\n if (forceFit) draw.mainCanvas.fitContents();\n draw.refresh();\n if (src!=\"tree\") tree.initShapeTreeWidget();\n }", "function resetUnloadedGapiModules() {\r\n // Clear last failed gapi.load state to force next gapi.load to first\r\n // load the failed gapi.iframes module.\r\n // Get gapix.beacon context.\r\n const beacon = _window().___jsl;\r\n // Get current hint.\r\n if (beacon === null || beacon === void 0 ? void 0 : beacon.H) {\r\n // Get gapi hint.\r\n for (const hint of Object.keys(beacon.H)) {\r\n // Requested modules.\r\n beacon.H[hint].r = beacon.H[hint].r || [];\r\n // Loaded modules.\r\n beacon.H[hint].L = beacon.H[hint].L || [];\r\n // Set requested modules to a copy of the loaded modules.\r\n beacon.H[hint].r = [...beacon.H[hint].L];\r\n // Clear pending callbacks.\r\n if (beacon.CP) {\r\n for (let i = 0; i < beacon.CP.length; i++) {\r\n // Remove all failed pending callbacks.\r\n beacon.CP[i] = null;\r\n }\r\n }\r\n }\r\n }\r\n}", "function resetUnloadedGapiModules() {\r\n // Clear last failed gapi.load state to force next gapi.load to first\r\n // load the failed gapi.iframes module.\r\n // Get gapix.beacon context.\r\n const beacon = _window().___jsl;\r\n // Get current hint.\r\n if (beacon === null || beacon === void 0 ? void 0 : beacon.H) {\r\n // Get gapi hint.\r\n for (const hint of Object.keys(beacon.H)) {\r\n // Requested modules.\r\n beacon.H[hint].r = beacon.H[hint].r || [];\r\n // Loaded modules.\r\n beacon.H[hint].L = beacon.H[hint].L || [];\r\n // Set requested modules to a copy of the loaded modules.\r\n beacon.H[hint].r = [...beacon.H[hint].L];\r\n // Clear pending callbacks.\r\n if (beacon.CP) {\r\n for (let i = 0; i < beacon.CP.length; i++) {\r\n // Remove all failed pending callbacks.\r\n beacon.CP[i] = null;\r\n }\r\n }\r\n }\r\n }\r\n}", "function aug(o, o2) {\n for (var k in o2) k != 'noConflict' && k != '_VERSION' && (o[k] = o2[k])\n return o\n }", "unpatch () {\n this._instrumented.forEach((instrumentation, moduleExports) => {\n instrumentation.unpatch(moduleExports)\n })\n\n debug('Unpatched')\n }", "function unlock_core_view_reload(){\n\tlast_loaded_core_view = undefined;\n}", "function oob_system(){\n\t\ntest_find_conflict();\n}//end function oob_system", "redraw() {\n\n }", "fixLeaftletCssBug() { \n delete L.Icon.Default.prototype._getIconUrl;\n\n L.Icon.Default.mergeOptions({\n iconRetinaUrl: marker2x,\n iconUrl: marker1x,\n shadowUrl: markerShadow\n });\n }", "function resetUI() {\n if (traceLib.valid) {\n setLink();\n $('.needsConfig').show();\n } else {\n $('.needsConfig').hide();\n }\n }", "function aug(o, o2) {\n for (var k in o2) {\n k != 'noConflict' && k != '_VERSION' && (o[k] = o2[k]);\n }\n return o;\n }", "function replace_or_redraw( new_URL )\n{\n//var oBase = document.all.tags('base');\n//if (oBase && oBase.target) oBase.target = _self;\nif( navigator.appVersion.charAt( 0 ) < '3' )\n\tlocation = new_URL;\nelse\n\tlocation.replace( new_URL );\nreturn false;\n}", "function initializeThemes(){\n var allThemes = [\"theme_dark\", \"theme_red\", \"theme_white\"];\n var allClasses = [\"gantt\", \"header_g\", \"row_g\", \"wd_g\", \"sa_g\", \"sn_g\",\n \"today\", \"navigate\", \"fn-content\", \"legend\", \"dataPanel_past\",\n \"gantt_otherReason\", \"ganttLegend_otherReason\", \"gantt_otherReason_me\",\n \"gantt_ownEmployee\", \"ganttLegend_ownEmployee\", \"gantt_ownEmployee_me\",\n \"gantt_trustedEmployee\", \"ganttLegend_trustedEmployee\", \"gantt_trustedEmployee_me\",\n \"gantt_anyCompany\", \"ganttLegend_anyCompany\", \"gantt_anyCompany_me\",\n \"gantt_trustedCompany\", \"ganttLegend_trustedCompany\",\"gantt_trustedCompany_me\",\n \"gantt_privateBooking\", \"ganttLegend_privateBooking\",\"gantt_privateBooking_me\",\n \"gantt_rentingRequest\", \"ganttLegend_rentingRequest\",\"gantt_rentingRequest_me\",\n \"nav-link\", \"showLegend\", \"load\", \"newBookingForm\"];\n\n // Set default theme\n changeTheme(window.ST.poolToolTheme, allThemes, allClasses);\n $('#theme_dark').css('border', 'none');\n $('#theme_white').css('border', 'none');\n $('#theme_red').css('border', 'none');\n $('#' + window.ST.poolToolTheme).css('border', '2px solid black');\n\n $('#theme_dark').on('vclick', function(){\n changeTheme('theme_dark', allThemes, allClasses);\n $('#theme_dark').css('border', '2px solid black');\n $('#theme_white').css('border', 'none');\n $('#theme_red').css('border', 'none');\n window.ST.poolToolTheme = \"theme_dark\";\n saveTheme(\"theme_dark\");\n });\n $('#theme_white').on('vclick', function(){\n changeTheme('theme_white', allThemes, allClasses);\n $('#theme_white').css('border', '2px solid black');\n $('#theme_dark').css('border', 'none');\n $('#theme_red').css('border', 'none');\n window.ST.poolToolTheme = \"theme_white\";\n saveTheme(\"theme_white\");\n });\n $('#theme_red').on('vclick', function(){\n changeTheme('theme_red', allThemes, allClasses);\n $('#theme_red').css('border', '2px solid black');\n $('#theme_white').css('border', 'none');\n $('#theme_dark').css('border', 'none');\n window.ST.poolToolTheme = \"theme_red\";\n saveTheme(\"theme_red\");\n });\n }", "function updateOwnDeps () {\n tools.updateOwnDependenciesFromLocalRepositories(args.depth);\n}", "function initLibs() {\n\t\tvar kjslib = universe.kjslib = _kJs_Initor();\n\t\tvar kxmllib = universe.kxmllib = _kXml_Initor();\n\t\tvar kanilib = universe.kanilib = _kAni_Initor();\n\t\tvar keventlib = universe.keventlib = _kEvent_Initor();\n\t\tvar kgraphlib = universe.kgraphlib = _kGraph_Initor();\n\t\tinitClasses\n\t\t\t(kjslib, \"kjsclasses\")\n\t\t\t(kxmllib, \"kxmlclasses\")\n\t\t\t(kanilib, \"kaniclasses\")\n\t\t\t(keventlib, \"keventclasses\")\n\t\t\t(kgraphlib, \"kgraphclasses\")\n\t\t;\n\t}", "function redraw() {\n // openLayers2();\n // openLayers3();\n leaflet();\n}", "function updateExtension(){\n ScratchExtensions.unregister('scratch3d');\n ScratchExtensions.register('scratch3d', descriptor, ext);\n }", "adoptStyles() {\n const styles = this.constructor._uniqueStyles;\n if (styles.length === 0) {\n return;\n }\n // There are three separate cases here based on Shadow DOM support.\n // (1) shadowRoot polyfilled: use ShadyCSS\n // (2) shadowRoot.adoptedStyleSheets available: use it.\n // (3) shadowRoot.adoptedStyleSheets polyfilled: append styles after\n // rendering\n if (window.ShadyCSS !== undefined && !window.ShadyCSS.nativeShadow) {\n window.ShadyCSS.ScopingShim.prepareAdoptedCssText(styles.map((s) => s.cssText), this.localName);\n }\n else if (supportsAdoptingStyleSheets) {\n this.renderRoot.adoptedStyleSheets =\n styles.map((s) => s.styleSheet);\n }\n else {\n // This must be done after rendering so the actual style insertion is done\n // in `update`.\n this._needsShimAdoptedStyleSheets = true;\n }\n }", "function albatrossColoring() {\n location.reload(true);\n}", "function pandaUILoaded() {\n if (savedSearchUI) { savedSearchUI.pandaUILoaded(); savedSearchUI = null; }\n if (MyOptions) MyOptions.resetToolTips();\n}", "function resetHighlight(e) {\n geojson_layer.resetStyle(e.target);\n info_panel.update() // resets infopanel\n}", "refresh() {\n $(\".\" + this.groupName\n + \" .slot-\" + this.groupEntryId\n + \" .strip\").removeClass(Spinner.notchesCSS);\n $(\".\" + this.groupName\n + \" .slot-\" + this.groupEntryId\n + \" .strip\").addClass(\"pos-\" + this.notchId);\n }", "function resetUI() {\n if (traceLib.valid) {\n $('.needsConfig').show();\n } else {\n $('.needsConfig').hide();\n }\n }", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}", "function updateJQuery( $ ) {\n if ( !$ || ( $ && $.bridget ) ) {\n return;\n }\n $.bridget = jQueryBridget;\n}" ]
[ "0.5746306", "0.56543815", "0.554185", "0.5524184", "0.5491174", "0.53969604", "0.5361566", "0.53248364", "0.524189", "0.52418125", "0.52334845", "0.52145433", "0.5206442", "0.520284", "0.5169705", "0.5169705", "0.5163949", "0.5160191", "0.51589644", "0.51499987", "0.51477414", "0.5133268", "0.5114779", "0.5095594", "0.5069222", "0.5066346", "0.50530785", "0.50429165", "0.50247574", "0.5023342", "0.50155276", "0.50058407", "0.4988916", "0.4977347", "0.49740493", "0.49738964", "0.4972377", "0.496863", "0.49685815", "0.49653295", "0.49599463", "0.49598792", "0.4958136", "0.49548334", "0.49541464", "0.4954119", "0.49379927", "0.49341145", "0.49278122", "0.49139953", "0.49122563", "0.49075964", "0.4906526", "0.4906526", "0.48928955", "0.48910457", "0.48894587", "0.48836905", "0.48708212", "0.48640054", "0.48575658", "0.4844714", "0.4844714", "0.4838898", "0.4834782", "0.48247632", "0.48139736", "0.4813927", "0.48136625", "0.480352", "0.48021147", "0.48012936", "0.47970837", "0.47967726", "0.47956327", "0.47907627", "0.47897226", "0.47889087", "0.4786949", "0.4782463", "0.47818646", "0.4776906", "0.4770522", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526", "0.47600526" ]
0.6299278
0
Given a new country, updates the enire page
function updateWithCountry(){ return function(){ /* Get the selected country code */ ccode = $("#country-input option:selected")[0].value; /* Make sure we were able to get the country code */ if(ccode === undefined || ccode.length !== 3){ /* TODO: Update timeline and map to be blank */ return; } /* Get the conflicts for the country */ $.ajax({ type: "get", url: "/disputes/country/"+ccode, success: function(data){ disputes = data.disputes; /* Update disputes per year */ for(var i=1812; i<1993; i++){ disputes_per_year[i+""] = 0; } for(var year in disputes){ for(var i = 0; i<disputes[year].length; i++){ var start = parseInt(disputes[year][i].dispute[4]); var end = parseInt(disputes[year][i].dispute[7]); for(var j=start; j<end; j++){ disputes_per_year[j+""]++; } } } /* Update the maximum number of disputes found */ max_disputes_in_year = 0; for(var i=1812; i<1993; i++){ var num_disp = disputes_per_year[i+""]; if(num_disp > max_disputes_in_year) max_disputes_in_year = num_disp; } /* Update the timeline */ drawTimeline(date_start, date_end); /* Update the conflict DOM */ updateConflicts(); /* Update the map */ updateMap(); } }); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pt9CountryChange() {\n ptCountryChange(pt9InitializeState,'AUEFT');\n }", "function handleCountryChange(countryCode, countryName) {\n basicMsg(\"Loading...\");\n $(\"#sourcesList\").prop('selectedIndex', 0); //reset sources list\n\n if (countryCode === 'All') {\n displayFilterValues('ALL', ''); //display news header title\n showAllNews(); //reload all news\n return;\n }\n\n displayFilterValues('COUNTRY -', countryName);\n\n const url = 'news/byCountry/' + countryCode + '?socketId=' + getSocketId();\n displayNewsInfo(url, countryCode);\n}", "function updateCountryInShoppingCart(country) {\n var postData = {\n __RequestVerificationToken: antiForgeryToken(),\n country: country\n };\n $.post('/shoppingcart/setcountry', postData, function (cart) {\n for (var i = 0; i < cart.Order.OrderDetails.length; i++) {\n var orderDetail = cart.Order.OrderDetails[i];\n refreshDetail(orderDetail);\n }\n recalculate();\n });\n}", "changeCountry(alpha3Code) {\n this.props.fetchCountry(alpha3Code);\n }", "function countryChange() {\n var country = $('#country-select option:selected').val();\n updateCountryInShoppingCart(country);\n}", "function pt6CountryChange() {\n ptCountryChange(pt6InitializeState,'CAEFT');\n }", "function pt10CountryChange() {\n ptCountryChange(pt10InitializeState,'BbanBicEFTWire');\n }", "function pt4CountryChange() {\n ptCountryChange(pt4InitializeState,'JPEFT');\n }", "function handleCountryButtonClick(e) {\n console.log(e.target.innerText);\n\n let countrySelectedCode;\n\n countriesArray.forEach(countryEntry => {\n if (countryEntry[0] === e.target.innerText) {\n countrySelectedCode = countryEntry[1];\n }\n });\n\n sessionStorage.setItem(\n \"current-country\",\n JSON.stringify(countrySelectedCode)\n );\n\n homePageReload(\"home\", {\n topSource: currentSourceId,\n country: countrySelectedCode,\n localType: \"news\"\n });\n }", "changeCountry(context, payload) {\n context.commit(\"changeCountry\", payload);\n }", "function updateCountry(values) {\n\n\t\tvar phoneProxyId = values.phoneProxyId,\n\t\t countryId = values.countryId,\n\t\t stateId = values.stateId,\n\t\t stateVal = values.stateVal,\n\t\t countryChecklist = values.countryChecklist,\n\t\t showStateChecklist = values.showStateChecklist,\n\t\t optInReqChecklist = values.optInReqChecklist,\n\t\t optInId = values.optInId,\n\t\t optInReqClass = values.optInReqClass,\n\t\t submitBtnClass = values.submitBtnClass,\n\t\t btnDisabledClass = values.btnDisabledClass,\n\t\t hiddenClass = values.hiddenClass;\n\n\t\t$('#' + phoneProxyId).on('countrychange', function (e, countryData) {\n\n\t\t\t// update country value\n\t\t\tvar countryCode = mapCountry(countryData.iso2);\n\t\t\t$('#' + countryId).val(countryCode);\n\t\t\tvalues.trackedCountry = countryCode;\n\n\t\t\t// this set the value of State for some forms that have State field\n\t\t\tvar $state = $('#' + stateId);\n\t\t\tif ($state.length) {\n\t\t\t\tSTATEHANDLER.countryChangeHandler(countryId, stateId, true);\n\t\t\t\t// get code of State\n\t\t\t\tvar stateProp = getProp(stateList, stateVal);\n\t\t\t\tif (stateProp) {\n\t\t\t\t\t$state.val(stateProp);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// country checker\n\t\t\tcountryChecker(values);\n\t\t});\n\t}", "SelectCountry(country) {\n this.plotObject.updatePlotAddCountry(country);\n }", "function changeCountry() {\n if($(this).is('tr')) {\n if(currentCountry !== this.getAttribute('value') && !countrySelected) {\n const country = this.getAttribute('value');\n currentCountry = country;\n countrySelected = true;\n console.log(\"Request data for country: \" + country);\n $('.currentCountry').html(currentCountry);\n changeCountryAnimation();\n getCountryData(country);\n }\n } else {\n if (currentCountry !== \"Worldwide\") {\n currentCountry = \"Worldwide\";\n countrySelected = false;\n console.log(\"Request World data\");\n $('.currentCountry').html(currentCountry);\n changeCountryAnimation();\n getWorldData();\n }\n }\n}", "function printCountries(countries, region, search = false) {\n var summeryObj = {\n NewConfirmed: 0,\n TotalConfirmed: 0,\n NewDeaths: 0,\n TotalDeaths: 0,\n NewRecovered: 0,\n TotalRecovered: 0,\n };\n var template = loadTemplate(\"countryinfo.ejs\");\n $(\".capiCountryContainer\").html(\"\");\n\n $.each(countries, function (i, field) {\n if (\n countriesMapping[field.CountryCode].region == region ||\n region == \"global\" ||\n search == true\n ) {\n summeryObj[\"NewConfirmed\"] =\n summeryObj[\"NewConfirmed\"] + field.NewConfirmed;\n summeryObj[\"TotalConfirmed\"] =\n summeryObj[\"TotalConfirmed\"] + field.TotalConfirmed;\n summeryObj[\"NewDeaths\"] = summeryObj[\"NewDeaths\"] + field.NewDeaths;\n summeryObj[\"TotalDeaths\"] = summeryObj[\"TotalDeaths\"] + field.TotalDeaths;\n summeryObj[\"NewRecovered\"] =\n summeryObj[\"NewRecovered\"] + field.TotalDeaths;\n summeryObj[\"TotalRecovered\"] =\n summeryObj[\"TotalRecovered\"] + field.TotalRecovered;\n $(\".capiCountryContainer\").append(ejs.render(template, field));\n }\n });\n updatedCapiInformation(\n region,\n summeryObj.NewConfirmed,\n summeryObj.TotalConfirmed,\n summeryObj.NewDeaths,\n summeryObj.TotalDeaths,\n summeryObj.NewRecovered,\n summeryObj.TotalRecovered\n );\n}", "function pt7CountryChange() {\n ptCountryChange(pt7InitializeState,'BREFT');\n }", "function setSelectedCountry(country) {\n localStorage.setItem(\"CountryNames\", country);\n var name = document.getElementById('countryName');\n localStorage.setItem(\"SearchTerm\", name.value);\n window.location.href = \"src/country-details/country-details.html\";\n}", "function fncChangeCountry()\r\n{\r\n\t//Get selected country from dropdown\r\n\tvar intCountry = document.frmFooter.cboCountries.selectedIndex;\r\n\tintCountry = parseInt(document.frmFooter.cboCountries[intCountry].value);\r\n\r\n\tvar objTemp = gobjCountryArray[intCountry];\r\n\t\r\n\t// For March 31, 2001 deadline,\r\n\t// Set country & language cookies for US and Canada only\r\n\t// Cookie is set to default value (i.e. US) for all other countries\r\n\t// This section needs to be changed for globalization as part of Phase 2\r\n\tif (objTemp.value == \"US\" || objTemp.value == \"CA\")\r\n\t{\r\n\t\tfncSetCookie(gstrCountryCookie, objTemp.value, gintCookieExpiration, gstrPath, gstrDomain);\r\n\t\tfncSetCookie(gstrLanguageCookie, objTemp.language[gintDefaultLanguage].value, gintCookieExpiration, gstrPath, gstrDomain);\r\n\t}\r\n\t// otherwise for all other countries set the cookie to empty string\r\n\telse\r\n\t{\r\n\t\tobjTemp = gobjCountryArray[gintDefaultCountry];\r\n\t\tfncSetCookie(gstrCountryCookie, objTemp.value, gintCookieExpiration, gstrPath, gstrDomain);\r\n\t\tfncSetCookie(gstrLanguageCookie, objTemp.language[gintDefaultLanguage].value, gintCookieExpiration, gstrPath, gstrDomain);\r\n\t}\r\n\t// Redirect to correct site\r\n\tobjTemp = gobjCountryArray[intCountry];\r\n\tif (objTemp.language[gintDefaultLanguage].url)\r\n\t{\r\n\t\tdocument.location = objTemp.language[gintDefaultLanguage].url;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tdocument.location = objTemp.region.url;\r\n\t}\r\n}", "function submit_change_country(){\n\tdocument.forms.change_country.submit();\n}", "function apiCountryCall(currentCountry) {\n let num = 0;\n if (currentCountry.length == 14) {\n num = 13;\n }\n wiki().page(currentCountry[num]).then(page => page.summary()).then(response => {\n console.log(response)\n const country = new Country({\n countryName: currentCountry[0],\n capitalCity: currentCountry[1],\n population: currentCountry[2],\n urbanRent: currentCountry[3],\n urbanPE: currentCountry[4],\n ruralRent: currentCountry[5],\n ruralPE: currentCountry[6],\n interestRate: currentCountry[7],\n debtGDP: currentCountry[8],\n inflation: currentCountry[9],\n bondSymbol: currentCountry[10],\n urbanSymbol: currentCountry[11],\n ruralSymbol: currentCountry[12],\n countrySummary: response\n });\n\n Country.count({countryName: currentCountry[0]}, function (err, count) {\n if (count > 0){\n Country.findOneAndUpdate(\n {countryName: currentCountry[0]},\n {$set:{\n countryName: country['countryName'],\n capitalCity: country['capitalCity'],\n population: country['population'],\n urbanRent: country['urbanRent'],\n urbanPE: country['urbanPE'],\n ruralRent: country['ruralRent'],\n ruralPE: country['ruralPE'],\n interestRate: country['interestRate'],\n debtGDP: country['debtGDP'],\n inflation: country['inflation'],\n bondSymbol: country['bondSymbol'],\n urbanSymbol: country['urbanSymbol'],\n ruralSymbol: country['ruralSymbol'],\n countrySummary: country['countrySummary']\n }},{upsert:false},\n function (error, success) {\n if(error) {\n console.log(error);\n } else {\n console.log(currentCountry[0]);\n }\n }\n );\n } else {\n country.save();\n }\n })})\n }", "function CountryChanged(newcountry) {\n // Fetch new data each time a new sample is selected\n barplot(newcountry);\n }", "function setCountry() {\n $.getJSON('https://freegeoip.net/json/', function (data) {\n var country = data.country_code;\n var $countrySelect = $('#country-select');\n var $countryOption = $countrySelect.find('option[value=\"' + country + '\"]');\n\n // Select 'other' if country is not in the list\n if ($countryOption.length == 0) {\n $countryOption = $countrySelect.find('option[value=\"--\"]');\n }\n $countryOption.attr('selected', 'selected');\n updateCountryInShoppingCart(country);\n });\n}", "function changeProfileCountry(whichblock,fieldsegment,origin) {\n debug.error('****** changeProfileCountry invoked', whichblock, fieldsegment, origin);\n var container = $('#'+whichblock);\n var selectedCountryIndex = document.getElementById('edit-'+fieldsegment+'-country').selectedIndex;\n var selectedCountry = document.getElementById('edit-'+fieldsegment+'-country').options[selectedCountryIndex].value;\n var buyFlowCountry = $('#edit-'+fieldsegment+'-country').val();\n var ln_container = 'localname-container'; // china reservation\n\n //WEB-8685 for China, we must rely on saved values(hidden fields), will break if coming from other county\n var savedCountry = $('#edit-'+fieldsegment+'-country-h').val();\n if (origin || savedCountry == 'CN') {\n var mailing_addr1 = $('#edit-'+fieldsegment+'-address-1-h').val();\n var mailing_addr2 = $('#edit-'+fieldsegment+'-address-2-h').val();\n var mailing_city = $('#edit-'+fieldsegment+'-city-h').val();\n var mailing_county = $('#edit-'+fieldsegment+'-county-h').val();\n var mailing_state = $('#edit-'+fieldsegment+'-state-h').val();\n var mailing_zip = $('#edit-'+fieldsegment+'-zip-h').val();\n var mailing_country = $('#edit-'+fieldsegment+'-country-h').val();\n } else {\n var mailing_addr1 = $('#edit-'+fieldsegment+'-address-1').val();\n var mailing_addr2 = $('#edit-'+fieldsegment+'-address-2').val();\n var mailing_city = $('#edit-'+fieldsegment+'-city').val();\n var mailing_county = $('#edit-'+fieldsegment+'-county').val();\n var mailing_state = $('#edit-'+fieldsegment+'-state').val();\n var mailing_zip = $('#edit-'+fieldsegment+'-zip').val();\n }\n\n var mailing_addr1_label = $('#edit-mailing-addr1-label').val();\n var mailing_addr2_label = $('#edit-mailing-addr2-label').val();\n var mailing_city_label = $('#edit-mailing-city-label').val();\n var mailing_state_label = $('#edit-mailing-state-label').val();\n var mailing_zip_label = $('#edit-mailing-zip-label').val();\n var mailing_province_label = $('#edit-mailing-province-label').val();\n var mailing_postalcode_label = $('#edit-mailing-postalcode-label').val();\n\n var mailing_addr1_css = '';\n var mailing_city_css = '';\n var mailing_state_css = '';\n var mailing_zip_css = '';\n\n if ($('label[for=\"edit-'+fieldsegment+'-address-1\"]').length && $('label[for=\"edit-'+fieldsegment+'-address-1\"]').css('color') == 'rgb(204, 0, 0)') {\n mailing_addr1_css = 'error';\n }\n if ($('label[for=\"edit-'+fieldsegment+'-city\"]').length && $('label[for=\"edit-'+fieldsegment+'-city\"]').css('color') == 'rgb(204, 0, 0)') {\n mailing_city_css = 'error';\n }\n if ($('label[for=\"edit-'+fieldsegment+'-state\"]').length && $('label[for=\"edit-'+fieldsegment+'-state\"]').css('color') == 'rgb(204, 0, 0)') {\n mailing_state_css = 'error';\n }\n if ($('label[for=\"edit-'+fieldsegment+'-zip\"]').length && $('label[for=\"edit-'+fieldsegment+'-zip\"]').css('color') == 'rgb(204, 0, 0)') {\n mailing_zip_css = 'error';\n } else if ($('#'+fieldsegment+'-zip-error').length) {\n mailing_zip_css = 'error';\n }\n\n if (!mailing_addr1) {mailing_addr1 = '';}\n if (!mailing_addr2) {mailing_addr2 = '';}\n if (!mailing_city) {mailing_city = '';}\n if (!mailing_state) {mailing_state = '';}\n if (!mailing_zip) {mailing_zip = '';}\n if (!mailing_country) {mailing_country = '';}\n\n if (fieldsegment == 'altmailing') {\n ln_container = 'alt-localname-container';\n }\n var user_selected = ( typeof(origin) != 'undefined' || origin == 'onready' ) ? false : true;\n\n // Swith places for first and last name fields for China\n var $lNameWrapper = $(\"#edit-last-name-wrapper\").parent(),\n $fNameWrapper = $(\"#col-left #edit-first-name-wrapper\").parent();\n\n if (selectedCountry == \"CN\") {\n $fNameWrapper.before($lNameWrapper);\n $lNameWrapper.parent().addClass(\"CN\");\n }\n else {\n $fNameWrapper.after($lNameWrapper);\n $lNameWrapper.parent().removeClass(\"CN\");\n }\n\n var data_mail_country = {countryTo: selectedCountry, address1: mailing_addr1, address2: mailing_addr2, city: mailing_city, county: mailing_county, state: mailing_state, zip: mailing_zip, country: mailing_country, mailing_addr1_lbl: mailing_addr1_label, mailing_addr2_lbl:mailing_addr2_label, mailing_city_lbl:mailing_city_label, mailing_state_lbl:mailing_state_label,mailing_zip_lbl:mailing_zip_label,mailing_province_lbl:mailing_province_label,mailing_postalcode_lbl:mailing_postalcode_label,segment:fieldsegment,addr1_css:mailing_addr1_css,city_css:mailing_city_css,state_css:mailing_state_css,zip_css:mailing_zip_css,user_selected:user_selected};\n debug.error('***** data_mail_country', data_mail_country);\n\n $.post(\"/mytesla/mailing-country\", data_mail_country,\n function(data) {\n if (origin) {\n container.html(data);\n container.css('display','block');\n showMailingState();\n if (fieldsegment == 'altmailing') {\n openAltContactDiv('noscroll');\n }\n } else {\n container.fadeOut(function() {\n container.html(data);\n container.fadeIn(function() {\n showMailingState();\n });\n });\n }\n\n if ($.inArray(selectedCountry, ['JP', 'CN', 'HK', 'MO']) >= 0) {\n $('#'+ln_container).fadeIn('slow');\n }\n else {\n $('#'+ln_container).fadeOut('slow');\n }\n });\n\n var $phone_element = ((fieldsegment == 'altmailing') ? ($('#edit-altcontact-phone')) : ($('#edit-phone')));\n if (($phone_element.val() == '') || (($phone_element.val() != '') && ($phone_element.val().length <= 4))) {\n updatePhoneCode(selectedCountry, $phone_element);\n }\n\n function updatePhoneCode(country, element) {\n var tesla_country_mapping = getTeslaCountryMapping(country);\n var phone_code = (((typeof tesla_country_mapping != 'undefined') && (tesla_country_mapping != '')) ? ('+' + tesla_country_mapping.phone_code) : (''));\n element.val(phone_code);\n }\n\n function showMailingState() {\n var selectedCountry = document.getElementById('edit-'+fieldsegment+'-country').options[selectedCountryIndex].value;\n if (selectedCountry != 'CN') {\n //WEB-11244\n if (!$('#province-selectbox-hidden').length) {\n // select element styling\n if (!$('#'+fieldsegment+'-province-istextbox').length) {\n $('#edit-'+fieldsegment+'-state').each(function() {\n var title = $(this).attr('title');\n if ( $('option:selected', this).val() != '' ) title = $('option:selected',this).text();\n $(this)\n .css({'z-index':13,'opacity':0,'-khtml-appearance':'none'})\n // .after('<span id=\"mailing-state-overlay\" class=\"select-mailing\">' + title.substring(0,38) + '</span>')\n .unbind('change')\n .unbind('keyup')\n .change(function() {\n val = $('option:selected',this).text();\n $('#'+fieldsegment+'-state-overlay').html(val.substring(0,22));\n })\n .keyup(function() {\n val = $('option:selected',this).text();\n $('#'+fieldsegment+'-state-overlay').html(val.substring(0,22));\n })\n });\n\n var provPosition = $('#edit-'+fieldsegment+'-state').position();\n var provPositionX = provPosition.left - 2;\n var provPositionY = provPosition.top + 2;\n if (selectedCountry == 'JP') {\n provPositionX = provPositionX - 2;\n }\n $('#'+fieldsegment+'-state-overlay').css('left',provPositionX);\n $('#'+fieldsegment+'-state-overlay').css('top',provPositionY);\n if (origin) {\n $('#mailing-state-overlay').fadeIn('fast');\n } else {\n // if ($('#edit-'+fieldsegment+'-state').css('display') == 'none') {\n $('#'+fieldsegment+'-state-overlay').fadeIn('fast');\n // }\n }\n }\n }\n checkProfileRequiredFields('onready');\n } else {\n loadChinaRegions(fieldsegment);\n ////////////////////////////////\n // start province overlay\n if ($('#edit-'+fieldsegment+'-99-province').length && !$('#edit-'+fieldsegment+'-99-province-overlay').length) {\n $('#edit-'+fieldsegment+'-99-province').each(function() {\n var title = $(this).attr('title');\n if ( $('option:selected', this).val() !== '' ) title = $('option:selected',this).text().substring(0,8);\n $(this)\n .css({'z-index':13,'opacity':0,'-khtml-appearance':'none','height':'40px'})\n .after('<span id=\"edit-'+fieldsegment+'-99-province-overlay\" class=\"select-short\" style=\"display:none;\" tabindex=\"0\">' + title + '</span>')\n .change(function() {\n val = $('option:selected',this).text();\n $('#edit-'+fieldsegment+'-99-province-overlay').html(val.substring(0,8));\n })\n .keyup(function() {\n val = $('option:selected',this).text();\n $('#edit-'+fieldsegment+'-99-province-overlay').html(val.substring(0,8));\n })\n });\n\n setTimeout(function() {\n var provPosition = $('#edit-'+fieldsegment+'-99-province').position();\n var provPositionX = provPosition.left-2;\n var provPositionY = provPosition.top+2; // -4\n $('#edit-'+fieldsegment+'-99-province-overlay').css('left',provPositionX);\n $('#edit-'+fieldsegment+'-99-province-overlay').css('top',provPositionY);\n $('#edit-'+fieldsegment+'-99-province-overlay').fadeIn('slow');\n },1000);\n }\n else {\n // reposition just in case...\n setTimeout(function() {\n var provPosition = $('#edit-'+fieldsegment+'99-province').position();\n var provPositionX = provPosition.left-2;\n var provPositionY = provPosition.top+2; // -4\n $('#edit-'+fieldsegment+'-99-province-overlay').css('left',provPositionX);\n $('#edit-'+fieldsegment+'-99-province-overlay').css('top',provPositionY);\n $('#edit-'+fieldsegment+'-99-province-overlay').fadeIn('slow');\n },1000);\n }\n\n ////////////////////////////////\n // start city overlay\n if ($('#edit-'+fieldsegment+'-99-city').length && !$('#edit-'+fieldsegment+'-99-city-overlay').length) {\n $('#edit-'+fieldsegment+'-99-city').each(function() {\n var title = $(this).attr('title');\n if ( $('option:selected', this).val() !== '' ) title = $('option:selected',this).text().substring(0,8);\n $(this)\n .css({'z-index':13,'opacity':0,'-khtml-appearance':'none','height':'40px'})\n .after('<span id=\"edit-'+fieldsegment+'-99-city-overlay\" class=\"select-short\" style=\"display:none;\" tabindex=\"0\">' + title + '</span>')\n .change(function() {\n val = $('option:selected',this).text();\n $('#edit-'+fieldsegment+'-99-city-overlay').html(val.substring(0,8));\n })\n .keyup(function() {\n val = $('option:selected',this).text();\n $('#edit-'+fieldsegment+'-99-city-overlay').html(val.substring(0,8));\n })\n });\n\n setTimeout(function() {\n var cityPosition = $('#edit-'+fieldsegment+'-99-city').position();\n var cityPositionX = cityPosition.left-2;\n var cityPositionY = cityPosition.top; // -4\n $('#edit-'+fieldsegment+'-99-city-overlay').css('left',cityPositionX);\n $('#edit-'+fieldsegment+'-99-city-overlay').css('top',cityPositionY);\n $('#edit-'+fieldsegment+'-99-city-overlay').fadeIn('slow');\n },1000);\n }\n else {\n // reposition just in case...\n setTimeout(function() {\n var cityPosition = $('#edit-'+fieldsegment+'-99-city').position();\n var cityPositionX = cityPosition.left-2;\n var cityPositionY = cityPosition.top; // -4\n $('#edit-'+fieldsegment+'-99-city-overlay').css('left',cityPositionX);\n $('#edit-'+fieldsegment+'-99-city-overlay').css('top',cityPositionY);\n $('#edit-'+fieldsegment+'-99-city-overlay').fadeIn('slow');\n },1000);\n }\n\n ////////////////////////////////\n // start district overlay\n if ($('#edit-'+fieldsegment+'-99-district').length && !$('#edit-'+fieldsegment+'-99-district-overlay').length) {\n $('#edit-'+fieldsegment+'-99-district').each(function() {\n var title = $(this).attr('title');\n if ( $('option:selected', this).val() !== '' ) title = $('option:selected',this).text().substring(0,8);\n $(this)\n .css({'z-index':13,'opacity':0,'-khtml-appearance':'none','height':'40px'})\n .after('<span id=\"edit-'+fieldsegment+'-99-district-overlay\" class=\"select-short\" style=\"display:none;\" tabindex=\"0\">' + title + '</span>')\n .change(function() {\n val = $('option:selected',this).text();\n $('#edit-'+fieldsegment+'-99-district-overlay').html(val.substring(0,8));\n })\n .keyup(function() {\n val = $('option:selected',this).text();\n $('#edit-'+fieldsegment+'-99-district-overlay').html(val.substring(0,8));\n })\n });\n\n setTimeout(function() {\n var distPosition = $('#edit-'+fieldsegment+'-99-district').position();\n var distPositionX = distPosition.left-2;\n var distPositionY = distPosition.top+2; // -4\n $('#edit-'+fieldsegment+'-99-district-overlay').css('left',distPositionX);\n $('#edit-'+fieldsegment+'-99-district-overlay').css('top',distPositionY);\n $('#edit-'+fieldsegment+'-99-district-overlay').fadeIn('slow');\n },1000);\n }\n else {\n // reposition just in case...\n setTimeout(function() {\n var distPosition = $('#edit-'+fieldsegment+'-99-district').position();\n var distPositionX = distPosition.left-2;\n var distPositionY = distPosition.top+2; // -4\n $('#edit-'+fieldsegment+'-99-district-overlay').css('left',distPositionX);\n $('#edit-'+fieldsegment+'-99-district-overlay').css('top',distPositionY);\n $('#edit-'+fieldsegment+'-99-district-overlay').fadeIn('slow');\n },1000);\n }\n //china dropdowns\n //change handler for province dropdown(updates city dropdown)\n $( \"#edit-\"+fieldsegment+\"-99-province\" ).change(function() {\n $('#edit-'+fieldsegment+'-99-city-overlay').hide();\n $( \"#edit-\"+fieldsegment+\"-99-city\" ).html('');\n $.each( chinaPCDMap[this.value], function( i, object ) {\n $( \"<option>\" ).attr( \"value\", i ).html(i).appendTo(\"#edit-\"+fieldsegment+\"-99-city\");\n });\n $( \"#edit-\"+fieldsegment+\"-99-city\" ).change(); //trigger city change event\n $('#edit-'+fieldsegment+'-99-city-overlay').fadeIn('slow');\n });\n\n //change handler for city dropdown(updates district dropdown)\n $( \"#edit-\"+fieldsegment+\"-99-city\" ).change(function() {\n $('#edit-'+fieldsegment+'-99-district-overlay').hide();\n $( \"#edit-\"+fieldsegment+\"-99-district\" ).html('');\n var province = $(\"#edit-\"+fieldsegment+\"-99-province\").val();\n $.each( chinaPCDMap[province][this.value], function( k, v ) {\n $( \"<option>\" ).attr( \"value\", v ).html(v).appendTo(\"#edit-\"+fieldsegment+\"-99-district\");\n });\n $( \"#edit-\"+fieldsegment+\"-99-district\" ).change();\n $('#edit-'+fieldsegment+'-99-district-overlay').fadeIn('slow');\n });\n checkProfileRequiredFields('onready');\n }\n }\n}", "function pt11CountryChange() {\n ptCountryChange(pt11InitializeState,'HKEFT');\n }", "function countryCheck() {\n var countryLog = document.querySelector(\".country\");\n var country = response.country;\n console.log(country);\n\n countryLog.innerHTML += country;\n }", "function updateCountryFlag(currCountry) {\n // remove old flag\n d3.select(\"#flag-img\").remove();\n var imgcountryName = currCountry.replace(/ /g,\"-\").replace(\"\\'\",\"-\").toLowerCase();\n // add new flag\n d3.select(\"#country-flag\").append(\"img\")\n .attr(\"src\", \"flags/\" + imgcountryName + \"-flag.svg\")\n .attr(\"id\", \"flag-img\")\n .attr(\"width\", 90)\n .attr(\"height\", 60);\n document.getElementById(\"country-name\").innerHTML = currCountry;\n}", "function update(value, type, country, state){\n var xhr = new XMLHttpRequest();\n xhr.open('GET', \"/api/locations?type=\" + type+ \"&country=\" + country + \"&state=\" + state, true);\n xhr.onload = function () {\n document.querySelector(\"#\" + type).innerHTML = this.responseText;\n if (value) {\n document.querySelector(\"#\" + type).value = value;\n }\n };\n xhr.send();\n}", "function updateRegionCountryNames(region) {\n let currentRegionCountries = []\n regionInfo[region].forEach(el => {\n el && currentRegionCountries.push(el)\n })\n\n document.querySelector('.countries-of-region').innerHTML = ''; // removing prior countries\n for (let country of currentRegionCountries) {\n document.querySelector('.countries-of-region').insertAdjacentHTML('beforeend', `<p class='${country}'>${country}</p><br><br>`);\n }\n}", "function wpsc_change_regions_when_country_changes() {\n\twpsc_copy_meta_value_to_similiar( jQuery( this ) );\n\twpsc_update_regions_list_to_match_country( jQuery( this ) );\n\treturn true;\n}", "function replaceCountryFilter(country) {\n var match = matchVoiceToDataCase(data, columnIndex, country);\n activeSheet.applyFilterAsync(\n \"Country / Region\",\n match,\n tableau.FilterUpdateType.REPLACE);\n }", "function findRegion(country) {\n\tvar region = autoRegionMap[country];\n\tif (region) {\n\t\t$(\"#selRegion\").val(region);\n\t\t$(\"#selRegionEdit\").val(region);\n\t}\n}", "function getCountryForUpdate() {\n\t$('#country_id').empty();\n\tgetCountry();\n\tvar selectfirst = \"<option value='0'>Please Select Country</option>\";\n\t$('#country_id').append(selectfirst);\n\t$.each(countryid, function(i, resData) {\n\t\tvar countryData = \"<option value=\" + resData.countryid + \">\"\n\t\t\t\t+ resData.countryName + \"</option>\";\n\t\t$(countryData).appendTo('#country_id');\n\t});\n\t$('#country_id').trigger(\"chosen:updated\");\n\t$('#country_id').chosen();\n}", "async function checkIfGuinea(country) {\n if (country === 'Guinea') {\n await fetch(\n `https://restcountries.eu/rest/v2/name/${country}?fullText=true`\n )\n .then((res) => res.json())\n .then((country) => {\n let output = `\n <div class=\"row\">\n <div class=\"col-md-6\">\n <img src=\"${country[0].flag}\" class=\"img-thumbnail\"/>\n </div>\n <div class=\"col-md-6\">\n <h2><strong><em>${country[0].name}</em></strong></h2>\n <a onclick=\"countrySelected('${country[0].alpha2Code}')\" href=\"country.html\" class=\"btn btn-primary mt-3\">Country Details</a>\n </div>\n </div>\n </div>\n `\n results.innerHTML = ''\n let doc = new DOMParser().parseFromString(output, 'text/html')\n results.appendChild(doc.body)\n })\n\n .catch((err) => err)\n }\n}", "function switchCountryAndUpdateStories(countryCode, emotionId) {\n //Sync globe\n selectedCountryCode = countryCode;\n controller.switchCountry(countryCode);\n\n //Update filter of emotion\n filterParams.emotion = emotionId;\n emotionSelect.val(emotionId);\n\n //Reload histories\n fetchHistories();\n }", "function governmentAction(countryCode) {\n var govAction =\n \"https://covidtrackerapi.bsg.ox.ac.uk/api/v2/stringency/date-range/2020-04-29/2020-05-06\";\n sIndexEle.text(\"Stringency Index: \");\n $.ajax({\n url: govAction,\n method: \"GET\",\n }).then(function (response) {\n // use 3 letter code to get country specific data\n var stringency = response.data[\"2020-05-06\"][countryCode].stringency;\n sIndexEle.append(stringency);\n });\n}", "function pt5CountryChange() {\n\n var cnProfileComplete = $('#cnProfileCompleteDiv').attr('complete');\n if (cnProfileComplete == \"true\") {\n ptCountryChange(pt5InitializeState,'CNEFT');\n } else {\n ptCountryChange(pt5CNProfileIncompleteState,'CNEFT');\n }\n }", "onCountrySelect(event): void\n\t{\n\t\tconst item = event.getData().item;\n\t\tif (item)\n\t\t{\n\t\t\tconst country = item.getId();\n\t\t\tif (country === this.getCountry())\n\t\t\t{\n\t\t\t\treturn; // nothing to do\n\t\t\t}\n\n\t\t\tthis.formatter.replaceCountry(country);\n\t\t\tthis.inputNode.value = this.formatter.getFormattedNumber();\n\t\t\tthis.drawCountryFlag();\n\t\t\tthis.callbacks.change({\n\t\t\t\tvalue: this.getValue(),\n\t\t\t\tformattedValue: this.getFormattedValue(),\n\t\t\t\tcountry: this.getCountry(),\n\t\t\t\tcountryCode: this.getCountryCode()\n\t\t\t});\n\t\t\tthis.callbacks.countryChange({\n\t\t\t\tcountry: this.getCountry(),\n\t\t\t\tcountryCode: this.getCountryCode()\n\t\t\t});\n\t\t}\n\t}", "function createCountry () {\n let countryName = $('#newCountryText');\n let capitalName = $('#newCapitalText');\n addCountry(countryName.val(), capitalName.val());\n countryName.val('');\n capitalName.val('');\n fixLinks();\n }", "function onchange() {\n\n updateLanguage();\n\n}", "function viewCountry() {\n\tvar id = this.id;\n\tvar xhttp = new XMLHttpRequest();\n\txhttp.onload = loadCountry;\n\txhttp.open(\"GET\", \"countries/\" + id + \".xml\", true);\n\txhttp.send();\n\t}", "function countryDetails(country, countries15) {\n\n main.innerHTML = '';\n main.append(...Countries([country])) ;\n \n\n if(main.childElementCount == 1) {\n main.classList.add('isolated');\n }\n\n main.firstElementChild.id = 'focused';\n \n let allLanguages = '';\n country.languages.forEach(language => {\n\n if(allLanguages == '') {\n allLanguages += language.name;\n }else {\n allLanguages += ', ' + language.name;\n }\n });\n\n let allTimezones = '';\n country.timezones.forEach(timezone => {\n\n if(allTimezones == '') {\n allTimezones += timezone;\n }else {\n allTimezones += ', ' + timezone;\n }\n });\n\n main.firstElementChild.lastElementChild.innerHTML += `<br> All lngs: ${allLanguages} <br> Timezone(s): ${allTimezones} <br> Population: ${country.population}`; \n \n headerUI(country.name, countries15);\n}", "async function fetchCountries(country) {\n //Fetch the Country\n // in future replace with fullName endpoint to get Guinea\n // might break some of the other countries due to values\n // not being the exact same as full name (.name field)\n if (country !== 'Guinea') {\n await fetch(`https://restcountries.eu/rest/v2/name/${country}`)\n .then((res) => res.json())\n .then((country) => {\n let output = `\n <div class=\"row\">\n <div class=\"col-md-6 name\">\n <img src=\"${country[0].flag}\" class=\"img-thumbnail-lg\"/>\n </div>\n <div class=\"col-md-6 name\">\n <h2><strong><em>${country[0].name}</em></strong></h2>\n <a onclick=\"countrySelected('${country[0].alpha2Code}')\" href=\"country.html\" class=\"btn btn-primary mt-3\">Country Details</a>\n </div>\n </div>\n </div>\n `\n results.innerHTML = ''\n let doc = new DOMParser().parseFromString(output, 'text/html')\n results.appendChild(doc.body)\n })\n\n .catch((err) => err)\n } else {\n checkIfGuinea(country)\n }\n}", "async updateCountry(req, res){\n let id = Number(req.params.id);\n let { name, regionId } = req.body;\n let country = new classSchema.Country(id, name, Number(regionId), true);\n\n // actualizo el pais en la base de datos\n let result = await countryMysql.updateCountry(country);\n console.log(\"result: \", result);\n if(result !== SQL_ERROR){\n if(result){\n response.setDefaultResponse(OK, SUCCESS);\n res.status(200).json(response);\n } else{\n response.setDefaultResponse(OK, NOTFOUND);\n res.status(404).json(response);\n }\n } else{\n response.setDefaultResponse(ERROR, SQL_ERROR);\n res.status(500).json(response);\n }\n }", "function SiteAddressCountryCode_Change()\n{\n\ttry\n\t{\n\t\tWrapperExtractCountryFromCountryOptionSet( \"new_countryregion\", \"new_ocountryregion\" );\n\t}\t\n\tcatch( err )\n\t{\n\t\twindow.alert( \"function SiteAddressCountryCode_Change error code \" + err );\n\t\tif( DebugModeLeadZipCode ) \n\t\t\twindow.alert( \"1 name \" + err.name + \"\\n2 message\\t\" + err.message + \"\\n3 number\\t\" + err.number + \"\\n4 prototype\\t\" + err.prototype + \"\\n5 toString\\t\" + err.toString() );\n\t}\n}", "function myCountryController() {\n\n}", "function onEntry() {\r\n var url = \"https://restcountries.eu/rest/v2/alpha/\"\r\n var newurl = url + this.getAttribute(\"id\");\r\n var file = chargerHttpJSON(newurl);\r\n var currency = file['currencies'][0]['name'];\r\n Bouton8_XMLcountry('countriesTP.xml','xslbutton9.xsl',this.getAttribute(\"id\"), 'ul', currency);\r\n this.style.fill=\"red\";\r\n}", "function onChangeTargetCountry(event) {\n\tvar available_languages = {\n\t\t'AR' : {es: 'Spanish'},\n 'AU' : {en: 'English',zh: 'Chinese'},\n 'AT' : {de: 'German', en: 'English'},\n 'BE' : {en: 'English', fr: 'French', nl: 'Dutch'},\n 'BR' : {pt: 'Portuguese'},\n 'CA' : {en: 'English', fr: 'French', zh: 'Chinese'},\n 'CL' : {es: 'Spanish'},\n 'CN' : {zh: 'Chinese'},\n 'CO' : {es: 'Spanish'},\n 'CZ' : {cs: 'Czech', en: 'English'},\n 'DK' : {da: 'Danish', en: 'English'},\n 'FR' : {fr: 'French'},\n 'DE' : {de: 'German', en: 'English'},\n 'HK' : {en: 'English', zh: 'Chinese'},\n 'IN' : {en: 'English'},\n 'ID' : {en: 'English', id: 'Indonesian'},\n 'IE' : {en: 'English'},\n 'IT' : {it: 'Italian'},\n 'JP' : {ja: 'Japanese'},\n 'MY' : {en: 'English', ms: 'Malay', zh: 'Chinese'},\n 'MX' : {en: 'English', es: 'Spanish'},\n 'NL' : {en: 'English', nl: 'Dutch'},\n 'NZ' : {en: 'English'},\n 'NO' : {en: 'English', no: '\tNorwegian'},\n 'PH' : {en: 'English', tl: 'Filipino'},\n 'PL' : {pl: 'Polish'},\n 'PT' : {pt: 'Portuguese'},\n 'RW' : {ru: 'Russian'},\n 'SG' : {en: 'English', zh: 'Chinese'},\n 'ZA' : {en: 'English'},\n 'ES' : {es: 'Spanish'},\n 'SE' : {en: 'English', sv: 'Swedish'},\n 'CH' : {en: 'German', en: 'English', fr: 'French', it: 'Italian'},\n 'TW' : {en: 'English', zh: 'Chinese'},\n 'TR' : {en: 'English', tr: 'Turkish'},\n 'AE' : {ar:'Arabic', en: 'English'},\n 'GB' : {en: 'English'},\n 'US' : {en: 'English', zh: 'Chinese'}\n\t};\n\n\t$('.googleshopping-feed-container select.feed-language')\n\t\t.find('option')\n \t.remove();\n\n\tif(available_languages.hasOwnProperty(event)) {\n\t\t$.each(available_languages[event], function(key, value) {\n\t\t\t$('.googleshopping-feed-container select.feed-language')\n\t\t\t\t.append($(\"<option></option>\")\n\t\t\t\t\t.attr(\"value\",key)\n\t\t\t\t\t.text(value));\n\t\t});\n\t}\n}", "function addCountryFilter(country) {\n var uppercase = country.toUpperCase();\n if(uppercase === \"ALL\") {\n activeSheet.applyFilterAsync(\n \"Country / Region\",\n \"\",\n tableau.FilterUpdateType.ALL);\n } else {\n var match = matchVoiceToDataCase(data, columnIndex, country);\n activeSheet.applyFilterAsync(\n \"Country / Region\",\n match,\n tableau.FilterUpdateType.ADD);\n }\n }", "function main(error, search_data, countries_data) {\n\tif (error) throw error;\n\t\n\tcountries = countries_data;\n\tsearch = search_data;\n\tupdate(\"Aliens of the Deep\");\n\t\n}", "function wpsc_update_location_labels( country_select ) {\n\n\tvar country_meta_key = wpsc_get_element_meta_key( country_select ),\n\t\tlabel, country_code;\n\n\tif ( country_meta_key == 'billingcountry' ) {\n\n\t\tvar billing_state_element = wpsc_get_wpsc_meta_element( 'billingstate' ) ;\n\n\t\tif ( billing_state_element ) {\n\t\t\tcountry_code = wpsc_get_value_from_wpsc_meta_element( 'billingcountry' );\n\t\t\tlabel = wpsc_country_region_label( country_code );\n\t\t\tbilling_state_element.attr( 'placeholder', label );\n\t\t\twpsc_update_labels( wpsc_get_wpsc_meta_elements( 'billingstate' ), label );\n\t\t}\n\t} else if ( country_meta_key == 'shippingcountry' ) {\n\n\t\tvar shipping_state_element = wpsc_get_wpsc_meta_element( 'shippingstate' );\n\n\t\tif ( shipping_state_element ) {\n\t\t\tcountry_code = wpsc_get_value_from_wpsc_meta_element( 'shippingcountry' );\n\t\t\tlabel = wpsc_country_region_label( country_code );\n\t\t\tshipping_state_element.attr( 'placeholder', label );\n\t\t\twpsc_update_labels( wpsc_get_wpsc_meta_elements( 'shippingstate' ), label );\n\t\t}\n\t}\n\n\treturn true;\n}", "function gcode(country) {\n if (country == \"United States\") {country = \"USA\";}\n \tgeocoder.geocode( { 'address': country }, function(results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n var marker = new google.maps.Marker({\n map: map,\n position: results[0].geometry.location,\n });\n google.maps.event.addListener(marker, 'click', function() {\n infowindow = new google.maps.InfoWindow({\n content: country\n });\n infowindow.open(map, marker);\n });\n map.setCenter(results[0].geometry.location);\n }\n \t});\n }", "function getCountryInfo() {\n var e = document.getElementById(\"country\");\n var strCountry = e.options[e.selectedIndex].value;\n twlGeo.getGeoNames('countryInfo', { country: strCountry }, countryInfo)\n}", "function initialize(countries) {\n nationsData = countries; \n let options = \"\";\n countries.forEach(country => options += `<option value=\"${country.alpha3Code}\">${country.name}</option>`);\n listOfCountries.innerHTML = options;\n listOfCountries.selectedIndex = 0;\n displayInfo(listOfCountries[listOfCountries.selectedIndex].value);\n}", "handleChangeCountry(e, index, country) {\n let personData = this.state.person;\n personData.country = country;\n \n this.setState({person: personData});\n }", "function updateCountryStorage() {\n localStorage.setItem(\"countries\", JSON.stringify(countries));\n }", "function optionChanged(country) {\n getSongData(country)\n\n}", "function wpsc_update_regions_list_to_match_country( country_select ) {\n\tvar country_meta_key = wpsc_get_element_meta_key( country_select );\n\tvar region_meta_key;\n\n\tif ( country_meta_key.indexOf( \"shipping\" ) === 0 ) {\n\t\tregion_meta_key = 'shippingregion';\n\t} else {\n\t\tregion_meta_key = 'billingregion';\n\t}\n\n\tvar region_select = wpsc_country_region_element( country_select );\n\tvar all_region_selects = wpsc_get_wpsc_meta_elements( region_meta_key ).filter( 'select' );\n\tvar country_code = wpsc_get_value_from_wpsc_meta_element( country_select );\n\tvar region = wpsc_get_value_from_wpsc_meta_element( region_meta_key );\n\n\tif ( wpsc_country_has_regions( country_code ) ) {\n\t\tvar select_a_region_message = wpsc_no_region_selected_message( country_code );\n\t\tvar regions = wpsc_country_regions( country_code );\n\t\tall_region_selects.empty();\n\t\tall_region_selects.append( wpsc_create_option( select_a_region_message ) );\n\t\tfor ( var region_code in regions ) {\n\t\t if ( regions.hasOwnProperty( region_code ) ) {\n\t\t\t var region_name = regions[region_code];\n\t\t\t all_region_selects.append( wpsc_create_option( region_name, region_code ) );\n\t\t }\n\t\t}\n\n\t\tif ( region ) {\n\t\t\tall_region_selects.val( region );\n\t\t}\n\n\t\tregion_select.show();\n\t} else {\n\t\tregion_select.hide();\n\t\tregion_select.empty();\n\t}\n\n\twpsc_update_location_labels( country_select );\n\twpsc_update_location_elements_visibility();\n\twpsc_copy_meta_value_to_similiar( country_select );\n}", "function changeLanguage(language) {\n if (site_language != language){\n if (language == 'en'){\n changeCurrentLanguage('en');\n displayLanguage('en');\n document.getElementById('language-dropdown-text').innerHTML = \"English\";\n } else {\n displayLanguage('de');\n changeCurrentLanguage('de');\n document.getElementById('language-dropdown-text').innerHTML = \"Deutsch\";\n }\n\n if(window.location.href.indexOf(\"new_page\") > -1){ //new_page is name of html file\n getAllBehaviors(); //display behaviors with changed name again\n } else if (window.location.href.indexOf(\"index\") > -1 || location.href.split(\"/\").slice(-1) == \"#\" || location.href.split(\"/\").slice(-1) == \"\"){\n updateCards();\n }\n }\n}", "function OpenListOfWorldCountries() {\n document.getElementById(\"countryToVisitSelector\").innerHTML =\n \"<div class='switchlink_l float_l'>Мої країни...</div>\" +\n \"<div class='switchlink float_l'><a title='Перейти до списку візитів' onclick='javascript:OpenListOfWorldVisits()' onmouseover='' style='cursor: pointer;'>Мої візити</a></div>\" +\n \"<br><br>\" + createWorldPageFrontView();\n\n //Calculate number of location visited and add them to front page\n if (local[0] == \"world\"){\n getNumberOfLocation();\n }\n }", "editTravel(id) {\n const index = this.travels.findIndex(\n (travel) => travel.id === id\n )\n this.travels[index].country = prompt(\"New country?\")\n }", "function store(storeLookup){\n\nvar storeLookup = {\n\n england: \"2 Bank Street, London, EC1, Tel:123456\",\n ireland: \"Temple Bar, Dublin 2, Tel: 123456\",\n wales: \"21 David's Avenue, Cardiff, Tel:123456\",\n scotland: \"South Bridge, Edinburgh EH8, Tel:123456\",\n};\n\n var country = document.getElementById(\"country\");\n if (country.value == \"england\") {\n document.getElementById(\"storeAddress\").innerHTML = storeLookup.england;\n }\n\n else if (country.value == \"ireland\") {\n document.getElementById(\"storeAddress\").innerHTML = storeLookup.ireland;\n }\n\n else if (country.value == \"wales\") {\n document.getElementById(\"storeAddress\").innerHTML = storeLookup.wales;\n }\n\n else if (country.value == \"scotland\") {\n document.getElementById(\"storeAddress\").innerHTML = storeLookup.scotland;\n }\n \n else {\n document.getElementById(\"storeAddress\").innerHTML = \"Sorry there's an error\";\n }\n }", "updateCountry() {\n if (this.state.country !== this.state.selectedCountry) {\n this.setState({country: this.state.selectedCountry})\n }\n }", "function countryChange(selectObj) { \n // get the index of the selected option \n var idx = selectObj.selectedIndex; \n // get the value of the selected option \n var which = selectObj.options[idx].value; \n // use the selected option value to retrieve the list of items from the countryLists array \n cList = countryLists[which]; \n // get the country select element via its known id \n var cSelect = document.getElementById(\"country\"); \n // remove the current options from the country select \n var len=cSelect.options.length; \n while (cSelect.options.length > 0) { \n cSelect.remove(0); \n } \n var newOption; \n // create new options \n for (var i=0; i<cList.length; i++) { \n newOption = document.createElement(\"option\"); \n newOption.value = cList[i]; // assumes option string and value are the same \n newOption.text=cList[i]; \n // add the new option \n try { \n cSelect.add(newOption); // this will fail in DOM browsers but is needed for IE \n } \n catch (e) { \n cSelect.appendChild(newOption); \n } \n } \n }", "addCountry(event) {\n event.preventDefault();\n // if checks if current state has an id\n if (this.state.id) {\n const countryUpdate_data = {\n country_name: this.state.country_name,\n continent_name: this.state.continent_name,\n id: this.state.id\n }\n console.log('Update this: ', countryUpdate_data);\n\n const putRequest = new Request(`${url}/update-country`, {\n method: 'PUT',\n headers: new Headers({ 'Content-Type': 'application/json' }),\n body: JSON.stringify(countryUpdate_data)\n });\n\n fetch(putRequest)\n .then(response => {\n console.log(`Put request was successful: ${response}`);\n this.getCountries();\n this.setState({\n //empties input states\n country_name: '',\n continent_name: '',\n id: ''\n })\n }).catch(error => console.log(`Fetch failed on update country: ${error}`)\n )\n } else {\n const country_data = {\n //new country data\n country_name: this.state.country_name,\n continent_name: this.state.continent_name\n }\n\n const request = new Request(`${url}/new-country`, {\n method: 'POST',\n headers: new Headers({ 'Content-Type': 'application/json' }),\n body: JSON.stringify(country_data)\n });\n\n fetch(request)\n .then(response => {\n console.log(`Post was successful: ${response}`);\n this.getCountries();\n this.setState({\n //empties input states\n country_name: '',\n continent_name: '',\n id: ''\n })\n }).catch(error => console.log(`Fetch failed on add country post: ${error}`)\n )\n }\n }", "function newCountry () {\n let countryIndex = Math.floor(Math.random()*countriesAndCodes.length)\n let country = countriesAndCodes[countryIndex].name\n randomCountryElement.innerHTML = country\n return countryIndex\n}", "function getData(country) {\n inputCountry = country;\n}", "function displayCountry(sysKey, sysValue) {\n if(sysKey == \"country\") {\n $(\"#country\").html(sysValue);\n }\n}", "function onSearchCountry(){\n setCountry(item)\n }", "function countryCodeCheck() {\n var countryCodeLog = document.querySelector(\".countryCode\");\n var countryCode = response.countryCode;\n console.log(countryCode);\n\n countryCodeLog.innerHTML += countryCode;\n }", "function country_load(){\n var countries = [ { value: \"country\", text: \"State\"},\n {value: \"AK\", text:\"Alaska - AK\"},\n {value: \"AL\", text:\"Alabama - AL\"},\n {value: \"AR\", text:\"Arkansas - AR\"},\n {value: \"AZ\", text:\"Arizona - AZ\"},\n {value: \"CA\", text:\"California - CA\"},\n {value: \"CO\", text:\"Colorado - CO\"},\n {value: \"CT\", text:\"Connecticut - CT\"},\n {value: \"DC\", text:\"District of Columbia - DC\"},\n {value: \"DE\", text:\"Delaware - DE\"},\n {value: \"FL\", text:\"Florida - FL\"},\n {value: \"GA\", text:\"Georgia - GA\"},\n {value: \"HI\", text:\"Hawaii - HI\"},\n {value: \"IA\", text:\"Iowa - IA\"},\n {value: \"ID\", text:\"Idaho - ID\"},\n {value: \"IL\", text:\"Illinois - IL\"},\n {value: \"IN\", text:\"Indiana - IN\"},\n {value: \"KS\", text:\"Kansas - KS\"},\n {value: \"KY\", text:\"Kentucky - KY\"},\n {value: \"LA\", text:\"Louisiana - LA\"},\n {value: \"MA\", text:\"Massachusetts - MA\"},\n {value: \"MD\", text:\"Maryland - MD\"},\n {value: \"ME\", text:\"Maine - ME\"},\n {value: \"MI\", text:\"Michigan - MI\"},\n {value: \"MN\", text:\"Minnesota - MN\"},\n {value: \"MO\", text:\"Missouri - MO\"},\n {value: \"MS\", text:\"Mississippi - MS\"},\n {value: \"MT\", text:\"Montana - MT\"},\n {value: \"NC\", text:\"North Carolina - NC\"},\n {value: \"ND\", text:\"North Dakota - ND\"},\n {value: \"NE\", text:\"Nebraska - NE\"},\n {value: \"NH\", text:\"New Hampshire - NH\"},\n {value: \"NJ\", text:\"New Jersey - NJ\"},\n {value: \"NM\", text:\"New Mexico - NM\"},\n {value: \"NV\", text:\"Nevada - NV\"},\n {value: \"NY\", text:\"New York - NY\"},\n {value: \"OH\", text:\"Ohio - OH\"},\n {value: \"OK\", text:\"Oklahoma - OK\"},\n {value: \"OR\", text:\"Oregon - OR\"},\n {value: \"PA\", text:\"Pennsylvania - PA\"},\n {value: \"RI\", text:\"Rhode Island - RI\"},\n {value: \"SC\", text:\"South Carolina - SC\"},\n {value: \"SD\", text:\"South Dakota - SD\"},\n {value: \"TN\", text:\"Tennessee - TN\"},\n {value: \"TX\", text:\"Texas - TX\"},\n {value: \"UT\", text:\"Utah - UT\"},\n {value: \"VA\", text:\"Virginia - VA\"},\n {value: \"VT\", text:\"Vermont - VT\"},\n {value: \"WA\", text:\"Washington - WA\"},\n {value: \"WI\", text:\"West Virginia - WV\"},\n {value: \"WV\", text:\"Wisconsin - WI\"},\n {value: \"WY\", text:\"Wyoming - WY\"}]\n \n var elm = document.getElementById('country'); // get the select\n for(i=0; i< countries.length; i++){ \n var option = document.createElement('option'); // create the option element\n option.value = countries[i].value; // set the value property\n option.appendChild(document.createTextNode(countries[i].text)); // set the textContent in a safe way.\n if(elm != null){\n elm.append(option);\n }\n }\n }", "function setDefaultCountry() {\n var countrytheSelect = document.getElementById('country');\n for (i=0;i< countrytheSelect.length;i++) {\n // the javascript geonamesData.js contains the countrycode\n // of the userIp in the variable 'geonamesUserIpCountryCode'\n if (countrytheSelect[i].value == geonamesUserIpCountryCode) {\n // set the country selectionfield\n //alert(countrytheSelect[i].value);\n countrytheSelect.selectedIndex = countrytheSelect[i].value;\n }\n }\n}", "function countryInformation(code) {\n let page1 = document.querySelector('.page1') //selecionando a div page1\n let page2 = document.querySelector('.page2') //selecionando a div page2\n let btnVoltar = document.querySelector('.btnVoltar') //selecionando o botao voltar\n\n page1.style.display = 'none' //deixando a div escondida\n page2.style.display = 'block' //deixando a div visivel\n btnVoltar.style.display = 'block' //deixando o botao voltar visivel na segunda pagina\n\n const url = `https://restcountries.eu/rest/v2/alpha/${code}`;\n fetch(url)\n .then(response => response.json())\n .then(data => {\n nome = data.name\n capital = data.capital\n region = data.region\n subregion = data.subregion\n population = data.population\n flag = data.flag\n neighbor = data.borders\n\n let lang = data.languages;\n let languages = ''\n\n document.querySelector('#imgSelected').src = flag;\n document.querySelector('#countryName').innerHTML = 'Nome: ' + nome\n document.querySelector('#countryCapital').innerHTML = 'Capital: ' + capital\n document.querySelector('#countryRegion').innerHTML = 'Região: ' + region\n document.querySelector('#countrySubRegion').innerHTML = 'Sub-Região: ' + subregion\n document.querySelector('#countryPopulation').innerHTML = 'População: ' + population\n lang.forEach(element => {\n languages += `${element.name} `\n });\n document.querySelector('#countryLang').innerHTML = 'Línguas: ' + languages.replaceAll(' ', ', ')\n drawBorders(neighbor, nome)\n\n })\n}", "function changeLanguage(language) {\n var currentLanguage = document.getElementById(\"userLanguage\").value;\n if (language !== currentLanguage) {\n var userLanguage = {\"userLanguage\": language, \"typeOperation\": \"UPDATE\"};\n postServletJSON('/homeServlet', userLanguage);\n if (language === \"en_US\") {\n window.location.href = '/';\n } else {\n window.location.href = '/html/ru/index.html';\n }\n }\n}", "function pt0CountryChange() {\n $('#routing').bind('blur',trimRoutingNumber);\n $('#bic').bind('blur',updateBic);\n ptCountryChange(pt0InitializeState, '');\n\n $('#paymentMethod').change(paymentMethodChangeHandler);\n\n $('#same').change(function() {\n if ($(this).is(':checked')) {\n $('.unique').hide();\n } else {\n $('.unique').show();\n }\n });\n }", "function t_yieldCountry() {\n\n var t_information = document.getElementById(\"t_information\");\n var picker = document.getElementById(\"t_countrypicker\");\n t_information.innerHTML = \"Delegate of \"+picker.options[picker.selectedIndex].value;\n\n}", "function getCountry(countryName) {\r\n\r\n /* Change the website title according to the country name */\r\n document.title = countryName;\r\n\r\n var theUrl = 'https://restcountries.eu/rest/v2/name/' + countryName;\r\n jQuery.ajax({\r\n url: theUrl,\r\n dataType: 'json',\r\n type: 'GET',\r\n cache: false,\r\n success: function (dataJSON) {\r\n displayCountry(dataJSON);\r\n }\r\n });\r\n}", "function showLegal(context, country, language, playerid, serverid) {\n var path = window.location.pathname;\n if (window.location.pathname.lastIndexOf('/') >= 0){ \n path = window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1);\n }\n var type = \"imprint\";\n switch (context.toLowerCase()){\n case \"tos\":\n case \"terms\":\n type = \"terms\";\n break;\n case \"privacy\":\n type = \"privacy\";\n break;\n case \"imprint\":\n default:\n type = \"imprint\";\n break;\n }\n var urlParams = \"type=\"+type+\"&lang=\" + language + \"&country=\" + country;\n\tvar url = ((\"https:\" == document.location.protocol) ? \"https\" : \"http\") + \"://\" + window.location.hostname + path + \"/legal/index_new.php?\" + urlParams;\n createPopup(\"legal\", url, 520, 600, 0, true, false, 0.6);\n}", "function info(){\n var country = countryForm.myCountry.value;\n country = country.charAt(0).toUpperCase() + country.substring(1);\n if(countriesInfo.hasOwnProperty(country)){\n window.location.href = \"country.html\";\n for(i = 0; i < nameOfAttributes.length; i++){\n document.cookie = \"CountryName=\" + country;\n document.cookie = nameOfAttributes[i] +\n \"=\" + countriesInfo[country][i];\n }\n }\n else{\n alert(\"NOT A VALID COUNTRY NAME\");\n }\n}", "function addCountry(name, capital, population) {\n nestedObject.data.continents.europe.countries[name] = {\n capital: capital,\n population: population\n }\n}", "function local() {\r\n let country = \"Portugal\";\r\n }", "setCountryCode() {\n this.countryCode = 'us';\n this.setCurrencySymbol();\n\n fetch('http://ip-api.com/json')\n .then(results => results.json())\n .then(results => {\n this.countryCode = results.countryCode.toLowerCase();\n this.setCurrencySymbol();\n });\n }", "function createWorldPageFrontView() {\n var countinents = initial_data.continent\n var countries = initial_data.country\n var result = \"<div id='MainContainer'>\";\n\n //List of visited countries splited per continents\n $.each( countinents, function( i, cont ){\n var countriesPerContinentNumber = 0;\n var listOfCountries = \"\";\n\n $.each( countries, function( j, country ){\n if (country.continent_id == cont.continent_id) {\n countriesPerContinentNumber += 1;\n\n listOfCountries += \"<a id='\" + country.short_name + \"' title='Перейти до інформації про країну' onclick='javascript:getCountryPage(this.id)' onmouseover='' style='cursor: pointer;'>\" +\n// \"<a href='index.html?country=\" + country.short_name + \"' onmouseover='' style='cursor: pointer;'>\" +\n \"<img src='IMG/icon/x.gif' title='\" + country.name_full + \"' class='countflag' style='background-position:\" + country.small_flag_img + \"' /></a>\"\n }\n });\n result += \"<div class='my_countries'><div><b>\" + cont.name_ru + \":</b> \" + setCountriesNumberWithCorrectEnd(countriesPerContinentNumber) + \"<span id='citiesNumberPerContinent\" + cont.continent_id + \"'></span>\" +\n \"</div>\" + listOfCountries + \"</div>\";\n });\n result += createWorldMap_HTML(countries);\n result += \"<div class='countryhead'>Усього: \" + setCountriesNumberWithCorrectEnd(countries.length) + \"<span id='totalCitiesNum'></span></div></div>\";\n return result;\n}", "function country(selectedCountry) {\n // Select the country dropdown button and set text equal to selection\n country_button.text(selectedCountry)\n}", "function clickCountry(e) {\n // exit early if we are at high zoom\n if (CONFIG.map.getZoom() > 7) return;\n // clear the map search input\n $('form#search input').val('');\n // get the name of the clicked country, and keep a reference to it\n var name = e.target.feature.properties['NAME'];\n CONFIG.selected_country.name = name;\n highlightCountryLayer(e.target.feature);\n // call the search function\n searchCountry(name, e.target._bounds);\n}", "function addCountryFlag(ip, td, newIP) {\n\n jQuery.ajax({\n type: 'POST',\n url: 'helpers/getCountry.php',\n data: { ip: ip },\n success: function (data) {\n if (data.length == 2) {\n td.html('<img src=\"images/flags/' + data.toLowerCase() + '.png\"/> ' + newIP);\n if (data.toLowerCase() != 'xx')\n localStorage.setItem('c' + ip, data.toLowerCase());\n }\n },\n error: function (data) {\n }\n });\n }", "function threeLetterCode(countryISO) {\n $.ajax({\n url: \"https://restcountries.eu/rest/v2/alpha?codes=\" + countryISO,\n method: \"GET\",\n }).then(function (response) {\n // call govenment action function to pass in response of 3 letter code\n\n governmentAction(response[0].alpha3Code);\n });\n}", "function updateResultsPanel(data, country=CONFIG.default_title) {\n // update primary content\n $('div#country-results div#results-title h3').text(country);\n var totalrow = $('div#country-results div#total-count').empty();\n var totaltext = data.length > 0 ? (data.length > 1 ? `Tracking ${data.length.toLocaleString()} coal-fired units` : `Tracking ${data.length} coal project`) : `Nothing found`;\n var total = $('<div>',{text: totaltext}).appendTo(totalrow);\n}", "function update2015() {\n L.geoJson(countryData, {style: u2015}).addTo(myMap);\n L.geoJson(countryData, {\n style: u2015,\n onEachFeature: onEachFeature5\n }).addTo(myMap);\n}", "function setAutocompleteCountry() {\n const country = document.getElementById(\"country\").value;\n if (country == \"all\") {\n autocomplete.setComponentRestrictions({\n country: [],\n });\n map.setCenter({\n lat: 15,\n lng: 0,\n });\n map.setZoom(3);\n } else {\n autocomplete.setComponentRestrictions({\n country: country,\n });\n map.setCenter(countries[country].center);\n map.setZoom(countries[country].zoom);\n }\n clearResults();\n clearMarkers();\n}", "function countryChange(selectObj) {\n\n var idx = selectObj.selectedIndex;\n var which = selectObj.options[idx].value;\n cList = countryLists[which];\n\n var cSelect = document.getElementById(\"country\");\n // remove the current options from the country select\n var len = cSelect.options.length;\n while (cSelect.options.length > 0) {\n cSelect.remove(0);\n }\n var newOption;\n // create new options\n for (var i = 0; i < cList.length; i++) {\n newOption = document.createElement(\"option\");\n newOption.value = cList[i];\n newOption.text = cList[i];\n\n\n try {\n cSelect.add(newOption); // this will fail in DOM browsers but is needed for IE\n } catch (e) {\n cSelect.appendChild(newOption);\n }\n }\n}", "function getCountryData(e) {\n let countryId = e.target.id;\n\n if (lastId !== \"\" && lastId !== countryId) {\n if (lastId === \"RU\") {\n lastId = \"ru-main\";\n }\n document.getElementById(lastId).style.fill = \"rgb(192, 192, 192)\";\n }\n\n document.getElementById(countryId).style.fill = \"red\";\n\n if (countryId === \"ru-main\") {\n countryId = \"RU\";\n }\n\n fetch(URL + countryId)\n .then(res => res.json())\n .then(countryArray => {\n let country = countryArray[0];\n document.getElementById(\"countryInfo\").innerHTML = \n `Country: ${country.name}<br>\n Population: ${country.population}<br>\n Area: ${country.area}<br>\n Region: ${country.region}<br>\n Borders: ${country.borders}<br>\n `;\n })\n lastId = countryId;\n}", "function onLanguageChange(lang){\n window.location.href=baseUrl+'/language/'+lang;\n}", "onCountryChange() {\n return this.signUpFormCtrl.getRules().then(() => {\n const changePhoneCountry =\n (!this.signUpFormCtrl.model.phoneCountry ||\n this.signUpFormCtrl.model.phoneCountry === 'UNKNOWN') &&\n this.signUpFormCtrl.model.country;\n\n if (changePhoneCountry) {\n this.signUpFormCtrl.model.phoneCountry = this.signUpFormCtrl.model.country;\n }\n });\n }", "function updateCountryName() {\ncountryName.text = currentCountry + \", \" + mapChart.dateFormatter.format(currentDate, \"MMM dd, yyyy\");\n}", "setCountryValue({value}) {\n this.countryValue = value;\n }", "function countryISO(obj) {\n globals.countryISO = obj;\n }", "function setAutocompleteCountry() {\n var country = document.getElementById(\"country\").value\n if (country == \"all\") {\n autocomplete.setComponentRestrictions({ country: [] })\n map.setCenter({ lat: 15, lng: 0 })\n map.setZoom(2)\n } else {\n autocomplete.setComponentRestrictions({ country: country })\n map.setCenter(countries[country].center)\n map.setZoom(countries[country].zoom)\n }\n clearResults()\n clearMarkers()\n}", "async handleChangeCountry(event) {\n let target = event.target;\n let content = [];\n if (!this.state.cities[target.value]) {\n content = await Butler.loadCities(target.value);\n } else {\n content = this.state.cities[target.value];\n }\n this.state.cities[target.value] = content;\n this.setState({\n selectedCountry: target.value,\n cities: this.state.cities,\n phoneNumberError: null,\n postalCodeError: null\n });\n }", "function showCountryDetail(){\n var country = document.querySelectorAll(\".countries > div > div\");\n country.forEach(function(c){\n c.addEventListener(\"click\", function(){\n toggleDisplay(filterForm, \"none\"); // SET DISPLAY TO NONE\n toggleDisplay(country, \"none\"); // SET DISPLAY TO NONE;\n var keyString = \"name/\" + this.querySelector(\"h1\").getAttribute(\"data-name\") + \"?fullText=true\";\n var borderString = \"\";\n getXmlData(keyString, function(data){\n HTMLCountryDetails(data);\n });\n });\n });\n}", "function changeLanguage(pLang) {\n\twindow.location.href = updateURLParameter(window.location.href, 'lang', pLang);\n}", "function handleToggleComplete(country) {\n selectCountry((prevSelect) => prevSelect === country.alpha2Code ? null : country.alpha2Code)\n }" ]
[ "0.6655316", "0.660322", "0.6579025", "0.6573853", "0.6438471", "0.64133376", "0.6409713", "0.63747454", "0.6317996", "0.6242204", "0.62264663", "0.62254775", "0.6220533", "0.6190308", "0.618959", "0.6178868", "0.61718464", "0.6163816", "0.6148273", "0.6051192", "0.5987728", "0.59762895", "0.596679", "0.5935382", "0.5918529", "0.58971184", "0.5893176", "0.5892264", "0.5880773", "0.5847329", "0.5842759", "0.5816137", "0.57945865", "0.5782308", "0.5773295", "0.5753583", "0.5753305", "0.5749414", "0.57448494", "0.5741298", "0.5713516", "0.56949097", "0.5694268", "0.56814253", "0.5678229", "0.56611013", "0.56504935", "0.5631854", "0.5627301", "0.562136", "0.55752456", "0.5563541", "0.5562772", "0.55606693", "0.55484974", "0.55414844", "0.55318093", "0.5530844", "0.5524071", "0.55143094", "0.5507643", "0.5507466", "0.55043304", "0.55017334", "0.54932916", "0.5493173", "0.54876715", "0.5476325", "0.54671246", "0.54549235", "0.54546624", "0.5442142", "0.5437601", "0.5429578", "0.5412936", "0.5412598", "0.5406192", "0.5404952", "0.53877646", "0.5385749", "0.5378469", "0.53710324", "0.5368307", "0.5361909", "0.5357278", "0.53428394", "0.53389996", "0.5333978", "0.53251016", "0.5324906", "0.5301696", "0.52796906", "0.52777153", "0.5274454", "0.52688473", "0.5266962", "0.52649015", "0.52643573", "0.52629584", "0.5261476" ]
0.5901455
25
Updates conflict information with the given start and end date
function updateConflicts(){ /* Remove children */ var ul = $("#conflict-list ul"); ul.html(""); var start_yr = timelinePixelToYear(date_start); var end_yr = timelinePixelToYear(date_end); /* Create and add new children */ for(var year in disputes){ if(parseInt(year) < start_yr || parseInt(year) > end_yr) continue; for(var i = 0; i<disputes[year].length; i++){ var li = $("<li>"); li.attr("onclick", "updateDetails("+year+","+i+")"); if(disputes[year][i].dispute[16] !== undefined) li.html(disputes[year][i].dispute[16]); else li.html("Unnamed Conflict of " + year); ul.append(li); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkConflict() {\n var event1 = $scope.events[0];\n event1.conflict = 0;\n var event2;\n var i = 1;\n while (i < $scope.events.length) {\n event2 = $scope.events[i];\n event2.conflict = 0;\n var event1End = new Date(event1.end.dateTime);\n var event2Start = new Date(event2.start.dateTime);\n // If an event has time conflict with other events, its 'conflict' attribute will be set to a positive number.\n // Specific values 1, 2 and 3 are used for styling\n if (event1End > event2Start) {\n event2.conflict = 3;\n if (event1.conflict == 3) {\n event1.conflict = 2;\n }\n else{\n event1.conflict = 1;\n }\n }\n event1 = event2;\n i += 1;\n }\n }", "function getConflicts(request) {\n var conflicts = calendar.getEvents(request.date, request.endTime);\n if (conflicts.length < 1) {\n request.status = \"New\";\n } else {\n request.status = \"Conflict\";\n sheet.getRange(lastRow, lastColumn - 1).setValue(\"Reject\");\n sheet.getRange(lastRow, lastColumn).setValue(\"Sent: Conflict\");\n }\n}", "function check(){\n var data = $('form#set_schedule').serializeObject();\n var tmp_day = '2000-01-01',\n outer_key,\n outer,\n inner_key,\n inner,\n tmp_range,\n checked = {},\n conflict_found = {},\n conflicts = [],\n i;\n \n for (outer_key in data) {\n if (Object.prototype.hasOwnProperty.call(data, outer_key)) {\n outer = data[outer_key];\n \n tmp_range = moment(tmp_day + 'T' + outer.start_time).twix(tmp_day + 'T' + outer.end_time);\n \n checked[outer_key] = true;\n \n for (inner_key in data) {\n if (Object.prototype.hasOwnProperty.call(data, inner_key) && outer_key !== inner_key && !checked[inner_key]) {\n inner = data[inner_key];\n \n if(outer.day === inner.day && inner.start_time != outer.end_time && (tmp_range.contains(tmp_day + 'T' + inner.start_time) || tmp_range.contains(tmp_day + 'T' + inner.end_time))) {\n conflict_found[outer_key] = true;\n conflict_found[inner_key] = true;\n conflicts.push([\n outer_key,\n inner_key\n ]);\n }\n }\n }\n }\n }\n \n \n // Ouput:\n document.getElementById('output').innerHTML = '';\n \n for (i = 0; i < conflicts.length; i++) {\n document.getElementById('output').innerHTML += '<li><strong>' + data[conflicts[i][0]].artist + '</strong> conflicts with <strong>' + data[conflicts[i][1]].artist + '</strong></li>';\n }\n \n for (outer_key in data) {\n if (Object.prototype.hasOwnProperty.call(data, outer_key) &&\n !conflict_found[outer_key]\n ) {\n document.getElementById('output').innerHTML += '<li><strong>' + data[outer_key].artist + '</strong> does not conflict with anyone</li>';\n }\n }\n \n}", "function getConflicts(request){\r\n var conflicts = request.calendar.getEvents(request.date, request.endTime);\r\n if (conflicts.length < 1) {\r\n request.status = \"Approve\";\r\n } else {\r\n request.status = \"Conflict\";\r\n }\r\n}", "function check_sched_conflict(dt,hr,mn,duration){\n //--- assume all is valid\n modelInspection.set(\"isvalid\",true);\n var idx_date = {Jan:\"0\",Feb:\"1\",Mar:\"2\",Apr:\"3\",May:\"4\",Jun:\"5\",Jul:\"6\",Aug:\"7\",Sep:\"8\",Oct:\"9\",Nov:\"10\",Dec:\"11\"};\n var arr = dt.split(\"-\");\n var new_sdate = new Date(arr[2],idx_date[arr[1]],arr[0],hr,mn,0,0);\n var new_edate = new Date(new_sdate.getTime() +duration*60000 );\n \n var cur_Date = new Date();\n if( new_sdate < cur_Date){\n modelInspection.set(\"isvalid\",false);\n return false;\n }\n\n $.each(modelInspection.data_source_inspection.data(), function (field, value) { \n var tmparr = value.date_start.split(\" \");\n var tmpampm = value.start_time.split(\" \");\n var tmptime = tmpampm[0].split(\":\");\n var plushour = tmpampm[1] == \"PM\" && parseInt(tmptime[0]) < 12 ?12:0;\n plushour = tmpampm[1] == \"AM\" && parseInt(tmptime[0]) == 12 ?-12:plushour;\n\n var cur_sdate = new Date(tmparr[2],idx_date[tmparr[1]],tmparr[0],parseInt(tmptime[0])+plushour,tmptime[1],0,0);\n var cur_edate = new Date(cur_sdate.getTime() +value.duration*60000);\n \n\n\n if(new_sdate >= cur_sdate && new_sdate < cur_edate ){\n modelInspection.set(\"isvalid\",false);\n }\n \n if(new_sdate == cur_sdate){\n modelInspection.set(\"isvalid\",false);\n } \n\n if(new_edate > cur_sdate && new_edate <= cur_edate ){\n modelInspection.set(\"isvalid\",false);\n }\n if(new_sdate <= cur_sdate && new_edate >= cur_edate ){\n modelInspection.set(\"isvalid\",false);\n }\n\n });\n\n var startdate = kendo.parseDate(new_sdate);\n var enddate = kendo.parseDate(new_edate);\n return {date_start:kendo.toString(startdate, \"dd MMM yyyy\"),start_time:kendo.toString(startdate, \"hh:mm tt\"),end_time:kendo.toString(enddate, \"hh:mm tt\"),duration:duration};\n \n}", "function updateReservation(id, people_count, table_id, start_date, end_date) {\n const obj = { people_count, table_id, start_date, end_date };\n queries.updateReservation(obj, id)\n .then(data => {});\n\n return obj;\n}", "dateChange(){\n if (this.date.start.getTime() > this.date.end.getTime())\n this.date.end = this.date.start;\n }", "function checkConflict(period1, period2) {\n // Assign day to endingDate\n const endingDate1 = getEndDate(period1);\n const startDate1 = new Date(period1.startingDay);\n\n const endingDate2 = getEndDate(period2);\n const startDate2 = new Date(period2.startingDay);\n // This conflicts\n if (startDate2.getTime() < endingDate1.getTime()) {\n if (\n endingDate2.getTime() >= endingDate1.getTime() ||\n startDate2.getTime() >= startDate1.getTime()\n ) {\n return true;\n }\n }\n // This conflicts\n if (startDate1.getTime() < endingDate2.getTime()) {\n if (\n endingDate1.getTime() >= endingDate2.getTime() ||\n startDate1.getTime() >= startDate2.getTime()\n ) {\n return true;\n }\n }\n // No conflict\n return false;\n}", "function addConflictMetaData() {\n var conflictedCnt = countRecrdsInObj(conflictedRecrds);\n conflictedCnt === 0 ?\n entityObj.validationResults.shareUnqKeyWithConflictedData = null :\n entityObj.validationResults.shareUnqKeyWithConflictedData = {\n received: rcrdsRecieved,\n cleanRecrdsCnt: rcrdsRecieved - conflictedCnt,\n unqKey: entityObj.unqKey[0],\n conCnt: conflictedCnt,\n recrds: conflictedRecrds\n };\n }", "function mark_conflict(el) {\n var event_start = time_to_mins($(el).attr('fullnarp-time'));\n var event_duration = $(el).attr('fullnarp-duration') / 60;\n\n var conflict = false;\n\n /* We do only need to check events in the same room at the same day for conflicts */\n $('.event.day_'+$(el).attr('fullnarp-day')+'.room'+$(el).attr('fullnarp-room')).each(function(index,check_el) {\n\n if( $(el).attr('event_id') == $(check_el).attr('event_id') ) { return true; }\n\n var check_start = time_to_mins($(check_el).attr('fullnarp-time'));\n var check_duration = $(check_el).attr('fullnarp-duration') / 60;\n\n if( check_start < event_start + event_duration &&\n event_start < check_start + check_duration ) {\n $(check_el).addClass('conflict');\n conflict = true;\n }\n });\n $(el).toggleClass('conflict', conflict );\n}", "function applyConflictResolutionFct(conflictResolutionMap) {\n var branchHead = this.lastVersion();\n var masterHead = Branch.getMasterHead();\n var v = new Version();\n v.elements.components = Branch.getMasterBranch().getVersion(this.lastPulledVersion).elements.getElements().slice();\n // Apply the conflict resolution\n if (Object.keys(conflictResolutionMap).length) {\n driverJsonPatchMongo.applyPatchToArray(conflictResolutionMap, v.elements.getElements(), Branch.getMasterBranch(), branchHead.elements.getElements().slice());\n }\n\n this.versions.push(v);\n v.changes = driverJsonPatchMongo.compare(getRawElements(masterHead.elements.getElements()), getRawElements(v.elements.getElements()));\n v.previous = branchHead._id;\n v.mergedFrom = masterHead._id;\n this.lastPulledVersion = masterHead._id;\n this.save();\n}", "set range(range) {\n this.startDate = range.startDate;\n this.endDate = range.endDate;\n this.refresh();\n }", "function constrainMarkerToRange(date, range) {\n if (range.start != null && date < range.start) {\n return range.start;\n }\n if (range.end != null && date >= range.end) {\n return new Date(range.end.valueOf() - 1);\n }\n return date;\n}", "function constrainMarkerToRange(date, range) {\n if (range.start != null && date < range.start) {\n return range.start;\n }\n\n if (range.end != null && date >= range.end) {\n return new Date(range.end.valueOf() - 1);\n }\n\n return date;\n }", "function constrainMarkerToRange(date, range) {\n if (range.start != null && date < range.start) {\n return range.start;\n }\n if (range.end != null && date >= range.end) {\n return new Date(range.end.valueOf() - 1);\n }\n return date;\n }", "function constrainMarkerToRange(date, range) {\n if (range.start != null && date < range.start) {\n return range.start;\n }\n if (range.end != null && date >= range.end) {\n return new Date(range.end.valueOf() - 1);\n }\n return date;\n }", "function constrainMarkerToRange(date, range) {\n if (range.start != null && date < range.start) {\n return range.start;\n }\n if (range.end != null && date >= range.end) {\n return new Date(range.end.valueOf() - 1);\n }\n return date;\n }", "function constrainMarkerToRange(date, range) {\n if (range.start != null && date < range.start) {\n return range.start;\n }\n if (range.end != null && date >= range.end) {\n return new Date(range.end.valueOf() - 1);\n }\n return date;\n }", "function constrainMarkerToRange(date, range) {\n if (range.start != null && date < range.start) {\n return range.start;\n }\n\n if (range.end != null && date >= range.end) {\n return new Date(range.end.valueOf() - 1);\n }\n\n return date;\n }", "onRangeChange({\n startDate,\n endDate\n }) {\n this.startDate = startDate;\n this.endDate = endDate;\n this.refresh();\n }", "function setEstFinishDate(estDays, startInput, endInput){\n\tvar startDate = document.getElementById(startInput).value;\n\tvar ans = true;\n\tif(startDate != \"\"){\n\t\t\n\t\tif(dependencyCount > 0){\n\t\t\tans = confirm(\"Do you really wish to specify a fixed date. If so, the dependencies will be removed.\");\n\t\t}\n\t\t\n\t\tif(ans){\n\t\t\tvar d = new Date(startDate);\n\t\t d.setDate(d.getDate()+parseInt(estDays));\n\t\t if(d.getYear()<1900)\n\t\t \tdocument.getElementById(endInput).value = (d.getMonth()+1)+\"/\"+d.getDate()+\"/\"+(d.getYear()+1900);\n\t\t else\n\t\t \tdocument.getElementById(endInput).value = (d.getMonth()+1)+\"/\"+d.getDate()+\"/\"+(d.getYear());\n\t\t}else{\n\t\t\tdocument.getElementById(startInput).value = \"\";\n\t\t\tdocument.getElementById(endInput).value = \"\";\n\t\t}\n\t}\n}", "function constrainMarkerToRange$1(date, range) {\n if (range.start != null && date < range.start) {\n return range.start;\n }\n if (range.end != null && date >= range.end) {\n return new Date(range.end.valueOf() - 1);\n }\n return date;\n }", "function handleUpdateDates() {\n const start_date = formatTimestampToString(selectedStartDate);\n const end_date = formatTimestampToString(selectedEndDate);\n dispatch(\n setStartAndEndTime({\n start_date,\n end_date,\n })\n );\n }", "function cb(start, end) {\n $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));\n }", "UpdateData(startDate, endDate) {\n this.startDate = startDate;\n this.endDate = endDate;\n\n const data = this.currentData.filter(row => { \n return row.Date.getTime() >= startDate.getTime() && row.Date.getTime() < endDate.getTime()\n });\n this.mapObject.updateMap(data);\n this.plotObject.updatePlot(data);\n }", "updateCourseDates(prevCourse, valueKey, value) {\n const updatedCourse = Object.assign({}, prevCourse); // clone the course\n updatedCourse[valueKey] = value;\n // Just return with the new value if it doesn't pass validation\n // or if it it lacks timeline dates\n if (!this.isDateValid(value) || !updatedCourse.timeline_start) { return updatedCourse; }\n if (isAfter(toDate(updatedCourse.start), toDate(updatedCourse.timeline_start)) && valueKey !== 'timeline_start') {\n updatedCourse.timeline_start = updatedCourse.start;\n }\n if (isAfter(toDate(updatedCourse.timeline_start), toDate(updatedCourse.timeline_end)) && valueKey !== 'timeline_end') {\n updatedCourse.timeline_end = updatedCourse.timeline_start;\n }\n if (isAfter(toDate(updatedCourse.timeline_end), toDate(updatedCourse.end)) && valueKey !== 'end') {\n updatedCourse.end = updatedCourse.timeline_end;\n }\n if (isAfter(toDate(updatedCourse.timeline_start), toDate(updatedCourse.end)) && valueKey !== 'timeline_start') {\n updatedCourse.timeline_start = updatedCourse.end;\n }\n\n // If the dates were changed by extending the course end, and the assignment end\n // was previously the same as the course end, then extend the timeline end to match.\n if (prevCourse.end === prevCourse.timeline_end && valueKey !== 'timeline_end') {\n updatedCourse.timeline_end = updatedCourse.end;\n }\n\n return updatedCourse;\n }", "function solveConflicts(time){\n\t\n\t// get data from ddl's\n\tvar beginHour = $(\"#beginHour\").val();\n\tvar beginMin = $(\"#beginMin\").val();\n\t\t\t\n\tvar endHour = $(\"#endHour\").val();\n\tvar endMin = $(\"#endMin\").val();\n\t\n\tswitch(time){\n\t\tcase 'begin':\n\t\t\t// set begin and end time in one var (eg 12:30 -> 1230)\n\t\t\tvar beginTime = \"\" + beginHour + beginMin;\n\t\t\tvar beginTime = parseInt(beginTime);\n\t\t\tvar endTime = \"\" + endHour + endMin;\n\t\t\tvar endTime = parseInt(endTime);\n\t\t\t\n\t\t\t// sets endhour always +15 minutes compared to beginhour-input by user\n\t\t\tif(beginTime >= endTime){\n\t\t\t\tbeginMin = parseInt(beginMin);\n\t\t\t\tif(beginMin < 45){\n\t\t\t\t\tbeginMin += 15;\n\t\t\t\t\t$(\"#endHour\").val(beginHour);\n\t\t\t\t\t$(\"#endMin\").val(\"\"+beginMin);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tbeginHour = parseInt(beginHour) + 1;\n\t\t\t\t\t$(\"#endHour\").val(beginHour);\n\t\t\t\t\t$(\"#endMin\").val(\"00\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'end':\n\t\t\t// set begin and end time in one var (eg 12:30 -> 1230)\n\t\t\tvar beginTime = \"\" + beginHour + beginMin;\n\t\t\tvar beginTime = parseInt(beginTime);\n\t\t\tvar endTime = \"\" + endHour + endMin;\n\t\t\tvar endTime = parseInt(endTime);\n\t\t\t// makes sure user doesnt select an endhour-value before the beginvalue\n\t\t\tif(beginTime > endTime){\n\t\t\t\tbeginMin = parseInt(beginMin);\n\t\t\t\tif(beginMin < 45){\n\t\t\t\t\tbeginMin += 15;\n\t\t\t\t\t$(\"#endHour\").val(beginHour);\n\t\t\t\t\t$(\"#endMin\").val(\"\"+beginMin);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tbeginHour = parseInt(beginHour) + 1;\n\t\t\t\t\t$(\"#endHour\").val(beginHour);\n\t\t\t\t\t$(\"#endMin\").val(\"00\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t}\n\t\n\tfilterResults();\n}", "function ShowCurrentConflictLine() {\r\n var k = 0;\r\n var conflict;\r\n for (var i = 0; i < n - 1; i++) {\r\n for (var j = i + 1; j < n; j++) {\r\n k = liveCpaIdx[i][j];\r\n flightPair[k] = new ORIGINALPAIR(); \r\n conflict = ConflictDetector(oriPath[i], oriPath[j], k);\r\n SegmentCutBorderSector(conflict[3], conflict[4], cpaLineExtension);\r\n resolutionGuideCircle = new Path.Circle({\r\n center: oriPath[1].Path.firstSegment.point,\r\n radius: oriPath[1].Path.firstSegment.point.getDistance(conflict[3]),\r\n strokeColor: green,\r\n strokeWidth: 1,\r\n visible: exploreMode \r\n });\r\n if (conflict[0]) {\r\n // CALCULATION OF ORIGINAL CONFLICT PROPERTIES HERE \r\n flightPair[k].HasConflict = conflict[0];\r\n flightPair[k].Pair.early = i;\r\n flightPair[k].Pair.late = j;\r\n flightPair[k].Conflict.ShiftTime = oriPath[j].EntryTime - oriPath[i].EntryTime;\r\n flightPair[k].Conflict.ShiftDistance = flightPair[k].Conflict.ShiftTime * mapAircraftSpeed; \r\n flightPair[k].Conflict.EntryClosure = oriPath[i].Path.firstSegment.point.getDistance(oriPath[j].Path.firstSegment.point);\r\n flightPair[k].Conflict.LOSLocation.angle = GetPolarCoord(cpaCircle[k].position).angle;\r\n flightPair[k].Conflict.LOSLocation.radius = GetPolarCoord(cpaCircle[k].position).radius;\r\n flightPair[k].Conflict.LOSLocation.x = cpaCircle[k].position.x; \r\n flightPair[k].Conflict.LOSLocation.y = cpaCircle[k].position.y;\r\n var cutPoint = oriPath[i].Path.getIntersections(oriPath[j].Path);\r\n if (cutPoint.length == 1) {\r\n var d1 = oriPath[i].Path.firstSegment.point.getDistance(cutPoint[0].position);\r\n var d2 = oriPath[j].Path.firstSegment.point.getDistance(cutPoint[0].position);\r\n var d0 = flightPair[k].Conflict.EntryClosure;\r\n var conflictAngle = math.acos((d1*d1 + d2*d2 - d0*d0 )/( 2 * d1 * d2));\r\n flightPair[k].Conflict.ConflictAngle = conflictAngle * 180 / pi;\r\n }\r\n else {\r\n flightPair[k].Conflict.ConflictAngle = -1; \r\n }\r\n }\r\n }\r\n }\r\n}", "async function updateAvailablity() {\n let projectEndDates = [];\n let estAvailableDate;\n\n // Get all entries from the IC table\n // TODO: Swap this out with PEOPLE_DB (our Operating Manual table)\n const entries = await notion.databases.query({\n database_id: MASTER_DB,\n });\n\n entries.results.forEach(async (entry) => {\n const people = entry.properties.People.people; // Get the person property values\n\n people.forEach(async (person) => {\n // Get all the projects mentioning a user from the project tracker\n const projects = await getUserMentionPages(\n PROJECT_TRACKER_DB,\n person\n );\n\n // If they have any projects assigned...\n if (projects.length > 0) {\n projects.forEach(async (project) => {\n // Get the end date from the est. project timeline\n let endDate = new Date(\n project.properties[\"Est Timeline\"].date.end\n );\n\n // Calculate the latest end date of a person's projects\n if (endDate) {\n projectEndDates.push(endDate);\n estAvailableDate = new Date(Math.max(...projectEndDates));\n }\n });\n\n await notion.pages.update({\n page_id: entry.id,\n properties: {\n // Update the client project count\n \"Projects\": {\n \"relation\": [...projects],\n },\n // Update their next est. availability date\n \"Est Available Date\": {\n \"date\": {\n \"start\": estAvailableDate.toISOString().substr(0, 10),\n },\n },\n },\n });\n }\n });\n });\n}", "function checkForCollision(newStart, newEnd){\n \n for(var i=0; i < descriptionList.length; i++){\n existingStart = descriptionList[i].startTime;\n existingEnd = descriptionList[i].endTime;\n \n //new description starts in an esisting description\n if(newStart > existingStart && newStart < existingEnd){\n descriptionCollision = true;\n }\n //new description runs into and existing description\n if(newEnd > existingStart && newEnd < existingEnd){\n descriptionCollision = true;\n }\n //new description completely covers an existing one\n if(newStart < existingStart && newEnd > existingEnd){\n descriptionCollision = true;\n } \n }\n}", "setNewDate({ start, end }) {\n const dimensionsStart = moment(start).valueOf();\n const dimensionsEnd = moment(end).valueOf();\n\n this.setProperties({\n dimensionsEnd,\n dimensionsStart\n });\n }", "function getCreationConflicts(creation, omitLine) {\n \n // No conflict by default\n var conflict = 0;\n \n // Raise a conflict if dates and meals are the same\n for (var i = 1; i < masterValues.length; i++) {\n if (omitLine !== i) {\n var dateString = (masterValues[i][0].getMonth() + 1) + '/' + masterValues[i][0].getDate() + '/' + masterValues[i][0].getYear();\n var meal = masterValues[i][1];\n if (dateString == creation.dateString && meal == creation.meal) {\n conflict = 1;\n creationConflictLine = i;\n }\n }\n }\n \n // Set status of creation object accordingly\n if (conflict == 1) {\n creation.status = \"Conflict\";\n } else {\n creation.status = \"Approved\";\n }\n \n}", "function updateDatepicker2(booked_dates, start_date){\n window.ST.initializeDatePickerWithBookings('#datepicker2', booked_dates, '#start-on2', '#end-on2', \"#booking-start-output2\", \"#booking-end-output2\", start_date);\n $('#datepicker2').datepicker('update');\n }", "function updateChart()\n{\n\tmin = new Date(document.getElementById(\"startDate\").value);\n\tmax = new Date(document.getElementById(\"endDate\").value);\n\n\t// Set the minString to midnight on minDate and the maxString to midnight on the day after maxDate\n\tvar minString = min.getFullYear() + \".\" + (min.getMonth() + 1) + \".\" + (min.getDate() + 1);\n\tvar maxString = max.getFullYear() + \".\" + (max.getMonth() + 1) + \".\" + (max.getDate() + 2);\n\n\tquery.setQuery(\"SELECT 'Date', '3379' FROM 1-UxIFELz001J7cR2JCWN8EJDf7nXTrstXKaSUb5t WHERE 'Date' >= '\"\n\t+ minString + \"' AND 'Date' <= '\" + maxString + \"' ORDER BY 'Date'\");\n\n\tquery.send(handleQueryResponse);\n}", "function syncDateRangeFields(FromDateRangeHasChanged) {\n\n var fromDateRangeValue = document.getElementById(\"fromDateRange\").value;\n var semicolon1 = fromDateRangeValue.indexOf(\";\");\n var fromDateStr1 = fromDateRangeValue.substring(0, semicolon1);\n var toDateStr1 = fromDateRangeValue.substring(semicolon1 + 1);\n\n var toDateRangeValue = document.getElementById(\"toDateRange\").value;\n var semicolon2 = toDateRangeValue.indexOf(\";\");\n var fromDateStr2 = toDateRangeValue.substring(0, semicolon2);\n var toDateStr2 = toDateRangeValue.substring(semicolon2 + 1);\n\n var result = \"\";\n\n if (FromDateRangeHasChanged) {\n if (fromDateStr1 == toDateStr1) {\n // We have just selected a day so we need to get the \"from\" field from\n // \"dateRange\" and the \"to\" field from the \"toDateRange\"\n result = fromDateStr1 + \";\" + toDateStr2;\n } else {\n // Both fields have changed so we just overwrite the \"toDateRange\"\n result = fromDateRangeValue;\n }\n } else {\n if (fromDateStr2 == toDateStr2) {\n // We have just selected a day so we need to get the \"from\" field from\n // \"dateRange\" and the \"to\" field from the \"toDateRange\"\n result = fromDateStr1 + \";\" + toDateStr2;\n } else {\n // Both fields have changed so we just overwrite the \"dateRange\"\n result = toDateRangeValue;\n }\n }\n\n document.getElementById(\"fromDateRange\").value = result;\n document.getElementById(\"toDateRange\").value = result;\n }", "async function updateParticipationLastUsedDate(participationEntry)\r\n{\r\n\tparticipationEntry.Last_Opened = Date.now();\r\n\tlet participationUpdateParams = {\r\n\t\tTableName:PARTICIPATIONCOLLECTION,\r\n\t\tItem:participationEntry\r\n\t};\r\n\t\r\n\tawait docClient.put(participationUpdateParams).promise();\r\n}", "function onChange(err, conflicts) {\n\t\tif(err) \n\t\t\tlog.error('onChange:err:'+JSON.stringify(err));\n\t\tif(conflicts && conflicts.length)\n\t\t\tlog.debug('onChange:conflicts:'+JSON.stringify(conflicts));\n\n\t\t// TODO - should this be here?\n\t\tpushService.registerForPush();\n\n\n\t\t$rootScope.syncInProgress = false;\n\t\tsyncService.setSyncInProgress(false);\t\t// not syncing now\n\t\tlog.debug(\"SYNC: FINISH\");\n\n\t\t$scope.jobStatuses = {};\n\n\t\tloadingService.hide();\n\n\t\t// We were getting the following error. Where does the order come from? reset filter here for now\n\t\t// Error: The order {\"key\":\"mobjobSeq\",\"reverse\":1} is not valid\n\t\tfilter = angular.copy(_localfilter);\n\n\t\t// Job.find() retrieves from LocalJob - only leg zeroes so as to display a job list (not all legs)\n\t\tJob.find(filter, function (err, jobs) {\n\t\t\t//console.log(err);\n\t\t\t//console.log(jobs);\n\n\t\t\tsyncService.setSyncInProgress(false);\t\t// not syncing now\n\n\t\t\t// TODO - maybe need to check error and only show jobs if no error\n\t\t\t$scope.jobs = jobs;\n\n\t\t\tif( sortKey && sortKey != '')\n\t\t\t\t$scope.jobs.sort(sortFunction);\n\n\t\t\tvar syncRequired = 0;\n\n\t\t\tfor (var i = 0; i < $scope.jobs.length; i++) {\n\t\t \t$scope.convertDates($scope.jobs[i], $rootScope.jobMetadata);\n\n\t\t\t\tvar job = $scope.jobs[i];\n\n\t\t\t\tjob.displayDate = job[displayDate];\n\t\t\t\tjob.displayFrom = job[displayFrom];\n\t\t\t\tjob.displayTo = job[displayTo];\n\n\t\t\t\t// ACK the job - notifies despatch job received by pda\n\t\t\t\tif( job.mobjobStatus == 'UJ') {\n\t\t\t\t\tjob.mobjobStatus = 'NJ';\n\t\t\t\t\tjob.onDeviceTime = new Date().toISOString();\n\n\t\t\t\t\tmystr = 'onChange:' + job.mobjobSeq + ' updated from ' + 'UJ' + ' -> ' + job.mobjobStatus;\n\t\t\t\t\tlog.info(mystr);\n\n\t\t\t\t\tjob.save();\n\t\t\t\t\tsyncRequired++;\n\t\t\t\t}\n\n\t\t\t\t// keep a count of the various job statuses\n\t\t\t\tif($scope.jobStatuses[job.mobjobStatus])\n\t\t\t\t\t$scope.jobStatuses[job.mobjobStatus] += 1;\n\t\t\t\telse\n\t\t\t\t\t$scope.jobStatuses[job.mobjobStatus] = 1;\n\t\t\t}\n\t\t\tif(syncRequired) {\n\t\t\t\t$rootScope.syncInProgress = true;\n\t\t\t\tsyncfilter = angular.copy(_syncfilter);\n\t\t\t\tsyncService.setCallingFunc(\"JobsIndexCtrl->Job.find\");\n\t\t\t\tsyncService.hybridSync(onChange,syncfilter);\n\t\t\t}\n\n\t\t\t$scope.titleWithTotal = \"Jobs \" + \" (\" + $scope.jobs.length + \")\";\n\n\t\t\t$scope.$apply();\n\t\t});\n\t}", "function checkForCollisionExtended(newStart, newEnd){\n \n for(var i=0; i < descriptionList.length; i++){\n existingStart = descriptionList[i].startTime;\n existingEnd = descriptionList[i].endTime;\n \n //new description starts in an esisting description\n if(newStart > existingStart && newStart < existingEnd){\n descriptionCollision = true;\n } \n }\n}", "function setEndRange(date, days) {\r\n var msSpan = days*24*3600*1000;\r\n var endDate = new Date(date.getTime() + msSpan);\r\n //$(\"#date2\").val(endDate.toISOString().split('T')[0]);\r\n $(\"#date2\").val(momentLA_Date(endDate));\r\n}", "function dateChanged(start, end) {\n\n let start_date = start.format('YYYY-MM-DD');\n let end_date = end.format('YYYY-MM-DD');\n\n datepicker_start_date = start_date;\n datepicker_end_date = end_date;\n\n console.log(\"A new date selection was made: \" + start_date + ' to ' + end_date );\n // Fetch new data each time a new sample is selected\n\n if( displayComparisonChart ){\n setComparisonChartRevenueCutoffDateWarning();\n }\n\n let numdays = end.diff(start, 'days') + 1;\n \n // let numdays_float = end.diff(start, 'days', true) + 1;\n // console.log(\"diff integer: \" + numdays);\n // console.log(\"diff float: \" + numdays_float);\n\n d3.select(\"#numberOfDays\").html(numdays);\n\n let api_call = \"/api/v1.0/daterange_pandas/\" + start_date + \"/\" + end_date; \n\n makeAPICall(api_call);\n\n}", "function hasConflicts() { // console.log(\"hasConflicts returned recrdsObj = %O\",recrdsObj);\n var processed, conflictedAry;\n var conflicted = false;\n var rcrdsRecieved = countRecrdsInObj(entityObj.curRcrds);\n var conflictedRecrds = checkEachRcrdForConflicts(entityObj.curRcrds); //console.log(\"%s conflicts = %O\", entity, conflictedRecrds);\n addConflictMetaData();\n\n function checkEachRcrdForConflicts(recrdsObj) {\n var conflictedRecrdsObj = {};\n for (var unqFieldAryKey in recrdsObj) { // console.log(\"conflictedAry = %O\", conflictedAry);\n processed = [], conflictedAry = [];\n var hasConflicts = hasConflictedRcrds(recrdsObj[unqFieldAryKey], unqFieldAryKey);\n hasConflicts && removeConflictedRecrds(unqFieldAryKey);\n }\n return isEmpty(conflictedRecrdsObj) ? null : conflictedRecrdsObj;\n /**\n * If there are conflicted records, join the collected conflict records with the records passed during first round processing.\n */\n function removeConflictedRecrds(unqFieldAryKey) {\n conflictedRecrdsObj[unqFieldAryKey] = getConflictedRcrds(conflictedAry, recrdsObj[unqFieldAryKey]);\n delete recrdsObj[unqFieldAryKey];\n }\n } /* End checkEachRcrdForConflicts */\n function getConflictedRcrds(conflictedAry, recrdsAry) {//console.log(\"getConflictedRcrds called. arguments = %O\", arguments);\n return conflictedAry.map(function(rcrdIdx){ //console.log(\"conflicted recrd in conflictedAry. recrd in orgAry = %O\", recrdsAry[rcrdIdx])\n return recrdsAry[rcrdIdx];\n });\n }\n /**\n * Filter out and return the records with conflicts in their data. {@link findConflicts }\n *\n * @param {array} recrdsAry An array of records sharing the same unqKey value.\n * @param {string} unqField A key that should be unique in each record\n * @return {array} Returns an array of records with confirmed conflicts with records previously processed.\n */\n function hasConflictedRcrds(recrdsAry, unqField) {\n recrdsAry.forEach(function(recrd, idx){\n conflicted = false;\n conflicted = findConflicts(recrd, unqField, idx);\n });\n return conflicted;\n }\n /**\n * Check each record already processed for conflicts with the record being processed, {@link @checkForConflicts }.\n *\n * @param {object} recrd Record currently being checked for conflicts\n * @param {string} unqField A key that should be unique in each record\n * @return {boolean} Returns True if a conflict is found\n */\n function findConflicts(recrd, unqField, recrdIdx) {\n processed.some(function(procesd){ // Loop through each record already processed\n conflicted = checkForConflicts(recrd, procesd.recrd, conflicted); // console.log(\"conflicted = \", conflicted);\n ifConflictedGrabTheseRcrds(procesd.idx, recrdIdx, unqField);\n return conflicted;\n });\n if (conflicted) {\n return true;\n } else { processed.push({ recrd: recrd, idx: recrdIdx }); }\n /**\n * If a conflict was found with this pair of records, add the previously processed record to its conflict collection.\n */\n function ifConflictedGrabTheseRcrds(procesdIdx, recrdIdx, unqField) {\n if (conflicted) {\n conflictedAry.push(recrdIdx);\n if (conflictedAry.indexOf(procesdIdx) === -1) { conflictedAry.push(procesdIdx); }\n }\n }\n } /* End findConflicts */\n /**\n * Adds data related to any conflicts found to the validation results.\n */\n function addConflictMetaData() {\n var conflictedCnt = countRecrdsInObj(conflictedRecrds);\n conflictedCnt === 0 ?\n entityObj.validationResults.shareUnqKeyWithConflictedData = null :\n entityObj.validationResults.shareUnqKeyWithConflictedData = {\n received: rcrdsRecieved,\n cleanRecrdsCnt: rcrdsRecieved - conflictedCnt,\n unqKey: entityObj.unqKey[0],\n conCnt: conflictedCnt,\n recrds: conflictedRecrds\n };\n }\n }", "function constrainDrop(start,end,indexOE = null){\n let allEvents = calendar.getEvents();\n let eventsToReplace = []; \n\n if(indexOE != null)\n allEvents.splice(indexOE,1)\n \n if(moment(start).isSame(moment(end),'day')){\n index = allEvents.findIndex(event => moment(event.start).isSame(moment(start),'day'))\n if(allEvents[index].classNames[0] == 'present')\n eventsToReplace.push(allEvents[index]);\n else\n eventsToReplace.push(true)\n }\n\n else{\n end = moment(end).subtract(1, \"days\")._d;\n let dates = createDateArray(start,end)\n allEvents.findIndex(function(event){\n if(dates.find(date => moment(date).isSame(moment(event.start),'day'))){\n if(event.classNames[0] == \"present\")\n eventsToReplace.push(event)\n else \n eventsToReplace.push(true)\n }\n })\n }\n return eventsToReplace;\n}", "function defineStartAndEndDate(list) {\n var minDate;\n var maxDate;\n\n $.each(list, function(key, value) {\n if (moment(value[4], 'MM-DD-YY', true).isValid()) {\n if (!minDate && !maxDate) {\n minDate = value[4];\n maxDate = value[4];\n }\n if (moment(value[4]).isBefore(minDate)) {\n // if(value[4] < minDate) {\n minDate = value[4];\n }\n if (moment(value[4]).isAfter(maxDate)) {\n // if(value[4] > maxDate) {\n maxDate = value[4];\n }\n }\n });\n\n minDate = moment(minDate,'MM-DD-YY').format('YYYY-MM-DD');\n maxDate = moment(maxDate,'MM-DD-YY').format('YYYY-MM-DD');\n\n $('.input-daterange').attr('data-start-date',minDate);\n $('#startdate').val(minDate);\n $('.input-daterange').attr('data-end-date',maxDate);\n $('#enddate').val(maxDate);\n }", "function updateDeadline(req, res) {\n var position = req.body;\n\n var deadline = position.deadline;\n var semester = position.semester;\n\n positionModel\n .updateDeadline(semester, deadline)\n .then(\n function (stats) {\n res.sendStatus(200);\n },\n function (error) {\n res.sendStatus(404);\n }\n );\n }", "updateField() {\n updateLocationField(this.props.index, this.state.city, moment(this.state.startDate).format('YYYYMMDD'), moment(this.state.endDate).format('YYYYMMDD'));\n }", "setDateParams([start, end]) {\n this.set('tableIsLoading', true);\n Ember.run.debounce(this, this.get('actions.setNewDate'), { start, end }, 500);\n }", "add(date) {\n let { start, end } = this.selection;\n if (start == null) {\n start = date;\n }\n else if (end == null) {\n end = date;\n }\n else {\n start = date;\n end = null;\n }\n super.updateSelection(new DateRange(start, end), this);\n }", "add(date) {\n let { start, end } = this.selection;\n if (start == null) {\n start = date;\n }\n else if (end == null) {\n end = date;\n }\n else {\n start = date;\n end = null;\n }\n super.updateSelection(new DateRange(start, end), this);\n }", "function setEndDate() {\n // get the `snapshot` of the references data\n date_end_ref.once('value', function(date) {\n date_end = date.val();\n set();\n });\n }", "function checkConflicts(sendResponse) {\n chrome.storage.sync.get('savedCourses', function (data) {\n var conflicts = [];\n var courses = data.savedCourses;\n for (let i = 0; i < courses.length; i++) {\n for (let j = i + 1; j < courses.length; j++) {\n let course_a = courses[i];\n let course_b = courses[j];\n if (isConflict(course_a.datetimearr, course_b.datetimearr))\n conflicts.push([course_a, course_b]);\n }\n }\n if (conflicts.length == 0) {\n sendResponse({\n isConflict: false\n });\n } else {\n sendResponse({\n isConflict: true,\n between: conflicts\n });\n }\n });\n}", "function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragments, fieldMap) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For every response name, if there are multiple fields, they\n // must be compared to find a potential conflict.\n Object.keys(fieldMap).forEach(function (responseName) {\n var fields = fieldMap[responseName];\n // This compares every field in the list to every other field in this list\n // (except to itself). If the list only has one item, nothing needs to\n // be compared.\n if (fields.length > 1) {\n for (var i = 0; i < fields.length; i++) {\n for (var j = i + 1; j < fields.length; j++) {\n var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragments, false, // within one collection is never mutually exclusive\n responseName, fields[i], fields[j]);\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n });\n}", "function DateChangedEnd() {\n var perStart = $(\"#dpfrom\").datepicker(\"getDate\");\n var perEnd = $(\"#dpto\").datepicker(\"getDate\");\n \n if (perStart > perEnd) {\n $('#dpfrom').datepicker('setDate', perEnd);\n }\n GetInvoicesForPeriod();\n}", "function defineEnd_date() {\n if (newPatient['Start_Date'] !== '') {\n let date = momentWeekDays(\n newPatient['Start_Date'],\n 'YYYY-MM-DD'\n ).businessAdd(14)._d;\n\n let endDate = moment(date).format('YYYY-MM-DD');\n\n setNewPatient({ ...newPatient, End_Date: endDate });\n\n console.log(moment(date).format('YYYY-MM-DD'));\n }\n }", "onSave(){\n //Brute force look for overlap\n let conflictPairs = {};\n let overlaps = false;\n let songs = this.state.rehearsalSongs.valueSeq();\n for(let i = 0; i < songs.size; i++){\n for(let j = i+1; j < songs.size; j++){\n //Check for intersection, ignore when start/end are the same\n if(songs.getIn([i,'rehearsalTime']).intersects(songs.getIn([j,'rehearsalTime']), true)){\n overlaps = true;\n\n let i1 = songs.get(i).id;\n let i2 = songs.get(j).id;\n if(!(i1 in conflictPairs)) conflictPairs[i1] = [];\n if(!(i2 in conflictPairs)) conflictPairs[i2] = [];\n //Record conflicts\n conflictPairs[i1].push(this.state.rehearsalSongs.getIn([i2,'title']));\n conflictPairs[i2].push(this.state.rehearsalSongs.getIn([i1,'title']))\n }\n }\n }\n //No conflicts\n if(!overlaps){\n this.props.onSave(songs);\n }\n //Report conflicts\n else{\n let errs = Object.keys(conflictPairs).reduce((accum,ind)=>{\n accum[ind] = 'De geselecteerde tijd overlapt met ' + conflictPairs[ind].join(',');\n return accum;\n },{});\n this.setState({songErrs:errs});\n }\n }", "function updateLinked(date)\n {\n var objects = false;\n if ($(this).attr('id') == $baseId)\n {\n objects = $widgets;\n }\n else if ($(this).attr('id') == $baseRangeId)\n {\n objects = $rangeWidgets;\n }\n\n if (objects)\n {\n indexForDay = $.datepicker._defaults.dateFormat.indexOf('dd');\n indexForMonth = $.datepicker._defaults.dateFormat.indexOf('mm');\n indexForYear = $.datepicker._defaults.dateFormat.indexOf('yy');\n\n var offsetForYear;\n if (objects.year.attr('maxlength'))\n {\n offsetForYear = objects.year.attr('maxlength');\n }\n else\n {\n var lastYear = objects.year.find('option:last').attr('value');\n offsetForYear = lastYear.length;\n }\n\n objects.month.val(date.substring(indexForMonth, indexForMonth+2));\n objects.day.val(date.substring(indexForDay, indexForDay+2));\n objects.year.val(date.substring(indexForYear, indexForYear+offsetForYear));\n }\n }", "function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For any response name which appears in both provided field\n // maps, each field from the first field map must be compared to every field\n // in the second field map to find potential conflicts.\n var _arr2 = Object.keys(fieldMap1);\n\n for (var _i3 = 0; _i3 < _arr2.length; _i3++) {\n var responseName = _arr2[_i3];\n var fields2 = fieldMap2[responseName];\n\n if (fields2) {\n var fields1 = fieldMap1[responseName];\n\n for (var i = 0; i < fields1.length; i++) {\n for (var j = 0; j < fields2.length; j++) {\n var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, fields1[i], fields2[j]);\n\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n }\n} // Determines if there is a conflict between two particular fields, including", "function OverlappingFieldsCanBeMerged(context) {\n var comparedSet = new PairSet();\n\n function findConflicts(fieldMap) {\n var conflicts = [];\n _Object$keys(fieldMap).forEach(function (responseName) {\n var fields = fieldMap[responseName];\n if (fields.length > 1) {\n for (var i = 0; i < fields.length; i++) {\n for (var j = i; j < fields.length; j++) {\n var conflict = findConflict(responseName, fields[i], fields[j]);\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n });\n return conflicts;\n }\n\n function findConflict(responseName, field1, field2) {\n var _field1 = _slicedToArray(field1, 3);\n\n var parentType1 = _field1[0];\n var ast1 = _field1[1];\n var def1 = _field1[2];\n\n var _field2 = _slicedToArray(field2, 3);\n\n var parentType2 = _field2[0];\n var ast2 = _field2[1];\n var def2 = _field2[2];\n\n // Not a pair.\n if (ast1 === ast2) {\n return;\n }\n\n // If the statically known parent types could not possibly apply at the same\n // time, then it is safe to permit them to diverge as they will not present\n // any ambiguity by differing.\n // It is known that two parent types could never overlap if they are\n // different Object types. Interface or Union types might overlap - if not\n // in the current state of the schema, then perhaps in some future version,\n // thus may not safely diverge.\n if (parentType1 !== parentType2 && parentType1 instanceof _typeDefinition.GraphQLObjectType && parentType2 instanceof _typeDefinition.GraphQLObjectType) {\n return;\n }\n\n // Memoize, do not report the same issue twice.\n if (comparedSet.has(ast1, ast2)) {\n return;\n }\n comparedSet.add(ast1, ast2);\n\n var name1 = ast1.name.value;\n var name2 = ast2.name.value;\n if (name1 !== name2) {\n return [[responseName, name1 + ' and ' + name2 + ' are different fields'], [ast1], [ast2]];\n }\n\n var type1 = def1 && def1.type;\n var type2 = def2 && def2.type;\n if (type1 && type2 && !(0, _utilitiesTypeComparators.isEqualType)(type1, type2)) {\n return [[responseName, 'they return differing types ' + type1 + ' and ' + type2], [ast1], [ast2]];\n }\n\n if (!sameArguments(ast1.arguments || [], ast2.arguments || [])) {\n return [[responseName, 'they have differing arguments'], [ast1], [ast2]];\n }\n\n var selectionSet1 = ast1.selectionSet;\n var selectionSet2 = ast2.selectionSet;\n if (selectionSet1 && selectionSet2) {\n var visitedFragmentNames = {};\n var subfieldMap = collectFieldASTsAndDefs(context, (0, _typeDefinition.getNamedType)(type1), selectionSet1, visitedFragmentNames);\n subfieldMap = collectFieldASTsAndDefs(context, (0, _typeDefinition.getNamedType)(type2), selectionSet2, visitedFragmentNames, subfieldMap);\n var conflicts = findConflicts(subfieldMap);\n if (conflicts.length > 0) {\n return [[responseName, conflicts.map(function (_ref3) {\n var _ref32 = _slicedToArray(_ref3, 1);\n\n var reason = _ref32[0];\n return reason;\n })], conflicts.reduce(function (allFields, _ref4) {\n var _ref42 = _slicedToArray(_ref4, 2);\n\n var fields1 = _ref42[1];\n return allFields.concat(fields1);\n }, [ast1]), conflicts.reduce(function (allFields, _ref5) {\n var _ref52 = _slicedToArray(_ref5, 3);\n\n var fields2 = _ref52[2];\n return allFields.concat(fields2);\n }, [ast2])];\n }\n }\n }\n\n return {\n SelectionSet: {\n // Note: we validate on the reverse traversal so deeper conflicts will be\n // caught first, for clearer error messages.\n leave: function leave(selectionSet) {\n var fieldMap = collectFieldASTsAndDefs(context, context.getParentType(), selectionSet);\n var conflicts = findConflicts(fieldMap);\n conflicts.forEach(function (_ref6) {\n var _ref62 = _slicedToArray(_ref6, 3);\n\n var _ref62$0 = _slicedToArray(_ref62[0], 2);\n\n var responseName = _ref62$0[0];\n var reason = _ref62$0[1];\n var fields1 = _ref62[1];\n var fields2 = _ref62[2];\n return context.reportError(new _error.GraphQLError(fieldsConflictMessage(responseName, reason), fields1.concat(fields2)));\n });\n }\n }\n };\n}", "findShallowIntersectingRange(date1, date2) {\n const thisRange = date1.toRange();\n const otherRange = date2.toRange(); // Start with infinite start and end dates\n\n let start = null;\n let end = null; // This start date exists\n\n if (thisRange.start) {\n // Use this definite start date if other start date is infinite\n if (!otherRange.start) {\n start = thisRange.start;\n } else {\n // Otherwise, use the earliest start date\n start = thisRange.start < otherRange.start ? thisRange.start : otherRange.start;\n } // Other start date exists\n\n } else if (otherRange.start) {\n // Use other definite start date as this one is infinite\n start = otherRange.start;\n } // Assign end date to this one if it is valid\n\n\n if (thisRange.end && (!start || thisRange.end >= start)) {\n end = thisRange.end;\n } // Assign end date to other one if it is valid and before this one\n\n\n if (otherRange.end && (!start || otherRange.end >= start)) {\n if (!end || otherRange.end < end) end = otherRange.end;\n } // Return calculated range\n\n\n return {\n start,\n end\n };\n }", "findShallowIntersectingRange(date1, date2) {\n const thisRange = date1.toRange();\n const otherRange = date2.toRange(); // Start with infinite start and end dates\n\n let start = null;\n let end = null; // This start date exists\n\n if (thisRange.start) {\n // Use this definite start date if other start date is infinite\n if (!otherRange.start) {\n start = thisRange.start;\n } else {\n // Otherwise, use the earliest start date\n start = thisRange.start < otherRange.start ? thisRange.start : otherRange.start;\n } // Other start date exists\n\n } else if (otherRange.start) {\n // Use other definite start date as this one is infinite\n start = otherRange.start;\n } // Assign end date to this one if it is valid\n\n\n if (thisRange.end && (!start || thisRange.end >= start)) {\n end = thisRange.end;\n } // Assign end date to other one if it is valid and before this one\n\n\n if (otherRange.end && (!start || otherRange.end >= start)) {\n if (!end || otherRange.end < end) end = otherRange.end;\n } // Return calculated range\n\n\n return {\n start,\n end\n };\n }", "function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For any response name which appears in both provided field\n // maps, each field from the first field map must be compared to every field\n // in the second field map to find potential conflicts.\n for (var _i7 = 0, _Object$keys2 = Object.keys(fieldMap1); _i7 < _Object$keys2.length; _i7++) {\n var responseName = _Object$keys2[_i7];\n var fields2 = fieldMap2[responseName];\n\n if (fields2) {\n var fields1 = fieldMap1[responseName];\n\n for (var i = 0; i < fields1.length; i++) {\n for (var j = 0; j < fields2.length; j++) {\n var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, fields1[i], fields2[j]);\n\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n }\n} // Determines if there is a conflict between two particular fields, including", "function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For any response name which appears in both provided field\n // maps, each field from the first field map must be compared to every field\n // in the second field map to find potential conflicts.\n for (var _i7 = 0, _Object$keys2 = Object.keys(fieldMap1); _i7 < _Object$keys2.length; _i7++) {\n var responseName = _Object$keys2[_i7];\n var fields2 = fieldMap2[responseName];\n\n if (fields2) {\n var fields1 = fieldMap1[responseName];\n\n for (var i = 0; i < fields1.length; i++) {\n for (var j = 0; j < fields2.length; j++) {\n var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, fields1[i], fields2[j]);\n\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n }\n} // Determines if there is a conflict between two particular fields, including", "function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For any response name which appears in both provided field\n // maps, each field from the first field map must be compared to every field\n // in the second field map to find potential conflicts.\n for (var _i7 = 0, _Object$keys2 = Object.keys(fieldMap1); _i7 < _Object$keys2.length; _i7++) {\n var responseName = _Object$keys2[_i7];\n var fields2 = fieldMap2[responseName];\n\n if (fields2) {\n var fields1 = fieldMap1[responseName];\n\n for (var i = 0; i < fields1.length; i++) {\n for (var j = 0; j < fields2.length; j++) {\n var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, fields1[i], fields2[j]);\n\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n }\n} // Determines if there is a conflict between two particular fields, including", "function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For any response name which appears in both provided field\n // maps, each field from the first field map must be compared to every field\n // in the second field map to find potential conflicts.\n for (var _i7 = 0, _Object$keys2 = Object.keys(fieldMap1); _i7 < _Object$keys2.length; _i7++) {\n var responseName = _Object$keys2[_i7];\n var fields2 = fieldMap2[responseName];\n\n if (fields2) {\n var fields1 = fieldMap1[responseName];\n\n for (var i = 0; i < fields1.length; i++) {\n for (var j = 0; j < fields2.length; j++) {\n var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, fields1[i], fields2[j]);\n\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n }\n} // Determines if there is a conflict between two particular fields, including", "function OverlappingFieldsCanBeMerged(context) {\n\t var comparedSet = new PairSet();\n\n\t function findConflicts(fieldMap) {\n\t var conflicts = [];\n\t _Object$keys(fieldMap).forEach(function (responseName) {\n\t var fields = fieldMap[responseName];\n\t if (fields.length > 1) {\n\t for (var i = 0; i < fields.length; i++) {\n\t for (var j = i; j < fields.length; j++) {\n\t var conflict = findConflict(responseName, fields[i], fields[j]);\n\t if (conflict) {\n\t conflicts.push(conflict);\n\t }\n\t }\n\t }\n\t }\n\t });\n\t return conflicts;\n\t }\n\n\t function findConflict(responseName, field1, field2) {\n\t var _field1 = _slicedToArray(field1, 3);\n\n\t var parentType1 = _field1[0];\n\t var ast1 = _field1[1];\n\t var def1 = _field1[2];\n\n\t var _field2 = _slicedToArray(field2, 3);\n\n\t var parentType2 = _field2[0];\n\t var ast2 = _field2[1];\n\t var def2 = _field2[2];\n\n\t // Not a pair.\n\t if (ast1 === ast2) {\n\t return;\n\t }\n\n\t // If the statically known parent types could not possibly apply at the same\n\t // time, then it is safe to permit them to diverge as they will not present\n\t // any ambiguity by differing.\n\t // It is known that two parent types could never overlap if they are\n\t // different Object types. Interface or Union types might overlap - if not\n\t // in the current state of the schema, then perhaps in some future version,\n\t // thus may not safely diverge.\n\t if (parentType1 !== parentType2 && parentType1 instanceof _typeDefinition.GraphQLObjectType && parentType2 instanceof _typeDefinition.GraphQLObjectType) {\n\t return;\n\t }\n\n\t // Memoize, do not report the same issue twice.\n\t if (comparedSet.has(ast1, ast2)) {\n\t return;\n\t }\n\t comparedSet.add(ast1, ast2);\n\n\t var name1 = ast1.name.value;\n\t var name2 = ast2.name.value;\n\t if (name1 !== name2) {\n\t return [[responseName, name1 + ' and ' + name2 + ' are different fields'], [ast1], [ast2]];\n\t }\n\n\t var type1 = def1 && def1.type;\n\t var type2 = def2 && def2.type;\n\t if (type1 && type2 && !(0, _utilitiesTypeComparators.isEqualType)(type1, type2)) {\n\t return [[responseName, 'they return differing types ' + type1 + ' and ' + type2], [ast1], [ast2]];\n\t }\n\n\t if (!sameArguments(ast1.arguments || [], ast2.arguments || [])) {\n\t return [[responseName, 'they have differing arguments'], [ast1], [ast2]];\n\t }\n\n\t var selectionSet1 = ast1.selectionSet;\n\t var selectionSet2 = ast2.selectionSet;\n\t if (selectionSet1 && selectionSet2) {\n\t var visitedFragmentNames = {};\n\t var subfieldMap = collectFieldASTsAndDefs(context, (0, _typeDefinition.getNamedType)(type1), selectionSet1, visitedFragmentNames);\n\t subfieldMap = collectFieldASTsAndDefs(context, (0, _typeDefinition.getNamedType)(type2), selectionSet2, visitedFragmentNames, subfieldMap);\n\t var conflicts = findConflicts(subfieldMap);\n\t if (conflicts.length > 0) {\n\t return [[responseName, conflicts.map(function (_ref3) {\n\t var _ref32 = _slicedToArray(_ref3, 1);\n\n\t var reason = _ref32[0];\n\t return reason;\n\t })], conflicts.reduce(function (allFields, _ref4) {\n\t var _ref42 = _slicedToArray(_ref4, 2);\n\n\t var fields1 = _ref42[1];\n\t return allFields.concat(fields1);\n\t }, [ast1]), conflicts.reduce(function (allFields, _ref5) {\n\t var _ref52 = _slicedToArray(_ref5, 3);\n\n\t var fields2 = _ref52[2];\n\t return allFields.concat(fields2);\n\t }, [ast2])];\n\t }\n\t }\n\t }\n\n\t return {\n\t SelectionSet: {\n\t // Note: we validate on the reverse traversal so deeper conflicts will be\n\t // caught first, for clearer error messages.\n\t leave: function leave(selectionSet) {\n\t var fieldMap = collectFieldASTsAndDefs(context, context.getParentType(), selectionSet);\n\t var conflicts = findConflicts(fieldMap);\n\t conflicts.forEach(function (_ref6) {\n\t var _ref62 = _slicedToArray(_ref6, 3);\n\n\t var _ref62$0 = _slicedToArray(_ref62[0], 2);\n\n\t var responseName = _ref62$0[0];\n\t var reason = _ref62$0[1];\n\t var fields1 = _ref62[1];\n\t var fields2 = _ref62[2];\n\t return context.reportError(new _error.GraphQLError(fieldsConflictMessage(responseName, reason), fields1.concat(fields2)));\n\t });\n\t }\n\t }\n\t };\n\t}", "'updateAtendence'(atendenceInsert){\n let actualDay = moment().format(\"YYYY-MM-DD\");\n let thisDate = Dates.findOne({_id: atendenceInsert.date, date: {$lt: actualDay}});\n if(thisDate){\n let atendenceDates = Dates.find({date: {$lte: actualDay}, teamId: atendenceInsert.teamId}).fetch();\n atendenceDates = atendenceDates.map((date) => {\n return date._id;\n });\n let count = Atendence.find({date: {$in: atendenceDates}, player: atendenceInsert.player}).count();\n let dates = Dates.find({date: {$lt: actualDay, $gte: thisDate.date}, teamId: atendenceInsert.teamId}).fetch();\n dates = dates.map((date) => {\n let existAtendence = Atendence.findOne({date: date._id, player: atendenceInsert.player});\n if(existAtendence == undefined){\n Players.update({_id: atendenceInsert.player}, {$inc: {\"countAtend\": +1}});\n Atendence.insert({\"date\": date._id, \"player\": atendenceInsert.player, \"atend\": true, \"teamId\": atendenceInsert.teamId});\n count++;\n }\n });\n let player = Players.findOne({_id: atendenceInsert.player});\n let playerRelAt = (player.countAtend) / count * 100;\n Players.update({_id: atendenceInsert.player}, {$set: {\"playerRelAt\": playerRelAt}} );\n }\n }", "function updateCalendar(start, end) {\n log.info('updateCalendar')\n $('#schedule-calendar', scheduled.$el).before(scheduled.template.loadingTemplate());\n var fetch = fetchScheduledArticles(start, end);\n fetch.done(function (data) {\n $('.loading-template', scheduled.$el).remove();\n $('#schedule-calendar').fullCalendar('removeEvents');\n $('#schedule-calendar').fullCalendar('addEventSource', convertArticlesToCalendar(scheduled.scheduled));\n $('#schedule-calendar').fullCalendar('rerenderEvents');\n updatePageUrl();\n });\n }", "function makeBookingLater(idRoom, startDate, endDate) {\n let booking = new Booking(new Date(startDate), new Date(endDate));\n ajax(\"PUT\", \"/bookings?room=\" + idRoom, callbackMakeBookingLater, booking);\n}", "updateDateRange(startTime) {\n this.changeStateValue('timestamp', startTime.format('X'));\n }", "function mergeRange(ranges, newRangeStart, newRangeEnd) {\n let inRange = false;\n for (let i = 0; i < ranges.length; i++) {\n const range = ranges[i];\n if (!inRange) {\n if (newRangeEnd <= range[0]) {\n // Case 1: New range is before the search range\n ranges.splice(i, 0, [newRangeStart, newRangeEnd]);\n return ranges;\n }\n else if (newRangeEnd <= range[1]) {\n // Case 2: New range is either wholly contained within the\n // search range or overlaps with the front of it\n range[0] = Math.min(newRangeStart, range[0]);\n return ranges;\n }\n else if (newRangeStart < range[1]) {\n // Case 3: New range either wholly contains the search range\n // or overlaps with the end of it\n range[0] = Math.min(newRangeStart, range[0]);\n inRange = true;\n }\n else {\n // Case 4: New range starts after the search range\n continue;\n }\n }\n else {\n if (newRangeEnd <= range[0]) {\n // Case 5: New range extends from previous range but doesn't\n // reach the current one\n ranges[i - 1][1] = newRangeEnd;\n return ranges;\n }\n else if (newRangeEnd <= range[1]) {\n // Case 6: New range extends from prvious range into the\n // current range\n ranges[i - 1][1] = Math.max(newRangeEnd, range[1]);\n ranges.splice(i, 1);\n inRange = false;\n return ranges;\n }\n else {\n // Case 7: New range extends from previous range past the\n // end of the current range\n ranges.splice(i, 1);\n i--;\n }\n }\n }\n if (inRange) {\n // Case 8: New range extends past the last existing range\n ranges[ranges.length - 1][1] = newRangeEnd;\n }\n else {\n // Case 9: New range starts after the last existing range\n ranges.push([newRangeStart, newRangeEnd]);\n }\n return ranges;\n}", "conflicts() {\n this.log('conflicts');\n }", "function updateProjectAssignments( event ){\n event.preventDefault();\n var joining_date = $(this).closest('tr').find('.joining-date input:text').val();\n var relieving_date = $(this).closest('tr').find('.relieving-date input:text').val();\n var involvement = $(this).closest('tr').find('.involvement input:text').val();\n var params = {};\n params['joining_date'] = joining_date;\n params['relieving_date'] = relieving_date;\n params['involvement'] = involvement;\n params['_method'] = 'patch';\n var ajax_url = $(this).data('url');\n $.ajax({\n url: ajax_url,\n type: \"POST\",\n dataType: \"script\",\n data: params\n });\n}", "function SetImpDate(){\n var month=jQ('#DATE_S_MonthInput_Maintenance__bDate_S_Month').val(),\n day=jQ('#DATE_S_DayInput_Maintenance__bDate_S_Day').val(),\n year=jQ('#DATE_S_YearInput_Maintenance__bDate_S_Year').val(),\n beginning=jQ('#Maintenance__bWindow option:selected').text().match(/[0-9]*[ap]m/g)[0].replace(/([0-9]*)([ap]m)/,\"$1:00 $2\").toUpperCase(),\n end=jQ('#Maintenance__bWindow option:selected').text().match(/[0-9]*[ap]m/g)[1].replace(/([0-9]*)([ap]m)/,\"$1:00 $2\").toUpperCase();\n shift= (beginning.match(/PM/)&&end.match(/AM/)) ? 1 : 0;\n\n if (month&&day&&year) { //if dates are not set, we should not use them\n var to = new Date(year, (month-1), day); //month -1, because in JS monthes start from 0, and in FP - from 1\n to.setDate(to.getDate()+shift); //calculate month overlap\n if (jQ(\"#Maintenance__bDate table th:first\").text()=='Mon') {\n jQ(\"input[name='Implementation__bStart__bTime_datetime']\" ).val(month+'/'+day+'/'+year+' '+beginning);\n jQ(\"input[name='Implementation__bEnd__bTime_datetime']\" ).val((to.getMonth()+1)+'/'+to.getDate()+'/'+to.getFullYear()+' '+end);\n }\n else{\n jQ(\"input[name='Implementation__bStart__bTime_datetime']\" ).val(day+'/'+month+'/'+year+' '+beginning);\n jQ(\"input[name='Implementation__bEnd__bTime_datetime']\" ).val(to.getDate()+'/'+(to.getMonth()+1)+'/'+to.getFullYear()+' '+end);\n }\n }\n }", "function update_bookings_after_gantt_chart_update(){\n if (gon.user_active_bookings !== null){\n for(var i=0; i<gon.user_active_bookings.length; i++){\n for(var j=i+1; j<gon.user_active_bookings.length; j++){\n if (gon.user_active_bookings[i].listing_id === gon.user_active_bookings[j].listing_id){\n\n // If transaction id is the same, then the booking was updated via the gantt chart\n if (gon.user_active_bookings[i].transaction_id === gon.user_active_bookings[j].transaction_id){\n if (gon.user_active_bookings[i].update === true){\n // Take over attributes from gantt change & remove the object created\n // with the gantt change\n gon.user_active_bookings[j].end_on = gon.user_active_bookings[i].end_on;\n gon.user_active_bookings[j].start_on = gon.user_active_bookings[i].start_on;\n gon.user_active_bookings[j].description = gon.user_active_bookings[i].description;\n gon.user_active_bookings.splice(i, 1);\n }else{\n // Take over attributes from gantt change & remove the object created\n // with the gantt change\n gon.user_active_bookings[i].end_on = gon.user_active_bookings[j].end_on;\n gon.user_active_bookings[i].start_on = gon.user_active_bookings[j].start_on;\n gon.user_active_bookings[i].description = gon.user_active_bookings[j].description;\n gon.user_active_bookings.splice(j, 1);\n }\n }\n }\n }\n }\n\n // Set 'update' to false if there is a booking left which is an update.\n // This only happens if there was no booking there of this listing before\n for(var k=0; k<gon.user_active_bookings.length; k++){\n if (gon.user_active_bookings[k].update === true){\n gon.user_active_bookings[k].update = false;\n }\n }\n }\n }", "function updateSceneChallenges() {\n var serial_id = $('#serialId').val();\n var bystander = $('#byStander_id_update').val();\n var relatives = $('#relatives_id_update').val();\n var remarks = $('#remarks_id_update').val();\n var police_on_scene = $('#policeOnScene_id_update').val();\n var fire_on_scene = $('#fireOnScene_id_update').val();\n var action_name = $('#actionTaken_id_update').val();\n var offdate = $('#reportOnDistManagerDate_Id_update').val();\n var offdate1 = moment(offdate).format(\"YYYY-MM-DD\");\n var status_id = 2;\n if(remarks==null||remarks==\"\"){\n \tremarks=' ';\n }\n \n var objUpd =\n {\n serial_id: serial_id,\n bystander: bystander,\n relatives: relatives,\n remarks: remarks,\n police_on_scene: police_on_scene,\n fire_on_scene: fire_on_scene,\n action_name: action_name,\n offdate: offdate,\n status_id: status_id\n\n\n };\n \n if (police_on_scene === '0' || police_on_scene === null) {\n showNotificationError(\"Select Police On Scene\", \"policeOnScene_id_update\", \"error\");\n return;\n }\n else if (fire_on_scene === '0' || fire_on_scene === null) {\n showNotificationError(\"Select Fire On Scene\", \"fireOnScene_id_update\", \"error\");\n return;\n }\n\n else if (bystander === '0' || bystander === null) {\n showNotificationError(\"Select ByStander\", \"byStander_id_update\", \"error\");\n return;\n }\n else if (relatives === '0' || relatives === null) {\n showNotificationError(\"Select Relatives\", \"relatives_id_update\", \"error\");\n return;\n }\n \n else if (action_name === '0' || action_name === null) {\n showNotificationError(\"Select Action Taken\", \"actionTaken_id_update\", \"error\");\n return;\n }\n else if (offdate === '' || offdate === null) {\n showNotificationError(\"Select Report On Dist.Manager\", \"reportOnDistManagerDate_Id_update\", \"error\");\n return;\n }\n var strUrl2 = Service.updateScene;\n\n console.log('==== strUrl' + strUrl2);\n $.ajax({\n type: \"POST\",\n url: strUrl2,\n dataType: \"json\",\n data: JSON.stringify(objUpd),\n contentType: \"application/json\",\n async: false,\n crossDomain: true,\n success: function (data) {\n if (data !== null || data !== 0) {\n showNotificationError(\"Data Updated Successfully\", \"scene_challenges_update_id\", \"success\");\n window.setTimeout(function() {\n location.reload();\n }, 3000);\n }\n },\n error: function () {\n console.log(\"Error In case_ReOpen Not updating\");\n }\n });\n\n}", "function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragments, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For any response name which appears in both provided field\n // maps, each field from the first field map must be compared to every field\n // in the second field map to find potential conflicts.\n Object.keys(fieldMap1).forEach(function (responseName) {\n var fields2 = fieldMap2[responseName];\n if (fields2) {\n var fields1 = fieldMap1[responseName];\n for (var i = 0; i < fields1.length; i++) {\n for (var j = 0; j < fields2.length; j++) {\n var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragments, parentFieldsAreMutuallyExclusive, responseName, fields1[i], fields2[j]);\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n });\n}", "async function updateRealCurrentCalls(start_date, table, datefield) {\n return new Promise((resolve, reject) => {\n let querySQL = `\n SELECT\n callentry_id AS rcc_callentry_id\n ,callentry_agent_id AS rcc_callentry_agent_id\n\n ,DATE_FORMAT(callentry_datetime_end,'%Y-%m-%d %H:%i:%s') as rcc_callentry_datetime_end\n\n ,TIMEDIFF( NOW(), rcc_callentry_datetime_init) AS rcc_callentry_duration\n ,TIMESTAMPDIFF(second, rcc_callentry_datetime_init, now()) AS rcc_callentry_duration_sec\n\n\n ,rcc_date\n ,rcc_callentry_agent_id\n ,inv_agent_people_json\n ,inv_agent_operation_json\n ,inv_agent_time_json\n\n FROM\n RealCurrentCalls\n\n LEFT OUTER JOIN InvAgent\n ON rcc_callentry_agent_id = inv_agent_id\n\n LEFT OUTER JOIN MainCallEntry\n ON callentry_id = rcc_callentry_id\n\n WHERE\n callentry_id IS NOT NULL\n\n `;\n\n resolve(pool.destinyReports.query(querySQL));\n reject(`Error`);\n });\n}", "set range(range) {\n this.topDate = range.topDate;\n this.bottomDate = range.bottomDate;\n this.refresh();\n }", "function extendDateRange(from_date,duration,callback) {\n\tconsole.log('extend date range',from_date,duration);\n\tif (!from_date) return;\n\tif (dateInRange(from_date)) return;\n\t$('#myThinker').dialog('open');\n\tvar requestObj = {\n\t\tfrom_date:from_date\n\t};\n\tif (duration) requestObj['duration'] = duration;\n\tvar service = '/getDashboardData';\n\t$.ajax({\n\t\turl:service,\n\t\ttype:'GET',\n\t\tdataType:'json',\n\t\tdata:requestObj,\n\t\n\t\tsuccess:function(d) {\n\t\t\tif (d.success && d.success>0)\n\t\t\t{\t\t\t\t\t\t\n\t\t\t\t$('#myThinker').dialog('close');\n\t\t\t\tmergeTrackerOptions(d['trackerData']);\n\t\t\t\tmergeDashboardData(d['responses']);\n\t\t\t\tif (callback) callback();\n\t\t\t}\n\t\t},\n\t\t\n\t\terror:function(err)\n\t\t{\n\t\t\tconsole.log('error',err);\n\t\t\tupdateMsg($('.validateTips'),'Error changing date range');\n\t\t\tsetTimeout(function() {$('#myThinker').dialog('close');},2000);\n\t\t}\n\t});\t\t\t\n}", "function updateDatepicker(booked_dates){\n // If modifying the past is not allowed, then ensure this in the datepicker\n var start_date;\n if (!gon.pool_tool_preferences.pool_tool_modify_past){\n start_date = new Date(new Date().setHours(0,0,0,0));\n }\n\n window.ST.initializeDatePickerWithBookings('#datepicker', booked_dates, '#start-on', '#end-on', \"#booking-start-output\", \"#booking-end-output\", start_date);\n $('#datepicker').datepicker('update');\n }", "function setEndDate() {\n // get the `snapshot` of the references data\n date_end_ref.once('value', function(date) {\n date_end = date.val();\n evaluateNewScreens(projectId);\n });\n }", "function setDate(e){\n\t\tif($('#selected-accomodation-' + idNumber).val() == null){return;}\n\t\tvar id = prevFocus ? prevFocus.attr('id') : null;\n\t\tvar secondElementId;\n\t\tvar elementDate;\n\t\tvar dataSource = $('#year-calendar').data('calendar').getDataSource();\n\t\tvar isDateValid;\n\t\t\n\t if(~id.indexOf(\"start-date\")){\n\t \tsecondElementId = \"#end-date-\" + idNumber;\n\t \tsecondElementDate = new Date(changeDateFormat($(secondElementId).val()));\t\n\t \tisDateValid = validateSelectedDates(dataSource, e.date, secondElementDate);\t\n\t \tif ((isNaN(secondElementDate) || e.date < secondElementDate) && (isDateValid)){setSelectedDate(id, e);}\t\n\t }else if(~id.indexOf(\"end-date\")){\n\t \tsecondElementId = \"#start-date-\" + idNumber;\n\t \tsecondElementDate = new Date(changeDateFormat($(secondElementId).val()));\n\t \tisDateValid = validateSelectedDates(dataSource, secondElementDate, e.date);\n\t \tif (!(isNaN(secondElementDate)) && (e.date >= secondElementDate) && (isDateValid)){\tsetSelectedDate(id, e);}\t\n\t }else{\n\t \treturn;\n\t }\n\t}", "function completeInterval(x, end) {\n var lastElement = x[x.length - 1];\n if (typeof lastElement[1] === 'undefined') {\n lastElement.push(moment(end).format('YYYY-MM-DD'));\n }\n if (lastElement[1] !== end) {\n var lastSet = [];\n lastSet.push(moment(lastElement[1]).add(1, 'day').format('YYYY-MM-DD'));\n lastSet.push(moment(end).format('YYYY-MM-DD'));\n x.push(lastSet);\n }\n}", "updateRange(start, end) {\n this.range.start = start\n this.range.end = end\n this.range.paddingTop = this.getPaddingTop()\n this.range.paddingBottom = this.getPaddingBottom()\n this.callUpdate(this.getRange())\n }", "function resolveConflicts(conflicts, node, $kids, $oldkids, numAddedNodes) {\n // the distance between the first conflicting node and the last\n var distance = conflicts.length - 1;\n // prevents same conflict being resolved twice consider when two nodes switch places.\n // only one should be given a mutation event (note -~ is used as a math.ceil shorthand)\n var counter = -~((distance - numAddedNodes) / 2);\n var $cur;\n var oldstruct;\n var conflict;\n while ((conflict = conflicts.pop())) {\n $cur = $kids[conflict.i];\n oldstruct = $oldkids[conflict.j];\n\n // attempt to determine if there was node rearrangement... won't gaurentee all matches\n // also handles case where added/removed nodes cause nodes to be identified as conflicts\n if (config.kids && counter && Math.abs(conflict.i - conflict.j) >= distance) {\n mutations.push(MutationRecord({\n type: \"childList\",\n target: node,\n addedNodes: [$cur],\n removedNodes: [$cur],\n // haha don't rely on this please\n nextSibling: $cur.nextSibling,\n previousSibling: $cur.previousSibling\n }));\n counter--; // found conflict\n }\n\n // Alright we found the resorted nodes now check for other types of mutations\n if (config.attr && oldstruct.attr) findAttributeMutations(mutations, $cur, oldstruct.attr, config.afilter);\n if (config.charData && $cur.nodeType === 3 && $cur.nodeValue !== oldstruct.charData) {\n mutations.push(MutationRecord({\n type: \"characterData\",\n target: $cur,\n oldValue: oldstruct.charData\n }));\n }\n // now look @ subtree\n if (config.descendents) findMutations($cur, oldstruct);\n }\n }", "function setDates() {\n var endDate, dat_endDate;\n if ((document.forms[0].startDate) && (document.forms[0].endDate)) {\n startDate=document.forms[0].startDate.value;\n endDate=document.forms[0].endDate.value;\n if (startDate != '') {\n if (startDate > endDate) {\n document.forms[0].endDate_dummy.value=document.forms[0].startDate_dummy.value;\n document.forms[0].endDate.value=document.forms[0].startDate.value;\n }\n\t }\n }\n}", "function approach_range(graph) {\n\tgraph.updateOptions({dateWindow: desired_range});\n}", "setReservation(startDateObj, endDateObj) {\n\t\tvar startSection = this.convertToSection(startDateObj);\n\t\tvar endSection = this.convertToSection(endDateObj);\n if(!this.checkReservation(startDateObj, endDateObj)) {\n return false;\n }\n //Increment reservation number for each time slot\n for(var i = startSection; i < endSection; i++) {\n this.reservedTimes[i] += 1;\n }\n return true;\n\t}", "function updateSpreadsheetChangeCalendar(event) {\n \n var linesToRemove = [];\n \n // For each row in the master spreadsheet\n // Counting down so lines to remove loops deletes later lines first\n for (var i = masterValues.length - 1; i > 0; i--) {\n \n // Initialize writeIn\n var writeIn;\n \n // If the required fields are filled\n if (masterValues[i][0] !== '' && masterValues[i][1] !== '' && masterValues[i][2] !== '') {\n \n var keepLine = i;\n \n // If there isn't someone signed up for the entry\n if (masterValues[i][5] == '') {\n // Make new creation write in object\n writeIn = new CreationWriteIn(i);\n } \n \n // Otherwise (someone signed up for the entry)\n else {\n // Make new signup write-in object\n writeIn = new SignupWriteIn(i);\n }\n \n // Check for conflicts\n getCreationConflicts(writeIn, i);\n \n // If there is a conflict\n // Add the lower priority line to a list of ones to remove if it doesn't show up already\n if (writeIn.status == \"Conflict\") {\n var removeLine = getLowerLinePriority(i, creationConflictLine);\n if (removeLine == i) {\n keepLine = creationConflictLine;\n linesToRemove.push(removeLine);\n }\n }\n \n // Continue if the current line is still being kept\n if (keepLine == i) {\n \n // If there is an ID (event already created)\n if (groupMealCalendar.getEventById(masterValues[i][11]) !== null) {\n \n Logger.log(\"ID Detected\");\n \n // Set the event ID and event\n writeIn.eventID = masterValues[i][11];\n var event = groupMealCalendar.getEventById(writeIn.eventID);\n \n // Reload the event time to the calendar\n writeIn.endTime = new Date(writeIn.date);\n writeIn.endTime.setMinutes(writeIn.date.getMinutes() + groupMealDurationMin);\n if (event.getStartTime().getTime() !== writeIn.date.getTime()) {\n event.setTime(writeIn.date, writeIn.endTime);\n }\n \n // Get date string to put in form prefill URL\n var dateStr = '';\n if ((writeIn.date.getMonth() + 1) < 10) {\n dateStr += '0';\n }\n dateStr += (writeIn.date.getMonth() + 1) + '/';\n if (writeIn.date.getDate() < 10) {\n dateStr += '0';\n }\n dateStr += writeIn.date.getDate() + '/' + writeIn.date.getYear();\n var tempStr = dateStr + ' ' + writeIn.meal + '. ' + writeIn.peopToFeed + ' people. ' + writeIn.appDelivTime;\n var str = tempStr.split(' ').join('+');\n \n // If nobody signed up\n // Set color to red if not already\n // Set description to open description if not already\n if (masterValues[i][5] == '') {\n if (event.getColor() !== \"11\")\n event.setColor(\"11\"); // Red;\n var description = 'Click link to sign up to bring ' + writeIn.meal.toLowerCase() + ' to feed ' + \n writeIn.peopToFeed + '\\n_____?usp=sf_link&entry._____=' + str + '\\n\\n' + writeIn.details;\n if (event.getDescription() !== description)\n event.setDescription(description);\n }\n \n // Otherwise (someone is signed up)\n // Update the calendar as if a signup just occurred\n else {\n updateCalendarSignup(writeIn);\n }\n \n } \n \n // Otherwise (no ID/ event not created)\n // Update the calendar\n // Add the event ID to the spreadsheet\n else {\n \n // If nobody signed up\n // Update the calendar as if a new event was created\n // Add the new event ID to the spreadsheet\n if (masterValues[i][5] == '') {\n updateCalendarCreation(writeIn);\n masterSheet.getRange(i + 1, 12).setValue(writeIn.eventID);\n masterRange = masterSheet.getDataRange();\n masterValues = masterRange.getValues();\n }\n \n // Otherwise (someone was signed up with no calendar event)\n else {\n \n // Create new end time\n writeIn.endTime = new Date(writeIn.date);\n writeIn.endTime.setMinutes(writeIn.date.getMinutes() + groupMealDurationMin);\n \n // Create description for event\n var description = 'Estimated people: ' + writeIn.peopToFeed + \n '\\nGraciously Provided By: ' + writeIn.name + \n '\\nContact Info: ' + writeIn.email + ', ' + writeIn.phone + \n '\\Affiliation: ' + writeIn.student +\n '\\nPlanned Food: ' + writeIn.foodDescrip + \n '\\nAllergen Alerts: ' + writeIn.allergy + \n '\\n\\n' + writeIn.details;\n \n // Add event to Google Calendar API\n var event = writeIn.calendar.createEvent(\n 'Group ' + writeIn.meal,\n writeIn.date,\n writeIn.endTime,\n {'description': description}\n );\n \n // Get event ID\n writeIn.eventID = event.getId();\n \n // Set event ID in sheet\n masterSheet.getRange(i + 1, 12).setValue(writeIn.eventID);\n masterRange = masterSheet.getDataRange();\n masterValues = masterRange.getValues();\n \n // Set event color to pale red\n event.setColor(\"4\"); // Pale Red\n }\n \n }\n \n // If someone signed up but there is no trigger ID\n // Create trigger for the signup\n // Set the spreadsheet trigger ID in the right spot\n if (masterValues[i][5] !== '' && masterValues[i][12] == '') {\n var triggerID = confirmSignup(writeIn);\n masterSheet.getRange(i + 1, 13).setValue(triggerID);\n masterRange = masterSheet.getDataRange();\n masterValues = masterRange.getValues();\n }\n \n }\n \n }\n \n // Otherwise (required fields aren't filled)\n // Add the line to be removed\n else {\n linesToRemove.push(i);\n }\n \n }\n \n // Sort linesToRemove in decreasing order in case something went wrong before\n linesToRemove.sort(function(a, b){return b - a});\n \n // Delete the lines to remove\n for (var i = 0; i < linesToRemove.length; i++) {\n masterSheet.deleteRow(linesToRemove[i]);\n }\n \n}", "function OverlappingFieldsCanBeMerged(context) {\n var comparedSet = new PairSet();\n\n function findConflicts(parentFieldsAreMutuallyExclusive, fieldMap) {\n var conflicts = [];\n (0, _keys2.default)(fieldMap).forEach(function (responseName) {\n var fields = fieldMap[responseName];\n if (fields.length > 1) {\n for (var i = 0; i < fields.length; i++) {\n for (var j = i; j < fields.length; j++) {\n var conflict = findConflict(parentFieldsAreMutuallyExclusive, responseName, fields[i], fields[j]);\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n });\n return conflicts;\n }\n\n function findConflict(parentFieldsAreMutuallyExclusive, responseName, field1, field2) {\n var _field = (0, _slicedToArray3.default)(field1, 3);\n\n var parentType1 = _field[0];\n var ast1 = _field[1];\n var def1 = _field[2];\n\n var _field2 = (0, _slicedToArray3.default)(field2, 3);\n\n var parentType2 = _field2[0];\n var ast2 = _field2[1];\n var def2 = _field2[2];\n\n // Not a pair.\n\n if (ast1 === ast2) {\n return;\n }\n\n // Memoize, do not report the same issue twice.\n // Note: Two overlapping ASTs could be encountered both when\n // `parentFieldsAreMutuallyExclusive` is true and is false, which could\n // produce different results (when `true` being a subset of `false`).\n // However we do not need to include this piece of information when\n // memoizing since this rule visits leaf fields before their parent fields,\n // ensuring that `parentFieldsAreMutuallyExclusive` is `false` the first\n // time two overlapping fields are encountered, ensuring that the full\n // set of validation rules are always checked when necessary.\n if (comparedSet.has(ast1, ast2)) {\n return;\n }\n comparedSet.add(ast1, ast2);\n\n // The return type for each field.\n var type1 = def1 && def1.type;\n var type2 = def2 && def2.type;\n\n // If it is known that two fields could not possibly apply at the same\n // time, due to the parent types, then it is safe to permit them to diverge\n // in aliased field or arguments used as they will not present any ambiguity\n // by differing.\n // It is known that two parent types could never overlap if they are\n // different Object types. Interface or Union types might overlap - if not\n // in the current state of the schema, then perhaps in some future version,\n // thus may not safely diverge.\n var fieldsAreMutuallyExclusive = parentFieldsAreMutuallyExclusive || parentType1 !== parentType2 && parentType1 instanceof _definition.GraphQLObjectType && parentType2 instanceof _definition.GraphQLObjectType;\n\n if (!fieldsAreMutuallyExclusive) {\n // Two aliases must refer to the same field.\n var name1 = ast1.name.value;\n var name2 = ast2.name.value;\n if (name1 !== name2) {\n return [[responseName, name1 + ' and ' + name2 + ' are different fields'], [ast1], [ast2]];\n }\n\n // Two field calls must have the same arguments.\n if (!sameArguments(ast1.arguments || [], ast2.arguments || [])) {\n return [[responseName, 'they have differing arguments'], [ast1], [ast2]];\n }\n }\n\n if (type1 && type2 && doTypesConflict(type1, type2)) {\n return [[responseName, 'they return conflicting types ' + type1 + ' and ' + type2], [ast1], [ast2]];\n }\n\n var subfieldMap = getSubfieldMap(ast1, type1, ast2, type2);\n if (subfieldMap) {\n var conflicts = findConflicts(fieldsAreMutuallyExclusive, subfieldMap);\n return subfieldConflicts(conflicts, responseName, ast1, ast2);\n }\n }\n\n function getSubfieldMap(ast1, type1, ast2, type2) {\n var selectionSet1 = ast1.selectionSet;\n var selectionSet2 = ast2.selectionSet;\n if (selectionSet1 && selectionSet2) {\n var visitedFragmentNames = {};\n var subfieldMap = collectFieldASTsAndDefs(context, (0, _definition.getNamedType)(type1), selectionSet1, visitedFragmentNames);\n subfieldMap = collectFieldASTsAndDefs(context, (0, _definition.getNamedType)(type2), selectionSet2, visitedFragmentNames, subfieldMap);\n return subfieldMap;\n }\n }\n\n function subfieldConflicts(conflicts, responseName, ast1, ast2) {\n if (conflicts.length > 0) {\n return [[responseName, conflicts.map(function (_ref3) {\n var _ref4 = (0, _slicedToArray3.default)(_ref3, 1);\n\n var reason = _ref4[0];\n return reason;\n })], conflicts.reduce(function (allFields, _ref5) {\n var _ref6 = (0, _slicedToArray3.default)(_ref5, 2);\n\n var fields1 = _ref6[1];\n return allFields.concat(fields1);\n }, [ast1]), conflicts.reduce(function (allFields, _ref7) {\n var _ref8 = (0, _slicedToArray3.default)(_ref7, 3);\n\n var fields2 = _ref8[2];\n return allFields.concat(fields2);\n }, [ast2])];\n }\n }\n\n return {\n SelectionSet: {\n // Note: we validate on the reverse traversal so deeper conflicts will be\n // caught first, for correct calculation of mutual exclusivity and for\n // clearer error messages.\n\n leave: function leave(selectionSet) {\n var fieldMap = collectFieldASTsAndDefs(context, context.getParentType(), selectionSet);\n var conflicts = findConflicts(false, fieldMap);\n conflicts.forEach(function (_ref9) {\n var _ref10 = (0, _slicedToArray3.default)(_ref9, 3);\n\n var _ref10$ = (0, _slicedToArray3.default)(_ref10[0], 2);\n\n var responseName = _ref10$[0];\n var reason = _ref10$[1];\n var fields1 = _ref10[1];\n var fields2 = _ref10[2];\n return context.reportError(new _error.GraphQLError(fieldsConflictMessage(responseName, reason), fields1.concat(fields2)));\n });\n }\n }\n };\n}", "function SyncEvent() {\n var ds=new Date(\"2015-10-01\");\n ds=ds.toISOString();\n var de=new Date(\"2015-12-31\");\n de=de.toISOString();\n gapi.client.load('calendar', 'v3', function() { \n var req = {\n 'calendarId': '[email protected]',\n \"start\": {\n \"dateTime\": de\n },\n \"end\": {\n \"dateTime\": ds //startDateMin.toISOString()\n }\n };\n var request = gapi.client.calendar.events.list(req);\n request.execute(function(resp) {\n\n for(var i=0; i<resp.items.length; i++){\n \n\n var postdata={\n \"description\" : resp.items[i].description,\n \"user_id\" : \"5623a9cbc99b1b623b810c8a\",\n \"date_end\" : Date(resp.items[i].end),\n \"date_start\" : Date(resp.items[i].start),\n \"place\" : resp.items[i].location,\n \"ispublic\" : true\n }; \n $.ajax({\n type: \"POST\",\n data: postdata,\n dataType: \"json\",\n url: url+\"/Event/\",\n success: function (data, textStatus, jqXHR) {\n console.log(data); \n },\n beforeSend: function (xhr) {\n },\n error: function (errorMessage) {\n alert(\"there is something wrong connecting to the server\");\n console.log(errorMessage);\n }\n });\n } \n });\n });\n }", "function dateRangeCalculator(){\n\n\t//start date\n\n\t//end date\n\n\t//Api call request that reloads page/section based off of time span requested OR trimming original data object/array based off of new specified date range \n\n\n}", "function updateCommitsChanges(timeSpan) {\n commitsChangeUpdate(timeSpan, (achievementsToUpdate) => {\n achievementsToUpdate.forEach(achievement => {\n MongoClient.connect(url, (errorDatabase, db) => {\n assert.equal(null, errorDatabase);\n\n db.collection('Achievement').updateOne(\n { _id: achievement._id },\n { $set: { daysInRow: achievement.daysInRow, lastUpdated: achievement.lastUpdated } });\n db.close();\n });\n });\n })\n}", "function resolveConflicts(conflicts, node, $kids, $oldkids, numAddedNodes) {\n // the distance between the first conflicting node and the last\n var distance = conflicts.length - 1,\n // prevents same conflict being resolved twice consider when two nodes switch places.\n // only one should be given a mutation event (note -~ is used as a math.ceil shorthand)\n counter = -~((distance - numAddedNodes) / 2), $cur, oldstruct, conflict;\n while (conflict = conflicts.pop()) {\n $cur = $kids[conflict.i];\n oldstruct = $oldkids[conflict.j];\n // attempt to determine if there was node rearrangement... won't gaurentee all matches\n // also handles case where added/removed nodes cause nodes to be identified as conflicts\n if (config.kids && counter && Math.abs(conflict.i - conflict.j) >= distance) {\n mutations.push(MutationRecord({\n type: 'childList', target: node, addedNodes: [$cur], removedNodes: [$cur],\n // haha don't rely on this please\n nextSibling: $cur.nextSibling, previousSibling: $cur.previousSibling\n }));\n counter--; // found conflict\n }\n // Alright we found the resorted nodes now check for other types of mutations\n if (config.attr && oldstruct.attr) findAttributeMutations(mutations, $cur, oldstruct.attr, config.afilter);\n if (config.charData && $cur.nodeType === 3 && $cur.nodeValue !== oldstruct.charData)\n mutations.push(MutationRecord({type: 'characterData', target: $cur}));\n // now look @ subtree\n if (config.descendents) findMutations($cur, oldstruct);\n }\n }", "_update(schedule_startdate, schedule_enddate, schedule_day, schedule_starttime,\n schedule_length, schedule_onlength, schedule_offlength) {\n return new Promise(function(resolve, reject) {\n // Update local object values\n this.startDate = schedule_startdate;\n this.endDate = schedule_enddate;\n this.days = schedule_day;\n this.startTime = schedule_starttime;\n this.length = schedule_length;\n this.onLength = schedule_onlength;\n this.offLength = schedule_offlength;\n\n // Delete all the scheduleDays and remove timeObjects\n var promiseArray = [];\n for (var i = 0; i < this.scheduleDays.length; i++) {\n var daySchedule = this.scheduleDays[i];\n promiseArray.push(daySchedule.destory());\n }\n // Delete the class object\n daySchedule = [];\n // Rebuild the scedule days\n this._buildScheduleDays();\n\n\n Promise.all(promiseArray).then(function() {\n // Update the DB to reflect the new local vales\n var query = \"UPDATE schedule SET startdate=?, enddate=?, freq=?, starttime=?, length=?, onlength=?, offlength=? WHERE id=?\";\n var values = [this.startDate, this.endDate, 'del', this.startTime, this.length, this.onLength, this.offLength, this.id];\n console.log(values);\n\n this.connectionPool.query(query, values, function(err, rows, fields) {\n if (err) {\n console.log(err);\n reject()\n } else {\n console.log(rows);\n resolve()\n }\n\n }.bind(this));\n }.bind(this))\n }.bind(this));\n\n\n }", "function isConflict(adtarr, bdtarr) {\n for (var i = 0; i < adtarr.length; i++) {\n var current_day = adtarr[i][0];\n var current_times = adtarr[i][1];\n for (var j = 0; j < bdtarr.length; j++) {\n var next_day = bdtarr[j][0];\n var next_times = bdtarr[j][1];\n if (next_day == current_day) {\n if (current_times[0] < next_times[1] && current_times[1] > next_times[0]) {\n return true;\n }\n }\n }\n }\n return false;\n}", "function DateChangedStart() {\n var perStart = $(\"#dpfrom\").datepicker(\"getDate\");\n var perEnd = $(\"#dpto\").datepicker(\"getDate\");\n \n if (perStart > perEnd) {\n $('#dpto').datepicker('setDate', perStart);\n }\n GetInvoicesForPeriod();\n}", "function constrainDate(date, range) {\n\tdate = date.clone();\n\n\tif (range.start) {\n\t\tdate = maxMoment(date, range.start);\n\t}\n\n\tif (range.end && date >= range.end) {\n\t\tdate = range.end.clone().subtract(1);\n\t}\n\n\treturn date;\n}", "function constrainDate(date, range) {\n\tdate = date.clone();\n\n\tif (range.start) {\n\t\tdate = maxMoment(date, range.start);\n\t}\n\n\tif (range.end && date >= range.end) {\n\t\tdate = range.end.clone().subtract(1);\n\t}\n\n\treturn date;\n}", "function constrainDate(date, range) {\n\tdate = date.clone();\n\n\tif (range.start) {\n\t\tdate = maxMoment(date, range.start);\n\t}\n\n\tif (range.end && date >= range.end) {\n\t\tdate = range.end.clone().subtract(1);\n\t}\n\n\treturn date;\n}", "checkChronology() {\r\n let chronologyError;\r\n\r\n // Ensure that all 4 fields are filled in\r\n if (\r\n this.state.monthStart &&\r\n this.state.monthEnd &&\r\n this.state.yearStart &&\r\n this.state.yearEnd\r\n ) {\r\n const { monthStart, monthEnd, yearStart, yearEnd } = this.state;\r\n\r\n // Turn the input into date objects for easy comparison\r\n let startDate = new Date(yearStart, monthStart - 1);\r\n let endDate = new Date(yearEnd, monthEnd - 1);\r\n\r\n // The entry value for daterange must be sent to the server as an array of two strings\r\n // The format must be an ISO 8601 Date format.\r\n //Because we are only asking for month/year, the last digit is a placeholder of '01'\r\n let payload = [\r\n `${yearStart}-${monthStart}-01`,\r\n `${yearEnd}-${monthEnd}-01`,\r\n ];\r\n\r\n if (startDate > endDate) {\r\n chronologyError = true;\r\n } else {\r\n chronologyError = false;\r\n this.props.onChange([this.props.question.id, payload]);\r\n }\r\n\r\n this.setState({\r\n endRangeErr: chronologyError,\r\n });\r\n }\r\n }" ]
[ "0.57612413", "0.5690803", "0.54826987", "0.5404315", "0.5310068", "0.52800864", "0.5115271", "0.5092457", "0.5092406", "0.50859", "0.49811685", "0.4977782", "0.49751657", "0.49723938", "0.49567866", "0.49567866", "0.49567866", "0.49567866", "0.4950253", "0.49229136", "0.48997837", "0.48668242", "0.48556128", "0.48341763", "0.48152515", "0.4809986", "0.47985488", "0.47909662", "0.47857955", "0.47760373", "0.476932", "0.47686577", "0.4765014", "0.47594893", "0.47516143", "0.47428438", "0.47360015", "0.47350904", "0.4680685", "0.46754113", "0.46413362", "0.46413285", "0.46337837", "0.463285", "0.46324453", "0.4620863", "0.46122932", "0.46122932", "0.46019644", "0.4586907", "0.45836493", "0.45827356", "0.45682207", "0.45662266", "0.4565091", "0.4564284", "0.45449284", "0.45371565", "0.45371565", "0.4532095", "0.4532095", "0.4532095", "0.4532095", "0.45264968", "0.4516239", "0.45124322", "0.45045128", "0.44825372", "0.44578394", "0.44527578", "0.44395757", "0.44298437", "0.44294962", "0.44269395", "0.4423075", "0.44193038", "0.44158295", "0.44068775", "0.43936107", "0.4388348", "0.43811506", "0.43697128", "0.43668294", "0.43629682", "0.4362664", "0.4360913", "0.43495095", "0.43445438", "0.43419793", "0.433245", "0.43145365", "0.43104368", "0.43102825", "0.43060663", "0.43029413", "0.42954382", "0.42942336", "0.42942336", "0.42942336", "0.429117" ]
0.5420406
3
Draws the unpopulated timeline on the timeline canvas
function drawTimeline(slider_start, slider_end){ /* Clear the context */ timeline_context.clearRect(0,0, timeline_canvas.width, timeline_canvas.height); timeline_context.fillStyle = "#FFFBF4"; timeline_context.fillRect(0,0,timeline_context.width, timeline_context.height); /* Timeline highlight */ timeline_context.fillStyle = "rgba(240, 150, 150, .1);" timeline_context.fillRect(slider_start,0, slider_end-slider_start, 70); /* Timeline axis */ timeline_context.fillStyle = "#777"; timeline_context.font = "bold 12pt Helvetica" timeline_context.fillText("1816",0,95); timeline_context.fillText("1992", 555, 95); /* Timeline line */ timeline_context.fillStyle = "#EEE"; timeline_context.strokeStyle = "#777"; timeline_context.lineWidth = 1; timeline_context.fillRect(10, 70, 580, 5); timeline_context.strokeRect(10, 70, 580, 5); /* Timeline data */ if(disputes_per_year !== undefined){ timeline_context.fillStyle = "rgba(240, 150, 150, 1);" var bar_width = yearsTotimelinePixels(1); var bar_inc = 65/max_disputes_in_year; for(var year in disputes_per_year){ if(disputes_per_year[year]>0){ timeline_context.fillRect( yearTotimelinePixels(parseInt(year)), 70-(bar_inc*disputes_per_year[year]), bar_width, bar_inc*disputes_per_year[year]); } } } /* Timeline sliders */ timeline_context.fillStyle = "#866"; timeline_context.arc(slider_start, 70, 10, 0, 2*Math.PI, false); timeline_context.fill(); timeline_context.fillStyle = "#866"; timeline_context.arc(slider_end, 70, 10, 0, 2*Math.PI, false); timeline_context.fill(); /* Timeline vertical bar */ timeline_context.strokeStyle = "#FAA"; timeline_context.beginPath(); timeline_context.moveTo(slider_start, 0); timeline_context.lineTo(slider_start, 60); timeline_context.stroke(); timeline_context.closePath(); timeline_context.beginPath(); timeline_context.moveTo(slider_end, 0); timeline_context.lineTo(slider_end, 60); timeline_context.stroke(); timeline_context.closePath(); timeline_context.fillStyle = "#777"; timeline_context.font = "bold 10pt Helvetica" timeline_context.fillText("" + timelinePixelToYear(slider_start), slider_start, 10); timeline_context.fillText("" + timelinePixelToYear(slider_end), slider_end-30, 10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onInitialDrawComplete() {\n var date = new Date();\n var year = date.getFullYear();\n var month = date.getMonth();\n var nextMonth = month == 11 ? 0 : month + 1;\n var nextYear = month == 11 ? year + 1 : year;\n var day = 1;\n\n this.timeline.setWindow(\n new Date(year, month, day),\n new Date(nextYear, nextMonth, day),\n { animation: false }\n );\n }", "function appendTimeline()\n{\n $(\"#timeline-container\").append(\n $(\"<div>\", {\n id: \"timeline\"\n })\n );\n setTimeline();\n d3.select(\"#timeline\").insert(\"svg\")\n .attr(\"height\", 3000)\n .attr(\"width\", globals.baseTimelineWidth);\n drawBlankTimeline();\n}", "function drawTimeline(player, nr) {\n //tömmer vyn för timeline innan den målas om\n $(`#timelinecontainer${nr}`).empty();\n $(`#timelinecontainer${nr}`).css('background-color', 'white');\n let height = heightCalculation(player.timeLine, player.tempList);\n let timeLineSorted = player.timeLine.sort();\n if (player.tempList.length < 1) {\n for (var i = 0; i < timeLineSorted.length; i++) {\n $(`#timelinecontainer${nr}`).append(`<div class=\\\"timelineblock\\\" style=\\\"height: ${height}%\\\"> <div class=\\\"timelineline\\\" style=\"background-color:${player.color}\"></div> </div> <div class=\\\"yearblock\\\" >${timeLineSorted[i]}</div>`);\n\n }\n }\n else {\n \n let tempListSorted = player.tempList.sort();\n let iterations = player.timeLine.length + player.tempList.length;\n let j = 0;\n let k = 0;\n for (var i = 0; i < iterations; i++) {\n if (timeLineSorted[j] < tempListSorted[k] || tempListSorted[k] == null && timeLineSorted != null) {\n $(`#timelinecontainer${nr}`).append(`<div class=\\\"timelineblock\\\" style=\\\"height: ${height}%\\\"> <div class=\\\"timelineline\\\" style=\"background-color:${player.color}\"></div> </div> <div class=\\\"yearblock\\\" >${timeLineSorted[j]}</div>`);\n j++;\n }\n else {\n $(`#timelinecontainer${nr}`).append(`<div class=\\\"timelineblock\\\" style=\\\"height: ${height}%\\\"> <div class=\\\"timelineline\\\" style=\"background-color:${player.color}\"></div> </div> <div class=\\\"yearblock\\\" style=\\\"opacity: 0.5\\\">${tempListSorted[k]}</div>`);\n k++;\n }\n }\n }\n $(`#timelinecontainer${nr}`).append(`<div class=\\\"timelineblock\\\" style=\\\"height: ${height}%\\\"> <div class=\\\"timelineline\\\" style=\"background-color:${player.color}\"></div> </div> `);\n}", "function drawTimeline(){\n\t\n\tvar color;\n\n\tfor(var i=0; i<timeline.length; i++){\n\t\tvar newPar = document.createElement(\"p\");\n\n\t\tif(timeline[i].name == \"Economic Downturn\"){\n\t\t\tcolor = \"red\";\n\t\t}else if(timeline[i].name == \"Economic Boom\"){\n\t\t\tcolor = \"green\";\n\t\t}\n\n\t\tvar text = timeline[i].year + \": \" + timeline[i].name + \" occured in \" + timeline[i].to + \".\";\n\n\t\tvar textNode = document.createTextNode(text);\n\t\tnewPar.appendChild(textNode);\n\t\tnewPar.className += \"mes \" + color;\n\t\tdocument.getElementById(\"events\").appendChild(newPar);\n\t\tscrollEvents();\n\t}\n}", "function update_timeline(once) {\r\n if (once == undefined) once = false;\r\n determine_now();\r\n tl_update_data();\r\n \r\n // Get context\r\n var g = tl.getContext(\"2d\");\r\n g.clearRect(0,0,TIMELINE_SIZES_WIDTH,TIMELINE_SIZES_FULL_HEIGHT);\r\n g.save();\r\n \r\n // Draw bar\r\n g.translate(TIMELINE_SIZES_WIDTH - 9.5, TIMELINE_SIZES_HISTORY * TIMELINE_SIZES_HEIGHT + .5);\r\n \r\n g.strokeStyle = \"rgb(0,0,0)\";\r\n g.beginPath();\r\n g.moveTo(0,-TIMELINE_SIZES_HISTORY * TIMELINE_SIZES_HEIGHT);\r\n g.lineTo(0, TIMELINE_SIZES_FUTURE * TIMELINE_SIZES_HEIGHT);\r\n g.stroke();\r\n for (var i=-TIMELINE_SIZES_HISTORY - tl_scroll_offset; i<=TIMELINE_SIZES_FUTURE - tl_scroll_offset; i+=1) {\r\n g.beginPath();\r\n l = -2;\r\n ll = 0;\r\n if (i%5 == 0) l-=2;\r\n if (i%15 == 0) l-=2;\r\n if ((i + tl_t_time.getMinutes())%60 == 0) ll+=8;\r\n g.moveTo(l, tl_warp(i + tl_scroll_offset));\r\n g.lineTo(ll, tl_warp(i + tl_scroll_offset)); \r\n g.stroke();\r\n }\r\n\r\n // Draw times\r\n g.mozTextStyle = \"8pt Monospace\";\r\n function round15(i){ return Math.floor(i/15)*15;}\r\n function drawtime(i, t) {\r\n h = t.getHours()+\"\";\r\n m = t.getMinutes()+\"\";\r\n if (m.length==1) m = \"0\" + m;\r\n x = h+\":\"+m;\r\n\r\n g.save();\r\n g.translate(-g.mozMeasureText(x) - 10, 4 + tl_warp(i + tl_scroll_offset));\r\n g.mozDrawText(x); \r\n g.restore(); \r\n }\r\n for (var i=round15(-TIMELINE_SIZES_HISTORY - tl_scroll_offset);\r\n i <= round15(TIMELINE_SIZES_FUTURE - tl_scroll_offset); i+=15) {\r\n t = new Date(tl_t_time);\r\n t.setMinutes(t.getMinutes() + i);\r\n drawtime(i, t);\r\n }\r\n\r\n // Draw current time\r\n diff = (tl_c_time.getTime() - tl_t_time.getTime()) / 1000 / 60;\r\n if (diff+tl_scroll_offset >= -TIMELINE_SIZES_HISTORY && diff+tl_scroll_offset <= TIMELINE_SIZES_FUTURE){\r\n y = tl_warp(diff + tl_scroll_offset);\r\n\r\n g.strokeStyle = \"rgb(0,0,255)\";\r\n g.beginPath();\r\n g.moveTo(-8, y);\r\n g.lineTo( 4, y);\r\n g.lineTo( 6, y-2);\r\n g.lineTo( 8, y);\r\n g.lineTo( 6, y+2);\r\n g.lineTo( 4, y);\r\n g.stroke();\r\n\r\n g.fillStyle = \"rgb(0,0,255)\";\r\n drawtime(diff, tl_c_time);\r\n\r\n // Highlight the 'elapsed time since last refresh'\r\n diff2 = (script_start_time - tl_t_time.getTime()) / 1000 / 60;\r\n y2 = tl_warp(diff2 + tl_scroll_offset);\r\n g.fillStyle = \"rgba(0,128,255,0.1)\";\r\n g.fillRect(9-TIMELINE_SIZES_WIDTH, y,TIMELINE_SIZES_WIDTH+1, y2-y);\r\n }\r\n\r\n unit = new Array(17);\r\n for (i=1; i<12; i++) {\r\n unit[i] = new Image();\r\n if (i==11)\r\n unit[i].src = \"img/un/u/hero.gif\";\r\n else\r\n unit[i].src = \"img/un/u/\"+(RACE*10+i)+\".gif\";\r\n }\r\n\r\n for (i=13; i<17; i++) {\r\n unit[i] = new Image();\r\n unit[i].src = \"img/un/r/\"+(i-12)+\".gif\";\r\n }\r\n\r\n\r\n function left(q) {\r\n if (q.constructor == Array)\r\n return q[0]-q[1];\r\n else\r\n return q-0;\r\n }\r\n\r\n // Draw data\r\n for (e in events) {\r\n p = events[e];\r\n diff = (e - tl_t_time.getTime()) / 1000 / 60 + tl_scroll_offset;\r\n if (diff<-TIMELINE_SIZES_HISTORY || diff>TIMELINE_SIZES_FUTURE) continue;\r\n y = tl_warp(diff);\r\n y = Math.round(y);\r\n g.strokeStyle = TIMELINE_EVENT_COLORS[p[0]];\r\n g.beginPath();\r\n g.moveTo(-10, y);\r\n g.lineTo(-50, y); \r\n g.stroke();\r\n \r\n g.fillStyle = \"rgb(0,128,0)\";\r\n var cap = 60*left(p[1])+40*left(p[2])+110*left(p[5]) - ((p[13]-0)+(p[14]-0)+(p[15]-0)+(p[16]-0));\r\n cap = (cap<=0)?\"*\":\"\";\r\n g.save();\r\n g.translate(20 - TIMELINE_SIZES_WIDTH - g.mozMeasureText(cap), y+4);\r\n g.mozDrawText(cap + p[12]);\r\n g.restore();\r\n\r\n if (p[17]) {\r\n g.fillStyle = \"rgb(0,0,128)\";\r\n g.save();\r\n g.translate(20 - TIMELINE_SIZES_WIDTH, y-5);\r\n g.mozDrawText(p[17]);\r\n g.restore();\r\n }\r\n\r\n if (SHOW_TIMELINE_REPORT_INFO) {\r\n g.fillStyle = \"rgb(64,192,64)\";\r\n g.save();\r\n g.translate(-40, y+4+12); // Move this below the message.\r\n for (i = 16; i>0; i--) {\r\n if (i==12)\r\n g.fillStyle = \"rgb(0,0,255)\";\r\n else if (p[i]) {\r\n try {\r\n g.translate(-unit[i].width - 8, 0);\r\n g.drawImage(unit[i], -0.5, Math.round(-unit[i].height*0.7) -0.5);\r\n } catch (e) {\r\n // This might fail if the image is not yet or can't be loaded.\r\n // Ignoring this exception prevents the script from terminating to early.\r\n var fs = g.fillStyle;\r\n g.fillStyle = \"rgb(128,128,128)\";\r\n g.translate(-24,0);\r\n g.mozDrawText(\"??\");\r\n g.fillStyle = fs;\r\n }\r\n if (p[i].constructor == Array) {\r\n g.fillStyle = \"rgb(192,0,0)\";\r\n g.translate(-g.mozMeasureText(-p[i][1]) - 2, 0);\r\n g.mozDrawText(-p[i][1]);\r\n g.fillStyle = \"rgb(0,0,255)\";\r\n g.translate(-g.mozMeasureText(p[i][0]), 0);\r\n g.mozDrawText(p[i][0]);\r\n } else {\r\n g.translate(-g.mozMeasureText(p[i]) - 2, 0);\r\n g.mozDrawText(p[i]);\r\n }\r\n }\r\n }\r\n }\r\n g.restore();\r\n }\r\n g.restore();\r\n if (KEEP_TIMELINE_UPDATED && once != true) {\r\n setTimeout(update_timeline,TIMELINE_UPDATE_INTERVAL);\r\n }\r\n }", "function drawTimeline() {\n for(var k = 0;k < listArrStations.length;k++){\n var sizeList = listArrStations[k].length;\n\n for (var i = 0; i < times.length-1; i++) {\n // Main line\n layer0.append(\"line\")\n .attr(\"id\", 'timeline' + k + '_' + i)\n .attr(\"x1\", i * hourSpace)\n .attr(\"y1\", listArrStations[k][0].y)\n .attr(\"x2\", i * hourSpace)\n .attr(\"y2\", listArrStations[k][sizeList-1].y)\n .attr(\"hour\",times[i])\n .attr(\"minutes\",0)\n .attr(\"fill\", \"none\")\n .attr(\"stroke-width\", 1)\n .attr(\"stroke\", \"gray\");\n // .on(\"mouseover\", gridMouseover)\n // .on(\"mouseout\",gridMouseout);\n\n for (var j = 1; j < 6; j++) {\n // Minor line\n layer0.append(\"line\")\n .attr(\"x1\", i * hourSpace + j * tenMinSpace)\n .attr(\"hour\",times[i])\n .attr(\"minutes\",j * 10)\n .attr(\"y1\", listArrStations[k][0].y)\n .attr(\"x2\", i * hourSpace + j * tenMinSpace)\n .attr(\"y2\", listArrStations[k][sizeList-1].y)\n .attr(\"fill\", \"none\")\n .attr(\"stroke-width\", 0.5)\n .attr(\"stroke\", function () { return j != 3 ? \"lightgray\" : \"lightgreen\"; });\n // .on(\"mouseover\", mouseoverTrainLine);\n // .on(\"mouseover\", gridMouseover)\n // .on(\"mouseout\",gridMouseout);\n }\n }\n }\n for (var i = 0; i < times.length; i++) {\n // Display time\n var text = layer0.append(\"text\")\n .attr(\"id\", 'timelinetext' + i)\n .text(times[i])\n .attr(\"x\", i * hourSpace)\n .attr(\"y\", -50)\n .attr(\"hour\",times[i])\n .style(\"font-size\", 20)\n .style(\"font-family\", \"Segoe UI\")\n .style(\"text-anchor\", \"middle\");\n // .on(\"mouseover\", gridMouseover)\n // .on(\"mouseout\",gridMouseout);\n }\n // for (var i = 0; i < times.length - 1; i++)\n // for (var j = 1; j < 6; j++) {\n // // Minor line\n // var line = layer0.append(\"line\")\n // .attr(\"x1\", i * hourSpace + j * tenMinSpace)\n // .attr(\"hour\",times[i])\n // .attr(\"minutes\",j * 10)\n // .attr(\"y1\", 0)\n // .attr(\"x2\", i * hourSpace + j * tenMinSpace)\n // .attr(\"y2\", viewerHeight)\n // .attr(\"fill\", \"none\")\n // .attr(\"stroke-width\", 0.5)\n // .attr(\"stroke\", function () { return j != 3 ? \"lightgray\" : \"lightgreen\"; })\n // // .on(\"mouseover\", mouseoverTrainLine);\n // .on(\"mouseover\", gridMouseover)\n // .on(\"mouseout\",gridMouseout);\n // }\n}", "initTimeline() {\n\t\tthis.timelineGfx = new createjs.Container;\n\t\tthis.timelineGfx.x = this.width/2;\n\t\tthis.timelineGfx.y = 20;\n\t\tthis.timelineGfx.level = this;\n\t\t\n\t\tvar border = new createjs.Shape();\n\t\tborder.graphics.beginStroke(\"#FFFFFF\").beginFill(\"#000000\").setStrokeStyle(1);\n\t\tborder.graphics.rect(-this.width/3,-5,2*this.width/3,10);\n\t\tthis.timelineGfx.addChild(border);\n\n\t\tvar fill = new createjs.Shape();\n\t\tfill.graphics.beginFill(\"DeepSkyBlue\");\n\t\tfill.graphics.rect(-this.width/3,-5,1,10);\n\t\tthis.timelineGfx.fillGfx = fill;\n\t\tthis.timelineGfx.addChild(fill);\n\t\t\n\t\t// add a click event listener\n\t\tthis.timelineGfx.addEventListener(\"click\", function(event) {\n\t\t\tvar level = event.currentTarget.level;\n\t\t\tlevel.reset();\n\t\t\t// calculate how far in the timeline we choose\n\t\t\tvar barPos = event.stageX - level.width/6;\n\t\t\tvar totalBarLength = 2*level.width/3;\n\t\t\tvar barRatio = barPos/totalBarLength;\n\t\t\t// calculate that time\n\t\t\tvar timelineLength = level.game.timeline.end - level.game.timeline.start;\n\t\t\tvar timeLerp = level.game.timeline.start + barRatio*timelineLength;\n\t\t\t// set the new time position\n\t\t\tlevel.game.timeline.setPosition(timeLerp);\n\t\t});\n\t\t\n\t\t// add all the highlight markings\n\t\tfor (var k = 0; k < this.level.highlights.length; k++) {\n\t\t\tvar highlight = this.level.highlights[k];\n\t\t\t// calculate where the highlight begins and ends\n\t\t\tvar songStart = this.game.timeline.start;\n\t\t\tvar songEnd = this.game.timeline.end;\n\t\t\tvar songLength = songEnd-songStart;\n\t\t\tvar startTime = 1000*this.notetrack.beatToTime(highlight[0]);\n\t\t\tvar endTime = 1000*this.notetrack.beatToTime(highlight[1]);\n\t\t\tvar startRatio = (startTime-songStart)/songLength;\n\t\t\tvar endRatio = (endTime-songStart)/songLength;\n\t\t\tvar boxBegin = -this.width/3;\n\t\t\tvar boxEnd = this.width/3;\n\t\t\tvar boxLength = boxEnd - boxBegin;\n\t\t\tvar boxBeginLerp = boxBegin + startRatio*boxLength;\n\t\t\tvar boxEndLerp = boxBegin + endRatio*boxLength;\n\t\t\tvar highlightWidth = boxEndLerp - boxBeginLerp;\n\t\t\t// draw the box\n\t\t\tvar highlightBox = new createjs.Shape();\n\t\t\tvar highlightColor = \"#ffff99\";\n\t\t\tif (highlight[2]) {\n\t\t\t\thighlightColor = highlight[2];\n\t\t\t}\n\t\t\thighlightBox.graphics.beginFill(highlightColor);\n\t\t\thighlightBox.graphics.rect(boxBeginLerp,-10,highlightWidth,20);\n\t\t\thighlightBox.alpha = 0.5;\n\t\t\tthis.timelineGfx.addChild(highlightBox);\n\t\t\tthis.stage.update();\n\t\t}\n\t\t\n\t\t// add timestamp\n\t\tthis.timestampText = new createjs.Text(\"start/end\", \"12px Arial\", \"#ffffff\")\n\t\tthis.timestampText.textAlign = 'right';\n\t\tthis.timestampText.x = 5*this.width/6;\n\t\tthis.timestampText.y = 32;\n\t\tthis.stage.addChild(this.timestampText)\n\t\t\n\t\tthis.stage.addChild(this.timelineGfx);\n\t}", "function redrawTimeline() {\n //debugger;\n //Recalculate 'x' based on added hours\n var x = d3.scale.linear()\n .domain([0, TOTAL_HOUR_PIXELS])\n .range([0, TOTAL_HOUR_PIXELS]);\n \n //Reset overlay and svg width\n document.getElementById(\"overlay\").style.width = SVG_WIDTH + 50 + \"px\";\n timeline_svg.attr(\"width\", SVG_WIDTH);\n \n //Remove all existing grid lines & background\n timeline_svg.selectAll(\"line\").remove();\n timeline_svg.selectAll(\"rect.background\").remove();\n \n //Redraw all x-axis grid lines\n timeline_svg.selectAll(\"line.x\")\n .data(x.ticks(XTicks)) \n .enter().append(\"line\")\n .attr(\"class\", \"x\")\n .attr(\"x1\", x)\n .attr(\"x2\", x)\n .attr(\"y1\", 15)\n .attr(\"y2\", SVG_HEIGHT-50)\n .style(\"stroke\", \"rgba(100, 100, 100, .5)\");\n \n //Redraw all y-axis grid lines\n timeline_svg.selectAll(\"line.y\")\n .data(yLines) \n .enter().append(\"line\")\n .attr(\"class\", \"y\")\n .attr(\"x1\", 0)\n .attr(\"x2\", SVG_WIDTH-50)\n .attr(\"y1\", y)\n .attr(\"y2\", y)\n .style(\"stroke\", \"#d3d1d1\");\n \n //Redraw darker first x and y grid lines\n timeline_svg.append(\"line\")\n .attr(\"x1\", 0)\n .attr(\"x2\", SVG_WIDTH-50)\n .attr(\"y1\", 15)\n .attr(\"y2\", 15)\n .style(\"stroke\", \"#000\")\n .style(\"stroke-width\", \"4\");\n \n timeline_svg.append(\"line\")\n .attr(\"y1\", 15)\n .attr(\"y2\", SVG_HEIGHT-50)\n .style(\"stroke\", \"#000\")\n .style(\"stroke-width\", \"4\");\n \n //Redraw Add Time Button\n document.getElementById(\"timeline-header\").style.width = SVG_WIDTH - 50 + \"px\";\n \n //Remove existing X-axis labels\n timeline_svg.selectAll(\"text.timelabel\").remove();\n numMins = -30;\n\n //Redraw X-axis labels\n timeline_svg.selectAll(\"text.timelabel\")\n .data(x.ticks(XTicks))\n .enter().append(\"text\")\n .attr(\"class\", \"timelabel\")\n .attr(\"x\", x)\n .attr(\"y\", 15)\n .attr(\"dy\", -3)\n .attr(\"text-anchor\", \"middle\")\n .text(function(d) {\n numMins+= 30;\n var hours = Math.floor(numMins/60);\n var minutes = numMins%60;\n if (minutes == 0 && hours == 0) return \". . . . 0:00\";\n else if (minutes == 0) return hours + \":00\";\n else return hours + \":\" + minutes; \n });\n \n //Add ability to draw rectangles on extended timeline\n timeline_svg.append(\"rect\")\n .attr(\"class\", \"background\")\n .attr(\"width\", SVG_WIDTH)\n .attr(\"height\", SVG_HEIGHT)\n .attr(\"fill\", \"white\")\n .attr(\"fill-opacity\", 0)\n .on(\"mousedown\", function() {\n var point = d3.mouse(this);\n newEvent(point);\n }); \n\n //Redraw the cursor\n timeline_svg.append(\"line\")\n .attr(\"y1\", 15)\n .attr(\"y2\", SVG_HEIGHT-50)\n .attr(\"x1\", 0)\n .attr(\"x2\", 0)\n .attr(\"class\", \"cursor\")\n .style(\"stroke\", \"red\")\n .style(\"stroke-width\", \"2\")\n\n //Get the latest time and team status, update x position of cursor\n cursor = timeline_svg.select(\".cursor\");\n var latest_time;\n if (in_progress){\n latest_time = (new Date).getTime();\n } else {\n latest_time = loadedStatus.latest_time;\n }\n \n //Next line is commented out after disabling the ticker\n //cursor_details = positionCursor(flashTeamsJSON, latest_time);\n\n //move all existing events back on top of timeline\n $(timeline_svg.selectAll('g')).each(function() {\n $('.chart').append(this);\n });\n}", "function start() {\n var timelineHolder = document.getElementById(\"schedule-graph\");\n var timeline = new google.visualization.Timeline(timelineHolder);\n var dataTable = prepareDataTable();\n\n timeline.draw(dataTable);\n}", "function drawChart() {\r\n drawSentimentBreakdown();\r\n drawSentimentTimeline();\r\n drawPopularityTimeline();\r\n}", "function drawVisualization() {\n var e = document.getElementById('mytimeline');\n var action = e.getAttribute(\"data-action\");\n var ind = e.getAttribute(\"data-value\");\n timeline_data = [];\n timeline_data_changed = [];\n function turnToDate(date) {\n var lst = date.split(\"-\");\n return new Date(lst[0],lst[1]-1,lst[2]);\n };\n\n var options = {\n \"width\": \"100%\",\n \"height\": \"200px\",\n \"style\": \"dot\", // optional\n //\"scale\": links.Timeline.StepDate.SCALE.YEAR,\n //\"step\": 1,\n \"zoomMax\": 1000 * 60 * 60 * 24 * 31 * 12 * 50,\n \"zoomMin\": 1000 * 60 * 60 * 24 * 31 * 12 * 5\n };\n timeline = new links.Timeline(e);\n\n function onSelectEdit() {\n var sel = timeline.getSelection();\n if (sel.length) {\n if (sel[0].row != undefined) {\n var row = sel[0].row;\n var eventSelected = timeline_data[row];\n if (action == \"edit\") {\n var info = document.getElementById('info');\n info.innerHTML =\n \"<span>Detail : </span> <span onclick='openTimelineDialog()' style='color:green' class='glyphicon glyphicon-plus'></span>\"\n + \"<span onclick='deleteEvent(\" + row + \")' style='color:red' class='glyphicon glyphicon-minus'></span>\"\n + \"<span onclick='openTimelineDialog(\" + row + \")' class='glyphicon glyphicon-pencil'></span>\"\n + \"<br>ID : \" + eventSelected.id\n + \"<br>Start : \" + jsDateConvert(eventSelected.start)\n + \"<br>End : \" + jsDateConvert(eventSelected.end)\n + \"<br>Content : \" + eventSelected.content\n\t + \"<br><a href='/events/\"+eventSelected.slg+\"'>Go to event page</a>\";\n }\n else if (action == \"select\") {\n e.setAttribute(\"data-value\", eventSelected.id);\n var input = document.getElementById(\"timeline_event_input\");\n input.value = eventSelected.id;\n var selected = document.getElementById(\"eventSelected\");\n selected.innerHTML = jsDateConvert(eventSelected.start) + \" \" + eventSelected.content + \"<sup style='color:red' onclick='cancelEventSelected()'> X </sup>\";\n }\n\telse if (action == \"read\") {\n\t var info = document.getElementById('info');\n\t info.innerHTML = event_to_period(eventSelected)\n + \" <a href='/events/\"+eventSelected.slg+\"'>\"+eventSelected.content+\"</a> : \"\n\t + eventSelected.abstract;\n\t}\n }\n }\n };\n links.events.addListener(timeline,'select',onSelectEdit);\n $.ajax({\n type:\"GET\",\n url:\"/timelinedata/\",\n data:{},\n success: function(data) {\n var events = JSON.parse(data['events']);\n var details = JSON.parse(data['details']);\n var row;\n for (var i = 0; i<events.length;i++) {\n var event = {};\n event['id'] = events[i].pk;\n event['start'] = turnToDate(events[i].fields.start);\n if (events[i].fields.end != null) {\n event['end'] = turnToDate(events[i].fields.end);\n }\n event['content'] = details[i].fields.content;\n event['abstract'] = details[i].fields.abstract;\n event['slg'] = events[i].fields.slg;\n if (event.id==ind) {\n event['className'] = 'timeline-event-target';\n row=i;\n\t var info = document.getElementById('info');\n\t info.innerHTML = event_to_period(event)\n + \" <a href='/events/\"+event.slg+\"'>\"+event.content+\"</a> : \"\n\t + event.abstract;\n }\n timeline_data.push(event);\n timeline.draw(timeline_data, options);\n timeline.setSelection([{row:row}]);\n }\n }\n });\n // Instantiate our timeline object.\n // Draw our timeline with the created data and options\n}", "function drawSentimentTimeline () {\r\n // Create the data table.\r\n var data = new google.visualization.DataTable();\r\n data.addColumn('date', 'Date');\r\n data.addColumn('number', 'Sentiment');\r\n data.addRows([\r\n [new Date(2012, 00, 01), 0.1],\r\n [new Date(2012, 00, 15), -0.2],\r\n [new Date(2012, 01, 01), 0.2],\r\n [new Date(2012, 01, 15), 0.4],\r\n [new Date(2012, 02, 01), -0.3]\r\n ]);\r\n\r\n // Set chart options\r\n var options = {\r\n title: 'Overall sentiment timeline:',\r\n backgroundColor: { fill: 'transparent' },\r\n vAxis: { minValue: -1.0,\r\n maxValue: 1.0 },\r\n legend: { position: 'none' }\r\n };\r\n\r\n // Instantiate and draw our chart, passing in some options.\r\n var chart = new google.visualization.LineChart(document.getElementById('chart_sentiment_timeline'));\r\n chart.draw(data, options);\r\n}", "function Timeline(n){function l(){var i=$(\".timeline\"),f=i.find(\"h2\").outerHeight(!0),u=0,n;t.targets[0]=i.find(\"article:first-of-type figure\").map(function(){return parseInt($(this).attr(\"data-proc\"))});t.targets[1]=i.find(\"article:last-of-type figure\").map(function(){return parseInt($(this).attr(\"data-proc\"))});t.lines[0].dots=[];n=f;i.find(\"article:first figure\").each(function(){var i=$(this).outerHeight(!0);t.lines[0].dots.push([$(this).outerWidth()+u,n+i/2+u]);n+=i});t.lines[1].dots=[];n=f;i.find(\"article:last figure\").each(function(){var i=$(this).outerHeight(!0);t.lines[1].dots.push([r.width-$(this).outerWidth()-u,n+i/2+u]);n+=i})}function o(){r.width=r.offsetWidth;r.height=r.offsetHeight;t.lines[0].height=t.lines[1].height=r.height*t.padding[1];var n=f;t.toggle(!1);t.lines[0].reset(r.offsetWidth/2-15);t.lines[1].reset(r.offsetWidth/2+15);l();t.toggle(!n)}function a(){var n=!1;try{n=!!(r.getContext&&(i=r.getContext(\"2d\")));t.lines[0]=new s(r.offsetHeight*t.padding[0],t.dotColors[0][3],t.options,u);t.lines[1]=new s(r.offsetHeight*t.padding[0],t.dotColors[1][3],t.options,u)}catch(f){return!1}return $(r).mousemove(function(n){n.offsetX?(u.x=n.offsetX,u.y=n.offsetY):n.layerX?(u.x=n.layerX,u.y=n.layerY):(u.x=n.pageX-$(r).offset().left,u.y=n.pageY-$(r).offset().top)}),$(window).resize(o),o(),n}function s(n,t,i,r){function f(n,t){this.y=t;this.x=n;this.base={x:n,y:t};this.update=function(n,t){var r=this.x-n.x,u=this.y-n.y,i=Math.atan2(r,u),i=i>0?i:2*Math.PI+i,f=t.radius/Math.sqrt(r*r+u*u);this.y+=Math.cos(i)*f+(this.base.y-this.y)*t.speed;this.x+=Math.sin(i)*f+(this.base.x-this.x)*t.speed}}var u=this;u.color=t;u.options=i;u.mouse=r;u.height=0;u.dots=[];u.y=n;u.points=[];u.reset=function(n){u.points=[];for(var t=u.y;t<u.height;t+=u.options.density)u.points.push(new f(n,t,u.color))};u.update=function(){for(var n=0;n<u.points.length;n++)u.points[n].update(u.mouse,u.options)}}function h(n,t,r){i.fillStyle=r;i.beginPath();i.arc(n.x,n.y,t,0,2*Math.PI,!0);i.closePath();i.fill()}function v(n,t){i.beginPath();i.moveTo(n.x,n.y);i.lineTo(t.x,t.y);i.stroke();i.closePath()}function y(){var n,f,e,u;for(i.clearRect(0,0,r.width,r.height),n=0;n<2;n++){for(f=t.lines[n].points,i.beginPath(),i.lineWidth=3,i.strokeStyle=t.lines[n].color,e=0,i.moveTo(f[e].x,f[e].y),u=e;u<f.length-2;u++){var o=f[u],y=(f[u+1].x+o.x)/2,p=(f[u+1].y+o.y)/2;i.quadraticCurveTo(o.x,o.y,y,p)}for(i.stroke(),i.closePath(),i.lineWidth=1.2,i.strokeStyle=t.dotColors[n][2],u=0;u<t.lines[n].dots.length;u++){var l=t.lines[n].dots[u],s=Math.floor(t.lines[n].points.length*t.targets[n][u]/100),a=[(t.lines[n].points[s].x+t.lines[n].points[s+1].x)/2,(t.lines[n].points[s].y+t.lines[n].points[s+1].y)/2,],w={x:l[0],y:l[1]},c={x:a[0],y:a[1]};v(w,c);h(c,11,t.dotColors[n][1]);h(c,5.5,t.dotColors[n][0])}}}function c(){e=requestAnimationFrame(c);t.lines[0].update();t.lines[1].update();y()}var t=this,f=!0,e=0,u={x:0,y:0},r=n,i=null;t.lines=[];t.isOK=!1;t.options={speed:.1,density:8,radius:600};t.targets=[];t.dotColors=[[\"#80A3C7\",\"rgba(19, 102, 155, 0.3)\",\"rgba(19, 102, 155, 0.08)\",\"rgba(19, 102, 155, 0.53)\"],[\"#7dd317\",\"rgba(113, 222, 15, 0.3)\",\"rgba(91, 164, 22, 0.12)\",\"rgba(113, 222, 15, 0.53)\"],];t.isPaused=function(){return f};t.padding=[.12,.98];t.toggle=function(n){return t.isOK?(n===undefined?t.toggle(!f):!!n&&f?(f=!1,c()):!!n||(f=!0,cancelAnimationFrame(e)),!0):!1};t.isOK=a()}", "resetTimeline() {\n let TL = this.querySelector(\".response-line\");\n TL.innerHTML = \"\";\n\n const min = parseFloat(this.dataset.min);\n const max = parseFloat(this.dataset.max);\n const step = parseFloat(this.dataset.labelStep);\n const size = max - min;\n // Draw timeline labels\n for(let t = min; t <= max; t += step) {\n let elm = document.createElement(\"div\");\n elm.classList.add(\"label\");\n elm.innerText = t.toString();\n TL.appendChild(elm);\n elm.style.left = ((t - min) / size * TL.clientWidth) + \"px\";\n }\n }", "drawTimeline(w, h, padding, sectionID) {\n let timelineSVG = d3\n .select(\"body\")\n .select(sectionID)\n .append(\"svg\")\n .attr(\"width\", 80)\n .attr(\"height\", h);\n timelineSVG // Add 'Present' label\n .append(\"text\")\n .attr(\"x\", 40)\n .attr(\"y\", padding + 5)\n .attr(\"text-anchor\", \"middle\")\n .attr(\"font-family\", \"Glober\")\n .attr(\"font-size\", \"22\")\n .text(\"Present\");\n timelineSVG // Add 'Past' label\n .append(\"text\")\n .attr(\"x\", 40)\n .attr(\"y\", ((this.nGens - 1) / this.nGens) * h + padding + 5)\n .attr(\"text-anchor\", \"middle\")\n .attr(\"font-family\", \"Glober\")\n .attr(\"font-size\", \"22\")\n .text(\"Past\");\n timelineSVG // Vertical line in arrow\n .append(\"line\")\n .attr(\"x1\", 40)\n .attr(\"x2\", 40)\n .attr(\"y1\", padding + 15)\n .attr(\"y2\", ((this.nGens - 2) / this.nGens) * h + padding + 5)\n .attr(\"stroke\", \"black\")\n .attr(\"stroke-width\", 2);\n timelineSVG // First arrowhead line\n .append(\"line\")\n .attr(\"x1\", 30)\n .attr(\"x2\", 40)\n .attr(\"y1\", ((this.nGens - 2.5) / this.nGens) * h + padding + 5)\n .attr(\"y2\", ((this.nGens - 2) / this.nGens) * h + padding + 5)\n .attr(\"stroke\", \"black\")\n .attr(\"stroke-width\", 2);\n timelineSVG // Second arrowhead line\n .append(\"line\")\n .attr(\"x1\", 50)\n .attr(\"x2\", 40)\n .attr(\"y1\", ((this.nGens - 2.5) / this.nGens) * h + padding + 5)\n .attr(\"y2\", ((this.nGens - 2) / this.nGens) * h + padding + 5)\n .attr(\"stroke\", \"black\")\n .attr(\"stroke-width\", 2);\n }", "function createTimeline() {\n const container = document.getElementById(\"timeline\");\n\n // Create a DataSet (allows two way data-binding)\n const items = new vis.Dataset(\n //Populate the DataSet with query\n connection.query(\"SELECT ? FROM date_and_time\", (err, results) => {\n if (err) {\n throw err;\n }\n\n items.clear();\n\n for (let i = 0; i < results.length; i++) {\n items.add = [\n {\n id: results[i].id,\n content: results[i].city_name,\n start: results[i].date_and_time\n }\n ];\n }\n console.log(items);\n })\n );\n\n // Configuration for the Timeline\n const options = {};\n // Create a Timeline\n const timeline = new vis.Timeline(container, items, options);\n module.exports = timeline;\n}", "function drawTimeLine(){\n console.log(\"CALL: drawTimeLine\");\n\n setFuncNextDate();\n\n var hAxisLabel = \"Days\";\n if($radioWeeks.is(':checked'))\n hAxisLabel = \"Weeks\";\n if($radioMonths.is(':checked'))\n hAxisLabel = \"Months\";\n\n var rows = getDataset();\n\n var data = new google.visualization.DataTable();\n\n data.addColumn('date', hAxisLabel);\n _.each(filteredUserData, function(userObj){\n data.addColumn('number', userObj.user);\n });\n\n data.addRows(rows);\n\n var options = {\n title: 'Users timeline',\n titleTextStyle: { fontSize: 14 },\n curveType: 'function',\n legend: 'none',\n backgroundColor: 'transparent',\n hAxis: {\n slantedText:true,\n slantedTextAngle:60,\n title: hAxisLabel,\n titleTextStyle: { fontSize: 14 },\n format: 'MMM d yyyy',\n maxValue: maxDate,\n minValue: minDate,\n ticks: ticks(),\n textStyle: { fontSize: 13 }\n },\n vAxis: {\n title: 'Number of data',\n titleTextStyle: { fontSize: 14 },\n logScale: false,\n viewWindow: {min:0},\n textStyle: { fontSize: 13 }\n },\n height: 400,\n colors: colors,\n chartArea: {\n height: '65%',\n top: '5%'\n }\n };\n\n var chart = new google.visualization.LineChart(document.getElementById(timeLineID));\n chart.draw(data, options);\n }", "function createTimeline() {\n var chart = new SmoothieChart();\n chart.addTimeSeries(random, { strokeStyle: 'rgba(0, 255, 0, 1)', fillStyle: 'rgba(0, 255, 0, 0.2)', lineWidth: 4 });\n chart.streamTo(document.getElementById(\"chart\"), 500);\n // HACK: because the chart needs some init data\n random.append(new Date().getTime(), 0);\n random.append(new Date().getTime(), 1);\n random.append(new Date().getTime(), 1);\n }", "function printTimeline(){\n\t \t$('#list_events').empty();\n\t \tfor (var j=0; j<events.length; j++) {\n\t \t\tif (j<curIndex)\n\t \t\t\t$('#list_events').append(\"<li class='pastdue \"+events[j].complete+\"'><h6>\"+events[j].end+\"</h6><span class='tooltip'><a index='\"+j+\"' class='eventlinks' id='\"+events[j].id+\"'>\"+events[j].title+\"</a></span></li>\");\n\t \t\telse if (j==curIndex)\n\t \t\t\t$('#list_events').append(\"<li class='\"+events[j].complete+\"'><h6>\"+events[j].end+\"</h6><span class='tooltip' style='display:block;''><a index='\"+j+\"' class='eventlinks' id='\"+events[j].id+\"'>\"+events[j].title+\"</a></span></li>\");\n\t \t\telse \n\t \t\t\t$('#list_events').append(\"<li class='\"+events[j].complete+\"'><h6>\"+events[j].end+\"</h6><span class='tooltip'><a index='\"+j+\"' class='eventlinks' id='\"+events[j].id+\"'>\"+events[j].title+\"</a></span></li>\");\n\t \t}\n\t \t$('#leftbar').show();\n\t \tclearScreen(curIndex);\n\t\t}", "onTimelinePaint() {\n const me = this;\n\n if (!me.subGrid.insertRowsBefore) {\n return;\n }\n\n me.isPainting = true;\n\n me.timeAxisViewModel.on({\n update: me.onViewModelUpdate,\n thisObj: me\n });\n\n // Upon paint we need to pass the forceUpdate flag in case we are sharing the TimAxisViewModel\n // with another Timeline which will already have done this.\n if (BrowserHelper.isIE11) {\n // subGrid in IE11 doesn't have height at this point, but container element does so we take it from there\n // TODO: make flex element inherit height from parent (min-height: 100% doesn't work)\n me.timeAxisViewModel.update(\n me.mode === 'vertical' ? me.subGrid.element.parentElement.offsetHeight : me.subGrid.width,\n false,\n true\n );\n } else {\n me.timeAxisViewModel.update(me.mode === 'vertical' ? me.subGrid.height : me.subGrid.width, false, true);\n }\n\n me.subGridElement.classList.add('b-timeline-subgrid');\n\n EventHelper.on({\n element: me.element,\n thisObj: me,\n click: 'onContainerElementClick',\n dblclick: 'onContainerElementClick',\n contextmenu: 'onContainerElementClick'\n });\n\n if (me.mode === 'vertical') {\n me.refreshHeader();\n }\n\n me.isPainting = false;\n }", "draw() {\n let minCount = this.minuteCount();\n let minPosition = this.minutePosition();\n this.drawBG();\n this.drawFog(this.getFogOpacity(minCount, minPosition));\n this.drawActiveVisitors();\n this.drawTime(minCount);\n }", "function timeline(parent) {\n var _chart = {};\n var _x = null, _y = null;\n var _width, _height;\n var _root = null, _svg = null, _g = null;\n var _tickWidth = 1, _tickOpacity = 0.5;\n var _region;\n var _minHeight = 20;\n var _dispatch = d3.dispatch('jump');\n // input data is just an array of {key: Date, value: {} or {adds: number, dels: number}}\n var _events = null;\n // play head\n var _current = null;\n // time display\n var _timewid = 65, _timefmt = d3.time.format('%-m/%-d %H:%M:%S');\n\n _chart.x = function(scale) {\n if(!arguments.length)\n return _x;\n _x = scale;\n return _chart;\n };\n\n _chart.y = function(scale) {\n if(!arguments.length)\n return _y;\n _y = scale;\n return _chart;\n };\n\n _chart.events = function(events) {\n if(!arguments.length)\n return _events;\n _events = events.map(function(e) {\n var value;\n if(e.value.adds !== undefined) {\n value = [\n {key: 'adds', height: e.value.adds, fill: 'green'},\n {key: 'dels', height: e.value.dels, fill: 'red'}\n ];\n } else {\n value = [\n {key: 'place', height: NaN, fill: 'grey'}\n ];\n }\n return {key: e.key, value: value};\n });\n return _chart;\n };\n\n // a region {x1, x2, color, opacity} to highlight\n _chart.region = function(region) {\n if(!arguments.length)\n return _region;\n _region = region;\n return _chart;\n };\n\n _chart.current = function(t) {\n if(!arguments.length)\n return _current;\n _current = t;\n return _chart;\n };\n\n function baseline() {\n return _height/2;\n }\n\n function y(height) {\n return isNaN(height) ? 3 : _y(0) - _y(height);\n }\n\n _chart.minHeight = function(h) {\n if(!arguments.length)\n return _minHeight;\n _minHeight = h;\n return _chart;\n };\n\n _chart.tickOpacity = function(o) {\n if(!arguments.length)\n return _tickOpacity;\n _tickOpacity = o;\n return _chart;\n };\n\n _chart.tickWidth = function(o) {\n if(!arguments.length)\n return _tickWidth;\n _tickWidth = o;\n return _chart;\n };\n\n function height(tick) {\n switch(tick.key) {\n case 'place': return 3;\n case 'marker': return baseline();\n default: return y(tick.height);\n }\n }\n\n function y0(tick) {\n switch(tick.key) {\n case 'place': return baseline()-1;\n case 'adds': return baseline()-y(tick.height);\n case 'dels': return baseline();\n default: throw new Error('unknown tick type ' + tick.key);\n }\n }\n\n _chart.redraw = function() {\n var bl = baseline();\n if(!_x) _x = d3.time.scale();\n if(!_y) _y = d3.scale.linear();\n _x.domain(d3.extent(_events, function(e) { return e.key; }))\n .range([_timewid, _width-_tickWidth]);\n var max = Math.max(_minHeight, d3.max(_events, function(e) {\n return e.value[0].key === 'adds' ? Math.max(e.value[0].height, e.value[1].height) : 0;\n }));\n _y.domain([max, -max]).range([0, _height]);\n\n var axis = _g.selectAll('rect.timeline').data([0]);\n axis.enter().append('rect').attr('class', 'timeline');\n axis.attr({\n width: _width-_timewid, height: 1,\n x: _timewid, y: bl,\n fill: '#ccc'\n });\n\n var region = _g.selectAll('rect.region')\n .data(_region ? [_region] : []);\n region.enter().append('rect')\n .attr('class', 'region');\n region.attr({\n x: function(d) {\n return _x(d.x1);\n },\n y: 0,\n width: function(d) {\n return _x(d.x2) - _x(d.x1) + _tickWidth;\n },\n height: _height,\n fill: _region && _region.color || 'blue',\n opacity: _region && _region.opacity || 0.5\n });\n region.exit().remove();\n\n var ticks = _g.selectAll('g.timetick')\n .data(_events, function(e) { return e.key; });\n ticks.enter().append('g').attr('class', 'timetick');\n ticks.attr('transform', function(d) {\n return 'translate(' + Math.floor(_x(d.key)) + ',0)';\n });\n ticks.exit().remove();\n var tick = ticks.selectAll('rect')\n .data(function(d) { return d.value; }, function(t) { return t.key; });\n tick.enter().append('rect');\n tick.attr({\n width: _tickWidth,\n height: height,\n x: 0, y: y0,\n fill: function(t) { return t.fill; },\n opacity: _tickOpacity\n });\n tick.exit().remove();\n\n if(_current) {\n var text = _g.selectAll('text.currtime')\n .data([0]);\n text.enter().append('text').attr('class', 'currtime');\n text.text(_timefmt(_current)).attr({\n 'font-family': 'sans-serif',\n 'font-size': '10px',\n x: 0,\n y: bl\n });\n var head = _g.selectAll('g.playhead')\n .data([0]);\n head.enter().append('g').attr('class', 'playhead');\n var playbox = head.selectAll('rect')\n .data([0]);\n playbox.enter().append('rect');\n playbox.attr({\n width: 4, height: _height,\n x: Math.floor(_x(_current))-1, y: 0,\n fill: 'none',\n stroke: 'darkblue',\n 'stroke-width': 1,\n opacity: 0.5\n });\n }\n return _chart;\n };\n\n _chart.render = function() {\n resetSvg();\n _g = _svg\n .append('g');\n\n _svg.on('click', function() {\n if(_x)\n _dispatch.jump(_x.invert(d3.mouse(this)[0]));\n });\n _chart.redraw();\n return _chart;\n };\n\n _chart.on = function(event, callback) {\n _dispatch.on(event, callback);\n return _chart;\n };\n\n _chart.width = function(w) {\n if(!arguments.length)\n return _width;\n _width = w;\n return _chart;\n };\n\n _chart.height = function(h) {\n if(!arguments.length)\n return _height;\n _height = h;\n return _chart;\n };\n\n _chart.select = function(s) {\n return _root.select(s);\n };\n\n _chart.selectAll = function(s) {\n return _root.selectAll(s);\n };\n\n function resetSvg() {\n _chart.select('svg').remove();\n generateSvg();\n }\n\n function generateSvg() {\n _svg = _root.append('svg')\n .attr({width: _chart.width(),\n height: _chart.height()});\n }\n\n _root = d3.select(parent);\n return _chart;\n}", "function draw(){\n\tctx.clearRect(0,0,width,height); //清空工作区重画,不然所有的轨迹都有\n\tvar now = new Date();\n\tvar hour = now.getHours();\n\tvar min = now.getMinutes();\n\tvar sec = now.getSeconds();\n\tdrawBackground();\n\tdrawHour(hour,min);\n\tdrawMin(min);\n\tdrawSec(sec);\n\tdrawDot();\n\tctx.restore();//恢复原来环境,坐标原点左上角.因为中间调用了一次原点是设置,所以需要还原\n}", "function drawCanvas() {\n\t\tdraw(context, drawer, colours, solver);\n\t\tsolver.callStateForItem(spanState);\n\t}", "drawCanvas(arrData) {\n const W = +this.elements.$tags.contentWrap.getBoundingClientRect().width;\n const H = +this.panel.svgHeight;\n const dateFrom = this.range.from.clone();\n const dateTo = this.range.to.clone();\n\n // область визуализации с данными (график)\n const margin = this.elements.sizes.marginAreaVis;\n const widthAreaVis = W - margin.left - margin.right;\n const heightAreaVis = H - margin.top - margin.bottom;\n const heightRowBar = parseInt(heightAreaVis / arrData.length, 10);\n\n const xScaleDuration = d3.scaleTime()\n .domain([0, new Date(dateTo).getTime() - new Date(dateFrom).getTime()])\n .range([0, widthAreaVis]);\n\n const xScaleTime = d3.scaleTime()\n .domain([new Date(dateFrom).getTime(), new Date(dateTo).getTime()])\n .range([0, widthAreaVis]);\n\n const canvasElement = d3.select(document.createElement('canvas'))\n .datum(arrData) // data binding\n .attr('width', widthAreaVis)\n .attr('height', heightAreaVis);\n\n const context = canvasElement.node().getContext('2d');\n\n // clear canvas\n context.fillStyle = 'rgba(0,0,0, 0)';\n context.rect(0, 0, canvasElement.attr('width'), canvasElement.attr('height'));\n context.fill();\n\n let top = 0;\n const sizeDiv = 1; // dividing line\n\n _.forEach(arrData, (changes, i, arr) => {\n _.forEach(changes, (d) => {\n context.beginPath();\n context.fillStyle = d.color;\n context.rect(\n xScaleTime(d.start) < 0 ? 0 : xScaleTime(d.start),\n top, xScaleDuration(d.ms),\n arr.length - 1 !== i ? heightRowBar - sizeDiv : heightRowBar,\n );\n context.fill();\n context.closePath();\n });\n\n top += heightRowBar;\n });\n return canvasElement.node();\n }", "startDraw(){\n if(!this.drawing) {\n this.drawing = true;\n this.then = Date.now();\n this.draw();\n }\n }", "function drawPopularityTimeline () {\r\n // Create the data table.\r\n var data = new google.visualization.DataTable();\r\n data.addColumn('date', 'Date');\r\n data.addColumn('number', 'Tweets');\r\n data.addRows([\r\n [new Date(2012, 00, 01), 123],\r\n [new Date(2012, 00, 15), 250],\r\n [new Date(2012, 01, 01), 198],\r\n [new Date(2012, 01, 15), 110],\r\n [new Date(2012, 02, 01), 50]\r\n ]);\r\n\r\n // Set chart options\r\n var options = {\r\n title: 'Popularity Timeline:',\r\n backgroundColor: { fill: 'transparent' },\r\n vAxis: { minValue: 0 },\r\n legend: { position: 'none' }\r\n };\r\n\r\n // Instantiate and draw our chart, passing in some options.\r\n var chart = new google.visualization.LineChart(document.getElementById('chart_popularity_timeline'));\r\n chart.draw(data, options);\r\n}", "function drawCanvas() {\n\t\tdrawing(context, drawer, colours, solver, selectedSpacesGrid);\n\t\tsolver.callStateForItem(spanState);\n\t}", "draw(){\n\t\t\n\t\tlet height = this.height; //100\n\t\tlet width = this.width; //100\n\t\t\n\t\tlet ctx = this.ctx;\n\t\t//save last frame\n\t\tlet lastFrame = ctx.getImageData(0, 0, width, height);\n\t\t//clear canvas\n\t\tctx.clearRect(0, 0, width, height);\n\t\t//now, move frame 1 pixel to the left\n\t\tctx.putImageData(lastFrame, -1, 0);\n\t\t\n\t\t//then, draw the lines\n\t\tfor(var line of this.lines){\n\t\t\t\n\t\t\t\n\t\t\tlet range = line.maxValue - line.minValue;\n\t\t\tlet value = line.value;\n\t\t\t\n\t\t\t//Multiply line's value by the ratio between height and range, to get effective range the same but zero at the top\n\t\t\tvalue *= 1 * height / range;\n\t\t\t\n\t\t\t//Now, zero the value by adding the difference between minValue and 0\n\t\t\tvalue -= line.minValue * height / range;\n\t\t\t\n\t\t\t//Now, invert by subtracting from height\n\t\t\tvalue = height - value;\n\t\t\t\n\t\t\tctx.beginPath();\n\t\t\tctx.strokeStyle = line.color;\n\t\t\tctx.moveTo(width - 2, value);\n\t\t\tctx.lineTo(width, value);\n\t\t\tctx.stroke();\n\t\t}\n\t}", "function draw() {\n // Makes the canvas light grey\n background(\"#7f7d7c\");\n // Continues redrawing the stamp where it was placed, so that it stays on screen. \n for (let i = 0; i < StampCollect.stamps.length; i++) {\n // Defines stamp as an instance in the array\n let stamp = StampCollect.stamps[i];\n // Keeps running through the draw function in the stamp class\n \n stamp.draw();\n stamp.draw();\n stamp.draw();\n stamp.draw();\n }\n }", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function drawTimelineHandle(svg) {\n svg.append('path')\n .style('stroke', '#341B1C')\n .style('fill', '#341B1C')\n .attr('class', 'time-handle-rect')\n .attr('d', 'M 0,50, L 25,0, L 50,50 Z');\n}", "function finalDraw() {\n\t Shapes.drawAll(gd);\n\t Images.draw(gd);\n\t Plotly.Annotations.drawAll(gd);\n\t Legend.draw(gd);\n\t RangeSlider.draw(gd);\n\t RangeSelector.draw(gd);\n\t }", "function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }", "function draw() {\n // Fade existing trails\n var prev = g.globalCompositeOperation;\n g.globalCompositeOperation = \"destination-in\";\n g.fillRect(0, 0, mapView.width, mapView.height);\n g.globalCompositeOperation = prev;\n\n // Draw new particle trails\n particles.forEach(function(particle) {\n if (particle.age < settings.maxParticleAge) {\n g.moveTo(particle.x, particle.y);\n g.lineTo(particle.xt, particle.yt);\n particle.x = particle.xt;\n particle.y = particle.yt;\n }\n });\n }", "function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }", "function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }", "function redrawBorad(){\n ctx.clearRect(startPointX,startPointY, 500, 500);\n gameBoard.showBoard();\n ctx.linewitdh = 1;\n drawTable();\n}", "function start_timeline(time) {\n line_count = setInterval(timer, 33);\n function timer() {\n time += 1;\n time_line.style.width = time + \"px\";\n if (time > 479) {\n clearInterval(line_count);\n }\n }\n}", "draw(ctx) {\n ctx.beginPath();\n ctx.lineWidth = 2;\n ctx.strokeStyle = 'blue';\n for (var i = 0; i < this.past_locations.length; i++) {\n ctx.lineTo(this.past_locations[i][0], this.past_locations[i][1]);\n ctx.moveTo(this.past_locations[i][0], this.past_locations[i][1]);\n }\n ctx.stroke();\n }", "function drawCanvas(){\n\tclearCanvas();\n\t// loop over the objects of the paint\n\tif (dataLoaded){\n\t\tif (!isFullHistory){\n\t\t\tctx.save();\n\t\t\tctx.globalAlpha = globalAlpha;\n\t\t\tfor (index in objArr)\n\t\t\t{\n\t\t\t\tobjArr[index].draw();\n\t\t\t}\n\t\t\tctx.restore();\n\n\t\t\thistoryObj.draw();\n\t\t\tif (moveToFullHistoy != 0){\n\t\t\t \tmoveToFullHistoy--;\n\t\t\t \tvar currInterval = (HISTORY_ANIMATION_TIME-moveToFullHistoy)/HISTORY_ANIMATION_TIME;\n\t\t\t\tgraphW = BASE_GRAPH_W + ((MAX_GRAPH_W - BASE_GRAPH_W) * currInterval);\n\t\t\t\tgraphH = BASE_GRAPH_H + ((MAX_GRAPH_H - BASE_GRAPH_H) * currInterval);\n\t\t\t\thistoryObj.pos.x = MIN_GRAPH_X + ((BASE_GRAPH_X-MIN_GRAPH_X) * (moveToFullHistoy/HISTORY_ANIMATION_TIME));\n\t\t\t\thistoryObj.pos.y = MIN_GRAPH_Y + ((BASE_GRAPH_Y-MIN_GRAPH_Y) * (moveToFullHistoy/HISTORY_ANIMATION_TIME));\n\t\t\t\tglobalAlpha = 1-currInterval;\n\t\t\t\tif (moveToFullHistoy == 0){\n\t\t\t\t\tisFullHistory = true;\n\t\t\t\t\tmoveToFullHistoy =-1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\thistoryObj.draw();\n\t\t\tfor (index in objArr)\n\t\t\t{\n\t\t\t\tif (objArr[index].kind == WATT_KIND) \n\t\t\t\t\tobjArr[index].draw();\n\t\t\t}\n\t\t\tif (moveToFullHistoy != -1){\n\t\t\t\tmoveToFullHistoy++;\n\t\t\t \tvar currInterval = (HISTORY_ANIMATION_TIME-moveToFullHistoy)/HISTORY_ANIMATION_TIME;\n\t\t\t\tglobalAlpha = 1;\n\t\t\t\tgraphW = BASE_GRAPH_W + ((MAX_GRAPH_W - BASE_GRAPH_W) * currInterval);\n\t\t\t\tgraphH = BASE_GRAPH_H + ((MAX_GRAPH_H - BASE_GRAPH_H) * currInterval);\n\t\t\t\thistoryObj.pos.x = MIN_GRAPH_X + ((BASE_GRAPH_X-MIN_GRAPH_X) * (moveToFullHistoy/HISTORY_ANIMATION_TIME));\n\t\t\t\thistoryObj.pos.y = MIN_GRAPH_Y + ((BASE_GRAPH_Y-MIN_GRAPH_Y) * (moveToFullHistoy/HISTORY_ANIMATION_TIME));\n\t\t\t\tif (moveToFullHistoy == HISTORY_ANIMATION_TIME){\n\t\t\t\t\tisFullHistory = false;\n\t\t\t\t\tmoveToFullHistoy = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "function renderCanvas()\n {\n if (drawing)\n {\n context.moveTo(lastPos.x, lastPos.y);\n context.lineTo(mousePos.x, mousePos.y);\n context.stroke();\n lastPos = mousePos;\n }\n }", "function _drawVisualization() {\n // Create and populate a data table.\n var data = new google.visualization.DataTable();\n data.addColumn('datetime', 'start');\n data.addColumn('datetime', 'end');\n data.addColumn('string', 'content');\n data.addColumn('string', 'group');\n\n var date = new Date(2014, 04, 25, 8, 0, 0);\n\n var loader_text = '<img src=\"/res/qsl/img/loader33x16.png\" width=\"33px\" height=\"16px\"> L-105';\n var inspe_text =\n '<div title=\"Inspection\" class=\"order\">' +\n '<i class=\"fa fa-lg fa-wrench\"></i> ' +\n 'Inspection' +\n '</div>';\n var inspe_start = new Date(date);\n var inspe_end = new Date(date.setHours(date.getHours() + 6));\n\n data.addRow([inspe_start, inspe_end, inspe_text, loader_text]);\n\n var vessl_text =\n '<div title=\"Snoekgracht\" class=\"order\">' +\n '<i class=\"fa fa-lg fa-anchor\"></i> ' +\n 'Snoekgracht' +\n '</div>';\n var inspe_start = new Date(date.setHours(date.getHours() + 6));\n var inspe_end = new Date(date.setHours(date.getHours() + 48));\n\n data.addRow([inspe_start, inspe_end, vessl_text, loader_text]);\n\n // specify options\n var options = {\n width: \"100%\",\n //height: \"300px\",\n height: \"auto\",\n layout: \"box\",\n editable: true,\n eventMargin: 5, // minimal margin between events\n eventMarginAxis: 0, // minimal margin beteen events and the axis\n showMajorLabels: false,\n axisOnTop: true,\n // groupsWidth : \"200px\",\n groupsChangeable: true,\n groupsOnRight: false,\n stackEvents: false\n };\n\n // Instantiate our timeline object.\n that.timeline = new links.Timeline(document.getElementById(that.optio.vva_id_regn));\n\n // Draw our timeline with the created data and options\n that.timeline.draw(data, options);\n }", "_drawTrajectories() {\n this._clearTrajectories();\n this._drawTrajectory(this.trajectories[0],\n '#8dd4e0', '#5aa1ad', '#daffff', '#276e7a');\n this._drawTrajectory(this.trajectories[1],\n '#f8c633', '#c59200', '#ffec59', '#926000');\n }", "function draw() {\n //if(sliceCount == 5000 ) return;\n //if all data has been shown, return\n if (usefulData.length < sliceCount * sliceSize) return;\n \n //get the data to be shown in this slice\n var start = sliceCount * sliceSize;\n var end = Math.min(usefulData.length, (sliceCount + 1) * sliceSize);\n var slicedData = usefulData.slice(start, end);\n sliceCount++;\n \n var minTime = slicedData[0].time;\n var cyOffset = eachHeight * 0.4 ;\n webgl\n .selectAll('.points_' + sliceCount)\n .data(slicedData).enter()\n .append('circle')\n .attr({\n cx:function(d){return startOffset + d.currentTime;},\n cy:function(d){return cyOffset + eachHeight * videoNames[d['videoID']];},\n r:0,\n fill:function (d) {return colors(d['type']);},\n opacity:0,\n class:'event',\n filter:'url(#ball-glow2)'\n })\n .transition()\n .delay(function (d, i) { return (d.time - minTime) / config.playrate }).duration(1000)\n .attr({\n opacity:0.3,\n r:15\n })\n .transition()\n .duration(1000)\n .attr({\n opacity:0,\n r:0\n })\n .remove();\n setTimeout(draw, (slicedData[slicedData.length - 1].time - minTime) / config.playrate);\n }", "function drawNotes(){\n \t if(startTime != null){\n \t noFill();\n \t for(let i = 0; i < notes.length; i++){\n \t drawNote(notes[i], i);\n \t }\n \t fill(255);\n }\n}", "function moveToCurrentTime() {\n timeline.setVisibleChartRangeNow();\n}", "function drawCanvas(type) {\n clearCanvas();\n getTiles(function(tile) {\n drawTile(tile);\n })\n }", "function drawStage(context, mouse) {\n\n // Clearing canvas\n context.clearRect(0, 0, innerWidth, innerHeight);\n\n // Drawing active line\n if(draw_active) {\n current_line.drawActive(context, mouse);\n }\n // Drawing all previous lines\n for(var i = 0; i < lines.length; i++) {\n lines[i].draw(context);\n }\n}", "function renderCanvas() {\n if (drawing) {\n ctx.beginPath();\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.closePath();\n ctx.stroke();\n\n lastPos = mousePos;\n }\n}", "function addTime() {\n calcAddHours(timelineHours);\n \n //Recalculate 'x' based on added hours\n var x = d3.scale.linear()\n .domain([0, hours])\n .range([0, hours]);\n \n //Reset overlay and svg width\n\tdocument.getElementById(\"overlay\").style.width = SVG_WIDTH + 50 + \"px\";\n timeline_svg.attr(\"width\", SVG_WIDTH);\n \n //Remove all exising grid lines\n timeline_svg.selectAll(\"line\").remove();\n \n //Redraw all x-axis grid lines\n timeline_svg.selectAll(\"line.x\")\n .data(x.ticks(XTicks)) \n .enter().append(\"line\")\n .attr(\"class\", \"x\")\n .attr(\"x1\", x)\n .attr(\"x2\", x)\n .attr(\"y1\", 15)\n .attr(\"y2\", SVG_HEIGHT-50)\n .style(\"stroke\", \"#000\");\n \n //Redraw all y-axis grid lines\n timeline_svg.selectAll(\"line.y\")\n .data(yLines) \n .enter().append(\"line\")\n .attr(\"class\", \"y\")\n .attr(\"x1\", 0)\n .attr(\"x2\", SVG_WIDTH-50)\n .attr(\"y1\", y)\n .attr(\"y2\", y)\n .style(\"stroke\", \"#d3d1d1\");\n \n //Redraw darker first x and y grid lines\n timeline_svg.append(\"line\")\n .attr(\"x1\", 0)\n .attr(\"x2\", SVG_WIDTH-50)\n .attr(\"y1\", 15)\n .attr(\"y2\", 15)\n .style(\"stroke\", \"#000\")\n .style(\"stroke-width\", \"4\")\n \n timeline_svg.append(\"line\")\n .attr(\"y1\", 15)\n .attr(\"y2\", SVG_HEIGHT-50)\n .style(\"stroke\", \"#000\")\n .style(\"stroke-width\", \"4\")\n \n //Remove existing X-axis labels -- can't get this to work\n //timeline_svg.selectAll(\".rule\").remove();\n numMins = -30;\n\n //Redraw X-axis labels\n timeline_svg.selectAll(\".rule\")\n .data(x.ticks(XTicks))\n .enter().append(\"text\")\n .attr(\"x\", x)\n .attr(\"y\", 15)\n .attr(\"dy\", -3)\n .attr(\"text-anchor\", \"middle\")\n .text(function(d) {\n numMins+= 30;\n var hours = Math.floor(numMins/60);\n var minutes = numMins%60;\n if (minutes == 0 && hours == 0) return \". . . . 0:00\";\n else if (minutes == 0) return hours + \":00\";\n else return hours + \":\" + minutes; \n });\n \n //Add ability to draw rectangles on extended timeline\n timeline_svg.append(\"rect\")\n .attr(\"class\", \"background\")\n .attr(\"width\", SVG_WIDTH)\n .attr(\"height\", SVG_HEIGHT)\n .attr(\"fill\", \"white\")\n .attr(\"fill-opacity\", 0)\n .on(\"mousedown\", mousedown);\n \n}", "function makeTimeline(svg, x, y, width, height, start, end, interval, years, index) {\n \n // draw the line\n var timelineY = y + 0.2 * height;\n var timeline = svg.append('path')\n .attr('d', line([\n [x, timelineY],\n [x + width, timelineY]\n ]))\n .attr('stroke', timelineColor)\n .attr('stroke-width', 4);\n \n // compute ranges where dates can exist\n var dateStartX = x + 0.1 * width;\n var dateEndX = x + width - 0.1 * width;\n var dateLength = dateEndX - dateStartX;\n\n function getXOfYear(year) {\n return dateStartX + ((year - start) / (end - start)) * dateLength;\n }\n\n // draw the labels\n for (var i = start; i <= end; i += interval) {\n var yearX = getXOfYear(i);\n \n // show the tick mark\n var tick = svg.append('path')\n .attr('d', line([\n [yearX, timelineY - (tickSize / 2)],\n [yearX, timelineY + (tickSize / 2)]\n ]))\n .attr('stroke', timelineColor)\n .attr('stroke-width', 2);\n \n // show the year \n var label = svg.append('text')\n .attr('x', yearX)\n .attr('y', timelineY - (tickSize / 2) - (padding / 2))\n .attr('width', interval)\n .attr('height', labelHeight)\n .style('font-family', mainFont)\n .style('font-size', timelineFontSize)\n .style('text-anchor', 'middle')\n .text(i);\n }\n \n // compute point sizes\n buttonSize = (dateLength / (years.length));\n buttonRadius = (buttonSize - padding) / 2;\n var currentButtonX = dateStartX;\n \n // create layer for points to prevent overlap\n var lineLayer = svg.append('g');\n\n // draw the points\n for (var i = 0; i < years.length; i++) {\n var yearX = getXOfYear(years[i]);\n \n // show the larger button\n var buttonStartY = timelineY + (tickSize / 2) + labelHeight + padding;\n var buttonCenterX = currentButtonX + (buttonSize / 2);\n var buttonCenterY = buttonStartY + buttonRadius;\n\n // show a point at the appropriate place\n var point = svg.append('circle')\n .attr('cx', yearX)\n .attr('cy', timelineY)\n .attr('r', 4)\n .attr('fill', timelineColor);\n \n // show the large button\n var button = svg.append('circle')\n .attr('cx', buttonCenterX)\n .attr('cy', buttonCenterY)\n .attr('r', buttonRadius)\n .attr('fill', buttonColor)\n .attr('index', index - 1) // for referencing purposes on click\n .on('mouseover', function() {\n showDetail(svg, d3.select(this).attr('index'));\n })\n .on('click', function() {\n showDetail(svg, d3.select(this).attr('index'));\n });\n animatePoint(button, buttonCenterX, buttonCenterY, buttonRadius,\n 1, 1000 * index / years.length);\n\n // fill the larger button with the number\n var label = svg.append('text')\n .attr('x', currentButtonX + (buttonSize / 2))\n .attr('y', buttonStartY + 1.4 * buttonRadius )\n .attr('width', buttonRadius * 2)\n .attr('height', buttonRadius * 2)\n .attr('index', index - 1) // for referencing purposes on click\n .style('font-family', mainFont)\n .style('font-size', buttonFontSize)\n .style('text-anchor', 'middle')\n .text(index)\n .on('mouseover', function() {\n showDetail(svg, d3.select(this).attr('index'));\n })\n .on('click', function() {\n showDetail(svg, d3.select(this).attr('index'));\n });\n disableSelection(label);\n\n // draw the connecting line\n var conLine = lineLayer.append('path')\n .attr('d', line([\n [yearX, timelineY],\n [buttonCenterX, buttonStartY]\n ]))\n .attr('stroke', timelineColor)\n .attr('stroke-dasharray', '5 5')\n .attr('stroke-width', 1);\n \n index++;\n currentButtonX += buttonSize;\n }\n\n}", "function drawOneLine(x,y){\n // Move to the location\n push();\n translate(x,0);\n noStroke();\n fill(220,220,220);\n // Draw the background gray to give the main timeline greater visual value on the page.\n rect(x0,y+1,x1-x0,30);\n // Loop through the cluster array and draw the segments for each cluster at different height\n for (var i = 0; i<clustersArray.length;i++){\n clustersArray[i]['segment'].drawMiddle(y+25-(20*i/clustersArray.length),6);\n }\n // Draw the top and bottom timelines\n stroke(170,170,170);\n strokeWeight(4);\n line(x0,y+1,x1,y+1);\n line(x0,y+31,x1,y+31);\n strokeWeight(6);\n // Draw the bookends\n line(timeTransform(0),y,timeTransform(0),y+30);\n line(timeTransform(duration),y,timeTransform(duration),y+30);\n line(timeTransform(0),y+30,timeTransform(0),y+34);\n line(timeTransform(duration),y+30,timeTransform(duration),y+34);\n // Loop through the timeslines array\n for (var i = 0; i<timelinesArray.length;i++){\n for (var j=0; j<timelinesArray[i]['segments'].length;j++){\n timelinesArray[i]['segments'][j].drawMarkings(y);\n }\n }\n // Move back to origin\n pop();\n // Loop through the clusters and display the stats for the current time in the video\n for (var i=0; i<clustersArray.length;i++){\n // If the video play point is in the cluster\n if (vid.time()>=clustersArray[i].segment.start.time&&vid.time()<clustersArray[i].segment.end.time){\n // If the cluster text isn't already set\n if (!cluster_text) {\n // Set accuracy to percentage and spread to rounded number.\n var accuracy = int(clustersArray[i].accuracy*100);\n var spread = precise_round(clustersArray[i].spread,2);\n \n // Print the effort in large text near the composite timeline\n strokeWeight(0.5);\n stroke(0);\n fill(0);\n textSize(16);\n text('Cluster:',860,485);\n textSize(28);\n text(clustersArray[i].segment.effort,560,y+26);\n // Print the effort in the central location\n textSize(24);\n text(clustersArray[i].segment.effort,860,515);\n // Print the accuracy and spread stats in the central location\n textSize(12);\n text(str(accuracy)+'% of '+str(clustersArray[i].size)+' Segments',930,515);\n textSize(12);\n text('(Spread '+str(spread)+')',860,535);\n textSize(20);\n // Print the emotional interpretation and statistics in the central location\n text(clustersArray[i].segment.emotion,860,563);\n textSize(12);\n text(str(int(clustersArray[i].emostat*100))+'% agreement',860,583);\n // Set cluster_text to true to avoid writing text for more than one cluster over the other.\n cluster_text=true;\n }\n }\n }\n // Set cluster_text to false so it will be updated in the next frame\n cluster_text=false;\n}", "function updateCanvas(pivot){\n var canv = document.getElementById('canv');\n var ctx = canv.getContext('2d');\n\n ctx.clearRect(0, 0, canv.width, canv.height);\n\n drawLines(pivot);\n\n\n}", "drawGraph() {\n logger.debug('ParticipantScore: drawGraph', this.props.graphType);\n const chart = this.chart;\n\n const timelineData = this.props.graphDatasets[GraphDatasetTypes.UTTERANCE_TIMELINE].data;\n logger.debug('ParticipantScore: timelineData', { timelineData });\n\n // Is this component trying to visualise an empty dataset?\n const emptyDataset = timelineData.utts.length === 0;\n if (emptyDataset) {\n chart.hide();\n this.props.dashboardGraphLoaded(this.props.graphType);\n return;\n }\n chart.show();\n\n const chartData = this.getGraphData();\n chart.data = chartData;\n }", "function initializeTimeline(selection) {\n\n\t\t\t\t\tvar timelineGroups = buildTimelineGroups(groups);\n\n\t\t\t\t\tstack(timelineGroups);\n\n\t\t\t\t\tgr = selection.select(\"svg\").select(\"g\");\n\n\t\t\t\t\tvar tooltip = gr.select(\".timeline-tooltip\");\n\n\t\t\t\t\tif(gr.empty()) {\n\t\t\t\t\t\tgr = selection.append(\"svg\")\n\t\t\t\t\t\t\t\t.attr(\"height\", height)\n\t\t\t\t\t\t\t\t.attr(\"width\", width)\n\t\t\t\t\t\t\t.append(\"g\")\n\t\t\t\t\t\t\t\t.attr(\"transform\", \"translate(\" + hMargin + \", \" + vMargin + \")\");\n\n\t\t\t\t\t\t// Set up transparent background rectable to catch zoom events.\n\t\t\t\t\t\tgr.append(\"rect\")\n\t\t\t\t\t\t\t\t.attr(\"height\", height - vMargin*2)\n\t\t\t\t\t\t\t\t.attr(\"width\", width - hMargin*2)\n\t\t\t\t\t\t\t\t.attr(\"fill\", \"rgba(0, 0, 0, 0)\");\n\t\t\t\t\t}\n\n\t\t\t\t\tz = d3.behavior.zoom();\n\t\t\t\t\tz.x(x);\n\t\t\t\t\tz.scaleExtent([1, Infinity]);\n\t\t\t\t\tz.on(\"zoom\", zoom);\n\n\t\t\t\t\tif(!gr.select(\"g.x-axis\").empty()) {\n\t\t\t\t\t\tgr.select(\"g.x-axis\").remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tgr.append(\"g\")\n\t\t\t\t\t\t\t.attr(\"class\", \"axis x-axis\")\n\t\t\t\t\t\t\t.attr(\"transform\", \"translate(0,\" + mainHeight + \")\")\n\t\t\t\t\t\t\t.call(xAxis);\n\n\t\t\t\t\tbrush.on(\"brushstart\", function () {\n\t\t\t\t\t\tif(d3.event.sourceEvent) d3.event.sourceEvent.stopPropagation();\n\t\t\t\t\t});\n\n\t\t\t\t\tbrush.on(\"brush\", function () {\n\t\t\t\t\t\textent = brush.extent();\n\n\t\t\t\t\t\tscope.localDimension.filterFunction(dimFilter);\n\t\t\t\t\t\tpalladioService.update();\n\t\t\t\t\t});\n\n\t\t\t\t\tbrush.on(\"brushend\", function () {\n\t\t\t\t\t\tvar ex = brush.extent();\n\t\t\t\t\t\textent = ex;\n\n\t\t\t\t\t\tif (brush.empty()) {\n\t\t\t\t\t\t\tscope.localDimension.filterAll();\n\n\t\t\t\t\t\t\tscope.$parent.$digest(); // Apparently scope $digest doesn't propogate up.\n\t\t\t\t\t\t\tpalladioService.removeFilter(identifier);\n\n\t\t\t\t\t\t\t// If our container supports state saving.\n\t\t\t\t\t\t\tif(scope.setFilter) scope.setFilter(brush.extent());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Don't need to update as brushmove is already processed on brushend\n\t\t\t\t\t\t\t// scope.localDimension.filterFunction(dimFilter);\n\n\t\t\t\t\t\t\tscope.$parent.$digest(); // Apparently scope $digest doesn't propogate up.\n\t\t\t\t\t\t\tvar filterText = ex.map(function (d) {\n\t\t\t\t\t\t\t\treturn \"from \" + dimFormat(d[0]) + \" to \" + dimFormat(d[1]);\n\t\t\t\t\t\t\t}).join(\" and \");\n\t\t\t\t\t\t\tderegister.push(palladioService.setFilter(identifier, scope.title, filterText, filterReset));\n\n\t\t\t\t\t\t\t// If our container supports state saving.\n\t\t\t\t\t\t\tif(scope.setFilter) scope.setFilter(brush.extent());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// updateHighlights(gr);\n\n\t\t\t\t\t\tpalladioService.update();\n\t\t\t\t\t});\n\n\t\t\t\t\tif(!gr.select(\"g.brush\").empty()) {\n\t\t\t\t\t\tgr.select(\"g.brush\").remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tbrush.resizeAdaption(function (selection) {\n\t\t\t\t\t\tselection.append(\"path\")\n\t\t\t\t\t\t\t.attr(\"transform\", \"translate(0, \" + -(mainHeight * (1/4)) + \")\");\n\n\t\t\t\t\t\tselection.select(\"rect\").attr(\"height\", mainHeight);\n\n\t\t\t\t\t\tfunction resizePath(d) {\n\t\t\t\t\t\t\tvar e = +(d[0] == \"e\"), x = e ? 1 : -1, y = (mainHeight)*(1/2);\n\t\t\t\t\t\t\treturn \"M\" + (0.5 * x) + \",\" + y +\n\t\t\t\t\t\t\t\t\"A6,6 0 0 \" + e + \" \" + (6.5 * x) + \",\" + (y + 6) +\n\t\t\t\t\t\t\t\t\"V\" + (2 * y - 6) +\n\t\t\t\t\t\t\t\t\"A6,6 0 0 \" + e + \" \" + (0.5 * x) + \",\" + (2 * y) +\n\t\t\t\t\t\t\t\t\"Z\" +\n\t\t\t\t\t\t\t\t\"M\" + (2.5 * x) + \",\" + (y + 8) +\n\t\t\t\t\t\t\t\t\"V\" + (2 * y - 8) +\n\t\t\t\t\t\t\t\t\"M\" + (4.5 * x) + \",\" + (y + 8) +\n\t\t\t\t\t\t\t\t\"V\" + (2 * y - 8);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tbrush.extentAdaption(function (selection) {\n\t\t\t\t\t\tselection.attr(\"height\", mainHeight)\n\t\t\t\t\t\t\t.classed(filterClass, true);\n\t\t\t\t\t});\n\n\t\t\t\t\tgBrush = gr.append(\"g\").attr(\"class\", \"brush\")\n\t\t\t\t\t\t\t\t.call(brush);\n\n\t\t\t\t\tgBrush.select('rect.background').attr(\"height\", mainHeight);\n\n\t\t\t\t\t// Groups must be appended after the brush to support tooltips.\n\n\t\t\t\t\t// Remove all the groups so they get properly recreated.\n\t\t\t\t\tgr.selectAll(\".group\").remove();\n\n\t\t\t\t\tif(!gr.select(\".groups\").empty()) {\n\t\t\t\t\t\tgr.select(\".groups\").remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tgroupContainer = gr.append('g').attr(\"class\", \"groups\");\n\n\t\t\t\t\tvar group = groupContainer.selectAll(\".group\")\n\t\t\t\t\t\t\t.data(timelineGroups);\n\n\t\t\t\t\tcolor.domain(d3.extent(timelineGroups, function(d){ return d[0].i; }));\n\n\t\t\t\t\tgroup.style(\"fill\", function(d) { return color(d[0].i); });\n\n\t\t\t\t\tvar newGroups = group.enter()\n\t\t\t\t\t\t\t.append(\"g\")\n\t\t\t\t\t\t\t\t.attr(\"class\", \"group\");\n\n\t\t\t\t\tnewGroups.append(\"path\")\n\t\t\t\t\t\t\t.attr(\"class\", \"area\")\n\t\t\t\t\t\t\t.attr(\"transform\", \"translate(-0.5,-0.5)\")\n\t\t\t\t\t\t\t.style(\"fill\", function(d) { return color(d[0].i); })\n\t\t\t\t\t\t\t.on(\"mouseover\", function (d) {\n\t\t\t\t\t\t\t\td3.select(this).style(\"fill\", \"#67D6E5\");\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.on(\"mouseout\", function (d) {\n\t\t\t\t\t\t\t\td3.select(this).style(\"fill\", function(d) { return color(d[0].i); });\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.tooltip(function (d,i){\n if(stackGroups[d[0].i] && stackGroups[d[0].i] !== \"No group\") {\n return {\n text : stackGroups[d[0].i],\n displacement : [0,20],\n position: [0,0],\n gravity: \"right\",\n placement: \"mouse\",\n mousemove : true\n };\n } else {\n // Place off screen\n return {\n position: [0,0],\n displacement: [-1000,0]\n };\n }\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\tif(tooltip.empty()) {\n\t\t\t\t\t\t// Set up the tooltip.\n\t\t\t\t\t\ttooltip = gr.append(\"g\")\n\t\t\t\t\t\t\t\t.attr(\"class\", \"timeline-tooltip\")\n\t\t\t\t\t\t\t\t.attr(\"pointer-events\", \"none\")\n\t\t\t\t\t\t\t\t.style(\"display\", \"none\");\n\n\t\t\t\t\t\ttooltip.append(\"foreignObject\")\n\t\t\t\t\t\t\t\t.attr(\"width\", 100)\n\t\t\t\t\t\t\t\t.attr(\"height\", 26)\n\t\t\t\t\t\t\t\t.attr(\"pointer-events\", \"none\")\n\t\t\t\t\t\t\t.append(\"html\")\n\t\t\t\t\t\t\t\t.style(\"background-color\", \"rgba(0,0,0,0)\")\n\t\t\t\t\t\t\t.append(\"div\")\n\t\t\t\t\t\t\t\t.style(\"padding-left\", 3)\n\t\t\t\t\t\t\t\t.style(\"padding-right\", 3)\n\t\t\t\t\t\t\t\t.style(\"text-align\", \"center\")\n\t\t\t\t\t\t\t\t.style(\"white-space\", \"nowrap\")\n\t\t\t\t\t\t\t\t.style(\"overflow\", \"hidden\")\n\t\t\t\t\t\t\t\t.style(\"text-overflow\", \"ellipsis\")\n\t\t\t\t\t\t\t\t.style(\"border-radius\", \"5px\")\n\t\t\t\t\t\t\t\t.style(\"background-color\", \"white\")\n\t\t\t\t\t\t\t\t.style(\"border\", \"3px solid grey\");\n\t\t\t\t\t}\n\t\t\t\t}", "function createTimeline(data, canvas) {\n var keyword = \"tagged\"; // highlight keyword \n \n var theme \t\t= Timeline.ClassicTheme.create();\n theme.event.bubble.width \t= 350;\n theme.event.bubble.height \t= 300;\n theme.highlightColor \t\t= \"#FFFF66\";\n \n // create eventSource and load data\n var eventSource = new Timeline.DefaultEventSource();\n eventSource.loadJSON(data, document.location.href);\n \n // set startdate\n var da = data.timestamp.split(/[\\-\\.\\:T]/);\n var startdate = new Date(da[0],da[1]-1,da[2],da[3],da[4],da[5]); \n //var startdate = new Date(\"Mar 02 2010 19:33:10 GMT-0500\"); // initial date\n var bandInfos = [\n Timeline.createBandInfo({\n timeZone: -4,\n width: \"60%\", \n intervalUnit: Timeline.DateTime.MINUTE, \n intervalPixels: 300,\n theme: theme,\n eventSource: eventSource,\n date: startdate \n }),\n Timeline.createBandInfo({\n timeZone: -4,\n showEventText: false,\n width: \"40%\", \n intervalUnit: Timeline.DateTime.HOUR, \n intervalPixels: 500,\n eventSource: eventSource,\n theme: theme,\n overview: true,\n date: startdate \n }) \n ];\n bandInfos[0].highlight = true;\n bandInfos[1].syncWith = 0;\n bandInfos[1].highlight = true;\n // create the timeline\n tl = Timeline.create(canvas, bandInfos);\n // add the highlighting for events\n var highlightMatcher = function(evt) {\n var description = evt.getDescription();\n var regex = new RegExp(keyword, \"i\");\n if (regex.test(description)) {\n return true;\n } return -1;\n };\n for (var i=0; i<bandInfos.length; i++)\n tl.getBand(i).\n getEventPainter().\n setHighlightMatcher(highlightMatcher);\n \n // Paint the mofo\n tl.paint();\n}", "function refreshDisplayNoOver() {\n p.getBubbleDrawer().clear();\n drawScales();\n p.getBubbleDrawer().drawDate(year.current);\n drawBubbles();\n drawBubblesNames();\n p.getBubbleDrawer().display();\n}", "_draw () {\r\n\t\tthis.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\r\n\r\n\t\tthis.particles.forEach(particle => {\r\n\t\t\tparticle.draw(this.context);\r\n\t\t});\r\n\t}", "function initializeTimelineDuration() {\n var totalHours = findTotalHours();\n if (totalHours > 48) {\n TIMELINE_HOURS = totalHours;\n TOTAL_HOUR_PIXELS = TIMELINE_HOURS * HOUR_WIDTH;\n SVG_WIDTH = TIMELINE_HOURS * 100 + 50;\n XTicks = TIMELINE_HOURS * 2;\n redrawTimeline();\n }\n}", "function buildTimeline(timeline, users){\n\tlet div = document.getElementById(\"timeline\");\n\n\tfor (let i = 0; i < timeline.length; i++){\n\t\tlet userDetails = users[i].split(\";\");\n\t\tlet name = \"<span style=\\\"color:\" + userDetails[1] + \";\\\">\" + userDetails[0] + \"</span>\";\n\t\t\n\t\tif (i % 2 == 0){\n\t\t\tdiv.innerHTML +=\n\t\t\t\t\"<h2>\" + name + \" said</h2>\" +\n\t\t\t\t\"<h3>\\\"\" + timeline[i] + \"\\\"</h3>\" \n\t\t\t\t\"<br/>\";\n\t\t} else {\n\t\t\tdiv.innerHTML +=\n\t\t\t\t\"<h2>\" + name + \" drew</h2>\" +\n\t\t\t\t\"<img class=\\\"drawing\\\" src=\\\"\" + timeline[i] + \"\\\"/>\" +\n\t\t\t\t\"<br/>\";\n\t\t}\n\t\t\n\t\tif (i != timeline.length - 1)\n\t\t\tdiv.innerHTML += \"<div class=\\\"line\\\"></div>\"\n\t}\n}", "updateCanvas() {\n //this is is to reset the canvas to a blank canvas before drawing every instance of lines\n const canvas = this.refs.canvas;\n const clear = canvas.getContext(\"2d\");\n clear.clearRect(0, 0, canvas.width, canvas.height);\n \n const linesArray = this.props.lines.linesArray;\n //if the linesArray contains items within it, we will go over each line and draw it within the canvas element\n {\n linesArray.length > 0 \n ?\n linesArray.forEach((line) => {\n const height = line.height;\n const id = line.id;\n const color = line.color;\n this.drawLines(height, id, color);\n })\n :\n null\n }\n }", "function Timeline()\n{\n this.listeners = [];\n this.element = null;\n this.maxElapsedTime = -1;\n\n // List of all selected bars.\n this.lastSelectedBar = null;\n}", "function draw() {\n \n// 4. Use clock function to get the present time.\n let now = clock();\n let hr = now.hour;\n let mn = now.min;\n let sc = now.progress.min;\n\n// 5. Use map function to re-map time from one range (0-24/60) to another (canvas size).\n let end_sec = map(sc, 0, 1, 0, 800);\n let end_min = map(mn, 0, 60, 0, 800);\n let end_hour = map(hr, 0, 24, 0, 800);\n \n// 6. Draw 3 stagnant rectangles (hour, minute, second) for reference of the canvas. \n fill(70);\n noStroke();\n rect(0, 100, maxWidth, barHeight);\n rect(0, 200, maxWidth, barHeight);\n rect(0, 300, maxWidth, barHeight);\n\n// 7. Draw 3 rectangles that would change thier lenth as per the time (hour, minute, second). \n fill('#00628F');\n rect(0, 90, end_hour, barHeight + 20);\n \n fill('#618EB3');\n rect(0, 195, end_min, barHeight + 10);\n \n fill('#ACC2D9');\n rect(0, 298, end_sec, barHeight + 4);\n}", "function redraw(drawingData, drawingLineAttributes) {\n $($(canvas).parent()).prepend(\"<canvas id=\\\"targetChart\\\" style=\\\"margin-left: calc(.02 * 100vh); margin-right: calc(.02 * 100vh); margin-top: calc(.02 * 100vh);\\\" class=\\\"chartClass\\\"></canvas>\");\n canvas.remove();\n\n canvas = document.getElementById(\"targetChart\");\n canvas.width = $(window).width() * chart_width_scalar;\n canvas.height = $(window).height() * chart_height_scalar;\n myChart = new Chart(canvas.getContext(\"2d\")).Line(drawingData, drawingLineAttributes);\n\n }", "function makeTimeline(dataForMap, dataForTimeline) {\n var margin = { top: 10, right: 10, bottom: 20, left: 25 },\n width = mapWidth - margin.left - margin.right,\n height = 80 - margin.top - margin.bottom;\n\n var timelineSvg = d3.select(\"#timeline-container\").append(\"svg\")\n .attr(\"width\", width + margin.left + margin.right)\n .attr(\"height\", height + margin.top + margin.bottom);\n\n var timeline = timelineSvg.append(\"g\")\n .attr(\"class\", \"timeline\")\n .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");\n\n var x = d3.time.scale()\n .domain(d3.extent(dataForTimeline.map(function(d) { return d.TIME; })))\n .range([0, width]);\n\n var y = d3.scale.linear()\n .domain(d3.extent(dataForTimeline.map(function(d) { return d.TOT; })))\n .range([height, 0]);\n\n var xAxis = d3.svg.axis()\n .scale(x)\n .orient(\"bottom\");\n\n var yAxis = d3.svg.axis()\n .scale(y)\n .orient(\"left\")\n .ticks(2);\n\n var area = d3.svg.area()\n .interpolate(\"linear\")\n .x(function(d) { return x(d.TIME); })\n .y0(height)\n .y1(function(d) { return y(d.TOT); });\n\n timeline.append(\"path\")\n .datum(dataForTimeline)\n .attr(\"class\", \"area\")\n .attr(\"d\", area);\n\n timeline.append(\"g\")\n .attr(\"class\", \"x axis\")\n .attr(\"transform\", \"translate(0,\" + height + \")\")\n .call(xAxis);\n\n timeline.append(\"g\")\n .attr(\"class\", \"y axis\")\n .call(yAxis);\n\n timeline.append(\"text\")\n .attr(\"transform\", \"rotate(-90)\")\n .attr(\"dy\", \"1em\")\n .style(\"text-anchor\", \"end\")\n .text(\"# Crimes\");\n\n // Add brush to timeline, hook up to callback\n var brush = d3.svg.brush()\n .x(x)\n .on(\"brush\", function() { brushCallback(brush, dataForMap); })\n .extent([new Date(\"12/1/2013\"), new Date(\"1/1/2014\")]); // initial value\n\n timeline.append(\"g\")\n .attr(\"class\", \"x brush\")\n .call(brush)\n .selectAll(\"rect\")\n .attr(\"y\", -6)\n .attr(\"height\", height + 7);\n\n brush.event(timeline.select('g.x.brush')); // dispatches a single brush event\n}", "function draw() {\n const data = getData();\n const svg = d3.select('body').append('svg');\n const plot = getPlotArea();\n const paddingGroup = chartUtils.setupSvgAndPaddingGroup(svg, plot);\n const scales = makeScales(data, plot);\n defineDashedLine(svg);\n appendYAxisDashedLines(paddingGroup, scales, plot);\n appendXAxis(paddingGroup, scales, plot);\n appendYAxis(paddingGroup, scales);\n appendBars(paddingGroup, data, scales, plot);\n appendScoreToday(paddingGroup, data, scales);\n appendScoreLastYear(paddingGroup, data, scales);\n appendChartTitle(svg, plot);\n appendYAxisTitle(svg, plot);\n appendFootnote(svg, plot);\n }", "function DJUIElementTimeLine(name, x, y, width, height) {\n\n DJUIElement.call(this, name, x, y, width, height);\n\n \n this.value = 0.0;\n this.UIType =\"timeline\";\n this.receivesClickEvent = true;\n}", "draw_background(){\n this.svg.append('rect')\n .attr(\"class\", \"timeline-bg\")\n .attr('y', `${this.label_height - 5}`)\n .attr('x', -5)\n .attr('width', `${this.WIDTH}`)\n .attr('height', '100%')\n }", "function drawTimeGrid() {\n timeGrid.innerHTML = \"\";\n updateDateAndTz();\n fillDays();\n makeRows(25, difference + 1);\n }", "function drawChart() {\n stroke(0);\n yAxis();\n xAxis();\n}", "function draw(){\n\tvar i;\n\tgrab(\"nextb\").style.display = grab(\"prevb\").style.display = \"none\"; /* a table reset */\n\tflashlighton = 0;\n\thideall();\n\trmblocks();\n\tend_time = 1050;\n\tfor(i=0; i<dontfills.length; i++) if(dontfills[i].e > end_time) end_time = dontfills[i].e;\n\tif(cursched >= schedules.length) cursched = 0;\n\tvar sch = schedules[cursched];\n\tif(sch && sch.length) for(i=0; i<sch.length; i++) if(sch[i].e > end_time) end_time = sch[i].e;\n\tfor(i=0; i<dontfills.length; i++){\n\t\tif (!dontfills[i].c)\n\t\t\tdontfills[i].block = block(dontfills[i].d, dontfills[i].s, dontfills[i].e, dontfill_color, dontfills[i].n);\n\t\telse\n\t\t\tdontfills[i].block = block(dontfills[i].d, dontfills[i].s, dontfills[i].e, dontfills[i].c, dontfills[i].n);\n\t\tdontfills[i].block.style.zIndex = 2;\n\t\tdontfills[i].block.onclick = function(ev){ rmdontfill(ev, this); };\n\t}\n\tif(sch && sch.length) {\n\t\tfor(i=0; i<sch.length; i++){\n\t\t\tif(!sch[i].t) continue;\n\t\t\tvar a = block(sch[i].d, sch[i].s, sch[i].e, sch[i].c, sch[i].t);\n\t\t\tif(sch[i].phantom) a.style.opacity = 0.6;\n\t\t}\n\t\tgrab(\"counter\").innerHTML = (cursched+1).toString() + \"/\" + schedules.length;\n\t}\n\tgrab(\"start_time\").innerHTML = toclock(start_time);\n\tgrab(\"end_time\").innerHTML = toclock(end_time);\n\tswitch(state){\n\tcase \"blank\":\n\t\tgrab(\"state\").innerHTML = \"blank\";\n\t\tgrab(\"state\").style.color = \"black\";\n\t\treturn;\n\tcase \"unbound\":\n\t\tgrab(\"state\").innerHTML = \"unbound- make to bind.\";\n\t\tgrab(\"state\").style.color = \"coral\";\n\t\treturn;\n\tcase \"bound\":\n\t\tgrab(\"state\").innerHTML = \"bound\";\n\t\tgrab(\"state\").style.color = \"royalblue\";\n\t\treturn;\n\tdefault: tantrum();\n\t}\n}", "function renderCanvas() {\n\tframeCount++;\n\tif (frameCount < fCount) {\n\t\t// skips the drawing for this frame\n\t\trequestAnimationFrame(renderCanvas);\n\t\treturn;\n\t}\n\telse frameCount = 0;\n\n\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\t// context.fillStyle = \"#999999\";\n\t// context.fillRect(0,0,canvas.width,canvas.height);\n\n\t\n\n\tGhost.draw()\n\trequestAnimationFrame(renderCanvas);\n}", "function deviceLivetime(){\n var container = document.getElementById('g-chart-deviceLivetime');\n var chart = new google.visualization.Timeline(container);\n var dataTable = new google.visualization.DataTable();\n\n dataTable.addColumn({ type: 'string', id: 'Devicename' });\n dataTable.addColumn({ type: 'date', id: 'Start' });\n dataTable.addColumn({ type: 'date', id: 'End' });\n\n var rows = [];\n deviceLivetime_arr.forEach(function(el){\n rows.push([ el[0], new Date(el[1]), new Date(el[2]) ]);\n });\n\n dataTable.addRows(rows);\n\n var height = 100 + 35*deviceLivetime_arr.length;\n var options = {\n backgroundColor: \"#f9e7d5\",\n height: height\n };\n\n chart.draw(dataTable, options);\n }", "draw() {\n let sprite = this.sprite;\n if (sprite == null)\n return;\n ctx.drawImage(sprite.sprite, sprite.animationFrame * sprite.width, 0, sprite.width, sprite.height, this.rect.x + sprite.xOffset, this.rect.y + sprite.yOffset, this.rect.width * sprite.xStretch, this.rect.height * sprite.yStretch);\n if (Entity.showEntityRects) {\n ctx.beginPath();\n ctx.lineWidth = \"5\";\n ctx.strokeStyle = \"#00ff00\";\n ctx.rect(this.rect.x, this.rect.y, this.rect.width, this.rect.height);\n ctx.stroke();\n }\n }", "function draw() {\n background(0);\n strokeWeight(1);\n\n if (drawArr) {\n for (let i = 0; i < width; ++i) {\n const col = drawMark[i];\n if (col) {\n stroke(col.r, col.g, col.b);\n } else {\n stroke(150);\n }\n line(i + 1, height, i + 1, height - drawArr[i]);\n }\n }\n}", "drawLines() {\n // Early bailout for timeaxis without start date\n if (!this.client.timeAxis.startDate) {\n return;\n }\n\n // We cannot rely on timeAxisViewModel because rendered header may not include full top header.\n // This means we should generate whole top level tick and then iterate over ticks, calculating lines position\n // depending on header config\n const me = this,\n { client } = me,\n { timeAxis } = client,\n axisStart = timeAxis.startDate,\n viewModel = client.timeAxisViewModel,\n tickSize = viewModel.tickSize,\n element = client.backgroundCanvas,\n canvas = document.createElement('canvas'),\n ctx = canvas.getContext('2d'),\n linesForLevel = viewModel.columnLinesFor,\n // header to draw lines for\n targetHeader = viewModel.headerConfig[linesForLevel],\n headers = viewModel.headers,\n // header which is used to draw major lines\n upperHeader = headers[headers.indexOf(targetHeader) - 1] || headers[0],\n // header defining ticks\n lowerHeader = headers[headers.length - 1],\n // when unit is year we should use 1 as increment\n startDate = timeAxis.floorDate(\n axisStart,\n false,\n upperHeader.unit,\n upperHeader.unit === 'year' ? 1 : upperHeader.increment || 1\n ),\n endDate = DateHelper.getNext(startDate, upperHeader.unit, upperHeader.increment || 1, timeAxis.weekStartDay),\n // we rendered one upper header and need to calculate how many ticks fit in it\n ticksInHeader =\n Math.round(DateHelper.getDurationInUnit(startDate, endDate, lowerHeader.unit)) / (lowerHeader.increment || 1),\n nbrLinesToDraw =\n Math.round(DateHelper.getDurationInUnit(startDate, endDate, targetHeader.unit)) / (targetHeader.increment || 1),\n // shows how many ticks should we skip before drawing next line\n ratio = ticksInHeader / nbrLinesToDraw;\n\n if (client.isHorizontal) {\n if (axisStart) {\n const doUnitsAlign = headers.length > 1 && DateHelper.doesUnitsAlign(upperHeader.unit, targetHeader.unit),\n offsetDate = doUnitsAlign\n ? startDate\n : timeAxis.floorDate(axisStart, false, targetHeader.unit, targetHeader.increment),\n // TODO: isContinuous check solved the issue I was seeing but not very generic\n offset = !timeAxis.isContinuous\n ? 0\n : (DateHelper.getDurationInUnit(offsetDate, axisStart, lowerHeader.unit, true) / timeAxis.increment) *\n tickSize,\n // this is position from left side of the canvas to draw first line, otherwi\n startPos = 10,\n height = 20;\n\n DomHelper.removeEachSelector(element, '.b-column-line-major');\n\n let isMajor = false,\n majorHeaderIsRegular = true;\n\n if (\n targetHeader !== upperHeader &&\n doUnitsAlign &&\n lowerHeader.unit === 'day' &&\n DateHelper.compareUnits(upperHeader.unit, 'month') !== -1\n ) {\n // This condition means, that major lines are irregular, e.g. when lower level is days and upper is\n // months. Since months have different duration, we cannot safely repeat images\n majorHeaderIsRegular = false;\n timeAxis.forEachAuxInterval(upperHeader.unit, upperHeader.increment, (start, end) => {\n DomHelper.append(element, {\n tag: 'div',\n className: 'b-column-line-major',\n style: `left:${viewModel.getPositionFromDate(end) - 1}px;`\n });\n });\n }\n\n // hack for FF to not crash when trying to create too wide canvas.\n canvas.width = Math.min(ticksInHeader * 2 * tickSize, 32767);\n canvas.height = height;\n ctx.translate(-0.5, -0.5);\n ctx.lineWidth = 2;\n\n for (let i = 0; i < nbrLinesToDraw; i++) {\n // Only first interval may be major\n if (i === 0) {\n // Filtered time axis should not have any major lines\n isMajor = upperHeader !== targetHeader && doUnitsAlign && majorHeaderIsRegular && timeAxis.isContinuous;\n } else {\n isMajor = false;\n }\n\n const tickStyle = (isMajor && me.majorTickStyle) || (!isMajor && me.tickStyle);\n if (tickStyle !== 'solid') {\n switch (tickStyle) {\n case 'dashed':\n ctx.setLineDash([6, 4]);\n break;\n case 'dotted':\n ctx.setLineDash([2, 3]);\n break;\n }\n }\n\n ctx.beginPath();\n ctx.strokeStyle = isMajor ? me.majorTickColor : me.tickColor;\n\n // draw ticks\n ctx.moveTo(i * ratio * tickSize * 2 + startPos - 1, 0);\n ctx.lineTo(i * ratio * tickSize * 2 + startPos - 1, height + 2);\n ctx.stroke();\n }\n\n // use as background image\n element.style.backgroundImage = `url(${canvas.toDataURL()})`;\n element.style.backgroundSize = `${canvas.width / 2}px`;\n element.style.backgroundPositionX = `${-(startPos / 2 + offset)}px`;\n }\n } else {\n // hack for FF to not crash when trying to create too wide canvas.\n canvas.width = client.timeAxisColumn.resourceColumns.columnWidth * 2;\n canvas.height = 2;\n ctx.translate(-0.5, -0.5);\n ctx.lineWidth = 2;\n\n if (axisStart) {\n DomHelper.removeEachSelector(element, '.b-column-line-major');\n\n // Major lines always as divs to not get so large image\n if (targetHeader !== upperHeader) {\n timeAxis.forEachAuxInterval(upperHeader.unit, upperHeader.increment, (start, end) => {\n DomHelper.append(element, {\n tag: 'div',\n className: 'b-column-line-major',\n style: `top:${viewModel.getPositionFromDate(end) - 1}px;`\n });\n });\n }\n\n if (me.tickStyle !== 'solid') {\n switch (me.tickStyle) {\n case 'dashed':\n ctx.setLineDash([6, 4]);\n break;\n case 'dotted':\n ctx.setLineDash([2, 3]);\n break;\n }\n }\n\n const height = ratio * tickSize * 2;\n\n canvas.height = height;\n\n ctx.beginPath();\n ctx.strokeStyle = me.tickColor;\n ctx.lineWidth = 2;\n\n // draw ticks\n ctx.moveTo(0, height - 1);\n ctx.lineTo(canvas.width + 2, height - 1);\n ctx.stroke();\n }\n\n ctx.beginPath();\n ctx.strokeStyle = me.tickColor;\n\n // draw ticks\n ctx.moveTo(canvas.width - 1, 0);\n ctx.lineTo(canvas.width - 1, canvas.height + 2);\n ctx.stroke();\n\n // use as background image\n element.style.backgroundImage = `url(${canvas.toDataURL()})`;\n element.style.backgroundSize = `${canvas.width / 2}px`;\n element.style.backgroundPositionX = '0';\n }\n }", "drawTimeAreaContent(changedType) {\n const ctx = this.context;\n const timeType = this.options.timeTypeName;\n // init coordinate by time type\n if (!changedType) {\n timeType.forEach((type) => {\n this.coordinate.timeArea[type].data = [];\n const timeAreaType = this.coordinate.timeArea[type].total;\n const oneBoxWidth = timeAreaType.width / this.options.timeArea.columnCount;\n const oneBoxHeight = timeAreaType.height / this.options.timeArea.rowCount;\n const maxNumber = type === 'hour' ? 24 : 60; // minute, second = 60\n let timeAreaObj = {};\n for (let ix = 0, ixLen = maxNumber; ix < ixLen; ix++) {\n const columnIdx = ix % this.options.timeArea.columnCount;\n const page = parseInt(ix /\n (this.options.timeArea.columnCount * this.options.timeArea.rowCount), 0) + 1;\n let rowIdx = 1;\n if (ix % (this.options.timeArea.columnCount * this.options.timeArea.rowCount)\n < this.options.timeArea.columnCount) {\n rowIdx = 0;\n }\n timeAreaObj = {\n startX: timeAreaType.startX + (columnIdx * oneBoxWidth),\n width: oneBoxWidth,\n startY: timeAreaType.startY + (rowIdx * oneBoxHeight),\n height: oneBoxHeight,\n page,\n styleObj: {\n fillText: {\n show: true,\n text: `${ix}`,\n },\n fill: {\n show: true,\n color: this.options.colors.thisMonthFill,\n },\n align: 'center',\n padding: {\n bottom: 13,\n },\n },\n };\n this.coordinate.timeArea[type].data.push(timeAreaObj);\n }\n });\n\n // DRAW box\n timeType.forEach((type) => {\n this.coordinate.timeArea[type].data.forEach((v) => {\n if (v.page === this.coordinate.timeArea[type].page) {\n this.dynamicDraw(ctx, v.startX, v.startY, v.width, v.height, v.styleObj);\n }\n });\n });\n } else {\n // DRAW box\n timeType.forEach((type) => {\n if (changedType === type) {\n this.coordinate.timeArea[type].data.forEach((v) => {\n if (v.page === this.coordinate.timeArea[type].page) {\n this.dynamicDraw(ctx, v.startX, v.startY, v.width, v.height, v.styleObj);\n }\n });\n }\n });\n }\n }", "function d_draw () {//draw a wall in canvas.\n /* drawing lines */\n context.beginPath();\n context.moveTo(this.startx, this.starty);\n context.lineTo(this.endx, this.endy);\n context.strokeStyle = \"white\";\n context.stroke();\n \n \n// context.lineTo(400, 300);\n// context.strokeStyle = \"red\";\n// context.stroke();\n}", "drawCanvas() {\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.ctx.fillStyle = '#18121e';\n this.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);\n this.moveDots();\n }", "doDraw() {\n let v = Math.min(Math.floor(Math.abs((this.life_time%120)-60.0)*(16/60)),15);\n draw_context.strokeStyle = \"#000\" + v.toString(16);\n draw_context.fillStyle = \"#FFF\" + v.toString(16);\n draw_context.font = \"40px Times\";\n draw_context.lineWidth = 10;\n draw_context.strokeText(this.text, canvas_element.width/2, 400);\n draw_context.fillText(this.text, canvas_element.width/2, 400);\n }", "function renderAll() {\n\t\tchart.each(render);\n\t\ttimeline1.updateData(bornDate.top(99999));\n\t}", "function draw() {\r\n\t //debugger;\r\n\t //selectedLeague = loadJSON('assets/ligue1-2017.json');\r\n\t //stroke(153);\r\n\t //line(200,200, 1400, 1400);\r\n\t \r\n\t \r\n\t \r\n\t}", "function draw(){\n ctx.fillStyle = \"black\";\n ctx.clearRect(0,0, 1200, 300);\n ctx.beginPath();\n ctx.fillRect(0, 0, 1000, 400);\n //Call function for robot head drawing\n robotHead();\n // Draw mountain range in background\n mountainRange();\n targetDraw();\n if(monster == 1){\n\tmonster1();\n }\n if(monster == 2){\n\tmonster2();\n }\n if(monster == 3){\n\tmonster3();\n }\n screenText();\n ctx.strokeStyle = 'white';\n ctx.stroke();\n // call draw livebars function\n livebars();\n}", "function draw() {\n background(\"lightblue\");\n /*Put your main animations and code here*/\n\t \n /*ctx.fillStyle = \"blue\";\n\tt.rect(turt.x, turt.y, 200, 200);*/\n\t\n /*log frame*/\n showFrames();\n}", "function draw() {\n if (isLineSelected === true) {\n var xStart, yStart, offset;\n $('#artboard').mousedown(function(e) {\n console.log('dewing');\n offset = $(this).offset();\n xStart = (e.pageX - offset.left);\n yStart = (e.pageY - offset.top);\n renderLine(e, offset);\n }).mouseup(function(e) {\n offset = $(this).offset();\n endLine(e, xStart, yStart, offset);\n })\n } else if (isCircleSelected === true) {\n var xStart, yStart, offset;\n $('#artboard').mousedown/*.click*/(function(e) {\n console.log('dewing');\n offset = $(this).offset();\n xStart = (e.pageX - offset.left);\n yStart = (e.pageY - offset.top);\n renderCircle(e, offset);\n }).mouseup(function(e) {\n offset = $(this).offset();\n endCircle(e, xStart, yStart, offset);\n })\n } else if (isRectSelected === true) {\n var xStart, yStart, w, h, offset;\n $('#artboard').mousedown(function(e) {\n offset = $(this).offset();\n xStart = (e.pageX - offset.left);\n yStart = (e.pageY - offset.top);\n renderRect(e, offset);\n }).mouseup(function(e) {\n offset = $(this).offset();\n endRect(e, xStart, yStart, w, h, offset);\n })\n } else if (isFreeSelected === true) {\n var start, startMid;\n drawFreeLine();\n }\n}", "function drawLineChart() {\n var maxValue = 150;\n maxValue = d3.max(deathDays, function (d) {\n return Number(d.deaths);\n });\n var xScale = d3.scale.linear();\n var yScale = d3.scale.linear();\n var timeScale = d3.scale.linear();\n\n\n\n xScale.domain([0, 41]).range([0, 400]);\n yScale.domain([0, maxValue]).range([300, 0]);\n timeScale.domain([0, 400]).range([0, 41]);\n\n timeline.append('rect')\n .attr(\"x\", \"0\")\n .attr(\"y\", \"0\")\n .attr(\"width\", \"400\")\n .attr(\"height\", \"300\")\n .attr(\"fill\", \"lightgrey\")\n .attr(\"stroke\", \"none\")\n .attr(\"class\", \"backing\")\n .attr(\"style\", \"opacity: \\\"0.05\\\"\")\n .attr('pointer-events', 'all')\n .on('mousemove', function () {\n clearDeaths();\n subset = [];\n mousedDay = Math.floor(timeScale(d3.mouse(this)[0]));\n todayCount = (deathDays[Math.floor(timeScale((d3.mouse(this)[0])))]).deaths;\n timeline.selectAll(\"line.pointer\").remove();\n\n timeline.append('line')\n .attr(\"x1\", Math.floor((d3.mouse(this)[0])))\n .attr(\"y1\", \"0\")\n .attr(\"x2\", Math.floor((d3.mouse(this)[0])))\n .attr(\"y2\", \"300\")\n .attr(\"class\", \"pointer\")\n .attr(\"stroke\", \"red\")\n .attr(\"stroke-width\", \"2\");\n\n timeline.append('line')\n .attr(\"x1\", \"0\")\n .attr(\"y1\", yScale(todayCount))\n .attr(\"x2\", \"400\")\n .attr(\"y2\", yScale(todayCount))\n .attr(\"class\", \"pointer\")\n .attr(\"stroke\", \"red\")\n .attr(\"stroke-width\", \"2\");\n\n //console.log(window.deathDetails)\n console.log(mousedDay);\n console.log(deathDays[Math.floor(timeScale((d3.mouse(this)[0])))].i);\n\n total = 0;\n for (q = 0; q < mousedDay; q++) {\n //subset.push(((q+1) * deathDays[q].deaths));\n console.log(deathDays[q].deaths);\n total += Number(deathDays[q].deaths);\n console.log(total);\n }\n subset = deathDetails.slice(0, total);\n console.log(subset);\n\n mapDeaths(subset);\n\n })\n .on('mouseout', function (d) {\n timeline.selectAll(\"line.pointer\").remove();\n subset = [];\n tota = 0;\n // clearDeaths();\n mapDeaths(deathDetails);\n });\n\n var pathGenerator = d3.svg.line()\n .x(function (d, i) {\n return xScale(i);\n })\n .y(function (d) {\n return yScale(d.deaths);\n });\n\n var xAxis = d3.svg.axis()\n .scale(xScale)\n .orient('bottom')\n .tickFormat(function (d) {\n return \"\" + d;\n });\n\n var yAxis = d3.svg.axis()\n .scale(yScale)\n .orient('left');\n\n timeline.append('g')\n .attr('class', 'axis')\n .attr('transform', 'translate(0,' + 300 + ')')\n .call(xAxis);\n\n timeline.append('g')\n .attr('class', 'axis')\n .call(yAxis);\n\n timeline.append('path')\n .style('fill', 'none')\n .style('stroke', 'black')\n .style('stroke-width', '3px')\n .attr('d', pathGenerator(deathDays));\n\n timeline.append('text')\n .text(\"Days Since August 19th, 1854\")\n .style('font-size', '11px')\n .attr('transform', 'translate(' + 105 + ',' + 335 + ')');\n\n timeline.append('text')\n .text(\"Deaths\")\n .style('font-size', '11px')\n .attr('transform', 'translate(' + \"-30\" + ',' + 180 + ') rotate(' + 270 + ')');\n}", "function drawAnimated(timeStamp) {\n updateDrawables(timeStamp);\n draw();\n window.requestAnimationFrame(drawAnimated);\n}", "function drawEmpty() {\n\t\tdrawChart([[0,0]], \"none\");\n\t}", "function draw() {\n const filteredData = state.data\n .filter(d => d.death_cause === state.selection)\n\n yScale\n .domain(d3.extent(filteredData, d=>d.death_count))\n\n // draw line\n const lineFunction = d3.line()\n .x(d => xScale(d.year))\n .y(d => yScale(d.death_count))\n\n svg.selectAll(\".line\")\n .data([filteredData]) // array data type\n .join(\"path\")\n .attr(\"class\", 'line')\n .attr(\"fill\", \"none\")\n .attr(\"stroke\", \"white\")\n .transition()\n .duration(1000)\n .attr(\"d\", d => lineFunction(d))\n}", "initTimelineConfig() {\n var self = this;\n var color = self.colorRange;\n var stackList = {},\n maxStack = 0,\n minTime = 0,\n maxTime = 0,\n width = self.width - self.margin.left - self.margin.right,\n height = self.height - self.margin.top - self.margin.bottom;\n\n // count number of stack and calculate min time, max time from data\n if (self.stack || self.ending === 0 || self.starting === 0) {\n \n self.dataTarget.forEach(function (datum, index) {\n\n if (self.stack && Object.keys(stackList).indexOf(index) == -1) {\n stackList[index] = maxStack;\n maxStack++;\n }\n\n datum.value.forEach(function (time, i) {\n if(self.starting === 0)\n if (time.start < minTime || minTime === 0)\n minTime = time.start;\n if(self.ending === 0) {\n if (time.start > maxTime)\n maxTime = time.start;\n if (time.end > maxTime)\n maxTime = time.end;\n }\n });\n });\n\n if (self.ending === 0) {\n self.ending = maxTime;\n }\n if (self.starting === 0) {\n self.starting = minTime;\n }\n }\n\n self.maxStack = maxStack;\n var scale = width / (self.ending - self.starting);\n\n //draw border\n self.body.append(\"rect\")\n .attr(\"class\", \"timeline-border-bar\")\n .attr(\"x\", 0)\n .attr(\"width\", width)\n .attr(\"y\", 0 - self.itemMargin / 2)\n .attr(\"height\", (self.itemHeight + self.itemMargin) * self.dataTarget.length)\n .attr(\"stroke\", \"rgb(154, 154, 154)\")\n .attr(\"stroke-width\", 2)\n .attr(\"fill\", \"none\");\n\n self.dataTarget.forEach( function(datum, index){\n var data = datum.value;\n\n //draw background\n if (self.backgroundColor) { \n var barYAxis = ((self.itemHeight + self.itemMargin) * stackList[index]);\n self.body.selectAll(\"g\")\n .data(data).enter()\n .insert(\"rect\")\n .attr(\"class\", \"timeline-background-bar\")\n .attr(\"x\", 0)\n .attr(\"width\", width)\n .attr(\"y\", barYAxis - self.itemMargin / 2)\n .attr(\"height\", self.itemHeight + self.itemMargin)\n .attr(\"fill\", Helper.isArray(self.backgroundColor) ? self.backgroundColor[index % (self.maxStack - 1)] : self.backgroundColor);\n }\n\n if (self.striped) { \n var barYAxis = ((self.itemHeight + self.itemMargin) * stackList[index]);\n self.body.selectAll(\"g\")\n .data(data).enter()\n .insert(\"rect\")\n .attr(\"class\", \"timeline-background-bar\")\n .attr(\"x\", 0)\n .attr(\"width\", width)\n .attr(\"y\", barYAxis - self.itemMargin / 2)\n .attr(\"height\", self.itemHeight + self.itemMargin)\n .attr(\"fill\", index % 2 ? \"rgb(255, 255, 255)\" : \"rgb(230, 230, 230)\");\n }\n\n //draw item\n self.body.selectAll(\"g\")\n .data(data).enter()\n .append(function (d, i) {\n return document.createElementNS(d3.ns.prefix.svg, d.end ? \"rect\" : \"circle\");\n })\n .attr(\"x\", getXPos)\n .attr(\"y\", getStackPosition)\n .attr(\"width\", function (d, i) {\n return (d.end - d.start) * scale;\n })\n .attr(\"cy\", function (d, i) {\n return getStackPosition(d, i) + self.itemHeight / 2;\n })\n .attr(\"cx\", getXPos)\n .attr(\"r\", self.itemHeight / 2)\n .attr(\"height\", self.itemHeight)\n .style(\"fill\", color(index));\n\n //draw label inside item\n // self.body.selectAll(\"g\")\n // .data(data).enter()\n // .append(\"text\")\n // .attr(\"x\", getXTextPos)\n // .attr(\"y\", getStackTextPosition)\n // .text(function(d) {\n // return d.name;\n // });\n\n if (self.rowSeparator && index < self.maxStack - 1) {\n var lineYAxis = ( self.itemHeight + self.itemMargin / 2 + (self.itemHeight + self.itemMargin) * stackList[index]);\n self.body.append(\"svg:line\")\n .attr(\"class\", \"timeline-row-separator\")\n .attr(\"x1\", 0)\n .attr(\"x2\", width)\n .attr(\"y1\", lineYAxis)\n .attr(\"y2\", lineYAxis)\n .attr(\"stroke-width\", 3)\n .attr(\"stroke\", Helper.isArray(self.rowSeparator) ? self.rowSeparator[index % (self.maxStack - 1)] : self.rowSeparator);\n }\n\n //draw the label left side item\n if (!Helper.isEmpty(datum.name) && datum.name != \"\") { \n var rowsDown = self.margin.top + (self.itemHeight + self.itemMargin) * (stackList[index] === undefined ? 0 : stackList[index]) + self.itemHeight * 0.75;\n\n d3.select(self.body[0][0].parentNode).append(\"text\")\n .attr(\"class\", \"timeline-label\")\n .attr(\"transform\", \"translate(\" + self.labelMargin + \",\" + rowsDown + \")\")\n .text(datum.name);\n }\n //draw icon\n else if (!Helper.isEmpty(datum.icon) && datum.icon != \"\") {\n d3.select(self.body[0][0].parentNode).append(\"image\")\n .attr(\"class\", \"timeline-label\")\n .attr(\"transform\", \"translate(\"+ self.labelMargin +\",\"+ (self.margin.top + (self.itemHeight + self.itemMargin) * stackList[index])+\")\")\n .attr(\"xlink:href\", datum.icon)\n .attr(\"width\", self.itemHeight)\n .attr(\"height\", self.itemHeight);\n }\n\n function getStackPosition(d, i) {\n if (self.stack) {\n return (self.itemHeight + self.itemMargin) * stackList[index];\n }\n return 0;\n }\n function getStackTextPosition(d, i) {\n if (self.stack) {\n return (self.itemHeight + self.itemMargin) * stackList[index] + self.itemHeight * 0.75;\n }\n return self.itemHeight * 0.75;\n }\n });\n\n function getXPos(d, i) {\n return (d.start - self.starting) * scale;\n }\n\n function getXTextPos(d, i) {\n return (d.start - self.starting) * scale + 5;\n }\n }", "draw() {\n this.checkContext();\n this.setRendered();\n if (this.unbeamable) return;\n\n if (!this.postFormatted) {\n this.postFormat();\n }\n\n this.drawStems();\n this.applyStyle();\n this.drawBeamLines();\n this.restoreStyle();\n }", "function draw() {\n if (!drawOnTop.checked) {\n clear();\n }\n // Handeling the Draw my self\n render();\n}", "function mainDraw() {\n\n stage.removeAllChildren();\n stage.update();\n \n //Create a Stage object to manipulate the canvas.\n stage = new createjs.Stage(\"canvas\");\n\n var bgImg = new createjs.Bitmap(queue.getResult('bgImg2'));\n bgImg.scaleX = 0.8;\n bgImg.scaleY = 0.8;\n bgImg.x = 0;\n bgImg.y = -70;\n stage.addChild(bgImg);\n\n killCount = 0;\n shotCount = 0;\n\n drawInfoWrapper();\n drawInitialBullets(); // bottom-right bullets\n drawClock();\n drawScore();\n createCrosshair();\n createTarget();\n\n // Add ticker\n createjs.Ticker.setFPS(60); // smoother fps\n createjs.Ticker.timingMode = createjs.Ticker.RAF; // smoother\n createjs.Ticker.addEventListener('tick', stage);\n createjs.Ticker.addEventListener('tick', ticker);\n}", "function draw() {\n if (canvasValid == false) {\n clear(ctx);\n\n // Add stuff you want drawn in the background all the time here\n\n // draw all boxes\n var l = boxes.length;\n for (var i = 0; i < l; i++) {\n drawshape(ctx, boxes[i], boxes[i].fill);\n }\n\n // draw selection\n // right now this is just a stroke along the edge of the selected box\n if (mySel != null) {\n ctx.strokeStyle = mySelColor;\n ctx.lineWidth = mySelWidth;\n ctx.strokeRect(mySel.x,mySel.y,mySel.w,mySel.h);\n }\n\n // Add stuff you want drawn on top all the time here\n\n canvasValid = true;\n //if(mySel != null)\n // fall();\n timeStep();\n }\n}", "onTimelinePaint({ firstPaint }) {\n const me = this;\n\n if (!me.subGrid.insertRowsBefore) {\n return;\n }\n\n if (firstPaint) {\n me.subGridElement.classList.add('b-timeline-subgrid');\n\n // If the owning Scheduler has hideHeaders: true, element won't be available.\n if (me.element) {\n EventHelper.on({\n element : me.element,\n thisObj : me,\n click : 'onContainerElementClick',\n dblclick : 'onContainerElementClick',\n contextmenu : 'onContainerElementClick'\n });\n }\n\n if (me.mode === 'vertical') {\n me.refreshHeader();\n }\n }\n }", "function makeTimeline(parsedData) {\n var listings = parsedData.listings;\n var interactions = parsedData.interactions;\n\n var isZoomed = false; // track status\n var data = formatDataForTimeline(listings, interactions);\n var filteredData; // on zoom\n\n var container = d3.select(\"#timeline\");\n var dateRange = d3.select(\".date-summary\");\n var listingsSummary = d3.select(\".listings-summary\");\n var interactionsSummary = d3.select(\".interactions-summary\");\n\n var zoomToggle = d3.select(\"#timeline .zoom\")\n .html(\"Zoom\")\n .on(\"click\", zoomOrResetTimeline);\n\n var timeline = fancyLineChart('#timeline')\n .width(700)\n .height(100)\n .xAccessor(function(d) { return +d.key})\n .yAccessor(function(d) { return +d.value })\n .y2Accessor(function(d) { return +d.value })\n .axisY({ title: \"# New Listings\", titleClass: \"y-label listings-color\" })\n .axisY2({ title: \"# Guest-Host Intrxns\", titleClass: \"y-label interactions-color\" })\n .onBrushed(onBrush);\n\n timeline.xAxis().ticks(5);\n timeline.yAxis().ticks(5);\n timeline.y2Axis().ticks(5);\n\n d3.select(\"#timeline\")\n .datum(data)\n .call(timeline);\n\n timeline.brush()\n .extent(initialTimerange);\n\n timeline.svg.select(\".brush\")\n .call(timeline.brush());\n\n onBrush(); // emit an event to init\n\n function onBrush(brush, brushG) {\n brush = brush || timeline.brush();\n\n var extent = brush.extent()\n .map(d3.time.day.round); // snap selection to days\n\n // Filter data\n // data for supply side\n listings.dims\n .dateCreated.filter(extent);\n\n // data for demand side\n interactions.dims\n .firstInteraction.filter(extent);\n\n // title for date range\n dateRange.html(formatDateRange(extent, brush.empty()));\n\n // listing / interaction counts\n listingsSummary.html(getListingsSummary(parsedData, extent, brush.empty()));\n interactionsSummary.html(getInteractionsSummary(parsedData, extent, brush.empty()));\n\n // path analysis\n sankeyPath.update(\n parsedData.filterPathAnalysisByDateRange(undefined, brush.extent())\n );\n\n redrawAll(parsedData);\n\n // Update status of zoom button\n if (brush.empty()) {\n zoomToggle.style(\"visibility\", \"hidden\");\n timeline.updateChart(data);\n }\n else {\n zoomToggle.style(\"visibility\", null);\n }\n }\n\n // Formats for reusable linechart { name: string, values: [object] }\n function formatDataForTimeline(listings, interactions) {\n var listingsGroup = listings.groups.dateCreated\n .top(Infinity)\n .sort(function(a,b) { return a.key - b.key; });\n\n var listingsData = {\n name: \"new listings\",\n color: listingsColor,\n axis: 0,\n values: listingsGroup\n };\n\n var interactionsGroup = interactions.groups.firstInteraction\n .top(Infinity)\n .sort(function(a,b) { return a.key - b.key; });\n\n var interactionsData = {\n name: \"interactions\",\n color: interactionsColor,\n axis: 1,\n values: interactionsGroup\n };\n\n var data = [listingsData, interactionsData];\n\n return data;\n };\n\n function zoomOrResetTimeline() {\n var brush = timeline.brush();\n filterToTimeRange(brush.extent());\n\n timeline.svg.select(\".brush\")\n .call(brush.clear());\n };\n\n function filterToTimeRange(extent) {\n filteredData = [];\n\n data.forEach(function(group) {\n var values = group.values.filter(function(d) {\n return d.key >= extent[0] && d.key <= extent[1];\n });\n filteredData.push(Object.assign({}, group, { values }));\n });\n\n zoomToggle.style(\"visibility\", \"hidden\");\n timeline.updateChart(filteredData);\n };\n\n function formatDateRange(range, isEmpty) {\n if (isEmpty) {\n return \"Select time range\";\n }\n var format = d3.time.format(\"%a %b %d %Y\");\n return \"Showing data for <span class='emph'>\" + format(range[0]) +\n \"</span> &ndash; <span class='emph'>\" + format(range[1]) + \"</span>\";\n };\n\n function getListingsSummary(parsedData, extent, isEmpty) {\n if (isEmpty) {\n return \"<div>-- new listings</div>\";\n }\n var monthInMs = (1000*60*60*24*30);\n var offsetExtent = [new Date(extent[0] - monthInMs), new Date(extent[1] - monthInMs)];\n var listings = parsedData.listings.groups.dateCreated.all();\n var curr;\n var count = 0;\n var countOffset = 0;\n var percentChange;\n // iterate over cross filter which is already keyed on days ...\n for (var i = 0, len = listings.length; i < len; i++) {\n curr = listings[i];\n if (curr.key >= extent[0] && curr.key <= extent[1]) {\n count += curr.value;\n }\n if (curr.key >= offsetExtent[0] && curr.key <= offsetExtent[1]) {\n countOffset += curr.value;\n }\n }\n percentChange = (count - countOffset) / countOffset * 100;\n percentChange = isNaN(percentChange) ? \"-\" : Math.round(percentChange*100) / 100;\n var arrow = \"<span class='glyphicon glyphicon-arrow-\" +\n (percentChange > 0 ? \"up\" : \"down\") + \"'></span>\";\n\n return \"<div>\" +\n \"<span class='emph'>\" + commaFormat(count) + \"</span> new listings\" +\n \"</div>\" +\n \"<div class='summary-change'>\" +\n arrow + \"<span class='emph'>\" + Math.abs(percentChange) + \"%</span> from \" + commaFormat(countOffset) +\n \"</div>\";\n };\n\n function getInteractionsSummary(parsedData, extent, isEmpty) {\n if (isEmpty) {\n return \"<div>-- interactions</div>\";\n }\n var monthInMs = (1000*60*60*24*30);\n var offsetExtent = [new Date(extent[0] - monthInMs), new Date(extent[1] - monthInMs)];\n var interactions = parsedData.interactions.groups.firstInteraction.all();\n var curr;\n var count = 0;\n var countOffset = 0;\n var percentChange;\n // iterate over cross filter which is already keyed on days ...\n for (var i = 0, len = interactions.length; i < len; i++) {\n curr = interactions[i];\n if (curr.key >= extent[0] && curr.key <= extent[1]) {\n count += curr.value;\n }\n if (curr.key >= offsetExtent[0] && curr.key <= offsetExtent[1]) {\n countOffset += curr.value;\n }\n }\n percentChange = (count - countOffset) / countOffset * 100;\n percentChange = isNaN(percentChange) ? \"-\" : Math.round(percentChange*100) / 100;\n var arrow = \"<span class='glyphicon glyphicon-arrow-\" +\n (percentChange > 0 ? \"up\" : \"down\") + \"'></span>\";\n\n return \"<div>\" +\n \"<span class='emph'>\" + commaFormat(count) + \"</span> interactions \" +\n \"</div>\" +\n \"<div class='summary-change'>\" +\n arrow + \"<span class='emph'>\" + Math.abs(percentChange) + \"%</span> from \" + commaFormat(countOffset) +\n \"</div>\";\n };\n\n}" ]
[ "0.7080322", "0.6962328", "0.691651", "0.6812492", "0.66872245", "0.66731375", "0.6668398", "0.660053", "0.63190126", "0.63044447", "0.6264887", "0.6247488", "0.62271714", "0.6179236", "0.61697626", "0.6105627", "0.60899585", "0.60818005", "0.60580105", "0.603072", "0.60301983", "0.6015337", "0.6014331", "0.6009135", "0.59942704", "0.59880644", "0.59857035", "0.5973494", "0.5960122", "0.59560823", "0.59104085", "0.59104085", "0.59104085", "0.59104085", "0.5906102", "0.59002227", "0.58998835", "0.5881498", "0.5879446", "0.5878351", "0.587715", "0.587236", "0.58718204", "0.58587587", "0.5825162", "0.582058", "0.58158773", "0.5813653", "0.5806349", "0.5806127", "0.5801987", "0.5796018", "0.5781504", "0.57780784", "0.5776768", "0.57762843", "0.577419", "0.57577986", "0.57492006", "0.5746233", "0.5743736", "0.57279724", "0.5724968", "0.57236844", "0.57194704", "0.57114035", "0.5707102", "0.5706564", "0.57035834", "0.5702603", "0.5701153", "0.56977534", "0.5685111", "0.5680685", "0.5678969", "0.5678219", "0.56752086", "0.5668123", "0.5667299", "0.566495", "0.5650305", "0.5646926", "0.5645989", "0.56454206", "0.5642315", "0.5639198", "0.5636134", "0.56345737", "0.56315976", "0.56271887", "0.5625308", "0.5625184", "0.5619827", "0.56166416", "0.5615436", "0.5612669", "0.56103724", "0.56089365", "0.56062526", "0.5603579" ]
0.7229555
0
Time comp: O(n) Space comp: O(n) Iterative solution
function returnKthToLast(head, k) { let p1 = head; for (let i = 0; i < k; i++) { p1 = p1.next; } let p2 = head; while(p1) { p2 = p2.next; p1 = p1.next; } return p2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mystery(n) {\n let r = 0;\n for (let i = 0; i < n; i++) {\n for (let j = i + 1; j <= n; j++) {\n for (let k = 1; k < j; k++) {\n r++;\n }\n }\n }\n return r;\n}", "function funChallenge(input) {\n let a = 10; // O(1)\n a = 50 + 3; // O(1)\n\n for (let i = 0; i < input.length; i++) {\n // O(n)\n anotherFunction(); // O(n)\n let stranger = true; // O(n)\n a++; // O(n)\n }\n return a; // O(1)\n}", "function solve(input) {\n let elves = [];\n for (let i = 0; i < input; i++) {\n elves.push(i + 1);\n }\n\n function getNextIndex(index) {\n let next = (elves.length / 2) + index;\n if (next >= elves.length) {\n next -= elves.length\n }\n if (!_.isInteger(next)) {\n next = _.floor(next);\n }\n return next;\n }\n\n let current = elves[0];\n // let currentTime = new Date().getTime();\n while (elves.length > 1) {\n let index = _.indexOf(elves, current);\n let nextIndex = getNextIndex(index);\n // if (index % 100 === 0) {\n // let newTime = new Date().getTime();\n // console.log(index, elves[index], elves[nextIndex], elves.length, newTime - currentTime);\n // currentTime = newTime;\n // }\n elves[nextIndex] = 0;\n elves = _.compact(elves);\n let nextCurrent = _.indexOf(elves, current) + 1;\n if (nextCurrent >= elves.length) {\n nextCurrent = 0;\n }\n current = elves[nextCurrent];\n }\n console.log(input, elves[0]);\n}", "function funChallenge(input) {\n let a = 10; // O(1)\n a = 50 + 3; // O(1)\n\n for (let i = 0; i < input.length; i++) {\n // O(n) --> number of inputs\n anotherFunction(); // O(n)\n let stranger = true; // O(n)\n a++; // O(n)\n }\n return a; // O(1)\n}", "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++) {\n // 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 for (let j = 0; j < input; j++) {\n // 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}", "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++) { //* \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++) { //*\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}", "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++) {\n // O(n) --> numbers of inputs\n let x = i + 1; // O(n)\n let y = i + 2; // O(n)\n let z = i + 3; // O(n)\n }\n for (let j = 0; j < input; j++) {\n // O(n) --> numbers of inputs\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}", "function solution (arr) {\n\t// if input has length of 1\n\tif ( arr.length === 1 ) {\n\t\t// return -1\n\t\treturn -1; \n\t}\n\t// make a store\n\tlet store = {};\n\t// make a max\n\tlet max=0;\n\t// iterate th input\n\tfor ( let i = 0; i < arr.length; i ++ ) {\n\t\t// put every value into store\n\t\tstore[arr[i]]= true;\n\t}\n\t// iterate th input again\n\tfor ( let j = 0; j < arr.length; j++ ) {\n\t\t// for every value P\n\t\tlet P = arr[j];\n\t\t\t// for every suprior value Q\n\t\t\tfor (let k = j+1; k < arr.length; k++ ) {\n\t\t\t\tlet Q = arr[k];\n\t\t\t// if abs P - Q is bigger than max\n\t\t\t\tif ( Math.abs( P - Q) > max ) {\n\t\t\t\t\t// make an ongoing run\n\t\t\t\t\tlet ongoingRun = 0\t\n\t\t\t\t\t// get max value btw P and Q\n\t\t\t\t\tconst maxVal = P > Q ? P : Q;\n\t\t\t\t\tconst minVal = P < Q ? P : Q;\n\t\t\t\t\t// go from max to min decrementing 1 (inter value)\n\t\t\t\t\tfor ( let interValue = maxVal-1; interValue >= minVal; interValue -=1 ) {\n\n\t\t\t\t\t\tongoingRun++;\n\t\t\t\t\t\t// if loop has finished : adajcent found\n\t\t\t\t\t\tif ( interValue === minVal ) {\n\t\t\t\t\t\t\t// if ongoing run is bigger than max\n\t\t\t\t\t\t\t// max = ongoing run\n\t\t\t\t\t\t\tmax = max >= ongoingRun ? max : ongoingRun\n\t\t\t\t\t\t\t// exit\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t// if inter value is in store\n\t\t\t\t\t\tif ( store[interValue] === true ) {\n\t\t\t\t\t\t\t// ongoing run = 0\n\t\t\t\t\t\t\tongoingRun=0;\n\t\t\t\t\t\t\t// break\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\t\t\n\t\t\t}\t\t\n\t}\n\t// return max\n\treturn max;\n}", "function solution(n) {\n let answer = 0;\n let tempArr = [];\n let root = Math.sqrt(n);\n \n for (let i = 0; i <= n; i++) {\n tempArr.push(true);\n }\n \n tempArr[0] = false;\n tempArr[1] = false;\n \n for (let j = 2; j < root; j++) {\n if (tempArr[j]) {\n for (let k = j * j; k <= n; k += j) {\n tempArr[k] = false;\n }\n }\n }\n \n for (let l = 0; l < tempArr.length; l++) {\n if (tempArr[l]) answer += 1;\n }\n \n return answer;\n}", "function loopTheLoop() {\n // time complexity would be something like 45^47\n for (let i = 0; i < 45; i++) {\n for (let j = 1; j < 47; j++) {\n console.log(i, j);\n }\n }\n}", "function naiveSumZero(arr){ // O(n^2)\r\n for(let i = 0; i < arr.length; i++){ // O(n)\r\n for(let j = i + 1; j < arr.length; j++){ // nested O(n)\r\n if(arr[i] + arr[j] === 0){\r\n return [arr[i], arr[j]];\r\n }\r\n }\r\n }\r\n}", "function findSolutions(n) {\n // Create a 2 step for loop\n for (let i = 1; i <= 2; i++) {\n // if the current value is equal to n, increment the count and return\n if (i === n) {\n count++;\n return\n // if it is more than n, return\n } else if (i > n) {\n return\n // if it is less than n, call climbing Stairs on n - the current value\n } else {\n findSolutions(n - i);\n }\n }\n }", "function problem9(){\n console.time('Problem 9 Runtime')\n let tripletProduct = null\n let startingValue = 500\n for(let c = startingValue; c > 2; c--){\n let c2 = c*c\n for(let b = c-1; b > 1; b--){\n let b2 = b*b\n for(let a = b-1; a > 0; a--){\n let a2 = a*a\n if(a2 + b2 == c2){\n let tripletSum = a+b+c\n if(tripletSum == 1000) {\n tripletProduct = a*b*c\n console.log(tripletProduct)\n console.timeEnd('Problem 9 Runtime')\n return\n }\n }\n }\n }\n }\n}", "function solution(n) {\n d = new Array(30);\n l = 0;\n while (n > 0) {\n d[l] = n % 2;\n n = Math.floor(n / 2);\n l += 1;\n }\n console.log('l = ', l);\n console.log('d = ', d);\n for (p = 1; p < 1 + l; ++p) {\n ok = true;\n for (i = 0; i < l - p; ++i) {\n if (d[i] != d[i + p]) {\n ok = false;\n break;\n }\n }\n if (ok) {\n return p;\n }\n }\n return -1;\n}", "function boooo(n) {\n for (let i = 0; i < n; i++) { // O(1)\n console.log('booooo');\n }\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 6.4.0)\n \n N = 100001\n var bitmap = Array(N).fill(false);\n for (var i = 0; i < A.length; i ++) {\n if (A[i] > 0 && A[i] <= N) {\n bitmap[A[i]] = true;\n }\n }\n \n for(var j = 1; j <= N; j++) {\n if (!bitmap[j]) {\n return j;\n }\n }\n \n return N + 1;\n}", "function solution(a) { // O(N)\n let max1; // O(1)\n let max2; // O(1)\n\n for (let value of a) { // O(N)\n if (!max1) { // O(1)\n max1 = value; // O(1)\n } else if (value > max1) { // O(1)\n max2 = max1; // O(1)\n max1 = value; // O(1)\n } else if (value < max1) { // O(1)\n if (!max2) { // O(1)\n max2 = value; // O(1)\n } else if (value > max2) { // O(1)\n max2 = value; // O(1)\n }\n }\n }\n\n return max2; // O(1)\n}", "function main() {\n var T = parseInt(readLine());\n \n for(var a0 = 0; a0 < T; a0++){\n \n \n var n = parseInt(readLine());\n q = readLine().split(' ');\n q = q.map(Number);\n \n \n q = [0].concat(q);\n \n var working =[0];\n \n var pending =[];\n \n for(var i =1;i<=n;i++){\n working.push(i);\n }\n \n var solution =0;\n \n //console.log('\\n',q,'\\n');\n \n for(var i=1;i<=n;i++){\n \n //console.log('ITERATION::',i)\n \n //console.log(working);\n\n \n //console.log('Q: ',q[i],' WORKING: ',working[i]);\n \n if(q[i]!= working[i] ){\n \n var index = working.indexOf(q[i]);\n \n var target =i;\n \n //console.log('TARGET: ',target,'INDEX: ',index);\n \n if( (index - target) > 2 || (target>index) ){\n pending.push({index:index,target:target,element:q[i]})\n }\n else{\n \n var element = working.splice(index,1);\n \n var rest = working.splice(target);\n \n var working = working.concat(element,rest);\n \n solution += index-target;\n }\n \n //console.log('SOLUTION: ',solution);\n \n }\n \n //console.log(working);\n\n \n var stopCondition =true;\n \n for(var j=1;j<n;j++){\n if(q[j]!== working[j]){\n stopCondition =false;\n break;\n }\n }\n \n if(stopCondition){\n console.log(solution);\n break;\n }\n \n }\n \n \n if(pending.length>0){\n console.log('Too chaotic')\n }\n \n \n \n \n }\n\n}", "function combinationSum(candidates, target) {\n let dp=[...Array(candidates.length+1)].map(d=>[...Array(target+1)].map(d=>0))\n // dp[sum][i]= #ways to reach sum with the first i items\n\n dp[0][0]=1// we can reach sum 0 with 0 items in 1 way\n for (let i = 1; i <= candidates.length; i++) {\n let ele=candidates[i-1]\n for (let s = 0; s <=target; s++) {\n if(ele<=s){\n dp[i][s]+=dp[i][s-ele] //this line allows repetition,\n // if it was +=dp[i-1][s-ele], it would mean that i m only picking an element once\n }\n dp[i][s]+=dp[i-1][s]\n \n } \n }\n\n dp.forEach(d=>console.log(d+''))\n let result=[...Array(dp[candidates.length][target])].map(d=>[])\n //reconstruction ezpz only through dp table\n let recursion=(i,j,left)=>{\n if(i<=0||j<=0||dp[i][j]==0)return\n let num=dp[i][j]-dp[i-1][j]\n if(num>0){\n for (let ii = left; ii <left+num; ii++) \n result[ii].push(candidates[i-1]) \n recursion(i,j-candidates[i-1],left)\n }\n recursion(i-1,j,left+num)\n }\n recursion(candidates.length,target,0)\n return result\n}", "function solution(A, S) {\n // write your code in JavaScript (Node.js 8.9.4\n let result = 0;\n if(A.length<1){\n return result; //base case\n }\n //dymamic\n let runningSum = 0;\n for(let i=0; i<A.length; i++){\n let el = A[i];\n \n runningSum+=el;\n \n // if(el>S){\n // continue;\n // }\n // else if(el===S){\n // result++;\n // }\n // else {\n // remaining=S-el;\n //get left and right of S\n result+= solution(A.slice(0,i), S);\n result+= solution(A.slice(i+1), S);\n //}\n }\n if(Math.floor(runningSum/A.length)===S){\n result++;\n }\n \n \n return result;\n //solutionHelper(A,S,0, A.length-1);\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n // [1,0] . [0,1]\n let f = A[0];\n let count = 0;\n let getOCount = getCount(A, 1);\n let getZCount = getCount(A, 0);\n console.log(getOCount + \" \" + getZCount);\n if (getOCount >= getZCount) {\n for (let i = 0; i < A.length - 1; ++i) {\n if (A[i] === A[i + 1]) {\n if (A[i] === 1) {\n A[i + 1] = 0;\n } else {\n A[i + 1] = 1;\n }\n count++;\n }\n }\n } else {\n for (let i = 0; i < A.length - 1; ++i) {\n if (A[i] === A[i + 1]) {\n if (A[i + 1] === 1) {\n A[i] = 0;\n } else {\n A[i] = 1;\n }\n count++;\n }\n }\n }\n return count;\n}", "function example2(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++) {\n let x = i + 1; // O(n)\n let y = i + 2; // O(n)\n let z = i + 3; // O(n)\n }\n for (let j = 0; j < input; j++) {\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}", "function funChallenge(input) {\n let a = 10; // O(1) Some people don't count assignments\n a = 50 + 3; // O(1)\n\n for (let i = 0; i < input.length; i++) { // O(n) --> n is the input\n anotherFunction(); // O(n)\n let stranger = true; // O(n)\n a++; // O(n)\n }\n return a; // O(1) another thing some people don't count\n}", "function slow_solution(arr){\n let resultsArr = []\n for(let i=0; i<arr.length;i++){\n resultsArr[i] = 0;\n for(let j=0; j<arr.length; j++){\n if(arr[i] % arr[j] !== 0){\n resultsArr[i] +=1;\n // console.log('|i:', i, '| j:', j,'| arr:', arr[i], '| res:',resultsArr[i])\n }\n }\n }\n return resultsArr\n}", "function i(n){let e=0,t=0;const r=n.length;let i,o=n[t];for(t=0;t<r-1;t++)i=n[t+1],e+=(i[0]-o[0])*(i[1]+o[1]),o=i;return e>=0}", "function advanced(arr) {\n const n = arr.length;\n let leftSum = 0;\n let rightSum = 0;\n\n for (let i = 1; i < n; i++) {\n rightSum += arr[i];\n }\n\n for (let i = 0, j = 1; i < n; i++, j++) {\n leftSum += arr[i];\n rightSum -= arr[j];\n\n if (leftSum === rightSum) {\n return arr[j];\n }\n }\n\n return arr[0];\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n if (A.length === 1) {\n return 1;\n }\n\n let left = 0;\n let right = 0;\n for (let i = 0; i < A.length; i++) {\n if (A[i] >= 0) {\n left = i;\n right = i;\n break;\n } else {\n A[i] *= -1;\n }\n }\n\n let lastVal = A[left];\n let nextVal = lastVal;\n let count = 1;\n while (left >= 0 && right < A.length) {\n if (A[left] !== A[right] && lastVal !== nextVal) {\n count++;\n }\n\n if (left > 0 && A[left] < A[right]) {\n lastVal = A[left];\n left--;\n nextVal = A[left];\n } else if (right < A.length - 1 && A[right] < A[left]) {\n lastVal = A[right];\n right++;\n nextVal = A[right];\n } else if (left > 0) {\n lastVal = A[left];\n left--;\n nextVal = A[left];\n } else if (right < A.length - 1) {\n lastVal = A[right];\n right++;\n nextVal = A[right];\n } else {\n break;\n }\n }\n\n return count;\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 4.0.0)\n var size = A.length;\n var sum = ((size + 1) * (size + 2)) / 2;\n for (i = 0; i < size; i++) {\n sum -= A[i];\n }\n return sum;\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 6.4.0)\n // sumup.\n var sumA=0;\n var sumI=0;\n for(var i=0;i<A.length;i++)\n {\n sumA+=A[i];\n sumI+=i+1;\n }\n\n sumI+=i+1; // the last item.\n return sumI-sumA;\n}", "function sol2(nums) {\n let sum = nums.reduce((acc, val) => acc + val, 0);\n if (sum % 2 !== 0) return false;\n sum /= 2;\n // arr of sums, 0... sum\n const dp = Array(sum + 1);\n dp[0] = true;\n\n // check the dp[current - num] OR if the sum - current number is valid\n\n for (let num of nums) {\n for (let j = sum; j >= 0; j--) {\n console.log(dp);\n if (j >= num) {\n dp[j] = dp[j] || dp[j - num];\n }\n }\n }\n\n return dp[sum];\n}", "function solution2(A) {\n let x1 = A[0]; // xor all elements in array\n let x2 = 1; // xor all elements from 1 to n+1 (n+1 since 1 number is missing)\n for (let i = 1; i < A.length; i++) {\n x1 ^= A[i];\n }\n for (let i = 2; i <= A.length + 1; i++) {\n x2 ^= i;\n }\n\n return x2 ^ x1;\n}", "function findSum(i, j) {\r\n var r1, r2, c1, c2\r\n if (i === 0)\r\n r1 = i\r\n else\r\n r1 = i - 1\r\n\r\n if (i === x - 1)\r\n r2 = i\r\n else\r\n r2 = i + 1\r\n\r\n if (j === 0)\r\n c1 = j\r\n else\r\n c1 = j - 1\r\n\r\n if (j === x - 1)\r\n c2 = j\r\n else\r\n c2 = j + 1\r\n\r\n var sum = 0\r\n for (let m = r1; m <= r2; m++) {\r\n for (let n = c1; n <= c2; n++) {\r\n if (m !== i || n !== j)\r\n sum += list[m][n]\r\n }\r\n }\r\n return sum\r\n}", "function f(n, k){\r\n let dp = new Array(n + 1)\r\n for (let i=0; i<n+1; i++)\r\n dp[i] = new Array(k + 1).fill(0)\r\n \r\n dp[0][0] = 1\r\n \r\n \r\n for (let i=1; i<=n; i++)\r\n for (let j=1; j<=Math.min(i, k); j++) {\r\n dp[i][j] = dp[i - j][j] + dp[i - 1][j - 1]\r\n console.log(dp); \r\n } \r\n return dp[n][k]\r\n}", "function sol26(arr = [2, 3, 1, 1, 2, 4, 2, 0, 1, 1]) {\n // number at idx is the max number of jumps can take\n const dp = arr.slice().fill(Infinity);\n dp[0] = 0;\n\n for (let i = 1; i < arr.length; i++) {\n for (let j = 0; j < i; j++) {\n if (arr[j] + j >= i) {\n if (dp[j] + 1 < dp[i]) {\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n\n return dp[dp.length - 1];\n}", "function solution(a) {\r\n // write your code in JavaScript (Node.js 0.12)\r\n var i, l=a.length-1;\r\n var arr=[];\r\n do{ \r\n arr[a[l]-1] = a[l];\r\n \r\n l--; \r\n if(l===0)\r\n for(j=0;j<arr.length;j++)\r\n if(!arr[j])\r\n return j+1;\r\n \r\n }while(l>=0)\r\n}", "function solution(arr){\n\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n let mini = Infinity;\n let answer = 0;\n for (const n of A) {\n if (n <= mini) {\n mini = n;\n continue;\n }\n answer = Math.max(answer, n - mini);\n }\n return answer;\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n const N = A.length;\n let count = new Array(N+1).fill(0);\n \n for(let i in A){\n if(A[i] > N){\n return 0;\n }\n if(count[A[i]] > 0){\n return 0;\n }\n count[A[i]]++;\n }\n \n for(let i=1; i>N+1; i++){\n if(count[i] != 1){\n return 0;\n }\n }\n \n return 1;\n}", "function solution(A) {\n\n A.sort();\n for (let i = 0;i < A.length; i++) {\n let br = 1;\n while(A[i] === A[i + 1]) {\n i++;\n br++;\n }\n if(br%2 !== 0){\n return A[i];\n }\n }\n return A[A.length - 1];\n}", "function threesum(nums){\n nums=nums.sort((a,b)=>a-b);\n let result=[];\n for(let i=0;i<nums.length-2;i++){\n let left=i+1;\n let right=nums.length-1;\n while(right>left){\n let currSum=nums[i]+nums[left]+nums[right];\n if(currSum===0){\n let flag=true;\n console.log(nums[i], nums[left], nums[right]);\n for(let ar of result){\n console.log(ar)\n if(ar[0]===nums[i] && ar[1]===nums[left] && ar[2]===nums[right]) flag=false;\n }\n if(flag){\n result.push([nums[i],nums[left],nums[right]])\n }\n left++;\n right--;\n }\n else if(currSum>0)\n right--;\n else\n left++\n }\n }\n return result;\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n let maxK1 = [];\n let maxK2 = [];\n maxK1[0] = maxK2[0] = 0;\n maxK1[A.length - 1] = maxK2[A.length - 1] = 0;\n for (let i = 1; i < A.length; i++) {\n if (i < A.length - 1) {\n maxK1[i] = Math.max(maxK1[i - 1] + A[i], 0);\n }\n let j = A.length - i;\n if (j < A.length - 1) {\n maxK2[j] = Math.max(maxK2[j + 1] + A[j], 0);\n }\n }\n let max = 0;\n for (let i = 1; i < A.length - 1; i++) {\n max = Math.max(max, maxK1[i-1] + maxK2[i+1]);\n }\n return max;\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 6.4.0)\n let valuesByIndex = {};\n let result = 1;\n \n for (let i = 0, aLength = A.length; i < aLength; i++) {\n let currentValue = A[i];\n \n if (!valuesByIndex[currentValue - 1]) {\n valuesByIndex[currentValue - 1] = currentValue; \n } else {\n result = 0;\n break;\n }\n \n }\n \n let valuesByIndexKeys = Object.keys(valuesByIndex);\n \n if (result === 1) {\n for (let i = 0, len = valuesByIndexKeys.length; i < len; i++) {\n let keyValue = parseInt(valuesByIndexKeys[i]);\n \n if (keyValue !== 0 && !valuesByIndex[keyValue - 1]) {\n result = 0;\n break;\n } \n }\n }\n \n return result;\n}", "function solution(N, A) {\n // write your code in JavaScript (Node.js 8.9.4)\n let counters = new Array(N).fill(0);\n let max = 0;\n let tmp = 0;\n\n for (let v of A) {\n if (v <= N) {\n let idx = v - 1;\n\n counters[idx] = Math.max(counters[idx], max);\n counters[idx] += 1;\n tmp = Math.max(counters[idx], tmp);\n } else {\n max = tmp;\n }\n }\n\n return counters.map((v) => {\n return Math.max(v, max);\n })\n}", "function solution_1 (n) {\r\n function sumSquaresOfDigits (n) {\r\n return String(n)\r\n .split('')\r\n .map(digit => +digit)\r\n .reduce((sum, digit) => sum + digit ** 2, 0);\r\n }\r\n const seen = new Set([n]); // this set is here to detect cycles\r\n let processedN = sumSquaresOfDigits(n) // i introduce this variable here to avoid calculating it twice (in the while loop condition and in the subsequent line)\r\n while (processedN !== 1) {\r\n n = processedN;\r\n if (seen.has(n)) return false;\r\n seen.add(n);\r\n processedN = sumSquaresOfDigits(n);\r\n }\r\n return true;\r\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n const len = A.length;\n let multiplier = 0;\n let total = 0;\n for (let i=0 ; i<len ; i++) {\n \n if(A[i]===0){\n multiplier++;\n }else{\n total += multiplier*1\n }\n\n \n\n }\n if(total > 1000000000){\n return -1\n }\n return total;\n\n}", "function allCombinations (a) {\n var poss = 0;\n for (var i = 1; i <= a; i++) {\n for (var j = 1; j <= a; j++) {\n if (i !== j) {\n poss++;\n console.log (i, j);\n }\n }\n }\n return poss;\n}", "function mutateTheArray(n, a) {\n if (n === 1) {\n return a;\n }\n var result = new Array(n);\n \n for (let i = 0; i < n; i++) {\n let left = a[i-1] ? a[i-1] : 0;\n let curr = a[i]\n let right = a[i+1] ? a[i+1] : 0;\n \n result[i] = (left+curr+right)\n } \n return result; \n \n}", "function solution(N) {\n // write your code in JavaScript (Node.js 8.9.4)\n \n let i = 1;\n let minp = 0;\n while(i*i<=N) {\n if(N%i==0) {\n let p = 2*(i+N/i);\n //console.log('i:'+i+' p:'+p);\n minp = minp==0?p:Math.min(p, minp);\n }\n i++;\n }\n return minp\n}", "function ex_2_I(n) {\n var sum = 0;\n var i=0;\n var j=0;\n while (i!=n){\n if(j%2==1){\n sum+=j;\n i++;\n j+=2;\n }\n else{j++;}\n }\n\n return sum;\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 4.0.0)\n var B=new Array(A.length+1), j;\n A.forEach((ele, i, arr) => B[ele-1] = i);\n for(j=0; j<B.length; j++) {\n if(B[j] === undefined) {\n return j+1;\n }\n }\n}", "function findEquilibriumSlower(arr) { \n //mildly offensive: two running sums, O(n^2)\n //get sum of elements before me and after me\n var sumUp, sumDown; \n for (var i=0, len = arr.length; i < len; i++) { \n sumUp =0;\n sumDown=0; \n for (j=0; j<i; j++) { \n sumUp += arr[j];\n }\n for (k=(arr.length-1); k>i; k--) { \n sumDown += arr[k]; \n }\n if (sumUp === sumDown) { \n return i; \n } \n }\n}", "kaleb(n){\n let prev = 2;\n let curr = -1;\n let result = 0;\n for (let i=1; i<n; ++i) {\n result = 2*prev - curr;\n prev = curr;\n curr = result;\n } \n console.log(result);\n return result;\n }", "function search_triplets(arr) {\n\t// TODO: Write your code here\n\t// given unsorted array, find all triplets that add up to zero, return array with all triplets that sum up to zero\n\t// sort the array first\n\t// start from both ends of the array\n\t//\n\ttriplets = [];\n\n\tlet sumTarget = 0;\n\n\tif (arr.length < 3) {\n\t\treturn triplets;\n\t}\n\n\tarr.sort((a, b) => a - b);\n\tfor (let i = 0; i < arr.length - 2; i++) {\n\t\tif (arr[i] === arr[i - 1]) continue;\n\t\tif (arr[i] > sumTarget) {\n\t\t\t//if the first target is already greater than zero and since it's increasing, there's no way to add up to zero\n\t\t\treturn triplets;\n\t\t}\n\t\tlet leftPointer = i + 1;\n\t\tlet rightPointer = arr.length - 1;\n\n\t\twhile (leftPointer < rightPointer) {\n\t\t\tif (arr[leftPointer] + arr[rightPointer] + arr[i] === sumTarget) {\n\t\t\t\ttriplets.push([ arr[leftPointer], arr[rightPointer], arr[i] ]);\n\t\t\t\twhile (arr[leftPointer] === arr[leftPointer + 1]) leftPointer++;\n\t\t\t\twhile (arr[rightPointer] === arr[rightPointer - 1]) rightPointer--;\n\t\t\t\tleftPointer++;\n\t\t\t\trightPointer--;\n\t\t\t} else if (arr[leftPointer] + arr[rightPointer] + arr[i] < sumTarget) {\n\t\t\t\tleftPointer++;\n\t\t\t} else {\n\t\t\t\trightPointer--;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn triplets;\n}", "function twoSum(numsArr, target) {\n // more basic code\n\n // for (let i = 0; i < numsArr.length; i++) {\n\n // for (let j = 0; j < numsArr.length; j++) {\n // if(i != j){\n // if (numsArr[i] + numsArr[j] == target) {\n // return [i, j];\n // }\n // }\n // }\n // }\n\n // faster code\n var sumPartners = {};\n for(var i = 0; i < nums.length; i++) {\n sumPartners[target - nums[i]] = i;\n if (sumPartners[nums[i]] && sumPartners[nums[i]] !== i) {\n return [sumPartners[nums[i]], i];\n }\n }\n \n for(var j = 0; j < nums.length; j++) {\n if (sumPartners[nums[j]] && sumPartners[nums[j]] !== j) {\n return [j, sumPartners[nums[j]]];\n }\n }\n}", "function combiLoop(n, r) {\n let queue = [[n, r]];\n const push = (a, b) => {\n if(a >= b && b >= 0) queue.push([a, b]);\n };\n do {\n if(queue[0][0] === 1) return;\n let [num, re] = queue.shift();\n push(num-1, re);\n push(num-1, re-1);\n } while(queue[0][0] > 1);\n\n let result = 0;\n for(let [n, r] of queue) {\n if(n > 0 && (r === 0 || r === 1)) result++;\n }\n return result;\n}", "function work(n) {\n var i = 0;\n while (++i < n * n) {}\n return i;\n }", "function work(n) {\n var i = 0;\n while (++i < n * n) {}\n return i;\n }", "function solution(N, A) {\n // write your code in JavaScript (Node.js 8.9.4)\n const counters = Array(N + 1).fill(0);\n let max = 0;\n let prevmax = 0;\n for (let i = 0; i < A.length; i++) {\n const op = A[i];\n if (op >= 1 && op <= N) {\n counters[op]++;\n max = Math.max(counters[op], max);\n // max;\n } else if (op === N + 1) {\n if (max !== prevmax) {\n prevmax = max;\n counters.fill(max);\n }\n // counters\n }\n }\n return counters.splice(1);\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n let west_cars = 0;\n let passing_cars = 0;\n \n for(let i=A.length-1; i>=0; i--){\n switch(A[i]){\n case 0:\n passing_cars += west_cars;\n break;\n case 1:\n west_cars++;\n break;\n }\n if(passing_cars > 1000000000){\n return -1;\n }\n }\n \n return passing_cars;\n}", "function fn(n) {\n for (var i = 0; i < n; i++) {\n for (var j = 0; j < n; j++) {\n console.log(i, j);\n }\n }\n}", "function fibonacciIterative(n) {\n let arr = [0, 1]\n for (let i = 2; i < n + 1; i++) {\n arr.push(arr[i - 2] + arr[i - 1])\n }\n return arr[n]\n} // O(n)", "function combiLoop(n, r) {\n let queue = [[n, r]];\n let result = 0;\n const push = (a, b) => {\n queue.push([a, b]);\n };\n do {\n let [num, re] = queue.shift();\n if(re > num / 2) re = num - re;\n if(re === 1) {\n result += num;\n } else if(re > 1) {\n push(num-1, re);\n push(num-1, re-1);\n }\n } while(queue.length);\n return result;\n}", "function isSumPossible(a, n, z) {\n var iMdone = 0,\n len = a.length;\n\n if (len < z || z < 0) {\n return iMdone;\n }\n if (len === z) {\n var sum = 0;\n for (var i=0; i<len; i+=1){\n sum += a[i];\n }\n return sum === n ? 1 : 0;\n }\n\n var val, arr;\n var Node = function(length, level, parent) {\n return {\n length: length !== null ? length : null,\n level: level || 1,\n parent: parent || null\n }\n };\n var proceedNode = function(array, parent) {\n var innerVal, innerArr;\n if (iMdone) {\n return;\n }\n if (parent.length === n && parent.level === z) {\n iMdone = 1;\n return;\n }\n if (parent && parent.level < z && parent.length <= n) {\n for (var i=0, l=array.length; i<l; i+=1) {\n innerVal = array[i];\n if (parent.level + 1 === z && parent.length + innerVal === n) {\n iMdone = 1;\n break;\n } else if (parent.length + innerVal > n) {\n break;\n }\n innerArr = array.slice(0);\n innerArr.splice(i, 1);\n proceedNode(innerArr, new Node(parent.length + innerVal, parent.level + 1, parent));\n }\n }\n };\n\n for (var i=0, l=a.length; i<l; i+=1) {\n val = a[i];\n if (iMdone) {\n break;\n }\n arr = a.slice(0);\n arr.splice(i, 1);\n proceedNode(arr, new Node(val, null, null));\n }\n\n return iMdone;\n}", "function simply_solution(n, cores) {\n var answer = 0;\n\n var core = [];\n for (let i of cores) {\n core.push({precessTime: i, t: i});\n }\n\n while (n != 0) {\n for (let i = 0; i < core.length; i++) {\n if (core[i].t == core[i].precessTime) {\n n--;\n core[i].t = 0;\n answer = i+1;\n if (n == 0) break;\n }\n core[i].t = core[i].t + 1;\n }\n }\n\n return answer;\n}", "function solution3(A) {\n count = 0;\n for (i = 0; i < A.length; i++) {\n if (i + 1 > A.length || i + 2 > A.length) {\n } else if (A[i] - A[i + 1] == A[i + 1] - A[i + 2]) {\n count += 1;\n\n let newA = A.slice(i + 2)\n let dist = A[i] - A[i + 1]\n\n for (j = 0; j < newA.length; j++) {\n if (j + 1 >= A.length) {\n console.log(\"No more new array!\")\n } else if (newA[j] - newA[j + 1] == dist) {\n count += 1;\n }\n }\n }\n }\n // console.log(count)\n}", "function iterate(n) {\n for (let i = 0; i < n; i++) {\n findSmallerPrimes();\n }\n}", "function problem2(){\n var numArr = [1,2];\n while(numArr[numArr.length-1]<4000000){\n numArr.push( numArr[numArr.length - 2] + numArr[numArr.length - 1] );\n }\n numArr = numArr.filter(function(a){ return a%2===0});\n return numArr.reduce(function(a,b){ return a+b; });\n}", "function x(n) {\n let i = 0, answer = [];\n while (i < n) {\n let j = 0, a = [];\n while (j < n) {\n a[j] = 0;\n j++;\n }\n answer.push(a);\n i++;\n }\n\n i = 0;\n while (i < n) {\n var k = 0;\n while (k < n) {\n if (i === k) {\n answer[i][k] = 1;\n }\n if (i + k === n - 1) {\n answer[i][k] = 1;\n }\n k++;\n }\n i++;\n }\n return answer;\n}", "function solution(n) {\n let cache = {}\n\n function tile(width) {\n if (width <= 0) return 0;\n if (width === 1) return 1;\n if (width === 2) return 3;\n\n if (cache[width]) {\n return cache[width];\n } else {\n cache[width] = (tile(width - 1) + 2 * tile(width - 2)) % 10007;\n return cache[width]\n }\n }\n\n return tile(n);\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n const N = A.length;\n const left = new Array(N).fill(0);\n const right = new Array(N).fill(0);\n for (let i = 1; i < N - 1; i++) {\n left[i] = Math.max(left[i - 1] + A[i], 0);\n }\n \n for (let i = N - 2; i > 0; i--) {\n right[i] = Math.max(right[i + 1] + A[i], 0);\n }\n \n let answer = 0;\n for (let i = 1; i < N - 1; i++) {\n answer = Math.max(answer, left[i - 1] + right[i + 1]);\n }\n \n return answer;\n}", "function solution_1 (A) {\n\n // INITIALIZATION\n const output = [];\n const refArr = [null]; // if `A[i] === n`, then `refArr[n] === i`. note that we throw in null into index 0. `A` will never contain 0.\n A.forEach((n, i) => refArr[n] = i);\n\n // DEFINE `flip` FUNCTION: given `n`, perform 2 flips to get it in the right spot\n function flip (n) {\n const indexOfN = refArr[n];\n for (let i = 0; i < indexOfN/2; ++i) { // flip all nums from start to `n` (remember to run the for loop only up to half of `indexOfN`)\n const a = A[i];\n const b = A[indexOfN - i];\n [refArr[a], refArr[b]] = [refArr[b], refArr[a]]; // swap opposite `refArr` elements\n [A[i], A[indexOfN - i]] = [A[indexOfN - i], A[i]]; // swap opposite `A` elements\n }\n for (let i = 0; i < (n - 1)/2; ++i) { // flip all nums up to where `n` should go (remember to run the for loop only up to half of `n - 1`)\n const a = A[i];\n const b = A[(n - 1) - i];\n [refArr[a], refArr[b]] = [refArr[b], refArr[a]];\n [A[i], A[(n - 1) - i]] = [A[(n - 1) - i], A[i]];\n }\n output.push(indexOfN + 1, n); // represent the two flips we just performed in `output`\n }\n\n // ITERATION\n for (let i = A.length - 1; i >= 0; --i) {\n const n = i + 1; // `n` is the number that should live in current position\n if (A[i] !== n) flip(n); // if `A[i] === n` then this number is correctly sorted\n }\n\n return output;\n}", "function twoSum(arr, n) {\n const cache = new Set();\n for (let i = 0; i < arr.length; i++) {\n if (cache.has(n - arr[i])) {\n return true;\n }\n cache.add(arr[i]);\n }\n return false;\n}", "function compressBoxes(input){\n for(var i = 0; i<=100; i++){\n console.log('hi'); // O(100)\n }\n\n input.forEach(function(box){\n console.log(box); // O(n)\n })\n\n input.forEach(function(box){\n console.log(box); //O(n)\n })\n }", "function solution(A) {\n \n let maxEnding = [];\n maxEnding.push(0);\n \n let maxBeginning = [];\n maxBeginning[A.length-1] = 0\n \n for (let i = 1; i < A.length-2; i++){\n maxEnding[i] = Math.max(0, maxEnding[i-1]+A[i]);\n }\n \n for (let i = A.length-2; i >= 2; i--){\n maxBeginning[i] = Math.max(0, maxBeginning[i+1]+A[i]);\n }\n \n let maxSum = 0;\n for (let i = 0; i < A.length-2; i++){\n let sum = maxEnding[i] + maxBeginning[i+2];\n if (sum > maxSum){\n maxSum = sum;\n }\n }\n \n return maxSum;\n}", "function process ( n )\n{\n \n for ( var b = 2; b < n; ++b )\n {\n // a must be less than b\n for ( var a = 1; a < b; ++a )\n {\n // a + b + c must be n\n var c = n - b - a;\n // b must be less than c\n if ( c <= b ) break;\n if ( Math.pow ( c, 2 ) == ( Math.pow ( a, 2 ) + Math.pow ( b, 2 ) ) )\n return a * b * c;\n }\n }\n \n return 0; // no answer was found\n}", "function snt (n) {\n for (let i=2 ; i <=n; i++)\n arr[i]=1;\n console.log(arr)\n arr[0]=arr[1]=0;\n // console.log(arr)\n for (let i =2; i<=Math.sqrt(n); i++)\n if (arr[i])\n for (let j=2*i; j <=n; j += i)\n arr[j]=0\n}", "function sol(){\n\n\n var resultat = new Set();\n\n for(var i=0 ; i<nb_nodes ; i++) // complexity O(n^3)\n {\n initialiser();\n marquer = new Array();\n marquer1= new Array();\n marquer2= new Array();\n dfs(i);\n marquer1 = marquer.splice(0,marquer.length); // copy marquer in marquer 1\n marquer1.splice(0,1); // because dfs make marquer.add(i)\n ensemble.delete(i); // we remove the node\n marquer = new Array();\n dfs(marquer1[0]);\n marquer2 = marquer.splice(0,marquer.length); // copy marquer in marquer 2\n if(!eqSet(marquer1 , marquer2)) // complexity O(n)\n {\n\n resultat.add(i);\n\n }\n\n }\n return resultat;\n}", "function solution(A) {\n // write your code in JavaScript (ECMA-262, 5th edition)\n function compareNumbers(a, b)\n {\n return a - b;\n }\n var rad = [], sorted = A.splice(0).sort(compareNumbers);\n for(var i=0; i<A.length; A++){\n \n }\n \n return 11 > 10000000 ? -1 : 11;\n}", "function solution(A){\n let hash = {};\n\n for (let i = 0; i < A.length; i++) {\n if (hash[A[i]] === undefined){\n hash[A[i]] = 1;\n } else if (hash[A[i]] != undefined){\n hash[A[i]]++;\n }\n }\n \n const pairs = Object.entries(hash);\n\n for (const [value,count] of pairs) {\n if (count % 2 != 0){\n return Number(value);\n }\n }\n}", "function solution(A) {\r\n // write your code in JavaScript (Node.js 8.9.4)\r\n\r\n /**\r\n * Formula:\r\n * (Sum of each index + 1) - (Sum of each value in array) = missing element\r\n */\r\n if (!A.length) {\r\n return 1;\r\n }\r\n\r\n var fullSum = 0;\r\n var sum = 0;\r\n\r\n for (let i = 0; i <= A.length; i++) {\r\n fullSum += i + 1;\r\n }\r\n\r\n for (let i = 0; i < A.length; i++) {\r\n sum += A[i];\r\n }\r\n\r\n return fullSum - sum;\r\n}", "function maxSubArraySum(arr, n){ // O(n^2) // naive solution\r\n let maxSum = 0;\r\n for(let i = 0; i < arr.length - n + 1; i++){ // O(n)\r\n let temp = 0;\r\n for(let j = 0; j < n; j++){ // nested O(n)\r\n temp += arr[i + j];\r\n }\r\n if(temp > maxSum){\r\n maxSum = temp;\r\n }\r\n }\r\n return maxSum;\r\n}", "function euler9() {\n for (let a = 1; a < 1000; a++) {\n for (let b = 2; b < 1000; b++) {\n for (let c = 3; c < 1000; c++) {\n if (a + b + c === 1000 && a ** 2 + b ** 2 === c ** 2) {\n return [a, b, c];\n }\n }\n }\n }\n}", "function solution(A) {\r\n // write your code in JavaScript (Node.js 8.9.4)\r\n let a1 = A.map(i => 0);\r\n let a2 = A.map(i => 0);\r\n \r\n for (let i = 1, iR = A.length - 2; iR > 1; i++, iR--) {\r\n a1[i] = Math.max(A[i] + a1[i - 1], 0);\r\n a2[iR] = Math.max(A[iR] + a2[iR + 1], 0);\r\n }\r\n \r\n let maxNum = a1[0] + a2[2]; \r\n for (let i = 2; i < A.length - 1; i++) {\r\n maxNum = Math.max(a1[i - 1] + a2[i + 1], maxNum)\r\n }\r\n \r\n return maxNum;\r\n}", "function solution(A) {\n const setA = new Set(A)\n if(setA.size!==A.length) return 0\n for(let i =1; i<=A.length; i++){\n if(setA.has(i)===false) return 0\n }\n return 1;\n // write your code in JavaScript (Node.js 8.9.4)\n}", "function StairCase(n, arr) {\n\tvar cache = [1];\n\tfor (let i=1; i< n+1; i++) {\n\t\tlet ans = getSumOfPossiblities(i, arr, cache);\n\t\tcache[i] = ans;\n\t}\n\t\n\treturn cache[n];\n}", "function lookup_chain(m, p, i, j) {\n if (m[i][j] < Number.POSITIVE_INFINITY) {\n return m[i][j];\n }\n \n if (i == j) {\n m[i][j] = 0;\n } else {\n for (var k=i; k<j; k++) {\n var q = lookup_chain(m, p, i, k) + lookup_chain(m, p, k+1, j) + p[i]*p[k+1]*p[j+1];\n if (q < m[i][j]) {\n m[i][j] = q;\n }\n }\n }\n return m[i][j];\n}", "function findConsqSums(arr, k) {\n let sol=[]\n let lptr=0;\n let rptr=0;\n while(sum(arr,lptr,rptr)<k){\n rptr++;\n }\n while (lptr<arr.length){\n let s=sum(arr,lptr,((rptr<arr.length)?rptr:arr.length-1))\n if(s==k){\n sol.push(arr.slice(lptr, rptr+1))\n rptr++;\n while(arr[rptr]===0){\n sol.push(arr.slice(lptr, rptr+1))\n rptr++;\n console.log(\"inner\",sum(arr,lptr,rptr))\n }\n }\n else if(s>k){\n lptr++;\n }\n else if(s<k){\n if(rptr<arr.length){\n rptr++;\n }\n else{\n break;\n }\n }\n console.log(\"outer\",sum(arr,lptr,rptr))\n }\n return sol;\n}", "function multinomial_mod_2(list){\r\n let old_sum = list[0];\r\n for(let i = 1; i < list.length; i++){\r\n for(let j = 1; j <= Math.min(old_sum, list[i]); j = j<<1) {\r\n if (((j & old_sum ) === j) && ((j & list[i]) !== 0) ) {\r\n return 0;\r\n }\r\n }\r\n old_sum += list[i];\r\n }\r\n return 1;\r\n}", "function solution(A) { //100% logica toda minha!!! :)\n let size = A.length;\n // array that will keep the current value + the biggest it can get\n let maxResultPossibilityAt = new Array(size).fill(null);\n \n for (let i = size-1; i>=0; i--){ \n let options = i+6>size-1? size-1-i: 6; //movements should not pass total size\n let maxFoward = -Infinity;\n // get max result for each foward house\n for (let j = i+1; j<=i+options; j++){\n if (maxResultPossibilityAt[j]>maxFoward) maxFoward = maxResultPossibilityAt[j];\n }\n //console.log(`sum: ${A[i]} + (${maxFoward})`);\n let sum = maxFoward == -Infinity? A[i]: A[i]+maxFoward;\n maxResultPossibilityAt[i] = sum;\n }\n console.log(maxResultPossibilityAt);\n \n return maxResultPossibilityAt[0];\n}", "function ex_7_R(a, b){\n s = 0; k = a;\n for( i = 1; i<b; i++){\n s = s + ex_5_R(a,k);\n k = ex_5_R(a,k);\n}\nreturn s;\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n let circles = [];\n let count = 0;\n const LIMIT = 10000000;\n\n for (let i = 0; i < A.length; i++) {\n circles.push({\n id: i,\n start: i - A[i],\n end: i + A[i]\n });\n }\n circles.sort((a, b) => a.start - b.start);\n\n for (let i = 0; i < circles.length; i++) {\n let circle = circles[i];\n let j = i + 1;\n\n while (circles[j] && circle.end >= circles[j].start) {\n if (++count > LIMIT) {\n return -1;\n }\n j++;\n }\n }\n return count;\n}", "function solution(A) {\n let left = {};\n let leftLeader = null;\n let leftMap = {};\n\n for (let i = 0; i < A.length; i++) {\n if (!left[A[i]]) {\n left[A[i]] = 0;\n }\n\n left[A[i]]++;\n\n if (leftLeader !== null) {\n if (leftLeader === A[i]) {\n if (left[leftLeader] <= (i + 1) / 2) {\n leftLeader = null;\n }\n } else {\n if (left[leftLeader] > left[A[i]]) {\n if (left[leftLeader] <= (i + 1) / 2) {\n leftLeader = null;\n }\n } else {\n leftLeader = null;\n }\n }\n } else {\n if (left[A[i]] > (i + 1) / 2) {\n leftLeader = A[i];\n }\n }\n\n leftMap[i] = leftLeader;\n }\n\n let right = {};\n let rightLeader = null;\n let rightMap = {};\n\n for (let i = A.length - 2; i >= 0; i--) {\n if (!right[A[i + 1]]) {\n right[A[i + 1]] = 0;\n }\n\n right[A[i + 1]]++;\n\n if (rightLeader !== null) {\n if (rightLeader === A[i + 1]) {\n if (right[rightLeader] <= (A.length - (i + 1)) / 2) {\n rightLeader = null;\n }\n } else {\n if (right[rightLeader] > right[A[i + 1]]) {\n if (right[rightLeader] <= (A.length - (i + 1)) / 2) {\n rightLeader = null;\n }\n } else {\n rightLeader = null;\n }\n }\n } else {\n if (right[A[i + 1]] > (A.length - (i + 1)) / 2) {\n rightLeader = A[i + 1];\n }\n }\n\n rightMap[i] = rightLeader;\n }\n\n let count = 0;\n\n for (let i = 0; i < A.length - 1; i++) {\n if (leftMap[i] !== null && leftMap[i] === rightMap[i]) {\n count++;\n }\n }\n\n return count;\n}", "function iterativeP(n) {\n // for n = 0 to n, calculate p(n), add the value to an array,\n // and then return the last element of the array\n let array = [0, 1, 2, 4]; // initialise the array with base cases\n // for n > 3, calculate p(n) from previous array members\n for (let i = 4; i <= n; i++) {\n let p = array[i - 3] + array[i - 2] + array[i - 1];\n array.push(p);\n }\n return array[n];\n}", "function FindTriplet()\n{\n for(let i=0;i<num-2;i++)\n {\n for(let j=i+1;j<num-1;j++)\n {\n for(let k=j+1;k<num;k++)\n {\n if(valueArray[i]+valueArray[j]+valueArray[k]==0)\n {\n //create the temp array and store the value in the array\n let tempArray=new Array();\n tempArray.push(valueArray[i],valueArray[j],valueArray[k])\n //push the stored temp array in the sum array to get separate array\n sumArray.push(tempArray);\n }\n }\n }\n }\n}", "function fibonacciIterative(n) {\n // O(n)\n let arr = [0, 1];\n for (let i = 2; i < n + 1; i++) {\n arr.push(arr[i - 2] + arr[i - 1]);\n }\n return arr[n];\n}", "function divisibleSumPairs(n, k, ar) {\n let result = 0;\n for (let i = 0; i < ar.length - 1; i++) {\n for (let j = i + 1; j < ar.length; j++) {\n if ((ar[i] + ar[j]) % k == 0) {\n result++\n }\n \n console.log(`cycle ${i} -- ${j} ----> result: ${result}`);\n }\n }\n\n console.log(result);\n return result\n}", "function solution(N, A) {\r\n // write your code in JavaScript (Node.js 8.9.4)\r\n\tlet counters = new Array(N).fill(0);\r\n\tlet maxNum = 0;\r\n\tlet lastMaxNum = 0;\r\n\t\r\n\tA.forEach(item => {\r\n\t\tif (item <= N) {\r\n\t\t\tif (counters[item - 1] < lastMaxNum) {\r\n\t\t\t\tcounters[item - 1] = lastMaxNum;\r\n\t\t\t}\r\n\t\t\tcounters[item - 1]++;\r\n\t\t\t\r\n\t\t\tif (counters[item - 1] > maxNum) {\r\n\t\t\t\tmaxNum = counters[item - 1];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlastMaxNum = maxNum;\r\n\t\t}\r\n\t});\r\n\t\r\n\tfor (const i in counters) {\r\n\t\tif (counters[i] < lastMaxNum) {\r\n\t\t\tcounters[i] = lastMaxNum;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn counters;\r\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n var ret = 1;\n A = A.sort((a,b) => a - b);\n var ALength = A.length;\n for(var i = 0; i < ALength; i++){\n if(A[i]!=i+1){\n ret = 0;\n break;\n } \n }\n return ret;\n}", "function solution1(n) {\n if (n === 2) {\n return 1;\n }\n if (n === 1) {\n return 0;\n }\n\n return solution1(n - 1) + solution1(n - 2);\n}", "function solution1(array, targetSum) {\n array.sort((a,b) => a - b);\n const result = [];\n for (let i = 0; i < array.length; i++) {\n const x = array[i];\n for (let j = i+1; j < array.length; j++) {\n const y = array[j];\n for (let k = j+1; k < array.length; k++) {\n const z = array[k];\n if (x + y + z === targetSum) {\n result.push([x, y, z]);\n }\n }\n }\n }\n return result;\n }", "function icecreamParlor(m, arr) {\n let result = [];\n let breakCondition = false;\n for (let i = 0; i < arr.length; i++) {\n for (let j = 0 ; j < arr.length; j++) {\n if (i !== j && arr[i] + arr[j] === m) {\n result.push(i+1);\n result.push(j+1);\n breakCondition = true;\n break;\n }\n }\n if (breakCondition) break;\n }\n return result;\n}" ]
[ "0.6663564", "0.65929866", "0.65746254", "0.6571828", "0.65539616", "0.65265745", "0.64724004", "0.6401897", "0.63385755", "0.6328479", "0.6302101", "0.62902457", "0.6273732", "0.62656975", "0.62620693", "0.62528133", "0.6239516", "0.6233018", "0.6218765", "0.62186587", "0.62184364", "0.6216841", "0.620906", "0.61996037", "0.6179256", "0.61494994", "0.6145948", "0.61364484", "0.60935634", "0.6084929", "0.6084717", "0.6072138", "0.6063621", "0.60363793", "0.6012113", "0.6000304", "0.5998881", "0.59805006", "0.5959934", "0.5949343", "0.59414715", "0.5935337", "0.59320945", "0.5918958", "0.5912209", "0.58978575", "0.5896274", "0.5894419", "0.5888412", "0.5887179", "0.58860546", "0.58772856", "0.58645225", "0.5851383", "0.5851374", "0.5846117", "0.5846117", "0.58411294", "0.5825499", "0.58252054", "0.58223754", "0.58176744", "0.5815536", "0.581294", "0.5804367", "0.58034796", "0.5793211", "0.578892", "0.5782901", "0.57818764", "0.5780687", "0.5774557", "0.57739747", "0.5773243", "0.5769511", "0.5765946", "0.5751866", "0.57488906", "0.57399404", "0.5736891", "0.57347065", "0.5732949", "0.5719437", "0.5714134", "0.57137764", "0.5711732", "0.5709953", "0.57057875", "0.5704641", "0.5696143", "0.569522", "0.5694844", "0.56928813", "0.5692204", "0.5687532", "0.5686898", "0.56835043", "0.5683075", "0.56809175", "0.56759953", "0.567565" ]
0.0
-1
gets activated when we press down a key
function keyDownHandler(event) { // get the keyCode switch (event.keyCode) { // "up arrow" key case 38: // set upArrowPressed = true upArrowPressed = true; break; // "down arrow" key case 40: downArrowPressed = true; break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "keyDown(event) {\n var keyCode = event.which || event.keyCode;\n this.activeCommands[keyCode] = true;\n }", "keyDown(event) {\n var keyCode = event.which || event.keyCode;\n this.activeCommands[keyCode] = true;\n }", "function keyDown(e) {\n keyPress[e.key] = true;\n}", "keyDown(_keycode) {}", "function keyIsDown(event) {\n keyPressed[event.keyCode] = true;\n}", "function keyPressed() {\n if (handler.active === handler.nameplate) {\n doorbell.keyPressed();\n }\n}", "function keyDown(event) {\r\n keyboard[event.keyCode] = true;\r\n}", "function keyDown(event){\n\tkeyboard[event.keyCode] = true;\n}", "function keyReleased() {\n\n}", "keyDown(key)\n\t{\n\t\tif(key == \"KeyA\")\n\t\t\tthis.keysdirectionPress[0] = 1;\n\n\t\tif(key == \"KeyD\")\n\t\t\tthis.keysdirectionPress[1] = 1;\n\t}", "function onKeyStart(key) {\n keyIsDown[key] = true;\n}", "function keysDown(e) {\n keys[e.keyCode] = true;\n}", "function keyPressed() {\n}", "function keyPressed() {\n if (keyCode === UP_ARROW) {\n upPressed = true;\n } else if (keyCode === DOWN_ARROW) {\n downPressed = true;\n } else if (keyCode === LEFT_ARROW) {\n leftPressed = true;\n } else if (keyCode === RIGHT_ARROW) {\n rightPressed = true;\n } else if (keyCode === 32){\n spacePressed = true;\n fired = true\n }\n}", "onDownKey() {\n this.onArrowKey('down');\n }", "onDownKey() {\n this.onArrowKey('down');\n }", "function onKeyDown(event) {\n}", "function keysDown(e)\n{\n keys[e.keyCode] = true;\n}", "function key_up(){\n\n\tdrag_manager.active_key=null;\n\n}", "keyUp(_keycode) {}", "function keyPressed() {\n if (key == 'T') {\n toggleInput();\n }\n}", "function keyDown (event) {\n let key = event.key;\n key = standardizeKey(key);\n if (keyIsValid(key)) {\n addActiveClasses(key);\n }\n}", "function keyDown(e){\n\te.preventDefault();\n\tkeys[e.key]=true;\n}", "mouseDown(event) {\n var button = event.which || event.button;\n this.activeCommands[button] = true;\n }", "mouseDown(event) {\n var button = event.which || event.button;\n this.activeCommands[button] = true;\n }", "function controlDown(e)\r\n\t\t{\r\n\t\t\tif (e.keyCode in keyMap)\r\n\t\t\t{\r\n\t\t\t\tkeyMap[e.keyCode] = true;\r\n\t\t\t}\t\r\n\t\t}", "function keyPressed() {\n\t// toggle fullscreen mode\n\tif( key === 'f') {\n\t\tfs = fullscreen();\n\t\tfullscreen(!fs);\n\t\treturn;\n\t}\n\n\t// dispatch key events for adventure manager to move from state to \n\tadventureManager.keyPressed(key); \n}", "function downHandler({ key }) {\n if (key === targetKey) {\n setKeyPressed(true)\n }\n }", "function keyDownHandler(event) {\n keyHandler(true, event);\n}", "function mouseDown (event) {\n const key = keys[keyIndexById(this.id)].key;\n addActiveClasses(key);\n}", "function handleKey(code,isDown){\n switch(code){\n case 32: keyShoot = isDown; break;\n case 37: keyLeft = isDown; break;\n case 38:\n keyUp = isDown;\n document.getElementById(\"instructions\").classList.add(\"hidden\");\n break;\n case 39: keyRight = isDown; break;\n }\n }", "function keyPressed(){\n if (key == ' '){\n gridActive = !gridActive;\n }\n if (key == 'w' || key == 'W'){\n yVelocity -= 1;\n }\n if (key == 's' || key == 'S'){\n yVelocity += 1;\n }\n if (key == 'a' || key == 'A'){\n xVelocity -= 1;\n }\n if (key == 'd' || key == 'D'){\n xVelocity += 1;\n }\n}", "function pressKey(event) {\n currentKey = event.which;\n}", "function keyReleased()\n{\n if (keyCode === LEFT_ARROW || keyCode === RIGHT_ARROW || keyCode === DOWN_ARROW) \n {\n b1 = true;\n }\n}", "function keyDownhandler(event) {\n if ( event.keyCode == 39 ) {\n //NOTE keyCode MUST!!! have Capitcal C in key C ode\n //keycode 39 = right arrow button\n rightPressed = true;\n } else if ( event.keyCode == 37 ){\n //keycode 37 = left arrow button\n leftPressed = true;\n }\n}", "function keyDown(evt) {\n var c = (evt.keyCode) ? evt.keyCode : evt.charCode;\n switch(c) {\n case 37: // left\n case 63234:\n dx = 1; break;\n case 39: // right\n case 63235:\n dx = -1; break;\n case 40: // down\n case 63233:\n dy = -1; break;\n case 38: // up\n case 63232:\n dy = 1; break;\n case 32: // fire\n if (Torpedo.x) {\n playSound('notAvail');\n message('Not loaded new torpedo yet!');\n mainPanel(\"#779\");\n } else Torpedo.fire();\n break;\n case 16: // shift\n withShift = 1; break;\n case 27: // esc\n gameRunning = score = 0;\n IntroOutro.endAnimDest(0 , 1, 1);\n }\n}", "function keyPressed() {\n // toggle fullscreen mode\n if( key === 'f') {\n fs = fullscreen();\n fullscreen(!fs);\n return;\n }\n\n // dispatch all keys to adventure manager\n adventureManager.keyPressed(key); \n}", "function keyPressed() {\n // toggle fullscreen mode\n if( key === 'f') {\n fs = fullscreen();\n fullscreen(!fs);\n return;\n }\n\n // dispatch all keys to adventure manager\n adventureManager.keyPressed(key); \n}", "function downHandler({ key }) {\n if (key === targetKey) {\n setKeyPressed(true);\n }\n }", "function handleKeyDown(event) {\n currentlyPressedKeys[event.keyCode] = true;\n }", "function keyPressed() {\n // toggle fullscreen mode\n if( key === 'f') {\n fs = fullscreen();\n fullscreen(!fs);\n return;\n } \n\n adventureManager.keyPressed(key); \n}", "keyPress({ key }) {\n if (this.$refs.dropdown && this.$refs.dropdown.isActive && (key === 'Escape' || key === 'Esc')) {\n this.toggle(false)\n }\n }", "function handleKeyDown(event) {\r\n // storing the pressed state for individual key\r\n currentlyPressedKeys[event.keyCode] = true;\r\n}", "function keyPressed() {\r\n\r\n //giving condition when key pressed down arrow key\r\n if (keyDown(DOWN_ARROW)) {\r\n\t \r\n\t Matter.Body.setStatic(packageBody, false);\r\n\t \r\n }\r\n\r\n}", "function keyPressed(){\n if (keyCode === RIGHT_ARROW){\n char1.willStop = false;\n if (char1.state !== \"right\") char1.rightState();\n\n }\n\n if (keyCode === LEFT_ARROW){\n char1.willStop = false;\n if (char1.state !== \"left\") char1.leftState();\n\n }\n\n if (keyCode === DOWN_ARROW){\n char1.willStop = false;\n if (hadouken1.alive === false){\n hadouken1.setStart(char1.charX, char1.charY);\n hadouken1.startTime = 0;\n hadouken1.lifeTime = 0;\n hadouken1.alive = true;\n\n //playing the sound effect\n char1.sound.play();\n }\n if (char1.state !== \"hadouken\") char1.hadouken();\n\n }\n}", "function keyDown (event) {\r\n // console.log(event.keyCode);\r\n if (event.keyCode == 65) {\r\n rightPressed = true;\r\n } else if (event.keyCode == 68) {\r\n leftPressed = true;\r\n } else if (event.keyCode == 87) {\r\n upPressed = true;\r\n } else if (event.keyCode == 83) {\r\n downPressed = true;\r\n }\r\n}", "function triggerKeydown(keycode){\ntriggerEvent(document,'keydown',keycode);\n}", "function keydown() {\n switch (d3.event.keyCode) {\n case 8: // backspace\n {\n break;\n }\n case 46: { // delete\n delete_node = true;\n break;\n }\n case 16: { //shift\n should_modify = true;\n break;\n }\n case 17: { //control\n drawing_line = true;\n }\n\n }\n}", "function onKeyDown(evt) {\n if (evt.keyCode == 81) Up1Pressed = true; //q\n else if (evt.keyCode == 65) Down1Pressed = true; //a\n // else if (evt.keyCode == 80) Up2Pressed = true; //p\n // else if (evt.keyCode == 76) Down2Pressed = true; //l\n}", "onKeyReleased(keyCode, event) {\n switch (keyCode) {\n case cc.KEY.a:\n case cc.KEY.left:\n self.accLeft = false;\n break;\n case cc.KEY.d:\n case cc.KEY.right:\n self.accRight = false;\n break;\n }\n }", "function handleKeyDown(event)\n{\n\tstatus_start = true;\n status_pause = false;\n\tcurrentlyPressedKeys[event.keyCode] = true;\n}", "function keyDownHandler(e) {\n if(e.keyCode == 38) {\n upPressed = true;\n }\n else if(e.keyCode == 40) {\n downPressed = true;\n }\n if(e.keyCode == 87) {\n wPressed = true;\n }\n else if(e.keyCode == 83) {\n sPressed = true;\n }\n}", "keyPress({\n key\n }) {\n if (this.isActive && (key === 'Escape' || key === 'Esc')) {\n if (Array.isArray(this.autoClose)) {\n if (this.autoClose.indexOf('escape') >= 0) this.isActive = false;\n }\n }\n }", "function keyPressed() {\n // if spacebar pushed toggleSound()\n if (keyCode == 32) { // keyCode for spacebar is 32 wack right\n toggleSound();\n //stateChoice = 5;\n }\n\n // press f to enter fullscreen\n else if (keyCode == 70) {\n fullscreen(true);\n if (stateChoice == 0) {\n stateChoice = 1;\n toggleSound();\n }\n }\n}", "function keyPressed(){\n\tgameManager.keyPressed();\n}", "function keyPressed() {\n\tswitch (keyCode){\n\t\tcase LEFT_ARROW:\n\t\t\tconsole.log('pressed', keyCode)\n\t\t\t\n\t\t\tsnake.setDir(-1, 0);\n\t\t\tbreak;\n\t\t\t\n\n\t\tcase RIGHT_ARROW:\n\t\t\tconsole.log('pressed', keyCode)\n\t\t\t\n\t\t\tsnake.setDir(1, 0);\n\t\t\tbreak;\n\t\t\t\n\n\t\tcase DOWN_ARROW:\n\t\t\tconsole.log('pressed', keyCode)\n\n\t\t\t\n\t\t\tsnake.setDir(0, 1)\n\t\t\tbreak;\n\t\t\t\n\t\tcase UP_ARROW:\n\t\t\tconsole.log('pressed', keyCode)\n\t\t\t\n\t\t\tsnake.setDir(0, -1)\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tconsole.log('pressed', keyCode)\n\t\t\tbreak;\n\t}\n}", "function keydown(event){switch(event.keyCode){case $mdConstant.KEY_CODE.LEFT_ARROW:event.preventDefault();incrementIndex(-1,true);break;case $mdConstant.KEY_CODE.RIGHT_ARROW:event.preventDefault();incrementIndex(1,true);break;case $mdConstant.KEY_CODE.SPACE:case $mdConstant.KEY_CODE.ENTER:event.preventDefault();if(!locked)select(ctrl.focusIndex);break;}ctrl.lastClick=false;}", "function keyPressed() {\n if (keyCode === UP_ARROW || keyIsDown(87)) {\n fireProjectile();\n // add a class of active on the #fire button to have the button fully opaque\n buttons.forEach(button => {\n const { id } = button.elt;\n if (id === 'fire') {\n button.elt.className = 'active';\n } else {\n button.elt.className = '';\n }\n });\n }\n}", "function keyDownHandler(e) {\n if (e.keyCode == A) {\n A_PRESSED = true;\n }\n else if (e.keyCode == D) {\n D_PRESSED = true;\n }\n else if (e.keyCode == SPACE) {\n SPACE_PRESSED = true;\n }\n}", "function onKeyDown(event){\n \n //keyboard events\n switch(event.keyCode){\n case 48:\n case 96:\n lookUp = true;\n break;\n case 38: //up\n case 87: //w\n console.log('w');\n moveForward = true;\n break;\n case 37: //left\n case 65: //a\n moveLeft = true;\n break;\n case 40: //down \n case 83: //s\n moveBackward = true;\n break;\n case 39: //right\n case 68: //d\n moveRight = true;\n break;\n }//end switch\n}", "function keyPressed(){\n if (state === `simulation`) {\n ant.keyPressed();\n ant.move();\n }\n}", "keyPressed({keyPressed, keyCode}){\n console.log('keypressed, keycode', keyPressed, keyCode);\n if(keyCode === 70){ //f\n requestFullScreen();\n return;\n }\n if(keyCode === 80){ //p\n requestPointerLock();\n return;\n }\n let key = keyCode + '';\n this.keysCurrentlyPressed[key] = {keyPressed, keyCode, clock:new Clock()};\n }", "function onKeyDown(evt) {\r\n\tif (evt.keyCode == 32) spacebarDown = true;\t\r\n\t\r\n\tif (evt.keyCode == 39) rightDown = true;\r\n\telse if (evt.keyCode == 37) leftDown = true;\r\n}", "function activeKeyboard () {\n\t\t$(document).keydown(function(e) {\n\n\t\tvar key = e.which;\n\t\tif(key == \"38\" && direction!= \"down\") {\n\t\t\tif(press_acs == 1) {\n\t\t\t\tdirection = \"up\";\n\t\t\t\tpress_acs = 0; \n\t\t\t}\t\n\t\t} \n\t\telse if(key == \"39\" && direction!= \"left\") {\n\t\t\tif(press_acs == 1) {\n\t\t\t\tdirection = \"right\";\n\t\t\t\tpress_acs = 0; \n\t\t\t}\t\n\t\t}\n\t\telse if(key == \"40\" && direction!= \"up\") {\n\t\t\tif(press_acs == 1) {\n\t\t\t\tdirection = \"down\";\n\t\t\t\tpress_acs = 0; \n\t\t\t}\t\n\t\t}\n\t\telse if(key == \"37\" && direction!= \"right\") {\n\t\t\tif(press_acs == 1) {\n\t\t\t\tdirection = \"left\";\n\t\t\t\tpress_acs = 0; \n\t\t\t}\t\n\t\t}\t\n\t\t});\n\t}", "HandleKeyDown(event) {}", "init() {\n this.keyPress = 39;\n }", "function keyPressed(){\n\tif(key == 'a'){\n\t\t ghost.up(); //calls upon the 'this.up' function within the ghost function\n\t}\n if(key == 'a'){\n thud.play(); //plays the thud sound\n thud.setVolume(1); //sets the volume\n }\n}", "_onKeyDown(event) {\n switch (event.keyCode) {\n case 87: // w\n case 38: // up\n this.keys.forward = true;\n break;\n case 65: // a\n case 37: //left\n this.keys.left = true;\n break;\n case 83: // s\n case 40: //down\n this.keys.backward = true;\n break;\n case 68: // d\n case 39: //right\n this.keys.right = true;\n break;\n case 32: // SPACE\n this.keys.space = true;\n break;\n case 16: // SHIFT\n this.keys.run = true;\n break;\n }\n }", "function keyPressed() {\n\t if (keyCode === UP_ARROW) {\n\t\t Matter.Body.applyForce(bob1,bob1.position,{x:-50,y:-45}); \n\t\t}\n\t\tconsole.log(keyPressed);\n\t }", "function keyPressed() {\n //RIGHT\n if (keyCode == '39') {\n right_gesture();\n }\n //LEFT\n else if (keyCode == '37') {\n left_gesture();\n }\n\n //UP - PLUCK\n else if (keyCode == '38') {\n pluck_gesture();\n }\n\n //DOWN -- poke\n else if (keyCode == '40') {\n poke_gesture();\n }\n\n //A -- TWIRL\n else if (keyCode == '65') {\n twirl_gesture();\n }\n}", "function handleKeyDown(event) {\n wgl.listOfPressedKeys[event.keyCode] = true;\n // console.log(\"keydown - keyCode=%d, charCode=%d\", event.keyCode, event.charCode);\n }", "keyDown(event){\n\t\tconsole.log(`======] Key Down [======`, event);\n\t\tevent.preventDefault();\n\n\t\tlet keycode = event.which;\n\t\tif(keycode === 16){\n\t\t\tthis.setState({shiftDown: true});\n\t\t}\n\t\t\n\t\t//TODO: figure out how to use SHIFT and CAPS lock\n\t\tif(this.state.focused){\n\t\t\tlet androidKeycode = keycodes.map[keycode];\n\t\t\tconsole.log(`======] KeyCode ${keycode} -> ${androidKeycode} [======`);\n\t\t\tif(androidKeycode){\n\t\t\t\tlet commands = [];\n\t\t\t\tif(this.state.shiftDown){\n\t\t\t\t\tcommands.push(keycodes.map[16]);\n\t\t\t\t}\n\t\t\t\tcommands.push(androidKeycode);\n\t\t\t\tthis.serializer.to({type: 'KEYEVENT', commands: commands})\n\t\t\t\t\t.then(message => {\n\t\t\t\t\t\tthis.websocket.send(message);\n\t\t\t\t\t})\n\t\t\t\t\t.catch(error => console.error(error));\n\t\t\t}\n\t\t}\n\t}", "function keyPressed() {\n\t//DOWN ARROW key makes the package fall to the ground\n if (keyCode === DOWN_ARROW) {\n Matter.Body.setStatic(packageBody, false);\n }\n //movement of the helicopter using RIGHT and LEFT ARROW keys\n if (keyCode === RIGHT_ARROW) {\n\thelicopterSprite.x += 10;\n }\n if (keyCode === LEFT_ARROW) {\n\thelicopterSprite.x -= 10;\n }\n}", "function keyPressed() {\n //When numbber key is pressed display new sketch\n if (isFinite(key)) {\n nextSoundNumber = int(key); //Save pressed key for the next sound to be played\n prepareSound();\n }\n}", "function keyPressDown(event){\n\n let key = (96 <= event.keyCode && event.keyCode <= 105)? event.keyCode - 48 : event.keyCode;\n if(key >= 16 && key <= 18){\n\n if(pressedModifiers.indexOf(key) === -1){\n\n pressedModifiers.push(key);\n }\n if(event.data && event.data.modifierFunc){\n\n event.data.modifierFunc(event);\n }\n\n } else {\n\n if(event.data && event.data.keyFunc){\n\n event.data.keyFunc(event);\n }\n }\n if(event.data && event.data.func){\n\n event.data.func(event);\n }\n for (var handler in waitingForInput) {\n if (waitingForInput.hasOwnProperty(handler)) {\n waitingForInput[handler](event);\n }\n }\n\n}", "function keyDownHandler(e) {\n if (e.key == \"down\" || e.key == \"w\") {\n wPressed = true;\n } else if (e.key == \"down\" || e.key == \"d\") {\n dPressed = true;\n } else if (e.key == \"down\" || e.key == \"s\") {\n sPressed = true;\n } else if (e.key == \"down\" || e.key == \"a\") {\n aPressed = true;\n }\n}", "function keyDown(e) {\n if (e.keyCode == 39) {\n rightPressed = true;\n } else if (e.keyCode == 37) {\n leftPressed = true;\n //arrow up\n } else if (e.keyCode == 38) {\n upPressed = true;\n } else if (e.keyCode == 40) {\n downPressed = true;\n }\n}", "function keyDownHandler(e) {\n\twasdKeys.onKeyDown(e);\n}", "function keyPressed() {\n\n //giving condition when key pressed down arrow key\n if (keyCode == DOWN_ARROW) {\n\t \n\t Matter.Body.setStatic(packageBody, false);\n\t \n }\n\n}", "function keyDownHandler(event) {\n if (event.keyCode == 39 || event.keyCode == 68) {\n rightPressed = true;\n }\n else if (event.keyCode == 37 || event.keyCode == 65) {\n leftPressed = true;\n }\n if (event.keyCode == 40 || event.keyCode == 83) {\n downPressed = true;\n }\n else if (event.keyCode == 32) {\n upPressed = true;\n }\n}", "function keyPressed() {\n\t\n if( key === 's' || key === 'S' ) {\n\n save();\n \n }else if( key === 'z' || key === 'Z' ) {\n toggleGrid();\n }else if( key === 'x' || key === 'X' ) {\n toggleQuarterLine();\n }\n\n}", "function d3_keyup() {\n\n lastKeyDown = -1;\n // ctrl\n if (!d3.event.ctrlKey) {\n rect.on('mousedown.drag', null)\n .on('touchstart.drag', null);\n svg.classed('ctrl', false);\n }\n}", "function keyPressed() {\n if (keyCode === UP_ARROW) {\n snake.dir(\"UP\");\n } else if (keyCode === DOWN_ARROW) {\n snake.dir(\"DOWN\");\n } else if (keyCode === LEFT_ARROW) {\n snake.dir(\"LEFT\");\n } else if (keyCode === RIGHT_ARROW) {\n snake.dir(\"RIGHT\");\n }\n}", "keyPressed() {\n if (this.started){\n\n switch (event.key) {\n case \"ArrowDown\":\n this.mainLoop(); //Call mainloop because funtion is the same\n break;\n case \"ArrowUp\":\n this.rotate('rotateright');\n break;\n case \"ArrowLeft\":\n this.arrowKeys(-1);\n break;\n case \"ArrowRight\":\n this.arrowKeys(1);\n break;\n case \" \": //space\n this.hardLock();\n break;\n case \"Escape\":\n // this.pauze();\n break;\n case \"z\":\n this.rotate('rotateleft');\n break;\n case \"c\":\n // this.hold();\n break;\n case \"r\":\n // this.gameover();\n // this.start();\n break;\n default:\n return; // Quit when this doesn't handle the key event.\n }\n\n }\n\n }", "press (key) {\n const { KEYS } = this.c8\n KEYS[key] = true\n setTimeout(() => { KEYS[key] = false }, 100)\n }", "function keyEvent(event) {\n console.log(\"KEY: \" + event.name + \"=\" + event.isPressed);\n if (event.name == 'UP'){\n\t\tactivesensor = 'T';\n\t\tled.sync.showMessage(activesensor);\n\t} else if (event.name == 'LEFT'){\n\t\tactivesensor = 'P';\n\t\tled.sync.showMessage(activesensor);\n\t} else if (event.name == 'RIGHT'){\n\t\tactivesensor = 'H';\n\t\tled.sync.showMessage(activesensor);\n\t}\n}", "function keyPressed(){\n\tif(keyCode === UP_ARROW){\n\t\ts.dir(0, -1);\n\t}else if(keyCode === DOWN_ARROW){\n\t\ts.dir(0, 1);\n\t}else if(keyCode === RIGHT_ARROW){\n\t\ts.dir(1, 0);\n\t}else if(keyCode === LEFT_ARROW){\n\t\ts.dir(-1, 0);\n\t}\n}", "onKeyPressed(keyCode, event) {\n switch (keyCode) {\n case cc.KEY.a:\n case cc.KEY.left:\n self.accLeft = true;\n self.accRight = false;\n break;\n case cc.KEY.d:\n case cc.KEY.right:\n self.accLeft = false;\n self.accRight = true;\n break;\n }\n }", "function keyReleased() {\n if (key != ' ') {\n granny.setDir(0);\n }\n}", "function keyEventDown(event){\n justPressedKey=event.keyCode;\n if (currentlyPressedKeys.indexOf(event.keyCode)== -1){\n currentlyPressedKeys.push(event.keyCode);\n }\n documentUpdate();\n event.preventDefault();\n}", "handleKeyDown (event) {\n }", "keyPressed(){\n if(keyCode === 66) {\n this.b = !this.b;\n }\n if(keyCode === 68) {\n this.d = !this.d;\n }\n if(keyCode === 71) {\n this.g = !this.g;\n }\n if(keyCode === 80) {\n this.p = !this.p;\n }\n if(keyCode === 83) {\n this.s = !this.s;\n }\n if(keyCode === 82) {\n this.r = !this.r;\n }\n\n }", "function handleKeyDown(evt) {\r\n if (evt.keyCode == KEYCODE_UP) {\r\n pressing.up = true;\r\n }\r\n else if (evt.keyCode == KEYCODE_DOWN) {\r\n pressing.down = true;\r\n }\r\n else if (evt.keyCode == KEYCODE_LEFT) {\r\n pressing.left = true;\r\n }\r\n else if (evt.keyCode == KEYCODE_RIGHT) {\r\n pressing.right = true;\r\n }\r\n}", "function onkey(event) {\n\n if (!(event.metaKey || event.altKey || event.ctrlKey)) {\n event.preventDefault();\n }\n\n if (event.charCode == 'z'.charCodeAt(0)) { // z\n controls.zeroSensor();\n } else if (event.charCode == 'f'.charCodeAt(0)) { // f\n effect.setFullScreen( true );\n } else if (event.charCode == 'w'.charCodeAt(0)) { // w - move a row up\n animator.changeRow( -1 );\n currentRow -= 1;\n } else if (event.charCode == 's'.charCodeAt(0)) { // s - move a row down\n animator.changeRow( 1 );\n currentRow += 1;\n } else if (event.charCode == 'a'.charCodeAt(0)) { // a - spin row left\n animator.spinRow( -1 );\n } else if (event.charCode == 'd'.charCodeAt(0)) { // d - spin row right\n animator.spinRow( 1 );\n }\n}", "function SimpleKeyNavigation() {\n }", "function keyPressHandler(e) {\r\n if (e.which === 117) rocket1.moveUp(10);\r\n if (e.which === 100) rocket1.moveDown(10);\r\n if (e.which === 114) rocket1.moveRight(10);\r\n if (e.which === 108) rocket1.moveLeft(10);\r\n if (e.which === 32) {\r\n soundFiring();\r\n rocket1.addBullet(rocket1.x, rocket1.y + rocket1.height / 2);\r\n }\r\n if (e.which === 48) {\r\n clearInterval(animate);\r\n }\r\n if (e.which === 49) {\r\n clearInterval(animate);\r\n animate = setInterval(animation, 100);\r\n }\r\n }", "function keyDown(ev) {\n\t if (!isKeyInputEnabled && ev.keyCode === key_1.Key.TAB) {\n\t isKeyInputEnabled = true;\n\t enableKeyInput();\n\t }\n\t }", "function keyup_handler(event)\n{\n\tgame.handle_key(event.code, false);\n}", "function key_down(event) {\n if (event.shiftKey) {\n shift_key_pressed = true;\n }\n}", "function keyDownHandler(e) {\n if (e.key == 'Right' || e.key == 'ArrowRight') {\n rightPressed = true;\n } else if (e.key == 'Left' || e.key == 'ArrowLeft') {\n leftPressed = true;\n }\n}" ]
[ "0.80504364", "0.80504364", "0.80347586", "0.785865", "0.77134097", "0.77106714", "0.76767427", "0.76314795", "0.7584557", "0.7535983", "0.752803", "0.7504957", "0.7483984", "0.74645764", "0.7461633", "0.7461633", "0.74455506", "0.74045163", "0.7401521", "0.73460174", "0.73379", "0.7331666", "0.73043436", "0.72952086", "0.72952086", "0.72909033", "0.7277773", "0.7277333", "0.72767", "0.72650075", "0.72617364", "0.7254685", "0.72471255", "0.7240662", "0.7239884", "0.7220971", "0.7217345", "0.7217345", "0.7206068", "0.71966285", "0.71735734", "0.7154962", "0.7152379", "0.7137433", "0.71357185", "0.71331125", "0.7124675", "0.71080744", "0.7099292", "0.707292", "0.70704705", "0.70597255", "0.7058342", "0.705093", "0.704094", "0.7030472", "0.70250076", "0.7015728", "0.7012768", "0.7012348", "0.700318", "0.7002012", "0.6993265", "0.69831896", "0.6977193", "0.6975219", "0.69745487", "0.6964504", "0.696123", "0.6960602", "0.69592696", "0.6946334", "0.6941307", "0.693693", "0.6934903", "0.69323206", "0.6927547", "0.691598", "0.6904756", "0.6898638", "0.68978703", "0.68959093", "0.6890109", "0.6885809", "0.68807954", "0.6880386", "0.68798333", "0.6876021", "0.68737656", "0.6866554", "0.68660796", "0.6861005", "0.68581074", "0.6852616", "0.68467164", "0.68460447", "0.68411005", "0.68378294", "0.6835793", "0.68207264" ]
0.7201216
39
update : position , movement , score ,etc....(core logic)
function update() { ball.x += ball.velocityX; ball.y += ball.velocityY; //simple AI to control computer paddle let computerLevel = 0.8; comp.y += (ball.y - (comp.y + comp.height / 2)) * computerLevel; // user up down change if (upArrowPressed && user.y > 0) { user.y -= 12; } else if (downArrowPressed && user.y < cvs.height - user.height) { user.y += 12; } if (ball.y + ball.radius > cvs.height || ball.y - ball.radius < 0) { //( if ball hit upper or lower boundary , reverse y velocity ) ball.velocityY = -ball.velocityY; } let player = ball.x < cvs.width / 2 ? user : comp; if (collision(ball, player)) { // calculating and normalising where the ball hits the player let collidePoint = ball.y - (player.y + player.height / 2); collidePoint = collidePoint / (player.height / 2); // calculating angle in radian let angleRad = collidePoint + Math.PI / 4; //direction in which ball must go after collision let direction = ball.x < cvs.width / 2 ? 1 : -1; //change velocity x and y ball.velocityX = direction * ball.speed; ball.speed += 1; //increasing speed everytime ball hits the paddle } // update score if (ball.x - ball.radius < 0) { // comp win comp.score++; resetBall(); } else if (ball.x + ball.radius > cvs.width) { // user win user.score++; resetBall(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update() {\n // initialize next move\n let nextPosition = this.getNextPosition();\n // if next position is not blocked by an object\n if (this.isPositionFree(nextPosition)) {\n this.position.x = nextPosition.x;\n this.position.y = nextPosition.y;\n\n // if successful, send movement to server\n this.game.broadcastPosition({id: this.id, x: this.position.x, y: this.position.y, direction: this.direction});\n }\n\n }", "update() {\n this.move();\n this.age();\n }", "updateVariables(move) { }", "function update() {\n // board movement.\n board.update();\n\n // arrow movement.\n updateArrow();\n}", "update() {\n if (this.y > 380) { //if player attempts to go over the 380 limit, player will remain at the 380 position\n this.y = 380;\n } else if (this.y < 0) { //if player a reaches to the top of the canvas (where the water is), player will be relocated to the default location\n this.x = 202;\n this.y = 380;\n\n score++; //score increments by 1 when player gets in range of the water\n $('.num').text(score); //updated score then gets appended to .num span\n }\n\n if (this.x > 400) { //if player attempts to go over 400 on the right or 0 on the left, player's position with remain at the 400 or 0 position\n this.x = 400;\n } else if (this.x < 0) {\n this.x = 0;\n }\n }", "update() { }", "update() { }", "update() {\n // Add points to score if win\n function addPoints() {\n score += 10;\n points.innerHTML = score;\n }\n if (this.y <= 0) {\n addPoints();\n this.x = 200;\n this.y = 380;\n }\n }", "update() {\n // Check if the player has reached the goal\n if (this.isReady && this.y === -25) {\n this.isReady = false;\n this.updateScore(); // Increment score by 1\n setTimeout(() => {\n // Reposition the player at the starting spot after brief delay\n [this.x, this.y] = this.startPos;\n this.isReady = true;\n }, 500);\n } else if (this.isReady && this.wantsToMove) {\n this.move(this.direction); // Move the player\n this.wantsToMove = false;\n }\n }", "update()\n {\n \n }", "update() {\n super.update();\n this.move();\n }", "function updateAll() {\r\n //Update each position by substituting its object in updateObj() method\r\n updateObj( star );\r\n updateObj( bullet );\r\n updateObj( enemyBullet );\r\n updateObj( enemy );\r\n updateObj( explosion );\r\n if ( !gameOver ) {\r\n jiki.update();//Update the sprite position\r\n }\r\n}", "function updateMovement()\r\n{\r\n if(moved)\r\n {\r\n moveCount++;\r\n updateMoveCounter();\r\n addNewNumber();\r\n updateTable();\r\n moved=false;\r\n\r\n if(isWin())\r\n gameWon();\r\n }\r\n else if(isGameOver())\r\n {\r\n gameOver();\r\n }\r\n}", "function updateAll() {\n paddle.handleMoveAction()\n ball.move()\n drawer.draw()\n}", "function update() {}", "update() {\n\n // Checks for collision with obstacles\n if(shouldCollide && collidedObject == null && is_colliding($('#squirrel'), $('#' + this.type + \"_left\"))){\n shouldCollide = false;\n collidedObject = this.type + \"_left\";\n if(this.type == \"chickfila\"){\n $('#chickfila_left').addClass('hidden');\n playerScore = playerScore + 50;\n $('#playerScore').text(playerScore);\n }\n else if(this.type == \"acorn\"){\n $('#acorn_left').addClass('hidden');\n playerScore = playerScore + 20;\n $('#playerScore').text(playerScore);\n }\n else if(this.type == \"gold_acorn\"){\n $('#gold_acorn_left').addClass('hidden');\n playerScore = playerScore + 100;\n $('#playerScore').text(playerScore);\n }\n else if(this.type == \"hawk\"){\n removeHeart();\n removeHeart();\n removeHeart();\n }\n else{\n $('#' + this.type + '_left').addClass('hidden');\n removeHeart();\n }\n \n }\n else if(!shouldCollide && this.type + \"_left\" == collidedObject && !is_colliding($('#squirrel'), $('#' + this.type + \"_left\"))){\n shouldCollide = true;\n collidedObject = null;\n }\n\n if(this.type === \"branch\"){\n $('#branch_left').css(\"top\",this.y+'px');\n }\n else if(this.type===\"chickfila\"){\n $('#chickfila_left').css(\"top\",this.y+'px');\n }\n else if(this.type===\"acorn\"){\n $('#acorn_left').css(\"top\",this.y+'px');\n }\n else if(this.type===\"gold_acorn\"){\n $('#gold_acorn_left').css(\"top\",this.y+'px');\n }\n else if(this.type === \"cone\"){\n $('#cone_left').css(\"top\",this.y+'px');\n }\n else if(this.type === \"hawk\"){\n $('#hawk_left').css(\"top\",this.y+'px');\n }\n }", "function update_scores(move, move_id) {\r\n var point = (move == \"X\") ? 1:-1;\r\n var scores = global_scores;\r\n var rc = parse_move_id(move_id);\r\n var r = rc[0];\r\n var c = rc[1];\r\n\r\n scores[r - 1] += point;\r\n scores[grid_size + (c - 1)] += point;\r\n if (r == c) scores[2 * grid_size] += point;\r\n if (grid_size - 1 - (c - 1) == (r - 1)) scores[2 * grid_size + 1] += point;\r\n send_message('userscores', '{ \"scores\":\"' + scores + '\" }');\r\n}", "function onPlayerMove(id, position) {\n\taoi_st.update(id, position.x, position.y);\n}", "update() {\n if (state.current.moving) {\n updateOnMove.map((object) => object.update());\n }\n }", "function update(){\n updateSnakeMovement();\n updateGameFinishedState();\n updateFoodAcquiredState();\n }", "function update() {\n\t\t\n\t}", "update(t){\r\n this.movingObject.update();\r\n this.fish.update(t);\r\n this.waterSurface.update(t);\r\n this.algaeSet.update(t);\r\n this.checkKeys();\r\n }", "update () {}", "updatePos(){\n var data = {x: this.x, y: this.y}\n if(this.oldPositions && (this.x !== this.oldPositions.x || this.y !== this.oldPositions.y)){\n this.newPos = data;\n this.oldPositions = {\n x: this.x,\n y: this.y\n }\n return true; \n }else{\n return false;\n }\n }", "update () {\n\n\n\n }", "update() {\n\n // Checks for collision with obstacles\n if(shouldCollide && collidedObject == null && is_colliding($('#squirrel'), $('#' + this.type + \"_right\"))){\n shouldCollide = false;\n collidedObject = this.type + \"_right\";\n\n if(this.type == \"chickfila\"){\n $('#chickfila_right').addClass('hidden');\n playerScore = playerScore + 50;\n $('#playerScore').text(playerScore);\n }\n else if(this.type == \"acorn\"){\n $('#acorn_right').addClass('hidden');\n playerScore = playerScore + 20;\n $('#playerScore').text(playerScore);\n }\n else if(this.type == \"gold_acorn\"){\n $('#gold_acorn_right').addClass('hidden');\n playerScore = playerScore + 100;\n $('#playerScore').text(playerScore);\n }\n else if(this.type == \"hawk\"){\n removeHeart();\n removeHeart();\n removeHeart();\n }\n else{\n $('#' + this.type + '_right').addClass('hidden');\n removeHeart();\n \n }\n $('#playerScore').text(playerScore);\n }\n else if(!shouldCollide && this.type + \"_right\" == collidedObject && !is_colliding($('#squirrel'), $('#' + this.type + \"_right\"))){\n shouldCollide = true;\n collidedObject = null;\n }\n\n if(this.type===\"branch\"){\n $('#branch_right').css(\"top\",this.y+'px');\n }\n else if(this.type === \"chickfila\"){\n $('#chickfila_right').css(\"top\",this.y+'px');\n }\n else if(this.type === \"acorn\"){\n $('#acorn_right').css(\"top\",this.y+'px');\n }\n else if(this.type === \"gold_acorn\"){\n $('#gold_acorn_right').css(\"top\",this.y+'px');\n }\n else if(this.type === \"cone\"){\n $('#cone_right').css(\"top\",this.y+'px');\n }\n else if(this.type === \"hawk\"){\n $('#hawk_right').css(\"top\",this.y+'px');\n }\n }", "update () {\n\n\n }", "update() {\n //Apply changes\n super.update()\n //Execute action\n if (this.action in this) {\n this[this.action]()\n this.output.idle = 0\n }\n\n //Update animation speed\n if (this.alive) {\n this.sprite.animationSpeed = Entity.ANIMATION_SPEED * this.adaptability\n }\n //Sudden death\n if ((this.sudden_death)||(this.hp <= 0)) {\n this.die()\n }\n }", "function update() {\n updatePosition();\n checkBounds();\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "_onUpdate() {\n const args = [this.x, this.y];\n this.moveHandlers.forEach((callback) => callback(...args));\n }", "update() {\n // Don't update when dead\n if (this.isDead()) {\n return;\n }\n\n this._applyConstantForces();\n\n this.vel = this.vel.add(this.acc);\n if (this.maxSpeed) {\n this.vel = this.vel.limit(this.maxSpeed);\n }\n\n this.prevPos = this.pos.clone();\n this.pos = this.pos.add(this.vel);\n\n // Reset acc for each cycle\n this.acc = this.acc.multiply(0);\n\n if (this.bindToScreen) {\n this._bindToScreen();\n }\n\n if (this.showTrail) {\n this.trail.push(this.pos.clone());\n this.trail = this.trail.splice(this.trail.length - this.trailLimit);\n }\n\n this.count += 1;\n }", "update() {\n }", "update() {\n }", "update() {\n }", "Update(user_move, user_position) {\n const updates = this.updates;\n // const user_position = this.user_position;\n const space_2d = this.space_2d;\n console.log('user_move', user_move)\n console.log('user_position', user_position)\n\n // compute entropy before updating\n let H_before = this.entropy(updates);\n\n // update probability distribution\n let temp = this.Pr_u_v(user_move, user_position);\n let updates_1d = this.twodto1d(updates);\n for (let i = 0; i < updates_1d.length; i++) {\n let opti = this.getIndexOfK(space_2d, i);\n updates_1d[i] = updates_1d[i] * this.Pr_u_t_v(user_move, opti, user_position) / temp;\n }\n\n // compute entropy after updating\n let somme = 0\n for (let j = 0; j < updates_1d.length; j++) {\n somme = somme + updates_1d[j];\n }\n\n for (let x = 0; x < updates_1d.length; x++) {\n updates_1d[x] = updates_1d[x] / somme;\n }\n\n this.setUpdatesOnedTo2d(updates_1d);\n\n let H_after = this.entropy(this.onedto2d(updates_1d));\n // this.setUserPosition(user_position, user_move);\n // console.log('this.user_position', this.user_position);\n console.log(\"The actual information gain is: \", Math.abs(H_after - H_before));\n console.log(\"The current distribution is: \" , this.updates);\n }", "function update(){\n\tvar a = arrayfromargs(messagename,arguments);\n\tvar ca = new Array(a[0],a[1],a[2],a[3],a[4]);\n\t//args = \"update\", x, y, playernumber\n\tif(a[1]>7 || a[2] > 7) { //out of range\n\t\t\n\t} else{ //new grid entry\n\t\n\t\t//get coords of update\n\t\tvar d = new Dict(\"gridSettings\");\n\t\tvar s = \"playerOffset::\";\n\t\ts = s.concat(a[3]);\n\t\t//post(s, \"\\n\");\n\t\tcOffset = d.get(s);\n\t\ta[1] += cOffset[1];\n\t\ta[2] += cOffset[0];\n\n\t\ta[2] = dimY - a[2] - 1; //flip Y-axis \n\n\t\t//determine state\n\t\tvar modFlag = 0;\n\t\tcurState = states[a[1]][a[2]].state;\n\t\tfor(var i=0;i<8;i++){\n\t\t\tif(curMod[i]>0) {\n\t\t\t\t//post(i,\"\\n\");\n\t\t\t\tmodFlag += (1<<(i+1));\n\t\t\t}\n\t\t}\n\t\tif (modFlag== 0 && curState > 0 && states[a[1]][a[2]].player == a[3] ) curState = 0;\n\t\telse if(modFlag == 0 ) curState = 1;//normal note\n\t\telse curState = modFlag; \n\t\tif(modFlag == 1) curState++;\n\t\t//post(curState);\n\n\t\tstates[a[1]][a[2]].state = curState;\n\t\tstates[a[1]][a[2]].player = a[3];\n\n\n\t\twriteValToGrid(a,curState);\n\n\t\t//outlet to coll is 3 values: player, state, y-position\n\t\tvar s = new Array(dimY+1);\n\t\ts[0] = a[1];\n\n\t\tfor(var i=0; i<dimY; i++) {\n\t\t\tvar curY = (dimY-i-1) % dimY;\n\t\t\ts[(i*3+1)] = states[a[1]][curY].player;\n\t\t\ts[(i*3+2)] = states[a[1]][curY].state;\n\t\t\ts[(i*3+3)] = i;\n\t\t}\n\n\t\toutlet(columnOut, s);\n\n\t\tupdateLP(ca[1], ca[2], states[a[1]][a[2]].state, states[a[1]][a[2]].player);\n\t}\n}//update", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "function update() {\n\t\t\t\tplayer.update();\n\t\t\t\tcomputer.update(ball);\n\t\t\t\tball.update(player.paddle, computer.paddle);\n\t\t\t\tdocument.getElementById(\"pongScore\").innerHTML = \"Score = \" + score;\n\t\t\t}", "update(){\n\n }", "function update()\n{\n\n}", "function update(){\n\t$(\"#characters\").children().each(function(index) {\n\t\tif( !$(this).hasClass(\"character-removed\") )\n\t\t{\n\t\t\tvar srcPos = $(this).attr(\"srcPos\"), destPos = $(this).attr(\"destPos\");\n\t\t\tvar destX = getPosX(destPos), srcX = getPosX(srcPos);\n\t\t\tvar movDistance = (destX - srcX) / 32;\n\t\t\tvar curPos = $(this).css(\"left\");\n\t\t\tvar nPosGap = Math.abs(destPos-srcPos);\n\t\t\n\t\t\tif(nPosGap == 0 ) // stay\n\t\t\t{\n\t\t\t\t//if(Math.random() > 0.5)\n\t\t\t\t{\n\t\t\t\t\tjumpMario($(this));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(nPosGap <= 2) // walking\n\t\t\t{\n\t\t\t\twalkMario($(this));\n\t\t\t}\n\t\t\telse if(nPosGap <4) // jump\n\t\t\t{\n\t\t\t\tjumpMario($(this));\n\t\t\t}\n\t\t\telse // run\n\t\t\t{\n\t\t\t\trunMario($(this));\n\t\t\t}\n\t\t}\n\t});\n\t\n\tmarioGame.nFrame++;\n\tif(marioGame.nFrame > 31){\n\t\tmarioGame.nFrame = 0;\n\t\tmarioGame.nTurn++;\n\t}\n}", "function update() {\n \n}", "function update() {\n // Test for game over, make the score bigger with a game over message\n if (gameOver) {\n lastScoreText = scoreText.text;\n scoreText.setPosition(150, 40);\n scoreText.setFill('red');\n scoreText.setFontSize(100);\n scoreText.setText(lastScoreText + '\\nGame over');\n this.scene.pause('default');\n } // Check if the player got the amount of points selected in the form -> Win\n else if (score >= document.getElementById('winScore').value) {\n player.setTint(0x008000);\n lastScoreText = scoreText.text;\n scoreText.setPosition(150, 40);\n scoreText.setFill('green');\n scoreText.setFontSize(100);\n scoreText.setText(lastScoreText + '\\nYou won!!');\n this.scene.pause('default');\n }\n\n // Check if space or up arrow are pressed and the player is on the floor to perform a jump\n if ((cursors.space.isDown || cursors.up.isDown) && player.body.onFloor())\n {\n player.body.setVelocityY(-400); // jump up\n }\n // Checking if the left arrow key is pressed\n if (cursors.left.isDown) {\n player.body.setVelocityX(-200); // move left\n player.flipX= true; // flip the sprite to the left\n if (player.body.onFloor()) {\n player.anims.play('left', true); // play walk animation\n }\n } // Check if the right arrow key is pressed\n else if (cursors.right.isDown) {\n player.body.setVelocityX(200); // move right\n player.flipX = false; // use the original sprite looking to the right\n if (player.body.onFloor()) {\n player.anims.play('right', true); // play walk animation\n }\n } else {\n // Checks if the player is not moving anymore to stop the movement\n player.body.setVelocityX(0);\n player.anims.play('idle', true);\n }\n }", "update() {\r\n //Creates new position from the current snake's head position to store in the position stack\r\n var position = {\r\n X: this.position.X,\r\n Y: this.position.Y\r\n }\r\n\r\n //adds position to the stack\r\n this.positionStack.unshift(position);\r\n\r\n //removes unneeded position from the stack's end\r\n this.positionStack.pop();\r\n\r\n //calculates new position depending on the current direction\r\n switch (this.direction) {\r\n case Helper.Directions.DOWN:\r\n this.position.Y += this.size.HEIGHT;\r\n break;\r\n case Helper.Directions.UP:\r\n this.position.Y -= this.size.HEIGHT;\r\n break;\r\n case Helper.Directions.LEFT:\r\n this.position.X -= this.size.WIDTH;\r\n break;\r\n case Helper.Directions.RIGHT:\r\n this.position.X += this.size.WIDTH;\r\n break;\r\n\r\n default:\r\n throw new Error('Pease, use Directions enumerations.');\r\n break;\r\n }\r\n\r\n //updates all body parts' positions\r\n for (var i = 0; i < this.length; i++) {\r\n this.bodyArray[i].position = this.positionStack[i];\r\n }\r\n //checks if the snake has eaten enough food and if so makes it grow\r\n if (this.foodEaten == Helper.DefaultSnakeProperties.FOOD) {\r\n this.foodEaten = 0;\r\n this.grow();\r\n }\r\n }", "update() {\n\n \n this.movePlayerManager();\n\n\n \n\n }", "updatePos() {\n if (this.x != this.player.x || this.y != this.player.y) {\n this.x = this.player.x;\n this.y = this.player.y;\n }\n }", "updatePosition(position, move) {\n position[move.to] = position[move.from];\n position[move.from] = null;\n }", "updateCoordinate() \n\t{\n\t\tif(this.counter>=this.constants[this.action].x.length)\n\t\t{\n\t\t\tthis.counter=0;\n\t\t\t//if action is anything other than 'STANDING' change the action back to 'STANDING'\n\t\t\tthis.action = 'STANDING';\n\t\t}\n\n\t\tif(this.action == 'WALK_LEFT')\n\t\t\tthis.ch_x = this.ch_x-10;\n\t\telse if(this.action == 'WALK_RIGHT')\n\t\t\tthis.ch_x = this.ch_x+10;\n\t}", "updatePositions(t) {\n for (var i = 0; i < this.sats.length; i++) {\n this.sats[i].updatePosition(t);\n }\n }", "refreshPos() {\n\t\tlet player = this;\n\t\tif (!this.idle) {\n\t\t\tswitch (this.last_direction) {\n\t\t\t\tcase DIRECTION.DOWN: //based on direction, the characters position in the matrix is updated\n\t\t\t\t\tthis.position.row += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DIRECTION.UP:\n\t\t\t\t\tthis.position.row -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DIRECTION.RIGHT:\n\t\t\t\t\tthis.position.col += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DIRECTION.LEFT:\n\t\t\t\t\tthis.position.col -= 1;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tboard.items.forEach(function (item, index, object) {\n\t\t\t\tif (item.position.row == player.position.row &&\n\t\t\t\t\titem.position.col == player.position.col) {\n\t\t\t\t\titem.updatePlayer(player, item); // trigger the effect on the player\n\t\t\t\t\taudioPickupItem.play();\n\t\t\t\t\tobject.splice(index, 1); // destroy the item\n\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}", "function update() {\n\t\n\n\n\n}", "update() {\n // did player collide with enemy?\n for (let enemy of allEnemies) {\n // collision? from http://blog.sklambert.com/html5-canvas-game-2d-collision-detection/#d-collision-detection\n if (this.x < enemy.x + enemy.collisionWidth && this.x + this.collisionWidth > enemy.x && this.y < enemy.y + enemy.collisionHeight && this.y + this.collisionHeight > enemy.y) {\n // if yes change score and reset to start\n this.restart();\n hearts.reduceHearts();\n this.blink();\n }\n }\n // item collected?\n for (let item of allItems) {\n if (item != player) {\n if (this.x < item.x + item.collisionWidth && this.x + this.collisionWidth > item.x && this.y < item.y + item.collisionHeight && this.y + this.collisionHeight > item.y) { \n item.xPointShow = item.x;\n item.yPointShow = item.y;\n item.collision = true;\n item.add();\n item.disappear();\n } \n }\n }\n }", "update() {\n super.update();\n let state = this.state;\n let entities = state.entities;\n entities.forEach(th => {\n th.data.repulse.set(0, 0);\n });\n entities.forEach(th => {\n this._processThinker(th)\n });\n // tous les sprites doivent etre relatifs à ce point de vue\n let p = state.player.data.position;\n entities.forEach(e => {\n e.sprite.position.set(e.data.position.sub(p));\n });\n ++this.state.time;\n state.player.sprite.position.set(0, 0);\n state.view.set(p);\n }", "updatePositions() {\n throw 'not implemented';\n }", "update(){\n }", "update(){\n }", "updatePosition(position) \n {\n this.position = position;\n }", "function update() { \n ball.update();\n player.update();\n ai.update();\n}", "function update_position() {\r\n if (!error_state) {\r\n if (prev_time + 50 < Date.now()) {\r\n prev_time = Date.now();\r\n //50 ms + 5ms to account for drift, measured to be around 5ms per update cycle.\r\n local_track.position += 55;\r\n update_controls_UI();\r\n }\r\n }\r\n }", "function hit(){\n score += 10;\n updateScore();\n}", "function updateGameLogic() {\n\tupdate_scores();\n\tif (gameState == \"READY\") {\n\t\tif (level == 0)\n\t\t\tdrawText(\"Click to hunt ducks!\",true);\n\t\telse {\n\t\t\tdrawText(\"Level \" + (level+1).toString() + \"!(click screen to start)\",true);\n\t\t}\n\t}\n\telse if (gameState == \"PLAY\") {\n\t\tflapCount++;\n\t\ttargetChange++;\n\n\t\t//Determines if the targets should be changed\n\t\t//Decently high mod value so the ducks don't change targets too quickly\n\t\tif (targetChange % 50 == 0)\n\t\t\tupdateTargets();\n\n\t\t//move and redraw the canvas for the level\n\t\tmoveDucks();\n\t\tdrawDucks();\n\t\tdrawLives();\n\n\t\t//Acts as the timer for the game to end\n\t\tgameTime--;\n\n\t\tif (gameTime == 0 || shots <= 0) {\n\t\t\tgameState = \"GAMEOVER\";\n\t\t\tducksFly();\n\t\t}\n\t}\n\telse if (gameState == \"GAMEOVER\") {\n\t\t//Update count for flap animation\n\t\tflapCount++;\n\t\t//Move ducks off screen\n\t\tmoveDucks();\n\t\tdrawDucks();\n\t\tdrawText(\"Game Over! Final Score: \" + score + \"!\" , false);\n\n\t}\n}", "function update() {\n ball.update();\n player.update();\n ai.update();\n}", "function update() {\n // ... no implementation required\n }", "function updateGameArea() {\r\n myGameArea.clear();\r\n myGamePiece.newPos();\r\n myGamePiece.update();\r\n}", "updatePositions(){\n this.api.get_positions(this.apiPositionListener)\n }", "updateScore( score ){\n this.score += score;\n this.playerDB.update(this.props());\n }", "update() {\n // ...\n }", "update() {\n //check for collisions, if yes, alert game over, if no game continues\n for (let enemy of allEnemies) {\n if (this.y === enemy.y && this.x < enemy.x + 50 && this.x + 50 > enemy.x) {\n this.x = this.startColumn;\n this.y = this.startRow;\n score -= 100;\n }\n if (this.y === 0) {\n // alert game won\n this.x = this.startColumn;\n this.y = this.startRow;\n alert('Game Won! You now have ' + score + ' points!');\n }\n }\n for (let gem of allGems) {\n if (this.y === gem.y && gem.x < gem.x + 50 && this.x + 50 > gem.x) {\n //earn points\n score += 100;\n }\n\n }\n\n }", "update () {\n }", "update() {\n }", "update() {\n }", "Update () {\n //keep a record of the old position so the goal::scored method\n //can utilize it for goal testing\n this.m_vOldPos = new Vector2D( this.m_vPosition );\n\n //Test for collisions\n this.TestCollisionWithWalls( this.m_PitchBoundary );\n\n //Simulate Prm.Friction. Make sure the speed is positive \n //first though\n if ( this.m_vVelocity.LengthSq() > Prm.Friction * Prm.Friction ) {\n this.m_vVelocity.add( Vector2D.mul( Vector2D.Vec2DNormalize( this.m_vVelocity ), Prm.Friction ) );\n this.m_vPosition.add( this.m_vVelocity );\n\n //update heading\n this.m_vHeading = Vector2D.Vec2DNormalize( this.m_vVelocity );\n };\n }", "updateGame(){\n //Update state of objectives\n this.isObjectiveTaken();\n //Update if game is over \n this.isOver();\n\n //check whether game is over\n if(!this.gameOver){\n //updates all players data\n this.updatePlayers();\n }\n }", "update() {\r\n ////console.log(\"in update shipConstruction\");\r\n if (this.gameOver) {\r\n //console.log(\"game is over??\");\r\n return;\r\n }\r\n\r\n\r\n if (sleepTortuga) {\r\n return;\r\n }\r\n\r\n\r\n }", "function update() {\n\tif(started)\n\t{\n\t\tballCollision(); // Checking every ball collision (X and Y border, paddles)\n\n\t\tballMovement(); // Updating ball position\n\n\t\tscoreSystem(); // Function that checks the score and gives a particular result in the end\n\n\t\tAI.move(); // Function that is responsible for AI movement\n\n\t\tplayer.move(); // Function that is responsible for player movement\n\t}\n\telse { // In else it is basically a classic reset of all positions and variables (starting over)\n\t\tAI.y = canvas.height / 2 - PLAYER_HEIGHT / 2;\n\t\tplayer.y = canvas.height / 2 - PLAYER_HEIGHT / 2;\n\n\t\tball.x = canvas.width/2 - ball.r/2;\n\n\t\tball.y = canvas.height / 2 - ball.r/2;\n\n\t\tball.xvel = 8;\n\t\tball.yvel = 8;\n\t}\n}", "function _update(){\n\t\t$scope.timing= SoundService.getPosition();\n\t\t$scope.timingpercent= SoundService.getPositionPercent();\n\t}", "function update() {\r\n paintCanvas();\r\n platformCalc();\r\n\r\n springCalc();\r\n\r\n playerCalc();\r\n player.draw();\r\n\r\n base.draw();\r\n\r\n updateScore();\r\n }", "move() {\n this.y += this.yVelocity;\n if (this.y < -40) {\n score++;\n }\n }", "async function update() {\r\n\t\t\t\t\tif(active) {\r\n\t\t\t\t\t\tdescription = ' ';\r\n\t\t\t\t\t\tconsoleEdit.edit(consoleDesc);\r\n\t\t\t\t\t\tconsoleDesc = `\\`\\`\\`X: ${stats.x} | Y: ${stats.y}\\`\\`\\``\r\n\t\t\t\t\t\tstats = client.getPInfo.get(message.author.id, message.guild.id);\r\n\t\t\t\t\t\tgameEdit.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] })\r\n\t\t\t\t\t\t.then(async collected => {\r\n\t\t\t\t\t\t\tconst reaction = collected.first();\r\n\t\t\t\t\t\t\treaction.users.remove(message.author.id);\r\n\t\t\t\t\t\t\tswitch(reaction.emoji.name) {\r\n\t\t\t\t\t\t\t\tcase '⬅️':\r\n\t\t\t\t\t\t\t\t\tmove(stats, stats.x-1, stats.y, 4);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tcase '➡️':\r\n\t\t\t\t\t\t\t\t\tmove(stats, stats.x+1, stats.y, 2);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tcase '⬇️':\r\n\t\t\t\t\t\t\t\t\tmove(stats, stats.x, stats.y-1, 3);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tcase '⬆️':\r\n\t\t\t\t\t\t\t\t\tmove(stats, stats.x, stats.y+1, 1)\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tcase '🛑':\r\n\t\t\t\t\t\t\t\t\tactiveGame.delete(message.author.id);\r\n\t\t\t\t\t\t\t\t\tactive = false;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tcase '⛏️':\r\n\t\t\t\t\t\t\t\t\tconsoleDesc += await client.commands.get('mine').execute(client, message, MessageEmbed);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tcase '🧳':\r\n\t\t\t\t\t\t\t\t\tclient.commands.get('inventory').execute(client, message, MessageEmbed, player);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tawait mapUpdate();\r\n\t\t\t\t\t\tawait update();\r\n\t\t\t\t\t\tturns--;\r\n\t\t\t\t\t}).catch(err => {\r\n\t\t\t\t\t\t//If the player does not respond in time, shut down the game.\r\n\t\t\t\t\t\tactiveGame.delete(message.author.id);\r\n\t\t\t\t\t\tgameEdit.edit(`${block}${block}${block}${block}${block}\\n${block}${block}${block}${block}${block}\\n${block}${block}${block}${block}${block}\\n${block}${block}${block}${block}${block}\\n${block}${block}${block}${block}${block}\\n`);\r\n\t\t\t\t\t\tconsoleEdit.edit('``` Game Closed ```')\r\n\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}" ]
[ "0.7234212", "0.7201657", "0.7168078", "0.6947328", "0.6931839", "0.6915788", "0.6915788", "0.68867666", "0.6876057", "0.686695", "0.6858264", "0.6815257", "0.6812449", "0.6776745", "0.6761515", "0.67493415", "0.67452395", "0.67289484", "0.6721278", "0.67107475", "0.669773", "0.66827583", "0.667472", "0.66481936", "0.6642491", "0.6639648", "0.6636897", "0.6597726", "0.659474", "0.6590468", "0.6590468", "0.6590468", "0.6590468", "0.6590468", "0.6590468", "0.6590468", "0.65890425", "0.65890425", "0.65890425", "0.65890425", "0.65890425", "0.65890425", "0.65890425", "0.65890425", "0.65890425", "0.6576068", "0.657171", "0.6565709", "0.6565709", "0.6565709", "0.6562512", "0.6559277", "0.6532078", "0.6532078", "0.6532078", "0.6532078", "0.6532078", "0.6532078", "0.6532078", "0.65300083", "0.652831", "0.6522406", "0.6511016", "0.6507432", "0.6481612", "0.64746815", "0.64727277", "0.64720833", "0.64691335", "0.64591914", "0.6456986", "0.6452584", "0.6451564", "0.64499336", "0.64452344", "0.6444986", "0.64437675", "0.64437675", "0.64430827", "0.64343643", "0.64328533", "0.6420064", "0.6419454", "0.6410849", "0.641048", "0.6409482", "0.64083225", "0.6405055", "0.6404811", "0.6401195", "0.63941735", "0.6392518", "0.6392518", "0.6391794", "0.63671196", "0.6362005", "0.63620025", "0.6345583", "0.6345136", "0.6342567", "0.6338858" ]
0.0
-1
DO NOT EDIT. Use zipCodeMaker.py to generate.
function constructZipCodeArray() { var zipCoords = [ new google.maps.LatLng( 0.480002428422559E+02, -0.122372853876444E+03), new google.maps.LatLng( 0.479981950000000E+02, -0.122375631000000E+03), new google.maps.LatLng( 0.479954570000000E+02, -0.122386731000000E+03), new google.maps.LatLng( 0.479902260000000E+02, -0.122392217000000E+03), new google.maps.LatLng( 0.479893630000000E+02, -0.122394729000000E+03), new google.maps.LatLng( 0.479971770000000E+02, -0.122402868000000E+03), new google.maps.LatLng( 0.479998150000000E+02, -0.122407599000000E+03), new google.maps.LatLng( 0.480010780000000E+02, -0.122415062000000E+03), new google.maps.LatLng( 0.479964950000000E+02, -0.122416726000000E+03), new google.maps.LatLng( 0.479998150000000E+02, -0.122427727000000E+03), new google.maps.LatLng( 0.480027260000000E+02, -0.122435159000000E+03), new google.maps.LatLng( 0.480032290000000E+02, -0.122435586000000E+03), new google.maps.LatLng( 0.480038240000000E+02, -0.122435159000000E+03), new google.maps.LatLng( 0.480042970000000E+02, -0.122439560000000E+03), new google.maps.LatLng( 0.480039150000000E+02, -0.122441548000000E+03), new google.maps.LatLng( 0.479998150000000E+02, -0.122451180000000E+03), new google.maps.LatLng( 0.480000860000000E+02, -0.122460993000000E+03), new google.maps.LatLng( 0.480042670000000E+02, -0.122461817000000E+03), new google.maps.LatLng( 0.480066170000000E+02, -0.122463861000000E+03), new google.maps.LatLng( 0.480077840000000E+02, -0.122466638000000E+03), new google.maps.LatLng( 0.480075470000000E+02, -0.122475305000000E+03), new google.maps.LatLng( 0.480053040000000E+02, -0.122483653000000E+03), new google.maps.LatLng( 0.480044190000000E+02, -0.122485362000000E+03), new google.maps.LatLng( 0.479970370000000E+02, -0.122485605000000E+03), new google.maps.LatLng( 0.479970370000000E+02, -0.122485605000000E+03), new google.maps.LatLng( 0.479964620000000E+02, -0.122491597000000E+03), new google.maps.LatLng( 0.479986780000000E+02, -0.122493949000000E+03), new google.maps.LatLng( 0.480007330000000E+02, -0.122493861000000E+03), new google.maps.LatLng( 0.480007530000000E+02, -0.122507578000000E+03), new google.maps.LatLng( 0.480142590000000E+02, -0.122506984000000E+03), new google.maps.LatLng( 0.480132570000000E+02, -0.122514445000000E+03), new google.maps.LatLng( 0.480099220000000E+02, -0.122518739000000E+03), new google.maps.LatLng( 0.480097390000000E+02, -0.122519931000000E+03), new google.maps.LatLng( 0.480096260000000E+02, -0.122524222000000E+03), new google.maps.LatLng( 0.480114550000000E+02, -0.122526230000000E+03), new google.maps.LatLng( 0.480125060000000E+02, -0.122525889000000E+03), new google.maps.LatLng( 0.480190180000000E+02, -0.122519821000000E+03), new google.maps.LatLng( 0.480271940000000E+02, -0.122507278000000E+03), new google.maps.LatLng( 0.480286330000000E+02, -0.122506799000000E+03), new google.maps.LatLng( 0.480403340000000E+02, -0.122506753000000E+03), new google.maps.LatLng( 0.480406130000000E+02, -0.122496289000000E+03), new google.maps.LatLng( 0.480495180000000E+02, -0.122497526000000E+03), new google.maps.LatLng( 0.480495100000000E+02, -0.122500059000000E+03), new google.maps.LatLng( 0.480459090000000E+02, -0.122500058000000E+03), new google.maps.LatLng( 0.480457690000000E+02, -0.122506841000000E+03), new google.maps.LatLng( 0.480660890000000E+02, -0.122506691000000E+03), new google.maps.LatLng( 0.480678510000000E+02, -0.122510781000000E+03), new google.maps.LatLng( 0.480666048842414E+02, -0.122512642377293E+03), new google.maps.LatLng( 0.480666048842414E+02, -0.122512642377293E+03), new google.maps.LatLng( 0.480734236733704E+02, -0.122511418071775E+03), new google.maps.LatLng( 0.480750926560238E+02, -0.122511118407914E+03), new google.maps.LatLng( 0.480753010000000E+02, -0.122511081000000E+03), new google.maps.LatLng( 0.480755461188955E+02, -0.122511327856426E+03), new google.maps.LatLng( 0.480810850000000E+02, -0.122516906000000E+03), new google.maps.LatLng( 0.480941542167064E+02, -0.122524108786013E+03), new google.maps.LatLng( 0.480965370000000E+02, -0.122525422000000E+03), new google.maps.LatLng( 0.480965524699514E+02, -0.122525234289681E+03), new google.maps.LatLng( 0.480975380000000E+02, -0.122513276000000E+03), new google.maps.LatLng( 0.480954384500262E+02, -0.122499152449630E+03), new google.maps.LatLng( 0.480942420000000E+02, -0.122491104000000E+03), new google.maps.LatLng( 0.480775608267170E+02, -0.122471988143992E+03), new google.maps.LatLng( 0.480685010000000E+02, -0.122461606000000E+03), new google.maps.LatLng( 0.480543230000000E+02, -0.122448419000000E+03), new google.maps.LatLng( 0.480464556371648E+02, -0.122433942613526E+03), new google.maps.LatLng( 0.480450010000000E+02, -0.122431266000000E+03), new google.maps.LatLng( 0.480447184818418E+02, -0.122430240189224E+03), new google.maps.LatLng( 0.480441693399557E+02, -0.122428246279635E+03), new google.maps.LatLng( 0.480372861321143E+02, -0.122403253660313E+03), new google.maps.LatLng( 0.480367835104642E+02, -0.122401428663617E+03), new google.maps.LatLng( 0.480365630000000E+02, -0.122400628000000E+03), new google.maps.LatLng( 0.480340300000000E+02, -0.122387382000000E+03), new google.maps.LatLng( 0.480344570000000E+02, -0.122376259000000E+03), new google.maps.LatLng( 0.480167812263017E+02, -0.122374686000000E+03), new google.maps.LatLng( 0.480090554265219E+02, -0.122373998466698E+03), new google.maps.LatLng( 0.480080131436756E+02, -0.122373905712008E+03), new google.maps.LatLng( 0.480007910000000E+02, -0.122373263000000E+03), new google.maps.LatLng( 0.480002428422559E+02, -0.122372853876444E+03), ]; return zipCoords }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\n var year_zip = define_zippy('year');\n var month_zip = define_zippy('month');\n var topic_zip = define_zippy('topic');\n var collection_zip = define_zippy('collection');\n}", "get zip(){return this._zip;}", "get zip(){return this._zip;}", "get zip(){return this._zip;}", "get zip() { return this._zip; }", "convertApkToZip (source, target){\n let cond = true;\n fs.rename(source, target, function(err) {\n if(err) {\n console.log('No such file or directory to be converted from APK to ZIP');\n cond=false;\n } // Set isExtracted to True\n });\n this.setterIsExtracted(cond);\n }", "function _jsZip () {\n\treturn jszip || window.JSZip;\n}", "function _jsZip () {\n\treturn jszip || window.JSZip;\n}", "function _jsZip () {\n\treturn jszip || window.JSZip;\n}", "function _jsZip () {\n\treturn jszip || window.JSZip;\n}", "getCode() {\n let token = ''\n let crowdsale = ''\n let migration = ''\n return this.getToken()\n .then((response) => {\n token = response;\n return this.getCrowdsale()\n })\n .then((response) => {\n crowdsale = response;\n return this.getMigration()\n })\n .then((response) => {\n migration = response;\n \n // Generate zip\n var zip = new JSZip();\n zip.file('Token.sol', token)\n zip.file('Crowdsale.sol', crowdsale)\n zip.file('1_initial_migration.js', migration)\n \n // Return data\n return zip.generateAsync({ type:\"base64\" });\n })\n }", "function _jsZip() {\n\t\treturn jszip || window.JSZip;\n\t}", "function _jsZip() {\n return jszip || window.JSZip;\n }", "compressFiles_() {\n this.fileIndex_ = 0;\n zip.createWriter(new zip.BlobWriter(), this.writeNextFile_.bind(this), this.reportError.bind(this));\n }", "function zipCheck() {\n var zipLog = document.querySelector(\".zip\");\n var zip = response.zip;\n console.log(zip);\n\n zipLog.innerHTML += zip;\n }", "function compressZip() {\r\n\treturn gulp\r\n\t\t.src( paths.zip.src )\r\n\t\t.pipe( zip( info.slug + '.zip' ) )\r\n\t\t.pipe( gulp.dest( paths.zip.dest ) )\r\n\t\t.on( 'error', notify.onError() )\r\n\t\t.pipe( notify( {\r\n\t\t\tmessage: 'Great! Package is ready',\r\n\t\t\ttitle: 'Build successful'\r\n\t\t}\r\n\t\t) );\r\n}", "static zip_folder(path_to_folder_to_zip){\n let zip = new AdmZip();\n zip.addLocalFolder(path_to_folder_to_zip)\n zip.writeZip(path_to_folder_to_zip + \".zip\")\n out(path_to_folder_to_zip + \".zip created.\")\n }", "function updateZipcode(zip){\n zipCode.value = zip;\n }", "function unzip(){\n\tlet zip = new AdmZip(\"download/Default Sample File.zip\");\n zip.extractAllTo(\"./extracted/\",true);\n}", "function BinaryPacker() {\n}", "function ZipArchive() {\n if (CRC32TABLE.length === 0) {\n ZipArchive.initCrc32Table();\n }\n this.files = [];\n this.level = 'Normal';\n _syncfusion_ej2_file_utils__WEBPACK_IMPORTED_MODULE_1__[\"Save\"].isMicrosoftBrowser = !(!navigator.msSaveBlob);\n }", "function makeZip() {\n const { filename, content } = fflateBuildZipContent()\n const [zipPromise, resolve, reject] = makePromise()\n\n fflate.zip(content, (err, data) => {\n if (err) {\n reject(err)\n return\n }\n resolve(data)\n })\n\n return zipPromise.then(makeBlob).then(blob => {\n saveAs(blob, filename)\n })\n}", "function zipBuild() {\n\treturn src(build.base.dest + '**/**/*')\n\t\t\t.pipe(zip(build.out))\n\t\t\t.pipe(dest(build.dest));\n}", "get zip() \n{ return this._zip; \n}", "function GraFlicArchive(zipDataUint8, paramz){\n\t//'this' object will be returned to the caller with contents of the ZIP.\n\tthis.f = {};//each file will have potentially .d (data) containing the files, extracted and decompressed. The filename will be the key to access the file object in files. JSON will have .json containing the reconstituted JSON object. Text will have .t (text) containing the text string. JSON and text do not currently fill the .d property because it would not be very useful and would waste resources.\n\tthis.j = {};//short links to .json ( JS-parsed and ready live JSON for stuff.json would be accessed at .j.stuff )\n\t//Images(PNG/JPG/GIF/WEBP) will have their raw binary appear in files in case metadata needs examining, and will also have an ObjectURL put here in images for easy loading by DOM elements in .b (blob link).\n\t//Other properties may be added to this result object later if needed.\n\t\n\tGraFlicArchive.archives.push(this);//Each archive created will be tracked here so that a file can be looked up if the path exists in any archive in memory with static getFileFromAny()\n\t\n\tvar v_loadedFilename = '**__Unknown__**';\n\tif(paramz){\n\t\tif(paramz.filename){\n\t\t//If the filename is provided, it can be used to check for the common ZIP repackaging mistake of packaging the extracted folder inside of itself and correct it.\n\t\t//This often happens because ZIP extractors will extract the contents into a folder with the folder name based on the filename(without extension). 'A_file.zip' extracts into folder 'A_file/'. Naturally, after editing some of the ZIP contents, the user may context-click the folder and choose to compress. This seems like how it should work, but that will put everything in the new ZIP file into another layer of extra folder that was not in the original. A contained file 'images/example.png' would become 'A_file/images/example.png';\n\t\tv_loadedFilename = paramz.filename.replace(/\\.[^\\.\\/]+$/, '');\n\t\t//TODO: Another approach that may be more reliable since the user may rename the zip after doing this: Detect if the root is empty except for one folder. If that is the case, then strip off the first folder from the extracted filename strings. Do note however, if the developer for some reason designed a save format to have a root that is empty except one folder, this could mess it up.\n\t\t}\n\t\t/*\n\t\tif(paramz.globalAsset){\n\t\t\t//being called with globalAsset true will tell it to keep the files in memory and set up the linkage so that the file can be used to fill custom zip links within the page with the images once they are extracted.\n\t\t\t//This is used when the custom:link rel=\"archive\" element is detected to say that the page uses images/files stored in a zip file.\n\t\t}\n\t\t*/\n\t}//end if paramz defined.\n\tif(!zipDataUint8){\n\t\t//If called without a binary ZIP to load, make a blank GraFlicArchive that can be filled with files programmatically and saved.\n\t\treturn;\n\t}\n//Note when reading, other ZIP builders may insert data descriptor after local file header and payload, which apparently may or may not use a signature...\n\t//Writing data descriptors is turned of in the save function used here with general purpose bit 3 set to 0.\n\tvar v_oct = zipDataUint8;\n\tvar v_pos;\n\tvar v_i;\n\tvar v_entrySize;\n\tvar v_filename;\n\tvar v_filenameSize;\n\tvar v_cdFilenameSize;\n\tvar v_extraFieldSize;\n\tvar v_cdExtraFieldSize;\n\tvar v_commentSize;\n\tvar v_payloadCompression;\n\tvar v_payloadSize;\n\tvar v_extractedBytes;\n\tvar v_fileHeadStart;\n\tvar v_startCRC;\n\tvar v_calcCRC32;\n\tvar v_readCRC32;\n\tvar v_decompressor;\n\tvar v_compSig;//component signature\n\tvar v_bitFlags;\n\tvar v_relOffset;\n\tvar v_offsetMode = 0;//0 for normal, 1 for undocumented mode some writers use that store the offset from the start of the file.\n\tconsole.log('Starting ZIP read. size: ' + v_oct.length);\n\t//First find the start of the end of central directory, it has a variable length comment field so may not be in a set spot.\n\tvar v_cdPos = v_oct.length - 1;//Read the zip starting with the central directory at the end. This is more reliable, since the length and CRC may not be available in the local file header.\n\t//IT MUST start by reading the End of Central Directory section. since there is only a comment field with in the EoCD the chances of collisions with the signature are near-zero when going in reverse to find the start of it.\n\t//reading thru the files from the start will not work because the length fields are not guaranteed to be filled in. In that case, one would have to scan for the start of Data Descriptor signature after the file to get the length. With large sections of binary there are high chances of collisions with the Data Descriptor signature.\n\tvar v_cdSig = 0;\n\twhile(v_cdSig != 0x06054B50){\n\t\tv_cdPos--;\n\t\tv_cdSig = GraFlicEncoder.readUint32(v_oct, v_cdPos, true);\n\t\t//console.log(v_cdSig.toString(16));\n\t}\n\tvar v_filesCountZIP = GraFlicEncoder.readUint16(v_oct, v_cdPos + 10, true);//Number of entries in central directory.\n\tvar v_filesRead = 0;\n\tvar v_cdStart = GraFlicEncoder.readUint32(v_oct, v_cdPos + 16, true);//Where the central directory starts\n\tv_cdPos = v_cdStart;\n\twhile(v_filesRead < v_filesCountZIP){\n\t\tconsole.log('CentDir pos: ' + v_cdPos + ' sig: ' + GraFlicEncoder.readUint32(v_oct, v_cdPos, true).toString(16));\n\t\tv_relOffset = GraFlicEncoder.readUint32(v_oct, v_cdPos + 42, true);\n\t\tif(v_relOffset == 0){v_offsetMode = 1;}\n\t\t//0 is never valid for the offset from central directory defined in the spec. If the first offset is 0, it must use the undocumented mode that uses the offset from the start of the file.\n\t\tif(v_offsetMode == 1){\n\t\t\tv_fileHeadStart = v_relOffset;\n\t\t}else{\n\t\t\tv_fileHeadStart = v_cdPos - v_relOffset;//go backwards by the offset bytes to locate the local file header.\n\t\t}\n\t\tconsole.log('version made by, version: ' + v_oct[v_cdPos + 4] + ' OS: ' + v_oct[v_cdPos + 5]);\n\t\tconsole.log('version needed to extract, version: ' + v_oct[v_cdPos + 6] + ' OS: ' + v_oct[v_cdPos + 7]);\n\t\tconsole.log('rel offset: ' + v_relOffset + ' starting at: ' + v_fileHeadStart);\n\t\tv_pos = v_fileHeadStart;\n\t\tv_payloadSize = GraFlicEncoder.readUint32(v_oct, v_cdPos + 20, true);//Read size out of central directory where it should be calculated. In the local file header it may be undefined if bit 3 of the flags is set. So far, this seems to reliably work to get payload size.\n\t\tv_cdFilenameSize = GraFlicEncoder.readUint16(v_oct, v_cdPos + 28, true);\n\t\tv_cdExtraFieldSize = GraFlicEncoder.readUint16(v_oct, v_cdPos + 30, true);//The extra field on central directory might be different from local file header.\n\t\tv_commentSize = GraFlicEncoder.readUint16(v_oct, v_cdPos + 32, true);//Comment ONLY appears on central directory header, NOT the local file header.\n\n\t\tconsole.log('local file header sig: ' + GraFlicEncoder.readUint32(v_oct, v_pos, true).toString(16));\n\t\tv_bitFlags = GraFlicEncoder.readUint16(v_oct, v_pos + 6, true);\n\t\tv_payloadCompression = GraFlicEncoder.readUint16(v_oct, v_pos + 8, true);\n\t\tv_filenameSize = GraFlicEncoder.readUint16(v_oct, v_pos + 26, true);\n\t\tv_extraFieldSize = GraFlicEncoder.readUint16(v_oct, v_pos + 28, true);\n\t\tv_pos += 30;\n\t\t\n\t\tv_filename = GraFlicEncoder.readStringUTF8(v_oct, v_pos, v_filenameSize);\n\t\t//OLD only ASCII compatible: v_filename = String.fromCharCode.apply(null, v_oct.subarray(v_pos, v_pos + v_filenameSize));\n\t\tv_pos += v_filenameSize;\n\t\tv_pos += v_extraFieldSize;//This app does not use extra field, but check for it in case the ZIP was edited and repackaged by another ZIP writer.\n\t\t\n\t\tv_cdPos += 46 + v_cdFilenameSize + v_cdExtraFieldSize + v_commentSize;//Advance to the next central directory header for the next file.\n\t\t\n\t\tconsole.log('Central Directory sizes: filename: ' + v_cdFilenameSize + ' comment: ' + v_commentSize + ' extra: ' + v_cdExtraFieldSize);\n\t\tconsole.log('Reading ' + v_filename + ' out of ZIP.');\n\t\tconsole.log('Local File Header sizes: payload: ' + v_payloadSize + ' filename: ' + v_filenameSize + ' extra: ' + v_extraFieldSize);\n\t\tconsole.log('bit flags: 0x' + v_bitFlags.toString(16));\n\t\tv_decompressor = GraFlicUtil.noCompression;//default to 0, no compression\n\t\tconsole.log('compression mode: ' + v_payloadCompression);\n\t\tif(v_payloadCompression == 8){//DEFLATE\n\t\t\tv_decompressor = window.pako.inflateRaw;\n\t\t}\n\t\tif(v_filename.match(/(^|\\/)\\./)){ // || v_filename.match(/\\..*\\./)){\n\t\t\t//Throw out files that start with a dot.\n\t\t\t//These are probably system generated junk files, the save format does not use files named this way.\n\t\t\t//In *nix operating systems starting with a dot(.) is a hidden file, often some kind of system file.\n\t\t\tconsole.log('Skipping apparent junk file: ' + v_filename);\n\t\t}else{\n\t\t\tv_extractedBytes = v_oct.subarray(v_pos, v_pos + v_payloadSize);\n\t\t\tif(v_filename.match(/\\//) && v_filename.split('/')[0].indexOf(v_loadedFilename) == 0){\n\t\t\t\t\t\t\t//(Remember, extra things like (2) may get appended to the filename if it gets renamed due to existing file that it was extracted from.)\n\t\t\t\t//If the files are in a folder with the same name as the loaded file, the user probably re-packed them\n\t\t\t\t//incorrectly which is easy to do, given the unintuitive way ZIPs extract out to a folder, but if you\n\t\t\t\t//compress the folder again, it puts the folder within the ZIP, so in that case, strip these out.\n\t\t\t\tv_filename = v_filename.replace(/^[^\\/]+\\//, '');\n\t\t\t\tconsole.log('The folder was repackaged inside of itself it seems. Filename fixed to: ' + v_filename);\n\t\t\t}\n\t\t\tvar xFile = {};\n\t\t\txFile.p = v_filename;//keep a reference for what the path is in case object referenced elsewhere.\n\t\t\ttry{//-----------------------------------------------------------------------------------\n\t\t\tif(v_filename.match(/\\.gz$/i)){\n\t\t\t\t//If .gz first decompress it with whatever compression method is defined in the ZIP entry (usually 0 none),\n\t\t\t\t//then set the decompressor to ungzip because .gz has internal compression of its own.\n\t\t\t\tv_extractedBytes = v_decompressor(v_extractedBytes);\n\t\t\t\tv_decompressor = window.pako.ungzip;\n\t\t\t\tconsole.log('.gz file, setting decompression to GZip, gz payload size: ' + v_extractedBytes.length);\n\t\t\t}\n\t\t\t//JSON and text will not have .d (data) populated since it is pretty useless in most cases and would waste resources.\n\t\t\tif(v_filename.match(/\\.json(\\.gz)?$/i)){\n\t\t\t\t//JSON needs extra logic to JSONize it into memory.\n\t\t\t\txFile.j = JSON.parse(v_decompressor(v_extractedBytes, {'to':'string'}));\n\t\t\t\t//alert('extracted JSON(' + v_filename + '): ' + JSON.stringify(xFile));\n\t\t\t\tthis.j[v_filename.replace(/\\.json(\\.gz)?$/i, '')] = xFile.j;//Set up a quick link for accessing JSON.\n\t\t\t\t\t\t\t//JSON files will typically contain the main configuration, parameters, and settings of a format\n\t\t\t\t\t\t\t//and need to be accessed often so .j.config.valX is less cluttered than: .f['config.json'].valX\n\t\t\t\t\t\t\t//do this after the file was successfully extracted\n\t\t\t}else if(v_filename.match(/\\.txt(\\.gz)?$/i)){\n\t\t\t\txFile.t = v_decompressor(v_extractedBytes, {'to':'string'});\n\t\t\t}else{\n\t\t\t\txFile.d = v_decompressor(v_extractedBytes);\n\t\t\t\t//Some browser may truncate the array text when tracing to debug and look like all zeroes.\n\t\t\t\tconsole.log('extracted U8Array(' + v_filename + '): ' + xFile + ' size: ' + xFile.d.length);\n\t\t\t}\n\t\t\t}catch(fileError){\n\t\t\t\tconsole.log('error reconstituting ' + v_filename + ', it may be a junk or auto-generated file.');\n\t\t\t}//-------------------------------- end try/catch ----------------------------------------\n\n\t\t\t//else if(v_filename.match(/\\.(a*png|jpe*g|giff*|webp)(\\.gz)?$/i)){\n\t\t\t//}\n\t\t\t\t//Keep image Uint8Array linked in case it needs to be examined for metadata such as EXIF rotation.\n\t\t\t\t//Also make a loadable BLOB ObjectURL so it can easily be loaded into images in the DOM.\n\t\t\t\t//Since the Uint8Array is used to build the BLOB for the ObjectURL, it would seem that dereferencing\n\t\t\t\t//it would probably not save any runtime resources, may as well keep it alive for analysis if needed.\n\t\t\t//make BLOBs for all files too\n\t\t\txFile.d = v_decompressor(v_extractedBytes);\n\t\t\tthis.fileToBLOB(xFile);\n\t\t\tthis.f[v_filename] = xFile;//if completed with no errors, include it in the files object\n\t\t\tconsole.log('----------------------');\n\t\t}\n\t\tv_filesRead++;\n\t}//end while\n}", "function pinCode(pc){\n\tvar zip_regex = /^[0-9]+$/;\n}", "function zon_persist_WriteZip(input) {\n var queryXml = NL.ZON.unzipAsXml(input, \"WriteZip\");\n xtk.session.Write(queryXml);\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if (!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if (arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n } // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n\n\n this.files = {};\n this.comment = null; // Where we are in the hierarchy\n\n this.root = \"\";\n\n this.clone = function () {\n var newObj = new JSZip();\n\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if(arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n }\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n this.clone = function() {\n var newObj = new JSZip();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}", "function zipGithub() {\n return gulp.src(`${paths.dist}*`, {base: 'dist'})\n .pipe($.zip(paths.zip))\n .pipe(gulp.dest(paths.dist));\n}", "function setZipCode(zipCode) {\n if (zipCode != null) {\n var coords = getCoordsFromZip(zipCode);\n createLocationData(coords.lat, coords.lon, zipCode, coords.cityName);\n } else {\n createLocationData(null, null, null, null);\n }\n}", "static createEntry(name, pack, code) {\n return `\"${name}\":{pack:${pack ? 'true' : 'false'}, invoke:function(exports, require){${code}}}`;\n }", "zipParser(blob){\n var zip = O.esri.zip;\n var _this = this;\n /*O.esri.*/zip.createReader(new /*O.esri.*/zip.BlobReader(blob), function (zipReader) {\n zipReader.getEntries(function (entries) {\n _this.initMap(entries);\n //if(entries)alert(\"TPK downloaded and unzipped!\");\n zipReader.close(function(evt){\n console.log(\"Done reading zip file.\" + evt);\n _this.set(\"loading\", false);\n });\n }, function (err) {\n alert(\"There was a problem reading the file!: \" + err);\n });\n });\n }", "function JSZip() {\n\t // if this constructor is used without `new`, it adds `new` before itself:\n\t if(!(this instanceof JSZip)) {\n\t return new JSZip();\n\t }\n\n\t if(arguments.length) {\n\t throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n\t }\n\n\t // object containing the files :\n\t // {\n\t // \"folder/\" : {...},\n\t // \"folder/data.txt\" : {...}\n\t // }\n\t this.files = {};\n\n\t this.comment = null;\n\n\t // Where we are in the hierarchy\n\t this.root = \"\";\n\t this.clone = function() {\n\t var newObj = new JSZip();\n\t for (var i in this) {\n\t if (typeof this[i] !== \"function\") {\n\t newObj[i] = this[i];\n\t }\n\t }\n\t return newObj;\n\t };\n\t}", "compress() {\n\n }", "static zip_and_encrypt(path_to_folder_to_zip, update_passwd){\n this.zip_folder(path_to_folder_to_zip)\n this.encrypt_file(path_to_folder_to_zip + \".zip\", update_passwd)\n }", "function JSZip() {\n // if this constructor is used without `new`, it adds `new` before itself:\n if (!(this instanceof JSZip)) {\n return new JSZip();\n }\n\n if (arguments.length) {\n throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n } // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n\n\n this.files = {};\n this.comment = null; // Where we are in the hierarchy\n\n this.root = \"\";\n\n this.clone = function () {\n var newObj = new JSZip();\n\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n\n return newObj;\n };\n }", "function unzipDownload(type,file,next) {\n\n var zip = require('zipfile'),\n fs = require('fs'),\n rimraf = require('rimraf'),\n path = require('path');\n\n var zf = new zip.ZipFile(file),\n baseFolder,\n tmpFolder,\n tmpName;\n\n zf.names.forEach(function(name) {\n\n // First result is the basefolder\n if(!baseFolder) {\n baseFolder = name; // Store\n }\n\n // Now, lets find the package.json\n if(type === 'module' && name === (baseFolder + \"package.json\")) {\n var buffer = zf.readFileSync(name);\n var packageJson = JSON.parse(buffer);\n tmpName = packageJson.name;\n tmpFolder = path.join(path.dirname(file),tmpName + \"/\"); // Extraction will go here\n }\n\n // Now, lets find the theme.json\n if(type === 'theme' && name === (baseFolder + \"theme.json\")) {\n var buffer = zf.readFileSync(name);\n var themeJson = JSON.parse(buffer);\n tmpName = themeJson.name;\n tmpFolder = path.join(path.dirname(file),tmpName + \"/\"); // Extraction will go here\n }\n\n });\n\n // Check that we have both a module name\n if(tmpName) {\n\n // Make sure we delete any existing tmp folder\n if(path.existsSync(tmpFolder)) {\n rimraf.sync(tmpFolder);\n }\n\n // Now unzip\n zf.names.forEach(function(name) {\n\n var uncompressed = name.replace(baseFolder,tmpFolder);\n var dirname = path.dirname(uncompressed);\n\n // Try to create the folder\n try {\n fs.mkdirSync(dirname, 0755)\n } catch(ex) {\n if(ex.code === 'EEXIST') {\n // Ignore\n } else {\n next(new Error(\"Couldn't create folder \" + dirname + \" because \" + ex.message));\n return;\n }\n }\n\n // Expand any files\n if (path.extname(uncompressed)) {\n try {\n var buffer = zf.readFileSync(name);\n fd = fs.openSync(uncompressed, 'w');\n fs.writeSync(fd, buffer, 0, buffer.length, null);\n fs.closeSync(fd);\n } catch(ex) {\n next(new Error(\"Couldn't write file \" + uncompressed + \" because \" + ex.message));\n return;\n }\n }\n\n });\n\n // Delete the zip file\n fs.unlinkSync(file);\n\n // Return;\n next(null,tmpName,tmpFolder);\n\n } else {\n if(type === 'module') {\n next(new Error(\"The file does not appear to have a valid package.json that specifies the name.\"));\n } else {\n next(new Error(\"The file does not appear to have a valid theme.json that specifies the name.\"));\n }\n\n }\n\n}", "function addZip(zipData){\n\tvar zipHistory = getZipHistory();\n\tzipHistory.unshift(zipData);\n\tlocalStorage[\"localZip\"] = JSON.stringify(zipHistory);\n}", "function createZip (files) {\n // Registra el cargo\n insertCargo(function(){\n // Crea el zip\n var zip = new JSZip();\n for (var i = 0; i < files.length; ++i) {\n zip.file(files[i].name, files[i].xml);\n }\n content = zip.generate({type:\"base64\"});\n\n // Descarga el archivo con el gestor de chrome\n chrome.downloads.download({\n url: 'data:application/zip;base64,' + content,\n filename: \"archivo.zip\",\n saveAs: true\n },\n function(id) {\n console.log(id);\n });\n });\n}", "function newZip() {\n var newZipValue = document.getElementById('zipValue').value;\n getZip(newZipValue);\n return newZipValue;\n }", "function composeZip(zipEntries, i, cb) {\n\t\t\t\tif (!zipEntries[i]) {\n\t\t\t\t\tcb();\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar item = zipEntries[i];\n\t\t\t\titem.getDataAsync(function (data) {\n\t\t\t\t\tif (item.entryName.indexOf('shp') > -1) out.addFile(\"Rivages_Points.shp\", data, '', 0644 << 16);\n\t\t\t\t\tif (item.entryName.indexOf('shx') > -1) out.addFile(\"Rivages_Points.shx\", data, '', 0644 << 16);\n\t\t\t\t\tif (item.entryName.indexOf('dbf') > -1) out.addFile(\"Rivages_Points.dbf\", data, '', 0644 << 16);\n\t\t\t\t\tcomposeZip(zipEntries, i + 1, cb);\n\t\t\t\t});\n\t\t\t}", "async function zipProject() {\n //if st is active\n if(isStorytellerCurrentlyActive) {\n //prompt for where to store the zip file\n let zipStorageFolders = await vscode.window.showOpenDialog({\n canSelectFiles: false,\n canSelectFolders: true,\n canSelectMany: false,\n defaultUri: vscode.workspace.workspaceFolders[0].uri,\n openLabel: 'Save stProject.zip',\n title: 'Choose a folder to store the Storyteller zip'\n });\n\n //if there was a selected location\n if(zipStorageFolders.length > 0) {\n //create an instance of jszip\n const zip = new JSZip();\n\n //get the path to the open project and the hidden st directory\n const projectDirPath = vscode.workspace.workspaceFolders[0].uri.fsPath;\n\n //recursively add files to the zip\n zipProjectHelper(projectDirPath, zip);\n\n //create and save the zip in the .storyteller dir\n zip.generateNodeStream({\n streamFiles: true,\n compression: 'DEFLATE',\n compressionOptions: {\n level: 9\n }\n }).pipe(fs.createWriteStream(path.join(zipStorageFolders[0].fsPath, 'stProject.zip'))).on('finish', function () {\n //notify user that the zip is complete\n vscode.window.showInformationMessage(`A new zip file, stProject.zip, has been added to the ${zipStorageFolders[0].fsPath} directory. You can share this file with others.`);\n });\n }\n }\n}", "function publishZipFiles(conf,inputs,outputs){\n var schema=\"cmdii_tmp\";\n var schemaf=\"cmdii\";\n var produced_dirs=[];\n var dbUser=conf[conf[\"main\"][\"dbuserName\"]];\n if(!inputs[\"zip\"][\"length\"])\n\tinputs[\"zip\"][\"length\"]=1;\n for(var i=0;i<inputs[\"zip\"][\"length\"];i++){\n\tvar cFile;\n\tif(i==0){\n\t cFile=inputs[\"zip\"][\"cache_file\"];\n\t alert(i+\" \"+inputs[\"zip\"][\"cache_file\"]);\n\t}\n\telse{\n\t cFile=inputs[\"zip\"][\"cache_file_\"+i];\n\t alert(i+\" \"+inputs[\"zip\"][\"cache_file_\"+i]);\n\t}\n var sqlQuery=\"INSERT INTO \"+schemaf+\".zip_files (name,mail) VALUES ('\"+cFile+\"','\"+inputs[\"mail\"][\"value\"]+\"') RETURNING id;\" ;\n var myOutputs= {\"Result\":{ type: 'RawDataOutput', \"mimeType\": \"application/json\" }};\n \tvar myInputs={\n \t\"dsoName\": {\"value\": \"\",\"type\":\"string\"},\n \t\"dstName\": {\"value\": \"PG:dbname=\"+conf[\"mmdb\"][\"dbname\"]+\" port=\"+conf[\"mmdb\"][\"port\"]+\" host=\"+conf[\"mmdb\"][\"host\"]+\" user=\"+conf[\"mmdb\"][\"user\"]+(conf[\"mmdb\"][\"password\"]?\" password=\"+conf[\"mmdb\"][\"password\"]:\"\"),\"type\":\"string\"},\n \t\"q\": {\"value\": sqlQuery,\"mimeType\":\"application/json\"},\n \t};\n\tvar myProcess = new ZOO.Process(conf[\"main\"][\"serverAddress\"],'vector-tools.vectInfo');\n\tvar myExecuteResult=myProcess.Execute(myInputs,myOutputs);\n\talert(myExecuteResult);\n\tvar currentId=eval(myExecuteResult);\n\tcurrentId=currentId[0][\"id\"];\n\tvar inputs00={\n\t \"zip\": {\"mimeType\":\"application/zip\", \"type\":\"reference\", \"value\": \"file://\"+cFile}\n\t}\n\tvar myOutputs00= {Result: { type: 'RawDataOutput', \"mimeType\": \"plain/text\" }};\n\tvar myProcess00 = new ZOO.Process(conf[\"main\"][\"serverAddress\"],'np.unzip');\n\tvar myExecuteResult00=myProcess00.Execute(inputs00,myOutputs00);//,\"Cookie: MMID=\"+conf[\"senv\"][\"MMID\"]);\n\talert(myExecuteResult00);\n\tproduced_dirs.push(myExecuteResult00);\n\talert(myExecuteResult00+\"/\"+cFile.replace(/\\/var\\/www\\/html\\//g,\"\").replace(/.zip/g,\".xls\"));\n\tcFile=inputs[\"ozip\"][\"cache_file\"];\n var myInputs01={\n\t\t\"path\": {\"value\": myExecuteResult00+\"/\"+cFile.replace(/\\/var\\/www\\/html\\/tmp/g,\"\").replace(/\\./g,\"_\").replace(/_zip/g,\".xls\").replace(/-/g,\"_\"), \"type\": \"string\" },\n\t\t\"ext\": {\"value\": \"xls\", \"type\": \"string\" }\n\t};\n var myOutputs01= {Result: { type: 'RawDataOutput', \"mimeType\": \"plain/text\" }};\n var myProcess01 = new ZOO.Process(conf[\"main\"][\"serverAddress\"],localModulePath+'.fixName');\n var myExecuteResult01=myProcess01.Execute(myInputs01,myOutputs01);\n alert(\"******************************\",myExecuteResult01,\"***********************************\");\n\tvar xlsFile=myExecuteResult01;//myExecuteResult00+\"/\"+cFile.replace(/\\/var\\/www\\/html\\/tmp/g,\"\").replace(/\\./g,\"_\").replace(/_zip/g,\".xls\").replace(/-/g,\"_\");\n\tvar kmlFile=myExecuteResult01.replace(/xls/g,\"kml\")//myExecuteResult00+\"/\"+cFile.replace(/\\/var\\/www\\/html\\/tmp/g,\"\").replace(/\\./g,\"_\").replace(/_zip/g,\".kml\").replace(/-/g,\"_\");\n /**\n * Import kml file in PG database to set proper comb_sub value\n */\n\t var inputs02={\n\t\t\"skipfailure\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"true\"},\n\t\t\"append\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"true\"},\n\t\t\"f\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"PostgreSQL\"},\n\t\t\"nln\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": schema+\".kml_\"+conf[\"lenv\"][\"usid\"]},\n\t\t//\"lco\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"SPATILALITE=YES\"},\n\t\t\"OutputDSN\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"PG:dbname=\"+dbUser[\"dbname\"]+\" port=\"+dbUser[\"port\"]+\" user=\"+dbUser[\"user\"]+\"\"+(dbUser[\"password\"]?\" password=\"+dbUser[\"password\"]:\"\")},\n\t\t\"InputDSN\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": kmlFile}\n\t }\n\t var myOutputs02= {\"OutputedDataSourceName\": { type: 'RawDataOutput', \"mimeType\": \"plain/text\" }};\n\t var myProcess02 = new ZOO.Process(conf[\"main\"][\"serverAddress\"],'vector-converter.Ogr2Ogr');\n\t var myExecuteResult02=myProcess02.Execute(inputs02,myOutputs02);//,\"Cookie: MMID=\"+conf[\"senv\"][\"MMID\"]);\n\t alert(myExecuteResult02);\n /**\n * Create a table with correct relationship defined between plot name and comb-sub\n */\n\t var inputs02={\n\t\t\"skipfailure\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"true\"},\n\t\t//\"update\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"true\"},\n\t\t\"f\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"SQLite\"},\n\t\t\"nln\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"kml_origin\"},\n\t\t//\"lco\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"SPATILALITE=YES\"},\n\t\t\"InputDSN\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"PG:dbname=\"+dbUser[\"dbname\"]+\" port=\"+dbUser[\"port\"]+\" user=\"+dbUser[\"user\"]+\"\"+(dbUser[\"password\"]?\" password=\"+dbUser[\"password\"]:\"\")},\n\t\t\"OutputDSN\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"postThin\"+/**/conf[\"lenv\"][\"usid\"]+\"_\"+i+/**/\".db\"},\n \"sql\": {\"mimeType\":\"text/plain\", \"type\":\"complex\", \"value\": \"SELECT *,\"+currentId+\" as zid,(select compartmen||''||subid as cuid from cmdii.scdb where ST_Intersects(\"+schema+\".kml_\"+(conf[\"lenv\"][\"usid\"].replace(/-/g,\"_\"))+\".wkb_geometry,cmdii.scdb.wkb_geometry)) as com_sub_real from \"+schema+\".kml_\"+(conf[\"lenv\"][\"usid\"].replace(/-/g,\"_\"))}\n\t }\n\t var myOutputs02= {\"OutputedDataSourceName\": { type: 'RawDataOutput', \"mimeType\": \"plain/text\" }};\n\t var myProcess02 = new ZOO.Process(conf[\"main\"][\"serverAddress\"],'vector-converter.Ogr2Ogr');\n\t var myExecuteResult02=myProcess02.Execute(inputs02,myOutputs02);//,\"Cookie: MMID=\"+conf[\"senv\"][\"MMID\"]);\n\t alert(myExecuteResult02);\n /**\n * Invoke R Service\n */\n\tvar inputs01={\n\t \"db\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": conf[\"main\"][\"tmpPath\"]+\"/postThin\"+/**/conf[\"lenv\"][\"usid\"]+\"_\"+i+/**/\".db\"},\n\t \"data\": {\"mimeType\":\"application/zip\", \"type\":\"reference\", \"value\": \"file://\"+xlsFile }\n\t}\n\tvar myOutputs01= {Result: { type: 'RawDataOutput', \"mimeType\": \"plain/text\" }};\n\tvar myProcess01 = new ZOO.Process(conf[\"main\"][\"serverAddress\"],localModulePath+'.analyze');\n\tvar myExecuteResult01=myProcess01.Execute(inputs01,myOutputs01);//,\"Cookie: MMID=\"+conf[\"senv\"][\"MMID\"]);\n\talert(localModulePath+\".analyze \"+myExecuteResult01);\n if(myExecuteResult01.indexOf(\"Exception\")>=0){\n data = myExecuteResult01.replace(/^<\\?xml\\s+version\\s*=\\s*([\"'])[^\\1]+\\1[^?]*\\?>/, \"\");\n data = new XML(data);\n alert(data);\n conf[\"lenv\"][\"message\"]=data.*::Exception.*::ExceptionText[0];\n return {result: ZOO.SERVICE_FAILED, conf: conf, outputs: {Result: {\"value\": \"Data successfully published\"}}};;\n\t}\n\n\tvar inputs02={\n\t \"skipfailure\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"true\"},\n\t \"append\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"true\"},\n\t \"f\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"SQLite\"},\n\t \"nln\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"plot_locations\"},\n\t \"lco\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"SPATILALITE=YES\"},\n\t \"OutputDSN\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"postThin\"/**/+conf[\"lenv\"][\"usid\"]+\"_0\"+i/**/+\".db\"},\n\t \"InputDSN\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": kmlFile}/*,\n\t \"t_srs\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"epsg:4326\"},\n\t \"sql\": {\"mimeType\":\"text/plain\", \"type\":\"complex\", \"value\": \"SELECT \\\"Name\\\",\\\"Description\\\" from \\\"Layer #0\\\"\"}*/\n\t}\n\tvar myOutputs02= {\"OutputedDataSourceName\": { type: 'RawDataOutput', \"mimeType\": \"plain/text\" }};\n\tvar myProcess02 = new ZOO.Process(conf[\"main\"][\"serverAddress\"],'vector-converter.Ogr2Ogr');\n\tvar myExecuteResult02=myProcess02.Execute(inputs02,myOutputs02);//,\"Cookie: MMID=\"+conf[\"senv\"][\"MMID\"]);\n\talert(myExecuteResult02);\n\n\tvar inputs02={\n\t \"skipfailure\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"true\"},\n\t \"append\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"true\"},\n\t \"f\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"PostgreSQL\"},\n\t \"nln\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": schema+\".plot_locations\"},\n\t \"lco\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"SPATILALITE=YES\"},\n\t \"OutputDSN\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"PG:dbname=\"+dbUser[\"dbname\"]+\" port=\"+dbUser[\"port\"]+\" user=\"+dbUser[\"user\"]+\"\"+(dbUser[\"password\"]?\" password=\"+dbUser[\"password\"]:\"\")},\n\t \"InputDSN\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": conf[\"main\"][\"tmpPath\"]+\"/postThin\"/**/+conf[\"lenv\"][\"usid\"]+\"_0\"+i/**/+\".db\"},/*\n\t \"t_srs\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"epsg:4326\"},*/\n\t \"sql\": {\"mimeType\":\"text/plain\", \"type\":\"complex\", \"value\": \"SELECT *,\"+currentId+\" as zid from plot_locations\"}\n\t}\n\tvar myOutputs02= {\"OutputedDataSourceName\": { type: 'RawDataOutput', \"mimeType\": \"plain/text\" }};\n\tvar myProcess02 = new ZOO.Process(conf[\"main\"][\"serverAddress\"],'vector-converter.Ogr2Ogr');\n\tvar myExecuteResult02=myProcess02.Execute(inputs02,myOutputs02);//,\"Cookie: MMID=\"+conf[\"senv\"][\"MMID\"]);\n\talert(myExecuteResult02);\n\n\tvar _tables=[\"plotestimates\",\"comsubestimates\"];\n\tfor(var j=0;j<_tables.length;j++){\n\t var inputs02={\n\t\t\"skipfailure\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"true\"},\n\t\t\"append\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"true\"},\n\t\t\"f\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"PostgreSQL\"},\n\t\t\"nln\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": schema+\".\"+_tables[j]},\n\t\t\"lco\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"SPATILALITE=YES\"},\n\t\t\"OutputDSN\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": \"PG:dbname=\"+dbUser[\"dbname\"]+\" port=\"+dbUser[\"port\"]+\" user=\"+dbUser[\"user\"]+\"\"+(dbUser[\"password\"]?\" password=\"+dbUser[\"password\"]:\"\")},\n\t\t\"InputDSN\": {\"dataType\":\"string\", \"type\":\"literal\", \"value\": conf[\"main\"][\"tmpPath\"]+\"/postThin\"/**/+conf[\"lenv\"][\"usid\"]+\"_\"+i/**/+\".db\"},\n\t\t\"sql\": {\"mimeType\":\"text/plain\", \"type\":\"complex\", \"value\": 'SELECT *,'+currentId+' as zid from '+_tables[j]+''}\n\t }\n\t var myOutputs02= {\"OutputedDataSourceName\": { type: 'RawDataOutput', \"mimeType\": \"plain/text\" }};\n\t var myProcess02 = new ZOO.Process(conf[\"main\"][\"serverAddress\"],'vector-converter.Ogr2Ogr');\n\t var myExecuteResult02=myProcess02.Execute(inputs02,myOutputs02);//,\"Cookie: MMID=\"+conf[\"senv\"][\"MMID\"]);\n\t alert(myExecuteResult02);\n\t}\n\n\tvar fields=[\n\t\t[\"rowid,name,description,zid,wkb_geometry\",\"mmid, name, description,zid, wkb_geometry\"],\n\t\t[\"hu_id,com_sub_real,plotname,speciesname,m_dbh,max_dbh,min_dbh,n_stems,stemsha,basalha,zid,mean_height,wkb_geometry\"],\n\t\t[\"hu_id,com_sub_real,speciesname,m_dbh,m_stemsha,m_basalha,zid,m_height,wkb_geometry\"]\n\t];\n\tvar sqlQuery=\"INSERT INTO \"+schemaf+\".plot_locations (\"+fields[0][0]+\") (SELECT \"+fields[0][1]+\" from \"+schema+\".plot_locations);\";\n\tsqlQuery+=\"INSERT INTO \"+schemaf+\".plotestimates (\"+fields[1][0]+\") (SELECT \"+fields[1][0]+\" from \"+schema+\".plotestimates);\";\n\tsqlQuery+=\"INSERT INTO \"+schemaf+\".comsubestimates (\"+fields[2][0]+\") (SELECT \"+fields[2][0]+\" from \"+schema+\".comsubestimates);\";\n sqlQuery+=\"UPDATE \"+schemaf+\".zip_files set wkb_geometry=(select ST_Multi(ST_Union(\"+schema+\".plot_locations.wkb_geometry)) from \"+schema+\".plot_locations) where id=\"+currentId+\";\";\n\tsqlQuery+=\"DELETE FROM \"+schema+\".plot_locations;\";\n\tsqlQuery+=\"DELETE FROM \"+schema+\".plotestimates;\";\n\tsqlQuery+=\"DELETE FROM \"+schema+\".comsubestimates;\";\n\tsqlQuery+=\"SELECT count(*) from \"+schema+\".comsubestimates;\";\n\n var myOutputs= {\"Result\":{ type: 'RawDataOutput', \"mimeType\": \"application/json\" }};\n var myInputs={\n \"dsoName\": {\"value\": \"\",\"type\":\"string\"},\n \"dstName\": {\"value\": \"PG:dbname=\"+conf[\"mmdb\"][\"dbname\"]+\" port=\"+conf[\"mmdb\"][\"port\"]+\" host=\"+conf[\"mmdb\"][\"host\"]+\" user=\"+conf[\"mmdb\"][\"user\"]+(conf[\"mmdb\"][\"password\"]?\" password=\"+conf[\"mmdb\"][\"password\"]:\"\"),\"type\":\"string\"},\n \"q\": {\"value\": sqlQuery,\"mimeType\":\"application/json\"},\n };\n var myProcess = new ZOO.Process(conf[\"main\"][\"serverAddress\"],'vector-tools.vectInfo');\n var myExecuteResult=myProcess.Execute(myInputs,myOutputs);\n alert(myExecuteResult);\n\t\n }\n return {result: ZOO.SERVICE_SUCCEEDED, conf: conf, outputs: {Result: {\"value\": \"Data successfully published\"}}};\n}", "function checkToZip(viewType){\n window.toZip.push(viewType);\n console.log('viewTypes to be zipped: ' + window.toZip);\n // TODO: update 'data-checked' on parent for the SVG-icons-as-checkboxes-blue-and-black-colored stuff\n}", "_getPNGURIGenerator() {\n//------------------\n// Result: a function returning the URL generator for a given PNG\n// file name.\nreturn (pngName) => {\nvar pngEntry;\npngEntry = this.pngEntries[pngName];\n// Result: PNG URI generator for the given PNG file:\nreturn function(pngHandler) {\nif (pngEntry) {\n// Asynchronous delivery of PNG data.\npngEntry.getData(new zip.Data64URIWriter(\"image/png\"), (function(pngURI) {\nreturn pngHandler(pngURI);\n}));\n} else {\n// Asynchronous delivery of null PNG.\nsetTimeout((function() {\nreturn pngHandler(null);\n}), 0);\n}\nreturn void 0; // void result from PNG URI generator\n};\n};\n}", "function extractZip (mainCallback) {\n async.forEachOf(regions, function (value, key, callback) {\n const zipFile = path.join(__dirname, 'res', value.zipFileName)\n extract(zipFile, { dir: path.join(__dirname, 'res') })\n .then(() => {\n console.log(`zip file extraction for ${value.name} complete`)\n callback()\n })\n .catch((errOnUnzip) => {\n callback(Error('Error unziping file ' + zipFile + '. ' + errOnUnzip.message))\n })\n }, function (err) {\n if (err) {\n mainCallback(Error(err))\n } else {\n mainCallback()\n }\n })\n}", "function createAchive(toArchive){\n \n console.log(toArchive);\n\n var zip = new JSZip();\n\n for(var i = 0; i < toArchive.length; i++ ){\n baseCode = toArchive[i].replace(/^data:image\\/(png|jpg);base64,/, \"\");\n zip.file('frame_' + (i+1) + '.png', baseCode, {base64: true});\n }\n\n zip.generateAsync({\n type: \"base64\"\n }).then(function(content) {\n var link = document.createElement('a');\n link.href = \"data:application/zip;base64,\" + content;\n link.download = \"Frames.zip\";\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n });\n\n}", "function readZipFile(codeVar){\r\n\r\n\tvar zip = new JSUnzip(window.atob(codeVar));\r\n\t//read archive\r\n\tzip.readEntries();\r\n\r\n\t// read files\r\n\tfor (var i = 0; i < zip.entries.length; i++) {\r\n\t\tvar entry = zip.entries[i];\r\n\t\tstimuliAllInfo[i] = imageProcess(entry);\r\n\t}\r\n\r\n}", "function zipTarget() {\n return src(['target/dist/**/*.*'], {dot: true})\n .pipe(zip('front_v' + appVersion + '.zip'))\n .pipe(dest('target'));\n}", "async handleSubmitZipcode() {\n // Get the entered zip code\n const zipcode = document.querySelector(\"#zipSubmitInput\").value;\n const zipcodeConverted = await this._mapInstance.convertZipCode(zipcode);\n\n const markerData = await this._mapInstance.addMarker(zipcodeConverted);\n this.createWeatherCard(markerData);\n }", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.476949250000000E+02, -0.117304059000000E+03),\n new google.maps.LatLng( 0.477145260000000E+02, -0.117303820000000E+03),\n new google.maps.LatLng( 0.477144760000000E+02, -0.117293570000000E+03),\n new google.maps.LatLng( 0.477111730000000E+02, -0.117293861000000E+03),\n new google.maps.LatLng( 0.477071730000000E+02, -0.117290101000000E+03),\n new google.maps.LatLng( 0.477077970000000E+02, -0.117281652000000E+03),\n new google.maps.LatLng( 0.477063930000000E+02, -0.117281844000000E+03),\n new google.maps.LatLng( 0.477044210000000E+02, -0.117283428000000E+03),\n new google.maps.LatLng( 0.477022930000000E+02, -0.117284244000000E+03),\n new google.maps.LatLng( 0.477001930000000E+02, -0.117283144000000E+03),\n new google.maps.LatLng( 0.477001930000000E+02, -0.117283144000000E+03),\n new google.maps.LatLng( 0.476903930000000E+02, -0.117283143000000E+03),\n new google.maps.LatLng( 0.476903930000000E+02, -0.117283143000000E+03),\n new google.maps.LatLng( 0.476919930000000E+02, -0.117296244000000E+03),\n new google.maps.LatLng( 0.476949250000000E+02, -0.117304059000000E+03),\n ];\n\n return zipCoords\n}", "function _zip(){\n\treturn gulp.src([\n\t\t'./assets/**/*'\n\t])\n\t\t.pipe(zip('release.zip'))\n\t\t.pipe(gulp.dest('./build'))\n\t\t.pipe(filesize( filesize_opt ))\n\t\t.on('error', debug)\n\t;\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.464670130000000E+02, -0.122174355000000E+03),\n new google.maps.LatLng( 0.464695090000000E+02, -0.122171771000000E+03),\n new google.maps.LatLng( 0.464695090000000E+02, -0.122171771000000E+03),\n new google.maps.LatLng( 0.464685260000000E+02, -0.122169853000000E+03),\n new google.maps.LatLng( 0.464643590000000E+02, -0.122165444000000E+03),\n new google.maps.LatLng( 0.464643590000000E+02, -0.122165444000000E+03),\n new google.maps.LatLng( 0.464633860000000E+02, -0.122165761000000E+03),\n new google.maps.LatLng( 0.464633860000000E+02, -0.122165761000000E+03),\n new google.maps.LatLng( 0.464670130000000E+02, -0.122174355000000E+03),\n ];\n\n return zipCoords\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.479632090000000E+02, -0.122109385000000E+03),\n new google.maps.LatLng( 0.479606920000000E+02, -0.122107859000000E+03),\n new google.maps.LatLng( 0.479542830000000E+02, -0.122108286000000E+03),\n new google.maps.LatLng( 0.479537560000000E+02, -0.122110148000000E+03),\n new google.maps.LatLng( 0.479549620000000E+02, -0.122114527000000E+03),\n new google.maps.LatLng( 0.479635980000000E+02, -0.122114786000000E+03),\n new google.maps.LatLng( 0.479635980000000E+02, -0.122110117000000E+03),\n new google.maps.LatLng( 0.479632090000000E+02, -0.122109385000000E+03),\n ];\n\n return zipCoords\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.466258870000000E+02, -0.119410541000000E+03),\n new google.maps.LatLng( 0.466276010000000E+02, -0.119411071000000E+03),\n new google.maps.LatLng( 0.466281720000000E+02, -0.119412563000000E+03),\n new google.maps.LatLng( 0.466277390000000E+02, -0.119413525000000E+03),\n new google.maps.LatLng( 0.466300010000000E+02, -0.119414718000000E+03),\n new google.maps.LatLng( 0.466314860000000E+02, -0.119415016000000E+03),\n new google.maps.LatLng( 0.466338620000000E+02, -0.119414484000000E+03),\n new google.maps.LatLng( 0.466345700000000E+02, -0.119413887000000E+03),\n new google.maps.LatLng( 0.466347990000000E+02, -0.119412659000000E+03),\n new google.maps.LatLng( 0.466338390000000E+02, -0.119411001000000E+03),\n new google.maps.LatLng( 0.466290400000000E+02, -0.119409445000000E+03),\n new google.maps.LatLng( 0.466267320000000E+02, -0.119409545000000E+03),\n new google.maps.LatLng( 0.466258870000000E+02, -0.119410541000000E+03),\n ];\n\n return zipCoords\n}", "function composeZip(zipEntries, i, cb) {\n\t\t\t\tif (!zipEntries[i]) {\n\t\t\t\t\tcb();\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar item = zipEntries[i];\n\t\t\t\titem.getDataAsync(function (data) {\n\t\t\t\t\tif (item.entryName.indexOf('shp') > -1) out.addFile(\"Rivages_Segments.shp\", data, '', 0644 << 16);\n\t\t\t\t\tif (item.entryName.indexOf('shx') > -1) out.addFile(\"Rivages_Segments.shx\", data, '', 0644 << 16);\n\t\t\t\t\tif (item.entryName.indexOf('dbf') > -1) out.addFile(\"Rivages_Segments.dbf\", data, '', 0644 << 16);\n\t\t\t\t\tcomposeZip(zipEntries, i + 1, cb);\n\t\t\t\t});\n\t\t\t}", "function Packer(){}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.487776893511001E+02, -0.122573203357158E+03),\n new google.maps.LatLng( 0.487775879934002E+02, -0.122573589999958E+03),\n new google.maps.LatLng( 0.487775879934002E+02, -0.122573589999958E+03),\n new google.maps.LatLng( 0.487796850000000E+02, -0.122577236000000E+03),\n new google.maps.LatLng( 0.487796850000000E+02, -0.122577236000000E+03),\n new google.maps.LatLng( 0.487800750000000E+02, -0.122575206000000E+03),\n new google.maps.LatLng( 0.487798150000000E+02, -0.122574260000000E+03),\n new google.maps.LatLng( 0.487776893511001E+02, -0.122573203357158E+03),\n ];\n\n return zipCoords\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.471664690000000E+02, -0.122631740000000E+03),\n new google.maps.LatLng( 0.471673190000000E+02, -0.122630639000000E+03),\n new google.maps.LatLng( 0.471605190000000E+02, -0.122630339000000E+03),\n new google.maps.LatLng( 0.471574190000000E+02, -0.122628739000000E+03),\n new google.maps.LatLng( 0.471541190000000E+02, -0.122630139000000E+03),\n new google.maps.LatLng( 0.471514190000000E+02, -0.122633639000000E+03),\n new google.maps.LatLng( 0.471479190000000E+02, -0.122636339000000E+03),\n new google.maps.LatLng( 0.471468190000000E+02, -0.122638839000000E+03),\n new google.maps.LatLng( 0.471484190000000E+02, -0.122640439000000E+03),\n new google.maps.LatLng( 0.471543190000000E+02, -0.122637639000000E+03),\n new google.maps.LatLng( 0.471571190000000E+02, -0.122637339000000E+03),\n new google.maps.LatLng( 0.471640190000000E+02, -0.122634139000000E+03),\n new google.maps.LatLng( 0.471664690000000E+02, -0.122631740000000E+03),\n ];\n\n return zipCoords\n}", "static images() {\n let zip = new JSZip();\n\n let mainfs = zip.folder(\"mainfs\");\n let mainfsDirCount = PP64.fs.mainfs.getDirectoryCount();\n for (let d = 0; d < mainfsDirCount; d++) {\n let dirFolder = mainfs.folder(d.toString());\n let dirFileCount = PP64.fs.mainfs.getFileCount(d);\n for (let f = 0; f < dirFileCount; f++) {\n try {\n let fileBuffer = PP64.fs.mainfs.get(d, f);\n if (PP64.utils.FORM.isForm(fileBuffer)) {\n let formUnpacked = PP64.utils.FORM.unpack(fileBuffer);\n if (formUnpacked.BMP1.length) {\n formUnpacked.BMP1.forEach((bmpEntry, idx) => {\n let dataUri = PP64.utils.arrays.arrayBufferToDataURL(bmpEntry.parsed.src, bmpEntry.parsed.width, bmpEntry.parsed.height);\n dirFolder.file(`${f}.${idx}.png`, dataUri.substr(dataUri.indexOf(',') + 1), { base64: true });\n });\n }\n }\n else {\n // Maybe an ImgPack?\n let imgs = _readImgsFromMainFS(d, f);\n imgs.forEach((imgInfo, idx) => {\n let dataUri = PP64.utils.arrays.arrayBufferToDataURL(imgInfo.src, imgInfo.width, imgInfo.height);\n dirFolder.file(`${f}.${idx}.png`, dataUri.substr(dataUri.indexOf(',') + 1), { base64: true });\n });\n if (imgs.length > 1) {\n let tilesBuf = PP64.utils.img.tiler.fromTiles(_readPackedFromMainFS(d, f), imgs.length, 1, imgs[0].width * 4, imgs[0].height);\n let tilesUrl = PP64.utils.arrays.arrayBufferToDataURL(tilesBuf, imgs[0].width * imgs.length, imgs[0].height);\n dirFolder.file(`${f}.all.png`, tilesUrl.substr(tilesUrl.indexOf(',') + 1), { base64: true });\n }\n }\n }\n catch (e) {}\n }\n }\n\n zip.generateAsync({type: \"blob\"}).then((blob) => {\n saveAs(blob, `mp${PP64.romhandler.getGameVersion()}-images.zip`);\n });\n\n function _readPackedFromMainFS(dir, file) {\n let imgPackBuffer = PP64.fs.mainfs.get(dir, file);\n let imgArr = PP64.utils.img.ImgPack.fromPack(imgPackBuffer);\n if (!imgArr || !imgArr.length)\n return;\n\n let dataViews = imgArr.map(imgInfo => {\n return new DataView(imgInfo.src);\n });\n\n return dataViews;\n }\n\n function _readImgsFromMainFS(dir, file) {\n let imgPackBuffer = PP64.fs.mainfs.get(dir, file);\n let imgArr = PP64.utils.img.ImgPack.fromPack(imgPackBuffer);\n if (!imgArr || !imgArr.length)\n return;\n\n return imgArr;\n }\n }", "function zipTarget() {\n return src('target/dist/**/*.*')\n .pipe(zip('app_v' + appVersion + '.zip'))\n .pipe(dest('target'));\n}", "function SiteAddressZipCode_Change()\n{\n\ttry\n\t{\n\t\tif( DebugModeSiteZipCode ) \n\t\t\twindow.alert( \"function SiteAddressZipCode_Change\" );\n\t\tvar z = myGetValue( \"new_zippostalcode\" );\n\t\tif( z != null && z.length > 0 )\n\t\t{\n\t\t\tif( DebugModeSiteZipCode ) \n\t\t\t\twindow.alert( \"function SiteAddressZipCode_Change\\nnew_zippostalcode\\t\" + z );\n\t\t\tWrapperExtractCityStateFromZip( z, \"new_city\", \"new_county\", \"new_stateprovince\", \"new_countryregion\", \"new_ocountryregion\" ); \n\t\t}\n\t}\t\n\tcatch( err )\n\t{\n\t\twindow.alert( \"function SiteAddressZipCode_Change error code \" + err );\n\t\tif( DebugModeSiteZipCode ) \n\t\t\twindow.alert( \"1 name \" + err.name + \"\\n2 message\\t\" + err.message + \"\\n3 number\\t\" + err.number + \"\\n4 prototype\\t\" + err.prototype + \"\\n5 toString\\t\" + err.toString() );\n\t}\n}", "get HEAP8() {\n return libzip_1.default.HEAP8;\n }", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.459437740000000E+02, -0.122786352000000E+03),\n new google.maps.LatLng( 0.459400930000000E+02, -0.122786682000000E+03),\n new google.maps.LatLng( 0.459355210000000E+02, -0.122788125000000E+03),\n new google.maps.LatLng( 0.459280010000000E+02, -0.122792257000000E+03),\n new google.maps.LatLng( 0.459246410000000E+02, -0.122797697000000E+03),\n new google.maps.LatLng( 0.459247790000000E+02, -0.122798647000000E+03),\n new google.maps.LatLng( 0.459336490000000E+02, -0.122797825000000E+03),\n new google.maps.LatLng( 0.459368260000000E+02, -0.122796153000000E+03),\n new google.maps.LatLng( 0.459437740000000E+02, -0.122786352000000E+03),\n ];\n\n return zipCoords\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.463090570000000E+02, -0.119254227000000E+03),\n new google.maps.LatLng( 0.463152570000000E+02, -0.119255227000000E+03),\n new google.maps.LatLng( 0.463215570000000E+02, -0.119253527000000E+03),\n new google.maps.LatLng( 0.463218570000000E+02, -0.119252627000000E+03),\n new google.maps.LatLng( 0.463212570000000E+02, -0.119251827000000E+03),\n new google.maps.LatLng( 0.463121570000000E+02, -0.119251527000000E+03),\n new google.maps.LatLng( 0.463093570000000E+02, -0.119253227000000E+03),\n new google.maps.LatLng( 0.463090570000000E+02, -0.119254227000000E+03),\n ];\n\n return zipCoords\n}", "function gen_op_neon_zip_u8()\n{\n gen_opc_ptr.push({func:op_neon_zip_u8});\n}", "render(){\n const zoneStyle = styles.zone\n const zipCode = this.props.currentZone.zipCodes[0]\n /*\n ln11: This line is breaking something when adding a zone.\n something to do with the zipCode array above\n */\n\n return(\n <div style={zoneStyle.container}>\n <h2 style={zoneStyle.header}>\n <a style={zoneStyle.title} href=\"#\">{this.props.currentZone.name}</a>\n </h2>\n <span className=\"detail\">{zipCode}</span><br />\n <span className=\"detail\">{this.props.currentZone.numComments} comments</span>\n </div>\n )\n }", "function GetAllZipfiles(zip, ZipfileList) {\n var Promise = JSZip.external.Promise;\n\n const unzipList = ZipfileList.map(function (item) {\n const extension3 = item.substr(-3).toLowerCase()\n const extension4 = item.substr(-4).toLowerCase()\n const extension5 = item.substr(-5).toLowerCase()\n const contentType = (extension3 === '.js' || extension4 === \".txt\" || extension5 === \".json\") ? \n 'string' : 'uint8array'\n return zip.file(item).async(contentType).then(function (data) {\n return { file: item, content: data }\n })\n })\n\n Promise.all(unzipList).then(function (unzippedFiles) {\n DATA_UNZIPPED = {}\n unzippedFiles.forEach(function (item) {\n DATA_UNZIPPED[item.file.toLowerCase()] = item.content;\n })\n\n Print('Ready!');\n });\n}", "isValidZip(zipCode){\n\t\tif(zipCode.length != 5 || (zipCode.match(/[a-z]/i))){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.466443960000000E+02, -0.119415740000000E+03),\n new google.maps.LatLng( 0.466459730000000E+02, -0.119418427000000E+03),\n new google.maps.LatLng( 0.466530110000000E+02, -0.119423469000000E+03),\n new google.maps.LatLng( 0.466538560000000E+02, -0.119423302000000E+03),\n new google.maps.LatLng( 0.466551360000000E+02, -0.119421743000000E+03),\n new google.maps.LatLng( 0.466544500000000E+02, -0.119418955000000E+03),\n new google.maps.LatLng( 0.466521420000000E+02, -0.119416865000000E+03),\n new google.maps.LatLng( 0.466471150000000E+02, -0.119414843000000E+03),\n new google.maps.LatLng( 0.466458120000000E+02, -0.119414910000000E+03),\n new google.maps.LatLng( 0.466443960000000E+02, -0.119415740000000E+03),\n ];\n\n return zipCoords\n}", "exportToUSFMFile(jsonData) {\n var _this = this;\n\n var ListofLanguage = _this.state.getTargetLanguages;\n var FileNameSlanguage = '';\n var FileNameTlanguage = '';\n if(ListofLanguage != null){\n Object.keys(ListofLanguage).map(function(data, index){\n if(ListofLanguage[data] === _this.state.Sourcelanguage){\n FileNameSlanguage = data;\n }\n if(ListofLanguage[data] === _this.state.Targetlanguage){\n FileNameTlanguage = data;\n }\n return null;\n })\n }\n\n zip = new JSZip();\n $.each(jsonData, function(key, value) {\n zip.file(key + '.usfm', value)\n });\n zip.generateAsync({type:\"blob\"})\n .then(function(content) {\n saveAs(content, FileNameSlanguage + 'To' + FileNameTlanguage + '.zip');\n }, function(err){\n _this.setState({uploaded: 'failure'}) \n })\n }", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.481313870000000E+02, -0.119050638000000E+03),\n new google.maps.LatLng( 0.481308040000000E+02, -0.119051590000000E+03),\n new google.maps.LatLng( 0.481311690000000E+02, -0.119053159000000E+03),\n new google.maps.LatLng( 0.481384690000000E+02, -0.119064397000000E+03),\n new google.maps.LatLng( 0.481384690000000E+02, -0.119064397000000E+03),\n new google.maps.LatLng( 0.481383780000000E+02, -0.119062237000000E+03),\n new google.maps.LatLng( 0.481340360000000E+02, -0.119053767000000E+03),\n new google.maps.LatLng( 0.481313870000000E+02, -0.119050638000000E+03),\n ];\n\n return zipCoords\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.481260415638450E+02, -0.122365061393677E+03),\n new google.maps.LatLng( 0.481233040000000E+02, -0.122363201000000E+03),\n new google.maps.LatLng( 0.481230150000000E+02, -0.122327449000000E+03),\n new google.maps.LatLng( 0.481211830000000E+02, -0.122321237000000E+03),\n new google.maps.LatLng( 0.481184520000000E+02, -0.122317835000000E+03),\n new google.maps.LatLng( 0.481162770000000E+02, -0.122307091000000E+03),\n new google.maps.LatLng( 0.481162790000000E+02, -0.122305334000000E+03),\n new google.maps.LatLng( 0.481197190000000E+02, -0.122305840000000E+03),\n new google.maps.LatLng( 0.481230220000000E+02, -0.122302896000000E+03),\n new google.maps.LatLng( 0.481233810000000E+02, -0.122296136000000E+03),\n new google.maps.LatLng( 0.481279510000000E+02, -0.122289636000000E+03),\n new google.maps.LatLng( 0.481345200000000E+02, -0.122282327000000E+03),\n new google.maps.LatLng( 0.481356560000000E+02, -0.122281350000000E+03),\n new google.maps.LatLng( 0.481379070000000E+02, -0.122281411000000E+03),\n new google.maps.LatLng( 0.481377090000000E+02, -0.122273385000000E+03),\n new google.maps.LatLng( 0.481398980000000E+02, -0.122269326000000E+03),\n new google.maps.LatLng( 0.481398540000000E+02, -0.122254295000000E+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.481427300000000E+02, -0.122250313000000E+03),\n new google.maps.LatLng( 0.481436910000000E+02, -0.122243385000000E+03),\n new google.maps.LatLng( 0.481433170000000E+02, -0.122224860000000E+03),\n new google.maps.LatLng( 0.481267230000000E+02, -0.122200139000000E+03),\n new google.maps.LatLng( 0.481230210000000E+02, -0.122200235000000E+03),\n new google.maps.LatLng( 0.481230410000000E+02, -0.122196647000000E+03),\n new google.maps.LatLng( 0.481269430000000E+02, -0.122196655000000E+03),\n new google.maps.LatLng( 0.481269520000000E+02, -0.122189952000000E+03),\n new google.maps.LatLng( 0.481249680000000E+02, -0.122189952000000E+03),\n new google.maps.LatLng( 0.481248290000000E+02, -0.122192854000000E+03),\n new google.maps.LatLng( 0.481230880000000E+02, -0.122192784000000E+03),\n new google.maps.LatLng( 0.481230080000000E+02, -0.122185185000000E+03),\n new google.maps.LatLng( 0.481308200000000E+02, -0.122184956000000E+03),\n new google.maps.LatLng( 0.481378240000000E+02, -0.122186116000000E+03),\n new google.maps.LatLng( 0.481379620000000E+02, -0.122183064000000E+03),\n new google.maps.LatLng( 0.481343680000000E+02, -0.122183217000000E+03),\n new google.maps.LatLng( 0.481337660000000E+02, -0.122140917000000E+03),\n new google.maps.LatLng( 0.480953740000000E+02, -0.122140717000000E+03),\n new google.maps.LatLng( 0.480958490000000E+02, -0.122129151000000E+03),\n new google.maps.LatLng( 0.480975100000000E+02, -0.122125230000000E+03),\n new google.maps.LatLng( 0.480994500000000E+02, -0.122125411000000E+03),\n new google.maps.LatLng( 0.480994390000000E+02, -0.122122620000000E+03),\n new google.maps.LatLng( 0.480947260000000E+02, -0.122121501000000E+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.480917200000000E+02, -0.122146059000000E+03),\n new google.maps.LatLng( 0.480923580000000E+02, -0.122166025000000E+03),\n new google.maps.LatLng( 0.480913540000000E+02, -0.122167421000000E+03),\n new google.maps.LatLng( 0.480900260000000E+02, -0.122167848000000E+03),\n new google.maps.LatLng( 0.480882560000000E+02, -0.122169511000000E+03),\n new google.maps.LatLng( 0.480844780000000E+02, -0.122175935000000E+03),\n new google.maps.LatLng( 0.480882170000000E+02, -0.122181567000000E+03),\n new google.maps.LatLng( 0.480899410000000E+02, -0.122182421000000E+03),\n new google.maps.LatLng( 0.480927190000000E+02, -0.122180331000000E+03),\n new google.maps.LatLng( 0.480950000000000E+02, -0.122180544000000E+03),\n new google.maps.LatLng( 0.480973350000000E+02, -0.122185015000000E+03),\n new google.maps.LatLng( 0.480554490000000E+02, -0.122184830000000E+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.480462620000000E+02, -0.122191254000000E+03),\n new google.maps.LatLng( 0.480439880000000E+02, -0.122193924000000E+03),\n new google.maps.LatLng( 0.480425310000000E+02, -0.122197541000000E+03),\n new google.maps.LatLng( 0.480427900000000E+02, -0.122200838000000E+03),\n new google.maps.LatLng( 0.480445760000000E+02, -0.122207979000000E+03),\n new google.maps.LatLng( 0.480451040000000E+02, -0.122208392000000E+03),\n new google.maps.LatLng( 0.480445760000000E+02, -0.122212953000000E+03),\n new google.maps.LatLng( 0.480384950000000E+02, -0.122226518000000E+03),\n new google.maps.LatLng( 0.480369690000000E+02, -0.122228654000000E+03),\n new google.maps.LatLng( 0.480354590000000E+02, -0.122229585000000E+03),\n new google.maps.LatLng( 0.480354230000000E+02, -0.122228462000000E+03),\n new google.maps.LatLng( 0.480342220000000E+02, -0.122226989000000E+03),\n new google.maps.LatLng( 0.480326390000000E+02, -0.122225974000000E+03),\n new google.maps.LatLng( 0.480316560000000E+02, -0.122225938000000E+03),\n new google.maps.LatLng( 0.480305830000000E+02, -0.122226924000000E+03),\n new google.maps.LatLng( 0.480298760000000E+02, -0.122231761000000E+03),\n new google.maps.LatLng( 0.480298760000000E+02, -0.122231761000000E+03),\n new google.maps.LatLng( 0.480416026080318E+02, -0.122260802857096E+03),\n new google.maps.LatLng( 0.480497930000000E+02, -0.122281087000000E+03),\n new google.maps.LatLng( 0.480519202928484E+02, -0.122283315965595E+03),\n new google.maps.LatLng( 0.480734150000000E+02, -0.122305838000000E+03),\n new google.maps.LatLng( 0.480738033032614E+02, -0.122306347656059E+03),\n new google.maps.LatLng( 0.480855070000000E+02, -0.122321709000000E+03),\n new google.maps.LatLng( 0.480928770000000E+02, -0.122326119000000E+03),\n new google.maps.LatLng( 0.480976310000000E+02, -0.122343241000000E+03),\n new google.maps.LatLng( 0.481239300000000E+02, -0.122363842000000E+03),\n new google.maps.LatLng( 0.481258220000000E+02, -0.122365078000000E+03),\n new google.maps.LatLng( 0.481260415638450E+02, -0.122365061393677E+03),\n ];\n\n return zipCoords\n}", "function archive() {\r\n\tvar time = dateFormat(new Date(), \"yyyy-mm-dd_HH-MM\");\r\n\tvar pkg = JSON.parse(fs.readFileSync('./package.json'));\r\n\tvar title = pkg.name + '_' + time + '.zip';\r\n\r\n\treturn gulp.src(CONF.PATHS.package)\r\n\t\t.pipe($.zip(title))\r\n\t\t.pipe(gulp.dest('packaged'));\r\n}", "function zipdirectory(zipfile, directory, notopdir, prefixpath) {\n \"use strict\";\n var fs = require('fs'),\n path = require('path'),\n stat,\n list;\n function listFiles(directory, basename, list) {\n var l = fs.readdirSync(directory),\n i;\n l.forEach(function (f) {\n var abspath = path.join(directory, f),\n relpath = path.join(basename, f),\n stat = fs.lstatSync(abspath);\n if (stat.isDirectory(abspath)) {\n listFiles(abspath, relpath, list);\n } else {\n list.push(relpath);\n }\n });\n }\n function zipFile(zip, abspath, relpath) {\n var entry = {}, data;\n entry.path = relpath;\n entry.date = new Date();\n runtime.log(abspath);\n data = runtime.readFileSync(abspath, \"binary\");\n runtime.log(\"[\" + zipfile + \"] << \\\"\" + entry.path + \"\\\"\");\n zip.save(entry.path, data, false, entry.date);\n }\n function zipList(base, zipfilepath, list) {\n var zip = new core.Zip(zipfilepath, null),\n i;\n for (i = 0; i < list.length; i += 1) {\n zipFile(zip, path.join(base, list[i]), path.join(prefixpath, list[i]));\n }\n zip.write(function (err) {\n if (err) {\n runtime.log(err);\n }\n });\n }\n\n if (!fs.existsSync(directory)) {\n throw \"Directory \" + directory + \" does not exist.\";\n }\n stat = fs.lstatSync(directory);\n if (!stat.isDirectory()) {\n throw directory + \" is not a directory.\";\n }\n list = [];\n if (notopdir) {\n listFiles(directory, \"\", list);\n } else {\n listFiles(directory, path.basename(directory), list);\n }\n runtime.log(list);\n if (list.length === 0) {\n throw \"Directory \" + directory + \" is empty.\";\n }\n if (fs.existsSync(zipfile)) {\n runtime.log(\"Deleting \" + zipfile);\n fs.unlinkSync(zipfile);\n }\n if (notopdir) {\n zipList(directory, zipfile, list);\n } else {\n zipList(path.dirname(directory), zipfile, list);\n }\n runtime.log(\"Created \" + zipfile);\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.486654400000000E+02, -0.118063254000000E+03),\n new google.maps.LatLng( 0.486658510000000E+02, -0.118060495000000E+03),\n new google.maps.LatLng( 0.486650060000000E+02, -0.118057149000000E+03),\n new google.maps.LatLng( 0.486645260000000E+02, -0.118057046000000E+03),\n new google.maps.LatLng( 0.486624680000000E+02, -0.118068359000000E+03),\n new google.maps.LatLng( 0.486632600000000E+02, -0.118070864000000E+03),\n new google.maps.LatLng( 0.486641590000000E+02, -0.118070499000000E+03),\n new google.maps.LatLng( 0.486654400000000E+02, -0.118063254000000E+03),\n ];\n\n return zipCoords\n}", "async function zipAppPackage(appPackage, apkOptions) {\n console.info('Zipping app package with options', appPackage, apkOptions);\n const apkName = `${apkOptions.name}${apkOptions.signingMode === 'none' ? '-unsigned' : ''}.apk`;\n let tmpZipFile = null;\n return new Promise((resolve, reject) => {\n try {\n const archive = archiver('zip', {\n zlib: { level: 5 },\n });\n archive.on('warning', function (zipWarning) {\n console.warn('Warning during zip creation', zipWarning);\n });\n archive.on('error', function (zipError) {\n console.error('Error during zip creation', zipError);\n reject(zipError);\n });\n tmpZipFile = tmp.tmpNameSync({\n prefix: 'pwabuilder-cloudapk-',\n postfix: '.zip',\n });\n const output = fs.createWriteStream(tmpZipFile);\n output.on('close', () => {\n if (tmpZipFile) {\n resolve(tmpZipFile);\n }\n else {\n reject('No zip file was created');\n }\n });\n archive.pipe(output);\n // Append the APK and next steps readme.\n const isSigned = !!appPackage.signingInfo;\n archive.file(appPackage.apkFilePath, { name: apkName });\n archive.file(isSigned ? './Next-steps.html' : './Next-steps-unsigned.html', { name: 'Readme.html' });\n // If we've signed it, we should have signing info, asset links file, and app bundle.\n if (appPackage.signingInfo && appPackage.signingInfo.keyFilePath) {\n archive.file(appPackage.signingInfo.keyFilePath, {\n name: 'signing.keystore',\n });\n const readmeContents = [\n \"Keep this file and signing.keystore in a safe place. You'll need these files if you want to upload future versions of your PWA to the Google Play Store.\\r\\n\",\n 'Key store file: signing.keystore',\n `Key store password: ${appPackage.signingInfo.storePassword}`,\n `Key alias: ${appPackage.signingInfo.alias}`,\n `Key password: ${appPackage.signingInfo.keyPassword}`,\n `Signer's full name: ${appPackage.signingInfo.fullName}`,\n `Signer's organization: ${appPackage.signingInfo.organization}`,\n `Signer's organizational unit: ${appPackage.signingInfo.organizationalUnit}`,\n `Signer's country code: ${appPackage.signingInfo.countryCode}`,\n ];\n archive.append(readmeContents.join('\\r\\n'), {\n name: 'signing-key-info.txt',\n });\n // Zip up the asset links.\n if (appPackage.assetLinkFilePath) {\n archive.file(appPackage.assetLinkFilePath, {\n name: 'assetlinks.json',\n });\n }\n // Zip up the app bundle as well.\n if (appPackage.appBundleFilePath) {\n archive.file(appPackage.appBundleFilePath, {\n name: `${apkOptions.name}.aab`,\n });\n }\n }\n // Add the source code directory if need be.\n if (apkOptions.includeSourceCode) {\n archive.directory(appPackage.projectDirectory, 'source');\n }\n archive.finalize();\n }\n catch (err) {\n reject(err);\n }\n finally {\n scheduleTmpFileCleanup(tmpZipFile);\n }\n });\n}", "function ZipArchive() {\n _classCallCheck(this, ZipArchive);\n\n this.files = [];\n this.level = 'Normal';\n Save.isMicrosoftBrowser = !!navigator.msSaveBlob;\n }", "function zipPublicHelper(dirPath, zip) {\n //copy the public folder to the zip\n const publicDirPath = path.join(__dirname, 'core', 'public');\n //get all of the files and dirs in the public directory\n const allFilesAndDirs = fs.readdirSync(dirPath);\n \n //go through the contents of the public dir\n for (let i = 0; i < allFilesAndDirs.length; i++) {\n const fileOrDirName = allFilesAndDirs[i];\n //get the full path to the file or directory\n const fullPathToFileOrDir = path.join(dirPath, fileOrDirName);\n const relativePathToFileOrDir = fullPathToFileOrDir.substring(publicDirPath.length + 1).split('\\\\').join('/');\n //get some stats about the file/dir\n const stats = fs.statSync(fullPathToFileOrDir);\n\n //if this is a file\n if(stats.isFile()) {\n //read the contents of the file\n const fileContents = fs.readFileSync(fullPathToFileOrDir);\n \n //add the file to the zip\n zip.file(relativePathToFileOrDir, fileContents);\n } else if(stats.isDirectory()) {\n //add the folder to the zip (for empty dirs)\n zip.folder(relativePathToFileOrDir);\n\n //recurse and add the files in the dir to the zip\n zipPublicHelper(fullPathToFileOrDir, zip);\n }\n }\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.478923950000000E+02, -0.118139663000000E+03),\n new google.maps.LatLng( 0.478941090000000E+02, -0.118139356000000E+03),\n new google.maps.LatLng( 0.478947940000000E+02, -0.118138675000000E+03),\n new google.maps.LatLng( 0.478982420000000E+02, -0.118133031000000E+03),\n new google.maps.LatLng( 0.479007080000000E+02, -0.118120778000000E+03),\n new google.maps.LatLng( 0.479003460000000E+02, -0.118114490000000E+03),\n new google.maps.LatLng( 0.479003460000000E+02, -0.118114490000000E+03),\n new google.maps.LatLng( 0.479003020000000E+02, -0.118111092000000E+03),\n new google.maps.LatLng( 0.479011030000000E+02, -0.118108476000000E+03),\n new google.maps.LatLng( 0.479046480000000E+02, -0.118101105000000E+03),\n new google.maps.LatLng( 0.479069810000000E+02, -0.118093255000000E+03),\n new google.maps.LatLng( 0.479058400000000E+02, -0.118084724000000E+03),\n new google.maps.LatLng( 0.479057700000000E+02, -0.118076378000000E+03),\n new google.maps.LatLng( 0.479049500000000E+02, -0.118075581000000E+03),\n new google.maps.LatLng( 0.479039220000000E+02, -0.118075716000000E+03),\n new google.maps.LatLng( 0.479021390000000E+02, -0.118077279000000E+03),\n new google.maps.LatLng( 0.479025510000000E+02, -0.118079013000000E+03),\n new google.maps.LatLng( 0.479005160000000E+02, -0.118080644000000E+03),\n new google.maps.LatLng( 0.478987800000000E+02, -0.118080609000000E+03),\n new google.maps.LatLng( 0.478950100000000E+02, -0.118074695000000E+03),\n new google.maps.LatLng( 0.478933650000000E+02, -0.118074185000000E+03),\n new google.maps.LatLng( 0.478915140000000E+02, -0.118074626000000E+03),\n new google.maps.LatLng( 0.478862570000000E+02, -0.118078226000000E+03),\n new google.maps.LatLng( 0.478820980000000E+02, -0.118078293000000E+03),\n new google.maps.LatLng( 0.478769800000000E+02, -0.118076151000000E+03),\n new google.maps.LatLng( 0.478770260000000E+02, -0.118072076000000E+03),\n new google.maps.LatLng( 0.478753020000000E+02, -0.118068950000000E+03),\n new google.maps.LatLng( 0.478698040000000E+02, -0.118066540000000E+03),\n new google.maps.LatLng( 0.478699640000000E+02, -0.118063823000000E+03),\n new google.maps.LatLng( 0.478727520000000E+02, -0.118060665000000E+03),\n new google.maps.LatLng( 0.478741460000000E+02, -0.118056453000000E+03),\n new google.maps.LatLng( 0.478744120000000E+02, -0.118044463000000E+03),\n new google.maps.LatLng( 0.478752780000000E+02, -0.118041471000000E+03),\n new google.maps.LatLng( 0.478729770000000E+02, -0.118034885000000E+03),\n new google.maps.LatLng( 0.478723600000000E+02, -0.118035089000000E+03),\n new google.maps.LatLng( 0.478713320000000E+02, -0.118036992000000E+03),\n new google.maps.LatLng( 0.478709440000000E+02, -0.118036856000000E+03),\n new google.maps.LatLng( 0.478701890000000E+02, -0.118034581000000E+03),\n new google.maps.LatLng( 0.478700740000000E+02, -0.118028909000000E+03),\n new google.maps.LatLng( 0.478679470000000E+02, -0.118024359000000E+03),\n new google.maps.LatLng( 0.478665980000000E+02, -0.118022968000000E+03),\n new google.maps.LatLng( 0.478655680000000E+02, -0.118018995000000E+03),\n new google.maps.LatLng( 0.478707560000000E+02, -0.118018618000000E+03),\n new google.maps.LatLng( 0.478756020000000E+02, -0.118020615000000E+03),\n new google.maps.LatLng( 0.478773380000000E+02, -0.118020580000000E+03),\n new google.maps.LatLng( 0.478819520000000E+02, -0.118014699000000E+03),\n new google.maps.LatLng( 0.478870020000000E+02, -0.118014694000000E+03),\n new google.maps.LatLng( 0.478918240000000E+02, -0.118011904000000E+03),\n new google.maps.LatLng( 0.478998480000000E+02, -0.118019270000000E+03),\n new google.maps.LatLng( 0.479028890000000E+02, -0.118023924000000E+03),\n new google.maps.LatLng( 0.479061800000000E+02, -0.118024703000000E+03),\n new google.maps.LatLng( 0.479131920000000E+02, -0.118016607000000E+03),\n new google.maps.LatLng( 0.479154310000000E+02, -0.118014872000000E+03),\n new google.maps.LatLng( 0.479162760000000E+02, -0.118014871000000E+03),\n new google.maps.LatLng( 0.479183090000000E+02, -0.118012421000000E+03),\n new google.maps.LatLng( 0.479263470000000E+02, -0.117999541000000E+03),\n new google.maps.LatLng( 0.479281980000000E+02, -0.118001082000000E+03),\n new google.maps.LatLng( 0.479327030000000E+02, -0.118006627000000E+03),\n new google.maps.LatLng( 0.479385760000000E+02, -0.118006179000000E+03),\n new google.maps.LatLng( 0.479446510000000E+02, -0.118001082000000E+03),\n new google.maps.LatLng( 0.479503000000000E+02, -0.117993481000000E+03),\n new google.maps.LatLng( 0.479524760000000E+02, -0.117980081000000E+03),\n new google.maps.LatLng( 0.479516540000000E+02, -0.117978753000000E+03),\n new google.maps.LatLng( 0.479479990000000E+02, -0.117976608000000E+03),\n new google.maps.LatLng( 0.479477780000000E+02, -0.117941980000000E+03),\n new google.maps.LatLng( 0.479495600000000E+02, -0.117930687000000E+03),\n new google.maps.LatLng( 0.479482340000000E+02, -0.117927115000000E+03),\n new google.maps.LatLng( 0.479466570000000E+02, -0.117918850000000E+03),\n new google.maps.LatLng( 0.479460620000000E+02, -0.117914462000000E+03),\n new google.maps.LatLng( 0.479461300000000E+02, -0.117908816000000E+03),\n new google.maps.LatLng( 0.479255160000000E+02, -0.117908011000000E+03),\n new google.maps.LatLng( 0.479202340000000E+02, -0.117896896000000E+03),\n new google.maps.LatLng( 0.479140370000000E+02, -0.117885887000000E+03),\n new google.maps.LatLng( 0.479140370000000E+02, -0.117885887000000E+03),\n new google.maps.LatLng( 0.479138780000000E+02, -0.117887962000000E+03),\n new google.maps.LatLng( 0.479098800000000E+02, -0.117891738000000E+03),\n new google.maps.LatLng( 0.479018580000000E+02, -0.117890351000000E+03),\n new google.maps.LatLng( 0.479021300000000E+02, -0.117884370000000E+03),\n new google.maps.LatLng( 0.479036920000000E+02, -0.117876074000000E+03),\n new google.maps.LatLng( 0.479101510000000E+02, -0.117867818000000E+03),\n new google.maps.LatLng( 0.479114780000000E+02, -0.117865271000000E+03),\n new google.maps.LatLng( 0.479074330000000E+02, -0.117865267000000E+03),\n new google.maps.LatLng( 0.479067920000000E+02, -0.117867135000000E+03),\n new google.maps.LatLng( 0.479049630000000E+02, -0.117870158000000E+03),\n new google.maps.LatLng( 0.479043470000000E+02, -0.117870417000000E+03),\n new google.maps.LatLng( 0.479032180000000E+02, -0.117869857000000E+03),\n new google.maps.LatLng( 0.479033510000000E+02, -0.117865211000000E+03),\n new google.maps.LatLng( 0.478673280000000E+02, -0.117865397000000E+03),\n new google.maps.LatLng( 0.478604880000000E+02, -0.117866157000000E+03),\n new google.maps.LatLng( 0.478472260000000E+02, -0.117865954000000E+03),\n new google.maps.LatLng( 0.478453440000000E+02, -0.117866426000000E+03),\n new google.maps.LatLng( 0.478453440000000E+02, -0.117866426000000E+03),\n new google.maps.LatLng( 0.478476020000000E+02, -0.117876072000000E+03),\n new google.maps.LatLng( 0.478477410000000E+02, -0.117882051000000E+03),\n new google.maps.LatLng( 0.478468050000000E+02, -0.117883885000000E+03),\n new google.maps.LatLng( 0.478442460000000E+02, -0.117884940000000E+03),\n new google.maps.LatLng( 0.478409560000000E+02, -0.117885350000000E+03),\n new google.maps.LatLng( 0.478381460000000E+02, -0.117887933000000E+03),\n new google.maps.LatLng( 0.478361390000000E+02, -0.117899542000000E+03),\n new google.maps.LatLng( 0.478365060000000E+02, -0.117902835000000E+03),\n new google.maps.LatLng( 0.478375580000000E+02, -0.117905787000000E+03),\n new google.maps.LatLng( 0.478373760000000E+02, -0.117906432000000E+03),\n new google.maps.LatLng( 0.478359130000000E+02, -0.117906535000000E+03),\n new google.maps.LatLng( 0.478355020000000E+02, -0.117907248000000E+03),\n new google.maps.LatLng( 0.478364400000000E+02, -0.117911083000000E+03),\n new google.maps.LatLng( 0.478361890000000E+02, -0.117914342000000E+03),\n new google.maps.LatLng( 0.478338570000000E+02, -0.117915463000000E+03),\n new google.maps.LatLng( 0.478333780000000E+02, -0.117917669000000E+03),\n new google.maps.LatLng( 0.478325330000000E+02, -0.117918722000000E+03),\n new google.maps.LatLng( 0.478303160000000E+02, -0.117918722000000E+03),\n new google.maps.LatLng( 0.478279170000000E+02, -0.117921438000000E+03),\n new google.maps.LatLng( 0.478250840000000E+02, -0.117927683000000E+03),\n new google.maps.LatLng( 0.478237130000000E+02, -0.117933893000000E+03),\n new google.maps.LatLng( 0.478239420000000E+02, -0.117935997000000E+03),\n new google.maps.LatLng( 0.478250610000000E+02, -0.117937524000000E+03),\n new google.maps.LatLng( 0.478278940000000E+02, -0.117950217000000E+03),\n new google.maps.LatLng( 0.478287840000000E+02, -0.117957445000000E+03),\n new google.maps.LatLng( 0.478299940000000E+02, -0.117961281000000E+03),\n new google.maps.LatLng( 0.478319590000000E+02, -0.117964302000000E+03),\n new google.maps.LatLng( 0.478329180000000E+02, -0.117966882000000E+03),\n new google.maps.LatLng( 0.478336010000000E+02, -0.117973569000000E+03),\n new google.maps.LatLng( 0.478347650000000E+02, -0.117978967000000E+03),\n new google.maps.LatLng( 0.478352410000000E+02, -0.117988675000000E+03),\n new google.maps.LatLng( 0.478345540000000E+02, -0.117991321000000E+03),\n new google.maps.LatLng( 0.478328390000000E+02, -0.117994883000000E+03),\n new google.maps.LatLng( 0.478252950000000E+02, -0.118003146000000E+03),\n new google.maps.LatLng( 0.478160200000000E+02, -0.118009502000000E+03),\n new google.maps.LatLng( 0.478111310000000E+02, -0.118011475000000E+03),\n new google.maps.LatLng( 0.478074520000000E+02, -0.118011546000000E+03),\n new google.maps.LatLng( 0.478059210000000E+02, -0.118013006000000E+03),\n new google.maps.LatLng( 0.478051450000000E+02, -0.118014669000000E+03),\n new google.maps.LatLng( 0.478048990000000E+02, -0.118029119000000E+03),\n new google.maps.LatLng( 0.478033920000000E+02, -0.118035565000000E+03),\n new google.maps.LatLng( 0.478005590000000E+02, -0.118040077000000E+03),\n new google.maps.LatLng( 0.478009710000000E+02, -0.118043944000000E+03),\n new google.maps.LatLng( 0.478005600000000E+02, -0.118047234000000E+03),\n new google.maps.LatLng( 0.478015200000000E+02, -0.118049133000000E+03),\n new google.maps.LatLng( 0.477997150000000E+02, -0.118052187000000E+03),\n new google.maps.LatLng( 0.477996690000000E+02, -0.118052763000000E+03),\n new google.maps.LatLng( 0.478006750000000E+02, -0.118053374000000E+03),\n new google.maps.LatLng( 0.477992350000000E+02, -0.118059445000000E+03),\n new google.maps.LatLng( 0.477991900000000E+02, -0.118061887000000E+03),\n new google.maps.LatLng( 0.477996470000000E+02, -0.118064769000000E+03),\n new google.maps.LatLng( 0.478009490000000E+02, -0.118068229000000E+03),\n new google.maps.LatLng( 0.478006290000000E+02, -0.118072300000000E+03),\n new google.maps.LatLng( 0.478014740000000E+02, -0.118073250000000E+03),\n new google.maps.LatLng( 0.478040340000000E+02, -0.118074336000000E+03),\n new google.maps.LatLng( 0.478071640000000E+02, -0.118077694000000E+03),\n new google.maps.LatLng( 0.478075750000000E+02, -0.118079357000000E+03),\n new google.maps.LatLng( 0.478099970000000E+02, -0.118081936000000E+03),\n new google.maps.LatLng( 0.478120540000000E+02, -0.118082513000000E+03),\n new google.maps.LatLng( 0.478152300000000E+02, -0.118084855000000E+03),\n new google.maps.LatLng( 0.478204600000000E+02, -0.118094630000000E+03),\n new google.maps.LatLng( 0.478241390000000E+02, -0.118095345000000E+03),\n new google.maps.LatLng( 0.478280250000000E+02, -0.118092395000000E+03),\n new google.maps.LatLng( 0.478294640000000E+02, -0.118092701000000E+03),\n new google.maps.LatLng( 0.478300350000000E+02, -0.118093923000000E+03),\n new google.maps.LatLng( 0.478303990000000E+02, -0.118100575000000E+03),\n new google.maps.LatLng( 0.478331850000000E+02, -0.118107264000000E+03),\n new google.maps.LatLng( 0.478341870000000E+02, -0.118114323000000E+03),\n new google.maps.LatLng( 0.478351000000000E+02, -0.118116055000000E+03),\n new google.maps.LatLng( 0.478374990000000E+02, -0.118118434000000E+03),\n new google.maps.LatLng( 0.478386410000000E+02, -0.118118877000000E+03),\n new google.maps.LatLng( 0.478422970000000E+02, -0.118118881000000E+03),\n new google.maps.LatLng( 0.478450180000000E+02, -0.118117492000000E+03),\n new google.maps.LatLng( 0.478459550000000E+02, -0.118117561000000E+03),\n new google.maps.LatLng( 0.478504340000000E+02, -0.118118618000000E+03),\n new google.maps.LatLng( 0.478542030000000E+02, -0.118121067000000E+03),\n new google.maps.LatLng( 0.478563500000000E+02, -0.118121748000000E+03),\n new google.maps.LatLng( 0.478598240000000E+02, -0.118121718000000E+03),\n new google.maps.LatLng( 0.478611020000000E+02, -0.118124165000000E+03),\n new google.maps.LatLng( 0.478646910000000E+02, -0.118128042000000E+03),\n new google.maps.LatLng( 0.478712980000000E+02, -0.118133537000000E+03),\n new google.maps.LatLng( 0.478789340000000E+02, -0.118135836000000E+03),\n new google.maps.LatLng( 0.478802600000000E+02, -0.118137941000000E+03),\n new google.maps.LatLng( 0.478859750000000E+02, -0.118142523000000E+03),\n new google.maps.LatLng( 0.478871600000000E+02, -0.118145435000000E+03),\n new google.maps.LatLng( 0.478871600000000E+02, -0.118145435000000E+03),\n new google.maps.LatLng( 0.478877360000000E+02, -0.118145647000000E+03),\n new google.maps.LatLng( 0.478888540000000E+02, -0.118141705000000E+03),\n new google.maps.LatLng( 0.478906130000000E+02, -0.118140208000000E+03),\n new google.maps.LatLng( 0.478923950000000E+02, -0.118139663000000E+03),\n ];\n\n return zipCoords\n}", "function packLocalCache() {\n \n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.490002680166211E+02, -0.119093249892880E+03),\n new google.maps.LatLng( 0.490003021009937E+02, -0.118873151322766E+03),\n new google.maps.LatLng( 0.490003077150958E+02, -0.118836898466696E+03),\n new google.maps.LatLng( 0.490003077150958E+02, -0.118836898466696E+03),\n new google.maps.LatLng( 0.489998980000000E+02, -0.118836465000000E+03),\n new google.maps.LatLng( 0.489400600000000E+02, -0.118835840000000E+03),\n new google.maps.LatLng( 0.489400600000000E+02, -0.118835840000000E+03),\n new google.maps.LatLng( 0.489390300000000E+02, -0.118840625000000E+03),\n new google.maps.LatLng( 0.489392810000000E+02, -0.118844544000000E+03),\n new google.maps.LatLng( 0.489420860000000E+02, -0.118857481000000E+03),\n new google.maps.LatLng( 0.489429270000000E+02, -0.118866741000000E+03),\n new google.maps.LatLng( 0.489412560000000E+02, -0.118873467000000E+03),\n new google.maps.LatLng( 0.489367940000000E+02, -0.118885318000000E+03),\n new google.maps.LatLng( 0.489363550000000E+02, -0.118896382000000E+03),\n new google.maps.LatLng( 0.489377050000000E+02, -0.118901479000000E+03),\n new google.maps.LatLng( 0.489474190000000E+02, -0.118923460000000E+03),\n new google.maps.LatLng( 0.489517140000000E+02, -0.118927863000000E+03),\n new google.maps.LatLng( 0.489535650000000E+02, -0.118940420000000E+03),\n new google.maps.LatLng( 0.489552550000000E+02, -0.118945658000000E+03),\n new google.maps.LatLng( 0.489553240000000E+02, -0.118948016000000E+03),\n new google.maps.LatLng( 0.489513480000000E+02, -0.118956270000000E+03),\n new google.maps.LatLng( 0.489489720000000E+02, -0.118958627000000E+03),\n new google.maps.LatLng( 0.489475100000000E+02, -0.118957933000000E+03),\n new google.maps.LatLng( 0.489461380000000E+02, -0.118962233000000E+03),\n new google.maps.LatLng( 0.489480110000000E+02, -0.118965529000000E+03),\n new google.maps.LatLng( 0.489505000000000E+02, -0.118968513000000E+03),\n new google.maps.LatLng( 0.489471630000000E+02, -0.118973678000000E+03),\n new google.maps.LatLng( 0.489471630000000E+02, -0.118973678000000E+03),\n new google.maps.LatLng( 0.489492420000000E+02, -0.118973783000000E+03),\n new google.maps.LatLng( 0.489520070000000E+02, -0.118972225000000E+03),\n new google.maps.LatLng( 0.489543150000000E+02, -0.118969348000000E+03),\n new google.maps.LatLng( 0.489579240000000E+02, -0.118966783000000E+03),\n new google.maps.LatLng( 0.489624940000000E+02, -0.118965815000000E+03),\n new google.maps.LatLng( 0.489633850000000E+02, -0.118966162000000E+03),\n new google.maps.LatLng( 0.489604810000000E+02, -0.118977365000000E+03),\n new google.maps.LatLng( 0.489591320000000E+02, -0.118978474000000E+03),\n new google.maps.LatLng( 0.489588810000000E+02, -0.118979375000000E+03),\n new google.maps.LatLng( 0.489589710000000E+02, -0.118981804000000E+03),\n new google.maps.LatLng( 0.489595190000000E+02, -0.118983088000000E+03),\n new google.maps.LatLng( 0.489610260000000E+02, -0.118983956000000E+03),\n new google.maps.LatLng( 0.489615290000000E+02, -0.118983645000000E+03),\n new google.maps.LatLng( 0.489604110000000E+02, -0.118981597000000E+03),\n new google.maps.LatLng( 0.489606900000000E+02, -0.118980608000000E+03),\n new google.maps.LatLng( 0.489667150000000E+02, -0.118981846000000E+03),\n new google.maps.LatLng( 0.489687940000000E+02, -0.118984450000000E+03),\n new google.maps.LatLng( 0.489752530000000E+02, -0.118996949000000E+03),\n new google.maps.LatLng( 0.489821270000000E+02, -0.119000219000000E+03),\n new google.maps.LatLng( 0.489840000000000E+02, -0.119000430000000E+03),\n new google.maps.LatLng( 0.489854640000000E+02, -0.119001152000000E+03),\n new google.maps.LatLng( 0.489886200000000E+02, -0.119006628000000E+03),\n new google.maps.LatLng( 0.489906100000000E+02, -0.119013429000000E+03),\n new google.maps.LatLng( 0.489908860000000E+02, -0.119017039000000E+03),\n new google.maps.LatLng( 0.489907540000000E+02, -0.119026297000000E+03),\n new google.maps.LatLng( 0.489912110000000E+02, -0.119034256000000E+03),\n new google.maps.LatLng( 0.489907570000000E+02, -0.119051195000000E+03),\n new google.maps.LatLng( 0.489899580000000E+02, -0.119058692000000E+03),\n new google.maps.LatLng( 0.489884050000000E+02, -0.119061121000000E+03),\n new google.maps.LatLng( 0.489788800000000E+02, -0.119070978000000E+03),\n new google.maps.LatLng( 0.489806140000000E+02, -0.119075212000000E+03),\n new google.maps.LatLng( 0.489875810000000E+02, -0.119080906000000E+03),\n new google.maps.LatLng( 0.489946610000000E+02, -0.119084519000000E+03),\n new google.maps.LatLng( 0.489947990000000E+02, -0.119086740000000E+03),\n new google.maps.LatLng( 0.489988400000000E+02, -0.119092158000000E+03),\n new google.maps.LatLng( 0.490002680166211E+02, -0.119093249892880E+03),\n ];\n\n return zipCoords\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.484811083004488E+02, -0.122818113776554E+03),\n new google.maps.LatLng( 0.484811000000000E+02, -0.122818118000000E+03),\n new google.maps.LatLng( 0.484812820000000E+02, -0.122825611000000E+03),\n new google.maps.LatLng( 0.484821280000000E+02, -0.122825715000000E+03),\n new google.maps.LatLng( 0.484833620000000E+02, -0.122824821000000E+03),\n new google.maps.LatLng( 0.484868120000000E+02, -0.122821453000000E+03),\n new google.maps.LatLng( 0.484887367857422E+02, -0.122819171785742E+03),\n new google.maps.LatLng( 0.484893265857422E+02, -0.122817212185742E+03),\n new google.maps.LatLng( 0.484917260000000E+02, -0.122815232000000E+03),\n new google.maps.LatLng( 0.484986950000000E+02, -0.122816023000000E+03),\n new google.maps.LatLng( 0.484993520000000E+02, -0.122816813000000E+03),\n new google.maps.LatLng( 0.484995340000000E+02, -0.122820596000000E+03),\n new google.maps.LatLng( 0.485041610000000E+02, -0.122827095000000E+03),\n new google.maps.LatLng( 0.485055780000000E+02, -0.122828471000000E+03),\n new google.maps.LatLng( 0.485084570000000E+02, -0.122829813000000E+03),\n new google.maps.LatLng( 0.485097590000000E+02, -0.122831396000000E+03),\n new google.maps.LatLng( 0.485100100000000E+02, -0.122833597000000E+03),\n new google.maps.LatLng( 0.485093240000000E+02, -0.122837792000000E+03),\n new google.maps.LatLng( 0.485097120000000E+02, -0.122838617000000E+03),\n new google.maps.LatLng( 0.485115170000000E+02, -0.122840097000000E+03),\n new google.maps.LatLng( 0.485153790000000E+02, -0.122838174000000E+03),\n new google.maps.LatLng( 0.485186710000000E+02, -0.122831847000000E+03),\n new google.maps.LatLng( 0.485218250000000E+02, -0.122829440000000E+03),\n new google.maps.LatLng( 0.485224420000000E+02, -0.122828443000000E+03),\n new google.maps.LatLng( 0.485243170000000E+02, -0.122820531000000E+03),\n new google.maps.LatLng( 0.485246830000000E+02, -0.122816094000000E+03),\n new google.maps.LatLng( 0.485239750000000E+02, -0.122809936000000E+03),\n new google.maps.LatLng( 0.485239060000000E+02, -0.122802334000000E+03),\n new google.maps.LatLng( 0.485250250000000E+02, -0.122797484000000E+03),\n new google.maps.LatLng( 0.485245660000000E+02, -0.122788265000000E+03),\n new google.maps.LatLng( 0.485239605532555E+02, -0.122787495560840E+03),\n new google.maps.LatLng( 0.485239605532555E+02, -0.122787495560840E+03),\n new google.maps.LatLng( 0.485233994873270E+02, -0.122787407687624E+03),\n new google.maps.LatLng( 0.485230120000000E+02, -0.122787347000000E+03),\n new google.maps.LatLng( 0.485177990000000E+02, -0.122777467000000E+03),\n new google.maps.LatLng( 0.485095664352738E+02, -0.122779001806453E+03),\n new google.maps.LatLng( 0.485089110000000E+02, -0.122779124000000E+03),\n new google.maps.LatLng( 0.484953208059023E+02, -0.122799155517055E+03),\n new google.maps.LatLng( 0.484949230279716E+02, -0.122799741829167E+03),\n new google.maps.LatLng( 0.484944670000000E+02, -0.122800414000000E+03),\n new google.maps.LatLng( 0.484882271319172E+02, -0.122815404374305E+03),\n new google.maps.LatLng( 0.484878410000000E+02, -0.122816332000000E+03),\n new google.maps.LatLng( 0.484838880000000E+02, -0.122817912000000E+03),\n new google.maps.LatLng( 0.484811083004488E+02, -0.122818113776554E+03),\n ];\n\n return zipCoords\n}", "function zipcodeChecker(zipcode) {\n return zipcode > 20000;\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.466351870000000E+02, -0.119412924000000E+03),\n new google.maps.LatLng( 0.466358500000000E+02, -0.119413786000000E+03),\n new google.maps.LatLng( 0.466401000000000E+02, -0.119414116000000E+03),\n new google.maps.LatLng( 0.466463150000000E+02, -0.119413782000000E+03),\n new google.maps.LatLng( 0.466466350000000E+02, -0.119413350000000E+03),\n new google.maps.LatLng( 0.466459950000000E+02, -0.119411957000000E+03),\n new google.maps.LatLng( 0.466395510000000E+02, -0.119410866000000E+03),\n new google.maps.LatLng( 0.466365120000000E+02, -0.119410801000000E+03),\n new google.maps.LatLng( 0.466351870000000E+02, -0.119412924000000E+03),\n ];\n\n return zipCoords\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.490003632277298E+02, -0.117429502617754E+03),\n new google.maps.LatLng( 0.490001609301037E+02, -0.117354524042634E+03),\n new google.maps.LatLng( 0.490001609301037E+02, -0.117354524042634E+03),\n new google.maps.LatLng( 0.489983050000000E+02, -0.117353026000000E+03),\n new google.maps.LatLng( 0.489881370000000E+02, -0.117349928000000E+03),\n new google.maps.LatLng( 0.489796830000000E+02, -0.117349297000000E+03),\n new google.maps.LatLng( 0.489734670000000E+02, -0.117351791000000E+03),\n new google.maps.LatLng( 0.489708840000000E+02, -0.117355016000000E+03),\n new google.maps.LatLng( 0.489708840000000E+02, -0.117355016000000E+03),\n new google.maps.LatLng( 0.489677300000000E+02, -0.117358206000000E+03),\n new google.maps.LatLng( 0.489661730000000E+02, -0.117364487000000E+03),\n new google.maps.LatLng( 0.489637610000000E+02, -0.117367258000000E+03),\n new google.maps.LatLng( 0.489622880000000E+02, -0.117364690000000E+03),\n new google.maps.LatLng( 0.489610320000000E+02, -0.117363960000000E+03),\n new google.maps.LatLng( 0.489507740000000E+02, -0.117360099000000E+03),\n new google.maps.LatLng( 0.489488790000000E+02, -0.117358536000000E+03),\n new google.maps.LatLng( 0.489484910000000E+02, -0.117357218000000E+03),\n new google.maps.LatLng( 0.489445380000000E+02, -0.117356174000000E+03),\n new google.maps.LatLng( 0.489359240000000E+02, -0.117355334000000E+03),\n new google.maps.LatLng( 0.489323540000000E+02, -0.117367017000000E+03),\n new google.maps.LatLng( 0.489307560000000E+02, -0.117364554000000E+03),\n new google.maps.LatLng( 0.489304600000000E+02, -0.117361294000000E+03),\n new google.maps.LatLng( 0.489281080000000E+02, -0.117358587000000E+03),\n new google.maps.LatLng( 0.489229440000000E+02, -0.117357438000000E+03),\n new google.maps.LatLng( 0.489195390000000E+02, -0.117360208000000E+03),\n new google.maps.LatLng( 0.489171170000000E+02, -0.117360553000000E+03),\n new google.maps.LatLng( 0.489134160000000E+02, -0.117358851000000E+03),\n new google.maps.LatLng( 0.489037490000000E+02, -0.117359605000000E+03),\n new google.maps.LatLng( 0.489015090000000E+02, -0.117363311000000E+03),\n new google.maps.LatLng( 0.489011610000000E+02, -0.117373049000000E+03),\n new google.maps.LatLng( 0.488983750000000E+02, -0.117380843000000E+03),\n new google.maps.LatLng( 0.488946260000000E+02, -0.117380570000000E+03),\n new google.maps.LatLng( 0.488903540000000E+02, -0.117382168000000E+03),\n new google.maps.LatLng( 0.488869740000000E+02, -0.117384390000000E+03),\n new google.maps.LatLng( 0.488837290000000E+02, -0.117384116000000E+03),\n new google.maps.LatLng( 0.488749200000000E+02, -0.117385962000000E+03),\n new google.maps.LatLng( 0.488733910000000E+02, -0.117386774000000E+03),\n new google.maps.LatLng( 0.488739620000000E+02, -0.117387377000000E+03),\n new google.maps.LatLng( 0.488722880000000E+02, -0.117392956000000E+03),\n new google.maps.LatLng( 0.488686160000000E+02, -0.117400065000000E+03),\n new google.maps.LatLng( 0.488651220000000E+02, -0.117405263000000E+03),\n new google.maps.LatLng( 0.488505000000000E+02, -0.117418359000000E+03),\n new google.maps.LatLng( 0.488455880000000E+02, -0.117420888000000E+03),\n new google.maps.LatLng( 0.488387910000000E+02, -0.117425258000000E+03),\n new google.maps.LatLng( 0.488338890000000E+02, -0.117431449000000E+03),\n new google.maps.LatLng( 0.488326280000000E+02, -0.117438307000000E+03),\n new google.maps.LatLng( 0.488326280000000E+02, -0.117438307000000E+03),\n new google.maps.LatLng( 0.488292740000000E+02, -0.117437714000000E+03),\n new google.maps.LatLng( 0.488260070000000E+02, -0.117438025000000E+03),\n new google.maps.LatLng( 0.488172310000000E+02, -0.117441312000000E+03),\n new google.maps.LatLng( 0.488106050000000E+02, -0.117440378000000E+03),\n new google.maps.LatLng( 0.488083200000000E+02, -0.117442280000000E+03),\n new google.maps.LatLng( 0.488067660000000E+02, -0.117444390000000E+03),\n new google.maps.LatLng( 0.488022420000000E+02, -0.117447088000000E+03),\n new google.maps.LatLng( 0.488014870000000E+02, -0.117446880000000E+03),\n new google.maps.LatLng( 0.488002300000000E+02, -0.117447398000000E+03),\n new google.maps.LatLng( 0.487975340000000E+02, -0.117450234000000E+03),\n new google.maps.LatLng( 0.487930540000000E+02, -0.117455766000000E+03),\n new google.maps.LatLng( 0.487914310000000E+02, -0.117460192000000E+03),\n new google.maps.LatLng( 0.487946990000000E+02, -0.117461680000000E+03),\n new google.maps.LatLng( 0.487951100000000E+02, -0.117462822000000E+03),\n new google.maps.LatLng( 0.487898490000000E+02, -0.117477378000000E+03),\n new google.maps.LatLng( 0.487871740000000E+02, -0.117481526000000E+03),\n new google.maps.LatLng( 0.487814090000000E+02, -0.117495385000000E+03),\n new google.maps.LatLng( 0.487765180000000E+02, -0.117497523000000E+03),\n new google.maps.LatLng( 0.487746910000000E+02, -0.117496760000000E+03),\n new google.maps.LatLng( 0.487728870000000E+02, -0.117494891000000E+03),\n new google.maps.LatLng( 0.487717690000000E+02, -0.117491641000000E+03),\n new google.maps.LatLng( 0.487719520000000E+02, -0.117489809000000E+03),\n new google.maps.LatLng( 0.487707190000000E+02, -0.117487388000000E+03),\n new google.maps.LatLng( 0.487690980000000E+02, -0.117486073000000E+03),\n new google.maps.LatLng( 0.487665620000000E+02, -0.117485103000000E+03),\n new google.maps.LatLng( 0.487630430000000E+02, -0.117484927000000E+03),\n new google.maps.LatLng( 0.487612610000000E+02, -0.117484268000000E+03),\n new google.maps.LatLng( 0.487530150000000E+02, -0.117476141000000E+03),\n new google.maps.LatLng( 0.487512800000000E+02, -0.117471232000000E+03),\n new google.maps.LatLng( 0.487485260000000E+02, -0.117469987000000E+03),\n new google.maps.LatLng( 0.487467210000000E+02, -0.117469848000000E+03),\n new google.maps.LatLng( 0.487389280000000E+02, -0.117474783000000E+03),\n new google.maps.LatLng( 0.487344010000000E+02, -0.117481653000000E+03),\n new google.maps.LatLng( 0.487330730000000E+02, -0.117485313000000E+03),\n new google.maps.LatLng( 0.487323830000000E+02, -0.117496159000000E+03),\n new google.maps.LatLng( 0.487342770000000E+02, -0.117500548000000E+03),\n new google.maps.LatLng( 0.487357430000000E+02, -0.117506896000000E+03),\n new google.maps.LatLng( 0.487333240000000E+02, -0.117514844000000E+03),\n new google.maps.LatLng( 0.487333730000000E+02, -0.117523479000000E+03),\n new google.maps.LatLng( 0.487301990000000E+02, -0.117529768000000E+03),\n new google.maps.LatLng( 0.487296290000000E+02, -0.117537851000000E+03),\n new google.maps.LatLng( 0.487302910000000E+02, -0.117541941000000E+03),\n new google.maps.LatLng( 0.487321660000000E+02, -0.117545097000000E+03),\n new google.maps.LatLng( 0.487327540000000E+02, -0.117551075000000E+03),\n new google.maps.LatLng( 0.487325560000000E+02, -0.117562754000000E+03),\n new google.maps.LatLng( 0.487278680000000E+02, -0.117563453000000E+03),\n new google.maps.LatLng( 0.487287170000000E+02, -0.117567141000000E+03),\n new google.maps.LatLng( 0.487302940000000E+02, -0.117569698000000E+03),\n new google.maps.LatLng( 0.487319520000000E+02, -0.117579102000000E+03),\n new google.maps.LatLng( 0.487316860000000E+02, -0.117580751000000E+03),\n new google.maps.LatLng( 0.487291730000000E+02, -0.117581717000000E+03),\n new google.maps.LatLng( 0.487240320000000E+02, -0.117576673000000E+03),\n new google.maps.LatLng( 0.487233460000000E+02, -0.117579988000000E+03),\n new google.maps.LatLng( 0.487234370000000E+02, -0.117583925000000E+03),\n new google.maps.LatLng( 0.487259240000000E+02, -0.117594702000000E+03),\n new google.maps.LatLng( 0.487237770000000E+02, -0.117593354000000E+03),\n new google.maps.LatLng( 0.487219260000000E+02, -0.117591418000000E+03),\n new google.maps.LatLng( 0.487202820000000E+02, -0.117587480000000E+03),\n new google.maps.LatLng( 0.487154630000000E+02, -0.117578672000000E+03),\n new google.maps.LatLng( 0.487133440000000E+02, -0.117578806000000E+03),\n new google.maps.LatLng( 0.487089280000000E+02, -0.117576495000000E+03),\n new google.maps.LatLng( 0.487084940000000E+02, -0.117576081000000E+03),\n new google.maps.LatLng( 0.487086770000000E+02, -0.117574113000000E+03),\n new google.maps.LatLng( 0.487063010000000E+02, -0.117571282000000E+03),\n new google.maps.LatLng( 0.487048840000000E+02, -0.117572455000000E+03),\n new google.maps.LatLng( 0.487034440000000E+02, -0.117575320000000E+03),\n new google.maps.LatLng( 0.487021870000000E+02, -0.117576390000000E+03),\n new google.maps.LatLng( 0.486970000000000E+02, -0.117577424000000E+03),\n new google.maps.LatLng( 0.486922920000000E+02, -0.117582185000000E+03),\n new google.maps.LatLng( 0.486927720000000E+02, -0.117583083000000E+03),\n new google.maps.LatLng( 0.486937780000000E+02, -0.117583014000000E+03),\n new google.maps.LatLng( 0.486951720000000E+02, -0.117582463000000E+03),\n new google.maps.LatLng( 0.486974340000000E+02, -0.117580185000000E+03),\n new google.maps.LatLng( 0.486984620000000E+02, -0.117579840000000E+03),\n new google.maps.LatLng( 0.486996500000000E+02, -0.117581014000000E+03),\n new google.maps.LatLng( 0.487010200000000E+02, -0.117585675000000E+03),\n new google.maps.LatLng( 0.486970670000000E+02, -0.117587986000000E+03),\n new google.maps.LatLng( 0.486923140000000E+02, -0.117589606000000E+03),\n new google.maps.LatLng( 0.486915140000000E+02, -0.117589640000000E+03),\n new google.maps.LatLng( 0.486901430000000E+02, -0.117588776000000E+03),\n new google.maps.LatLng( 0.486847740000000E+02, -0.117588118000000E+03),\n new google.maps.LatLng( 0.486826720000000E+02, -0.117588634000000E+03),\n new google.maps.LatLng( 0.486818030000000E+02, -0.117588082000000E+03),\n new google.maps.LatLng( 0.486778750000000E+02, -0.117576624000000E+03),\n new google.maps.LatLng( 0.486783550000000E+02, -0.117572691000000E+03),\n new google.maps.LatLng( 0.486789270000000E+02, -0.117571311000000E+03),\n new google.maps.LatLng( 0.486807550000000E+02, -0.117569724000000E+03),\n new google.maps.LatLng( 0.486829490000000E+02, -0.117560751000000E+03),\n new google.maps.LatLng( 0.486828340000000E+02, -0.117556024000000E+03),\n new google.maps.LatLng( 0.486824260000000E+02, -0.117555123000000E+03),\n new google.maps.LatLng( 0.486804800000000E+02, -0.117549537000000E+03),\n new google.maps.LatLng( 0.486806620000000E+02, -0.117546396000000E+03),\n new google.maps.LatLng( 0.486812330000000E+02, -0.117545050000000E+03),\n new google.maps.LatLng( 0.486828330000000E+02, -0.117544015000000E+03),\n new google.maps.LatLng( 0.486836090000000E+02, -0.117540288000000E+03),\n new google.maps.LatLng( 0.486809570000000E+02, -0.117533905000000E+03),\n new google.maps.LatLng( 0.486789910000000E+02, -0.117531283000000E+03),\n new google.maps.LatLng( 0.486771160000000E+02, -0.117527316000000E+03),\n new google.maps.LatLng( 0.486784620000000E+02, -0.117520863000000E+03),\n new google.maps.LatLng( 0.486811130000000E+02, -0.117518342000000E+03),\n new google.maps.LatLng( 0.486806970000000E+02, -0.117508784000000E+03),\n new google.maps.LatLng( 0.486719000000000E+02, -0.117492913000000E+03),\n new google.maps.LatLng( 0.486682030000000E+02, -0.117481179000000E+03),\n new google.maps.LatLng( 0.486679750000000E+02, -0.117480006000000E+03),\n new google.maps.LatLng( 0.486685930000000E+02, -0.117476488000000E+03),\n new google.maps.LatLng( 0.486703530000000E+02, -0.117476558000000E+03),\n new google.maps.LatLng( 0.486697140000000E+02, -0.117472866000000E+03),\n new google.maps.LatLng( 0.486697140000000E+02, -0.117472866000000E+03),\n new google.maps.LatLng( 0.486659500000000E+02, -0.117475711000000E+03),\n new google.maps.LatLng( 0.486585030000000E+02, -0.117475720000000E+03),\n new google.maps.LatLng( 0.486506730000000E+02, -0.117490061000000E+03),\n new google.maps.LatLng( 0.486481580000000E+02, -0.117492093000000E+03),\n new google.maps.LatLng( 0.486473810000000E+02, -0.117493782000000E+03),\n new google.maps.LatLng( 0.486465320000000E+02, -0.117499712000000E+03),\n new google.maps.LatLng( 0.486465320000000E+02, -0.117499712000000E+03),\n new google.maps.LatLng( 0.486562270000000E+02, -0.117499695000000E+03),\n new google.maps.LatLng( 0.486558480000000E+02, -0.117629241000000E+03),\n new google.maps.LatLng( 0.486590990000000E+02, -0.117629261000000E+03),\n new google.maps.LatLng( 0.486621410000000E+02, -0.117634639000000E+03),\n new google.maps.LatLng( 0.486642670000000E+02, -0.117637362000000E+03),\n new google.maps.LatLng( 0.486657300000000E+02, -0.117638395000000E+03),\n new google.maps.LatLng( 0.486662560000000E+02, -0.117638188000000E+03),\n new google.maps.LatLng( 0.486662100000000E+02, -0.117637187000000E+03),\n new google.maps.LatLng( 0.486656360000000E+02, -0.117632980000000E+03),\n new google.maps.LatLng( 0.486649050000000E+02, -0.117632083000000E+03),\n new google.maps.LatLng( 0.486649270000000E+02, -0.117631256000000E+03),\n new google.maps.LatLng( 0.486660240000000E+02, -0.117629875000000E+03),\n new google.maps.LatLng( 0.486678740000000E+02, -0.117629305000000E+03),\n new google.maps.LatLng( 0.487043920000000E+02, -0.117629405000000E+03),\n new google.maps.LatLng( 0.487076810000000E+02, -0.117634937000000E+03),\n new google.maps.LatLng( 0.487097390000000E+02, -0.117636938000000E+03),\n new google.maps.LatLng( 0.487120470000000E+02, -0.117635590000000E+03),\n new google.maps.LatLng( 0.487111090000000E+02, -0.117632379000000E+03),\n new google.maps.LatLng( 0.487112730000000E+02, -0.117629422000000E+03),\n new google.maps.LatLng( 0.487426830000000E+02, -0.117629512000000E+03),\n new google.maps.LatLng( 0.487429110000000E+02, -0.117595383000000E+03),\n new google.maps.LatLng( 0.487424640000000E+02, -0.117563527000000E+03),\n new google.maps.LatLng( 0.487499110000000E+02, -0.117564062000000E+03),\n new google.maps.LatLng( 0.488366990000000E+02, -0.117563619000000E+03),\n new google.maps.LatLng( 0.488368190000000E+02, -0.117498576000000E+03),\n new google.maps.LatLng( 0.489227860000000E+02, -0.117498868000000E+03),\n new google.maps.LatLng( 0.489230680000000E+02, -0.117430203000000E+03),\n new google.maps.LatLng( 0.489705600000000E+02, -0.117430154000000E+03),\n new google.maps.LatLng( 0.490003632277298E+02, -0.117429502617754E+03),\n ];\n\n return zipCoords\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.485547070000000E+02, -0.122925607000000E+03),\n new google.maps.LatLng( 0.485554390000000E+02, -0.122928051000000E+03),\n new google.maps.LatLng( 0.485592780000000E+02, -0.122928807000000E+03),\n new google.maps.LatLng( 0.485605800000000E+02, -0.122927706000000E+03),\n new google.maps.LatLng( 0.485606710000000E+02, -0.122926054000000E+03),\n new google.maps.LatLng( 0.485600770000000E+02, -0.122924470000000E+03),\n new google.maps.LatLng( 0.485576550000000E+02, -0.122922853000000E+03),\n new google.maps.LatLng( 0.485569690000000E+02, -0.122922818000000E+03),\n new google.maps.LatLng( 0.485547070000000E+02, -0.122925607000000E+03),\n ];\n\n return zipCoords\n}", "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.477194066768012E+02, -0.122545911133421E+03),\n new google.maps.LatLng( 0.477209750000000E+02, -0.122548509000000E+03),\n new google.maps.LatLng( 0.477212950000000E+02, -0.122552099000000E+03),\n new google.maps.LatLng( 0.477209530000000E+02, -0.122553487000000E+03),\n new google.maps.LatLng( 0.477121090000000E+02, -0.122563750000000E+03),\n new google.maps.LatLng( 0.477107830000000E+02, -0.122564732000000E+03),\n new google.maps.LatLng( 0.477048180000000E+02, -0.122564393000000E+03),\n new google.maps.LatLng( 0.477021900000000E+02, -0.122563310000000E+03),\n new google.maps.LatLng( 0.477004990000000E+02, -0.122563310000000E+03),\n new google.maps.LatLng( 0.476930940000000E+02, -0.122565984000000E+03),\n new google.maps.LatLng( 0.476895520000000E+02, -0.122565915000000E+03),\n new google.maps.LatLng( 0.476816230000000E+02, -0.122565126000000E+03),\n new google.maps.LatLng( 0.476773500000000E+02, -0.122562761000000E+03),\n new google.maps.LatLng( 0.476737790000000E+02, -0.122562242000000E+03),\n new google.maps.LatLng( 0.476663410000000E+02, -0.122566225000000E+03),\n new google.maps.LatLng( 0.476636930000000E+02, -0.122568651000000E+03),\n new google.maps.LatLng( 0.476640600000000E+02, -0.122569658000000E+03),\n new google.maps.LatLng( 0.476699110000000E+02, -0.122569368000000E+03),\n new google.maps.LatLng( 0.476736350000000E+02, -0.122569780000000E+03),\n new google.maps.LatLng( 0.476746800000000E+02, -0.122570665000000E+03),\n new google.maps.LatLng( 0.476746800000000E+02, -0.122572512000000E+03),\n new google.maps.LatLng( 0.476707350000000E+02, -0.122579760000000E+03),\n new google.maps.LatLng( 0.476652120000000E+02, -0.122586352000000E+03),\n new google.maps.LatLng( 0.476635470000000E+02, -0.122590564000000E+03),\n new google.maps.LatLng( 0.476611900000000E+02, -0.122591312000000E+03),\n new google.maps.LatLng( 0.476587420000000E+02, -0.122589785000000E+03),\n new google.maps.LatLng( 0.476574980000000E+02, -0.122588061000000E+03),\n new google.maps.LatLng( 0.476502500000000E+02, -0.122583605000000E+03),\n new google.maps.LatLng( 0.476454590000000E+02, -0.122581361000000E+03),\n new google.maps.LatLng( 0.476451916234375E+02, -0.122575617283594E+03),\n new google.maps.LatLng( 0.476479310000000E+02, -0.122569230000000E+03),\n new google.maps.LatLng( 0.476469090000000E+02, -0.122567261000000E+03),\n new google.maps.LatLng( 0.476458410000000E+02, -0.122567582000000E+03),\n new google.maps.LatLng( 0.476434494207031E+02, -0.122574085632812E+03),\n new google.maps.LatLng( 0.476432202207031E+02, -0.122575999032813E+03),\n new google.maps.LatLng( 0.476416670000000E+02, -0.122578538000000E+03),\n new google.maps.LatLng( 0.476374100000000E+02, -0.122578767000000E+03),\n new google.maps.LatLng( 0.476325730000000E+02, -0.122577379000000E+03),\n new google.maps.LatLng( 0.476272480000000E+02, -0.122577210000000E+03),\n new google.maps.LatLng( 0.476246230000000E+02, -0.122577958000000E+03),\n new google.maps.LatLng( 0.476210450000000E+02, -0.122577469000000E+03),\n new google.maps.LatLng( 0.476155440000000E+02, -0.122574143000000E+03),\n new google.maps.LatLng( 0.476129120000000E+02, -0.122574173000000E+03),\n new google.maps.LatLng( 0.476110270000000E+02, -0.122575363000000E+03),\n new google.maps.LatLng( 0.476068930000000E+02, -0.122575669000000E+03),\n new google.maps.LatLng( 0.476007590000000E+02, -0.122576889000000E+03),\n new google.maps.LatLng( 0.475995230000000E+02, -0.122576629000000E+03),\n new google.maps.LatLng( 0.475950900000000E+02, -0.122574172000000E+03),\n new google.maps.LatLng( 0.475926100000000E+02, -0.122571548000000E+03),\n new google.maps.LatLng( 0.475909170000000E+02, -0.122568527000000E+03),\n new google.maps.LatLng( 0.475907530000000E+02, -0.122567222000000E+03),\n new google.maps.LatLng( 0.475920530000000E+02, -0.122564085000000E+03),\n new google.maps.LatLng( 0.475946320000000E+02, -0.122560759000000E+03),\n new google.maps.LatLng( 0.476006900000000E+02, -0.122557234000000E+03),\n new google.maps.LatLng( 0.476023230000000E+02, -0.122555037000000E+03),\n new google.maps.LatLng( 0.476040090000000E+02, -0.122550932000000E+03),\n new google.maps.LatLng( 0.476037190000000E+02, -0.122548735000000E+03),\n new google.maps.LatLng( 0.476026660000000E+02, -0.122547316000000E+03),\n new google.maps.LatLng( 0.476005910000000E+02, -0.122546720000000E+03),\n new google.maps.LatLng( 0.475995760000000E+02, -0.122547117000000E+03),\n new google.maps.LatLng( 0.475970430000000E+02, -0.122545209000000E+03),\n new google.maps.LatLng( 0.475964950000000E+02, -0.122540616000000E+03),\n new google.maps.LatLng( 0.475927180000000E+02, -0.122535062000000E+03),\n new google.maps.LatLng( 0.475882550000000E+02, -0.122531536000000E+03),\n new google.maps.LatLng( 0.475778940000000E+02, -0.122524609000000E+03),\n new google.maps.LatLng( 0.475753990000000E+02, -0.122523509000000E+03),\n new google.maps.LatLng( 0.475743690000000E+02, -0.122521022000000E+03),\n new google.maps.LatLng( 0.475741516604196E+02, -0.122517407938191E+03),\n new google.maps.LatLng( 0.475741516604196E+02, -0.122517407938191E+03),\n new google.maps.LatLng( 0.475740800000000E+02, -0.122518367000000E+03),\n new google.maps.LatLng( 0.475715819454235E+02, -0.122523482706890E+03),\n new google.maps.LatLng( 0.475715819454235E+02, -0.122523482706890E+03),\n new google.maps.LatLng( 0.475717070000000E+02, -0.122533047000000E+03),\n new google.maps.LatLng( 0.475875060000000E+02, -0.122545194000000E+03),\n new google.maps.LatLng( 0.475896880000000E+02, -0.122547925000000E+03),\n new google.maps.LatLng( 0.475908330000000E+02, -0.122550382000000E+03),\n new google.maps.LatLng( 0.475913670000000E+02, -0.122553221000000E+03),\n new google.maps.LatLng( 0.475911610000000E+02, -0.122556624000000E+03),\n new google.maps.LatLng( 0.475891620000000E+02, -0.122566466000000E+03),\n new google.maps.LatLng( 0.475875830000000E+02, -0.122571243000000E+03),\n new google.maps.LatLng( 0.475909170000000E+02, -0.122576721000000E+03),\n new google.maps.LatLng( 0.475953490000000E+02, -0.122581147000000E+03),\n new google.maps.LatLng( 0.475975690000000E+02, -0.122582322000000E+03),\n new google.maps.LatLng( 0.475993470000000E+02, -0.122582581000000E+03),\n new google.maps.LatLng( 0.476422170000000E+02, -0.122585299000000E+03),\n new google.maps.LatLng( 0.476424530000000E+02, -0.122587023000000E+03),\n new google.maps.LatLng( 0.476439100000000E+02, -0.122589282000000E+03),\n new google.maps.LatLng( 0.476503720000000E+02, -0.122594501000000E+03),\n new google.maps.LatLng( 0.476556130000000E+02, -0.122597904000000E+03),\n new google.maps.LatLng( 0.476617700000000E+02, -0.122600879000000E+03),\n new google.maps.LatLng( 0.476635780000000E+02, -0.122600926000000E+03),\n new google.maps.LatLng( 0.476717490000000E+02, -0.122599538000000E+03),\n new google.maps.LatLng( 0.476816460000000E+02, -0.122594881000000E+03),\n new google.maps.LatLng( 0.476932600000000E+02, -0.122581395000000E+03),\n new google.maps.LatLng( 0.476980770000000E+02, -0.122577243000000E+03),\n new google.maps.LatLng( 0.477063220000000E+02, -0.122571439000000E+03),\n new google.maps.LatLng( 0.477153260000000E+02, -0.122563559000000E+03),\n new google.maps.LatLng( 0.477216600000000E+02, -0.122556389000000E+03),\n new google.maps.LatLng( 0.477262109830198E+02, -0.122548121559165E+03),\n new google.maps.LatLng( 0.477262109830198E+02, -0.122548121559165E+03),\n new google.maps.LatLng( 0.477194066768012E+02, -0.122545911133421E+03),\n ];\n\n return zipCoords\n}" ]
[ "0.62616396", "0.6171133", "0.6171133", "0.6171133", "0.6141213", "0.58906025", "0.58729374", "0.58729374", "0.58729374", "0.58729374", "0.586976", "0.5866391", "0.5833366", "0.5823646", "0.5813035", "0.56864625", "0.5640382", "0.56234306", "0.5590841", "0.5552588", "0.5521587", "0.54796106", "0.5454282", "0.5451704", "0.5448566", "0.5445747", "0.54381645", "0.5431502", "0.5416109", "0.5416109", "0.5416109", "0.5416109", "0.5416109", "0.5416109", "0.5416109", "0.5416109", "0.5416109", "0.5416109", "0.5416109", "0.5416109", "0.5416109", "0.54122883", "0.54081655", "0.5397009", "0.539542", "0.53891665", "0.5368186", "0.5341574", "0.5334163", "0.53300405", "0.5328322", "0.5326491", "0.53169215", "0.53113335", "0.53051126", "0.5302449", "0.52863055", "0.5285323", "0.52773094", "0.5271838", "0.5258684", "0.5258148", "0.5248398", "0.52345324", "0.52145547", "0.51977736", "0.5195959", "0.51906973", "0.5189301", "0.5184889", "0.51782656", "0.51762897", "0.5173845", "0.517299", "0.5172322", "0.51709586", "0.51699376", "0.5157948", "0.5157462", "0.5156119", "0.51532316", "0.51527613", "0.5152216", "0.5150378", "0.5148364", "0.51477885", "0.5146884", "0.51462615", "0.5144762", "0.514401", "0.5141492", "0.5137528", "0.51361394", "0.51351833", "0.5134584", "0.5133173", "0.5132019", "0.51302147", "0.5129744", "0.5128723", "0.51272154" ]
0.0
-1
mark the world in search
function highlightWord(){ var keyword = document.getElementById("keyword").value; var display = document.getElementById('fileContent'); var newContent = ""; //find all the occurences let spans = document.querySelectorAll("mark"); for (var i=0; i< spans.length; i++){ spans[i].outerHTML = spans[i].innerHTML; } var re = new RegExp(keyword, "gi"); var replaceText = "<mark od ='markMe'>$&</mark>"; var currentBook = display.innerHTML; newContent = currentBook.replace(re, replaceText); display.innerHTML = newContent; var count = document.querySelectorAll("mark"); document.getElementById("searchstat").innerHTML = "found " + count.length + " occurences"; if (count > 0){ var element = document.getElementById("markMe"); element.scrollIntoView; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function outSearchResult(){\n highlightShip(oldMmsi);\n jumpto(oldCoordinates);\n}", "function searchLoc(){\n selectedPlace = document.getElementById('place');\n deleteAllMarkers();\n searchNearLocs(map, curPos);\n }", "function searchUpdated(term) {\n setsearch(term);\n }", "function searchMap( map, lat, lng ) {\n //If there is a place to locate...\n if( $( '#city_id' ).val() ) {\n //Set the new location\n map.setView( new L.LatLng( lat, lng ), zoomSearch, { animation: true } );\n enableControls( map );\n } \n }", "function resetSearch() {\n addressinfowindow.close();\n marker.setVisible(false);\n walkCircle.setMap(null);\n\n map.setCenter({ lat: 44.478081, lng: -73.215 });\n map.setZoom(15)\n startCondition()\n }", "function userSearch(){\n var newInput = input.val();\n geocode(newInput, MAPBOX_TOKEN).then(function (result){\n lng = result[0];\n lat = result[1];\n marker.setLngLat([lng, lat]);\n map.flyTo({\n center: [lng, lat],\n essential: true,\n zoom: 9\n })\n weatherMap();\n })\n }", "function setSearchLocation(location)\n {\n request.location = location;\n map.panTo(location);\n analyzeModuleData.currentLocation.lat = location.lat();\n analyzeModuleData.currentLocation.lng = location.lng();\n showRadius(location, request.radius);\n }", "function search() {\n\t\n}", "function wildlifeCentres() {\n\n //check whether the value field is not empty\n // if it is not, proceed with the search\n if(document.getElementById(\"userQuery\").value != \"\") {\n\n // delete any existing markers\n deleteMarkers();\n query = 'Wildlife centres';\n userQuery = document.getElementById(\"userQuery\").value;\n\n //depending on what the user has typed, the title on the page will be changed\n document.querySelector(\".new-heading\").textContent = userQuery;\n\n // create a request object\n let request = {\n placeId: place.place_id,\n // location: globalPos,\n // radius: '100000',\n //again, it doesn't matter where you are, just search for the wildlife centres(query)\n // in the region user has chosen (userQuery)\n query: [ query + ' ' + userQuery ]\n };\n\n // create the service object\n const service = new google.maps.places.PlacesService(map);\n\n // perform a search based on the request object and callback\n service.textSearch(request, callback);\n\n // this is an inner callback function as referenced immediately above\n function callback(results, status) {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n for (let i = 0; i < results.length; i++){\n addMarker(results[i]);\n }\n }\n }\n\n // display all the pins on the map\n displayAllMarkers(map);\n\n //if the user puts an empty value\n } else {alert (\"Search field is empty! Put some value there.\")}\n }", "function searchWine(){\n setSearchFor();\n whatToSearch();\n watchSubmit();\n}", "function updateFilter(spot) {\n updateFilterStatus(spot);\n if (namespace.selectedMarker) {\n findNearbyPOIs(namespace.selectedMarker);\n }\n}", "function suggestFilter(msg, arg){\r\n\t\tstate = 3;\r\n\t\thasTheWord = arg;\r\n\t\topenPanel(msg);\r\n\t}", "function overSearchResult(coordinates, mmsi){\n oldMmsi = selectedMmsi;\n oldCoordinates = view.getCenter();\n highlightShip(mmsi);\n jumpto(coordinates);\n}", "function additional_search_sitter()\n\t{\n\t\t$.mobile.showPageLoadingMsg();\n\t\tvar location=$('#kgeo').val();\n\t\tif(location == \"\")\n\t\t{\n\t\t\talert('Please enter a location to search');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t $(\"#geo-of-sitter\").geocomplete('find',location);\n\t\t\t $(\"#geo-of-sitter\").trigger(\"geocode\");\n\t\t\t $.mobile.hidePageLoadingMsg();\n\t\t\t $.mobile.changePage('#recherche-kid',{transition:'turn'});\n\t\t}\n\t}", "function _triggerSearch() {\n Mediator.pub(\n CFG.CNL.DICTIONARY_SEARCH,\n (_searchIsActive ? _$search.val() : \"\")\n );\n }", "function draw_search(env, after) {\n\tenv.$template('search');\n\tenv.$output({title : 'Search'});\n\tafter();\n}", "function boxSearch() {\n var self = this.self;\n var newLocation = self.newLocation();\n /* looking for a new location */\n if (newLocation.trim().length > 0) {\n var searchedPlaces = searchBox.getPlaces();\n var places = searchedPlaces.length;\n if (places >= 1) {\n var place = searchedPlaces[0]; // take the first result\n if (!place.geometry) {\n self.customAlert(\"map searchBox's returned place contains no geometry\");\n return;\n }\n this.mapCenter = place.geometry.location;\n // create a new location based on information returned by searchBox.getPlaces()\n var location = {};\n location.name = place.formatted_address;\n location.city = place.formatted_address;\n location.mapcenter = {\n lat: place.geometry.location.lat(),\n lng: place.geometry.location.lng(),\n };\n location.selected = true;\n // set a new location and search places for nearby this location\n self.addLocation(location);\n } else {\n // self.customAlert(\"map searchBox could not locate the new location\");\n }\n self.newLocation(\"\");\n }\n }", "function mapSearch()\n {\n // reset the markers\n clearPlaces();\n\n // Create the PlaceService and send the request.\n // Handle the callback with an anonymous function.\n service = new google.maps.places.PlacesService(map);\n service.nearbySearch(request, function(results, status) {\n $('.wbf-search-form .btn .fa').addClass('hidden'); // hide loading icon\n\n // no results\n if (status == google.maps.places.PlacesServiceStatus.ZERO_RESULTS) {\n swal({title: translations.swal.no_results, text: translations.swal.no_results_msg, type: \"warning\"});\n }\n // yup there's results\n if (status == google.maps.places.PlacesServiceStatus.OK) {\n\n for (var i = 0; i < results.length; i++) {\n var place = results[i];\n addPlaceMarker(place);\n }\n addSearchMarker(request.location);\n showRadius(request.location, request.radius);\n }\n });\n }", "setIsSearch(flag){\n this.search=flag;\n }", "function doSearchWith(location) {\n state = 1;\n locations = [];\n errorMessage = '';\n searchTerm = location;\n\n $$('#search-text').val(searchTerm);\n\n doSearchByTerm();\n }", "filterLocations(query) {\n var { venues } = this.props;\n var { value } = query.target;\n var locations = [];\n venues.forEach((myLocation) => {\n if (myLocation.title.toLowerCase().indexOf(value.toLowerCase()) >= 0) {\n myLocation.marker.setVisible(true);\n locations.push(myLocation);\n } else {\n myLocation.marker.setVisible(false);\n }\n });\n this.setState({\n locations: locations,\n query: value\n });\n }", "function setSearch()\n {\n let busqueda = $j('#checkPersonalizada')\n busqueda.on('change', (e) =>\n {\n if (this.customSearch == false)\n {\n this.customSearch = true\n }\n else\n {\n this.customSearch = false\n }\n $j('#personalizada').toggleClass('invisible')\n })\n }", "function setSearchFilter(page) {\n if (tod) {\n searchFilter.innerText = page.documentInfo[0] // document title\n searchFilter.classList.remove('hidden')\n searchBoxElement.placeholder = 'Search within doc'\n }\n }", "function search(data){\n setSearch(data); \n }", "toggleSearchLayer(e) {\n\t\tlet q = this.state.query;\n\t\tconst searchLayers = this.state.query.searchLayers;\n\t\tsearchLayers[e.target.id] = !searchLayers[e.target.id];\n\n\t\t//reset certain query properties\n\t\tq.searchLayers = searchLayers;\n\t\tq.offset = 0;\n\t\tq.term = this.refs.searchTerm.value;\n\n\t\tthis.doSearch(q, true);\n\t}", "searchList () {\n this.showAlert(undefined, false); //hide alert box if shown\n this.clickClearRoute();\n if (this.searchString().indexOf('\\\\') >= 0) { //symbol \\ cannot be used in regexp\n this.showAlert(SEARCH_ERROR_TEXT + '\\\\');\n } else {\n const regex = new RegExp(this.searchString(), 'i'); //use regexp to ignore register in a search string\n const locations = this.locations();\n for (let i = 0; i < locations.length; i++) {\n let nameMatch = regex.test(locations[i].name);\n locations[i].visible(nameMatch);\n locations[i].marker.setVisible(nameMatch);\n }\n }\n }", "function updateSn(text) {\n resetSr(Cdp.search);\n\n // Clear markers and selection on map to show it's map search OR sn search\n markers.clearMarkers();\n vectors.destroyFeatures();\n precis.destroyFeatures();\n\n //filter.type = 'by_sn';\n //filter.prm = obj;\n //loadResults(search_type);\n Cdp.search.filters = new Object(); // Reset global object to remove previous filters\n Cdp.search.filters.sn = text;\n loadMyResults(Cdp.search);\n}", "onSearchLocation(query) {\n var self = this;\n this.setState({\n locations: this.locations.filter(location => {\n if (location.marker) {\n if (location.name.toLowerCase().indexOf(query.toLowerCase().trim()) >= 0) {\n location.marker.setMap(self.map);\n } else {\n location.marker.setMap(null);\n }\n }\n return location.name.toLowerCase().indexOf(query.toLowerCase().trim()) >= 0;\n })\n })\n }", "function opensearch(){\n\tsummer.openWin({\n\t\tid : \"search\",\n\t\turl : \"comps/summer-component-contacts/www/html/search.html\"\n\t});\n}", "function enableWildlifeSearch() {\n /**\n * Enable all form elements in the wildlife search except for the\n * \"Found Address\" field\n */\n $(\".wildlife-form *:disabled\").not(\"#found-address\")\n .removeAttr(\"disabled\");\n\n /**\n * Add the \"checked\" class to all custom checkboxes that are\n * overlaying checked checkboxes\n */\n const customCheckboxes = $(\".custom-checkbox\");\n for(const customCheckbox of customCheckboxes) {\n const checkedRealCheckbox = $(customCheckbox)\n .siblings('input[type=\"checkbox\"]:checked');\n if (checkedRealCheckbox.length > 0) {\n $(customCheckbox).addClass(\"checked\");\n }\n }\n\n /**\n * Remove the \"disabled\" class from the custom checkboxes for the\n * wildlife types\n */\n $(\".custom-checkbox\").removeClass(\"disabled\");\n \n console.log(\"Wildlife search enabled\");\n }", "function search(term) {\n clear();\n app.model.term = term;\n $.get(\"/search/\" + term, function (d) {\n if (d.nodes.length === 0) {\n app.showMessage(\"Nothing found\");\n return;\n }\n var nodes = d.nodes;\n var links = d.links;\n var mapper = {};\n for (var i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n var node = addNode(n.name);\n mapper[n.id] = node;\n }\n for (var i = 0; i < links.length; i++) {\n var n = links[i];\n if (i === 0) {\n setStyle(mapper[n.from], \"Orange\");\n app.graph.setBounds(mapper[n.from], new yfiles.geometry.RectD(10, 0, 100, 80));\n }\n var edge = connectNodes(mapper[n.from], mapper[n.to], n.label);\n }\n if(app.preferredLayout==\"organic\")\n organicLayout();\n else\n hierarchyLayout();\n //app.dynamics.go();\n });\n }", "set materialSearch(value) {}", "filterMarkers(event) {\n this.props.closeInfoWindow();\n const {value} = event.target;\n var locations = [];\n this.props.markers.forEach(function(location) {\n if (location.longname.toLowerCase().indexOf(value.toLowerCase()) >= 0) {\n location.marker.setVisible(true);\n locations.push(location);\n } else {\n location.marker.setVisible(false);\n }\n });\n this.setState({\n markers: locations,\n query: value\n });\n }", "function searchPOI() {\n search = {\n bounds: map.getBounds(),\n types: [document.getElementById('poi').value]\n };\n searchNearby();\n}", "function showAllGSighting(){\n showAllObjectMarker(SIGHTING);\n }", "function whatToSearch(){\n $(`.js-search`).on('click',function(){\n //will eventually ask to allow for location\n // make an if statement to set a global variable to winerie or taste room depending on which button was pressed.\n $(`.js-where`).removeClass('hidden')\n\n })\n}", "function findWords(){\n if(options.isOn == false){\n options.isOn = true;\n options.timer.check(\"Traverse Grid\");\n result = traverseGrid();\n options.isOn = false;\n loading.stop();\n options.timer.check(\"Display Results\");\n displayResults(result);\n options.timer.stop()\n displayTime();\n }\n }", "function performSearch() {\n giphiesPage.searchInput().type('drake');\n giphiesPage.searchButton().click();\n\n firstGiph = giphiesPage.allGiphies().first();\n }", "function doSearch(searchFor) {\r\n\t\t\tvar boundary = _gMap.getBounds();\r\n\r\n\t\t\t// reset the result page count (as we're starting afresh with a new search)\r\n\t\t\t_pageNum = 0;\r\n\t\t\tclearMarkers();\r\n\r\n\t\t\tvar request = {\r\n\t\t\t\tquery: searchFor,\r\n\t\t\t\t// limit to search to boundary of the map screen\r\n\t\t\t\tbounds: boundary\r\n\t\t\t};\r\n\t\t\t_placesApi.textSearch(request, gmPlaceSelected);\r\n\r\n\t\t\t// ensure the search box reflects what's been search for\r\n\t\t\t_searchBox.val(searchFor);\r\n\r\n\t\t} // doSearch", "function search() {\n // get the value of the search input field\n var searchString = $('#search').val().toLowerCase();\n\n markerLayer1.setFilter(showType);\n\n // here we're simply comparing the 'name' property of each marker\n // to the search string, seeing whether the former contains the latter.\n function showType(feature) {\n return feature.properties.name\n .toLowerCase()\n .indexOf(searchString) !== -1;\n }\n}", "function search() {\n\tclearEventSpecificInfo();\n\t// Fetch address from the set location box.\n\t// If default or blank, use the home address.\n\tvar address = $('#set_location_box').val();\n\tif (address == 'Address, City, State or Zip' || address == '') {\n\t\taddress = currentAddress;\n\t}\n\tif (geocoder) {\n geocoder.geocode (\n \t{'address': address},\n \tfunction(results, status) {\n \tif (status == google.maps.GeocoderStatus.OK) {\n\t\t\t\t\tvar location = results[0].geometry.location;\n\t\t\t\t\tstoreMyLocation(location.lat(), location.lng());\n\t\t\t\t\tinitChores();\n \t}\n }\n );\n\t}\n}", "function searchForText() {\n\n var searchText = dijit.byId(\"wordSearchTB\").get('value');\n var searchValue = searchText.toUpperCase();\n\n // remove any previously plotted GIS layers\n var layersOnMap = map.layerIds.length;\n if (layersOnMap > 1) {\n map.removeAllLayers();\n map.addLayer(basemap);\n map.addLayer(basemapReference);\n map.addLayer(hoverTextLayer);\n map.addLayer(highlightLayer);\n map.addLayer(dataLayer);\n map.addLayer(listHighlightLayer);\n }\n if (hoverTextLayer != undefined) hoverTextLayer.clear();\n if (listHighlightLayer != undefined) listHighlightLayer.clear();\n if (highlightLayer != undefined) highlightLayer.clear();\n\n dataLayer.clear();\n map.infoWindow.hide();\n \n csvStore.fetch({\n onComplete: function(items, request) {\n //alert(items.length);\n dojo.forEach(items, function(item, index) {\n var foundIt = false;\n var year = csvStore.getValue(item, \"Year\");\n var cruise = csvStore.getValue(item, \"Cruise\");\n var latitude = csvStore.getValue(item, \"Latitude\");\n var longitude = csvStore.getValue(item, \"Longitude\");\n var summary = csvStore.getValue(item, \"Summary\");\n var id = csvStore.getIdentity(item);\n if (latitude != undefined && longitude != undefined) {\n if (summary != undefined) {\n var summaryText = summary.toUpperCase();\n if (summaryText.indexOf(searchValue) != -1) foundIt = true;\n }\n if (cruise != undefined) {\n var cruiseText = cruise.toUpperCase();\n if (cruiseText.indexOf(searchValue) != -1) foundIt = true;\n }\n if (foundIt) {\n createMarker(id, year, cruise, latitude, longitude);\n }\n }\n });\n initializeCruiseListing();\n dojo.connect(dataLayer, \"onClick\", onFeatureClick);\n var cruiseTotals = dijit.byId(\"wordCounter\");\n cruiseTotals.attr(\"value\", dataLayer.graphics.length + \" Cruises Displayed\");\n },\n onError: function(error) {\n dojo.byId(\"itemsList\").innerHTML = \"Unable to search the data.\";\n }\n });\n\n map.setExtent(startExtent);\n\n }", "function search() {\n var search = {\n bounds: map.getBounds(),\n types: ['lodging']\n };\n\n places.nearbySearch(search, function(results, status) {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n clearMarkers();\n // Create a marker for each hotel found, and\n // assign a letter of the alphabetic to each marker icon.\n for (var i = 0; i < results.length; i++) {\n var markerLetter = String.fromCharCode('A'.charCodeAt(0) + i);\n var markerIcon = MARKER_PATH + markerLetter + '.png';\n // Use marker animation to drop the icons incrementally on the map.\n markers[i] = new google.maps.Marker({\n position: results[i].geometry.location,\n animation: google.maps.Animation.DROP,\n icon: markerIcon\n });\n // If the user clicks a hotel marker, show the details of that hotel\n // in an info window.\n markers[i].placeResult = results[i];\n google.maps.event.addListener(markers[i], 'click', showInfoWindow);\n setTimeout(dropMarker(i), i * 100);\n //addResult(results[i], i);\n }\n }\n });\n}", "function searchNow(){\n\tvar inputstring = \"San Diego\";\n\tif ($(\"#searchbox\").val() != \"\"){\n\t\tinputstring = $(\"#searchbox\").val();\n\t}\n\tsearched = true;\n\tvar geocoderequest = new google.maps.Geocoder();\n\tvar geocoderesult;\n\tvar geocodestatus;\n\tgeocoderequest.geocode({address: inputstring}, function(geocoderesult, geocodestatus){\n\t\tif (geocodestatus == \"OK\"){\n\t\t\t$.each(geocoderesult, function(index, value){\n\t\t\t\tthisx = this;\n\t\t\t\tif(index == 0){\n\t\t\t\t\tmap.fitBounds(value.geometry.viewport);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t})\n\t\t}\n\t\telse if (geocodestatus == \"ZERO_RESULTS\"){\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$(\"#info\").html(\"Error, try again later\");\n\t\t}\n\t});\n}", "function searchNow(){\n\tvar inputstring = \"San Diego\";\n\tif ($(\"#searchbox\").val() != \"\"){\n\t\tinputstring = $(\"#searchbox\").val();\n\t}\n\tsearched = true;\n\tvar geocoderequest = new google.maps.Geocoder();\n\tvar geocoderesult;\n\tvar geocodestatus;\n\tgeocoderequest.geocode({address: inputstring}, function(geocoderesult, geocodestatus){\n\t\tif (geocodestatus == \"OK\"){\n\t\t\t$.each(geocoderesult, function(index, value){\n\t\t\t\tthisx = this;\n\t\t\t\tif(index == 0){\n\t\t\t\t\tmap.fitBounds(value.geometry.viewport);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t})\n\t\t}\n\t\telse if (geocodestatus == \"ZERO_RESULTS\"){\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$(\"#info\").html(\"Error, try again later\");\n\t\t}\n\t});\n}", "function highlightLocationOnMap() {\n //get current location id\n var attrLocationId = this.getAttribute('data-location-id');\n\n //if location is hided on map\n if (this.textContent == 'location_off') {\n //show location on map\n document.getElementById('label-for-checkbox-location' + attrLocationId).click();\n }\n\n //set scope to location on map\n //@TODO: add focusing and highlighting location on map\n}", "function searchGus(location) {\r\n hideListings();\r\n var service = new google.maps.places.PlacesService(map);\r\n service.nearbySearch({\r\n location: location,\r\n radius: radius,\r\n type: ['gas_station']\r\n }, callback);\r\n}", "function changeLocalSearch(){\n gridManager.setLocalSearch($scope.data.localSearch);\n}", "function updateFilteredSearch(){\n \n if(typeof searchPnt != \"undefined\")\n findProviders(providerFS, searchPnt)\n }", "function textSearchPlaces() {\n var bounds = map.getBounds();\n hideMarkers(placeMarkers);\n var placesService = new google.maps.places.PlacesService(map);\n placesService.nearbySearch({\n location: map.center,\n radius: 30000,\n type: [\"museum\"]\n }, function(results, status) {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n createMarkersForPlaces(results);\n locations = results;\n ko.applyBindings(new ViewModel());\n }\n });\n}", "function nearByPlaces() {\n var bounds = map.getBounds();\n hideMarkers(markers);\n\n var placesService = new google.maps.places.PlacesService(map);\n placesService.textSearch({\n query: document.getElementById(\"schAdd\").value,\n bounds: bounds\n }, function(results, status) {\n if(status === google.maps.places.PlacesServiceStatus.OK) {\n showMarkers(results);\n }\n });\n }", "function setSearch(ary) {\n subreddits = getNodeList(ary)\n subs_suggestions = new Bloodhound({\n datumTokenizer: Bloodhound.tokenizers.whitespace,\n queryTokenizer: Bloodhound.tokenizers.whitespace,\n local: subreddits\n });\n\n // Initializing the typeahead\n $('.typeahead').typeahead({\n hint: true,\n highlight: true, /* Enable substring highlighting */\n minLength: 2, /* Specify minimum characters required for showing result */\n // limit: 4\n },\n {\n name: 'subs',\n source: subs_suggestions\n });\n $('.typeahead').bind('typeahead:select', function (ev, suggestion) {\n console.log('Selection: ' + suggestion);\n highlightSearchNodes([suggestion]);\n });\n // d3.select('#search-input').on('change', function () {\n // highlightSearchNodes([suggestion]);\n\n // if (search_timeout){\n // setTimeout(highlightSearchNodes, 1000, [suggestion])\n // }\n // })\n\n}", "function goWiki(term) {\n counter = counter + 1;\n //Check if Adolf Hitler\n if (term == 'Adolf Hitler') {\n console.log('Found Hitler')\n console.log('In', counter, 'Random Searches');\n } else {\n let url = searchUrl + term;\n loadJSON(url, gotSearch, 'jsonp');\n }\n}", "function searchWeather(city) {\n fetchWeather(city);\n addNewCity(city);\n}", "function searchVenue(){\n\t\t$(\"#query\").click(function(){\n\t\t\t$(this).val(\"\");\n\t\t});\n\n\t\t$(\"#query\").blur(function(){\n\t\t\tif ($(this).val() == \"\") {\n\t\t\t\t$(this).val(\"Example: Ninja Japanese Restaurant\");\n\t\t\t}\n\t\t\n\t\t\tif ($(this).val() != \"Example: Ninja Japanese Restaurant\") {\n\t\t\t\t$(this).addClass(\"focus\");\n\t\t\t} else {\n\t\t\t\t$(this).removeClass(\"focus\");\n\t\t\t}\n\t\t});\n\n\t\t//Submit search query and call to getVenues\n\t\t$(\"#searchform\").submit(function(event){\n\t\t\tevent.preventDefault();\n\t\t\tif (!lat) {\n\t\t\t\tnavigator.geolocation.getCurrentPosition(getLocation);\n\t\t\t} else {\n\t\t\t\tgetVenues();\n\t\t\t}\t\t\n\t\t});\n\n\t}", "function updateForSearchVisible() {\n /* Prevent accidental scrolling of the body, prevent page layout jumps */\n let scrolledBodyWidth = document.body.offsetWidth;\n document.body.style.overflow = 'hidden';\n document.body.style.paddingRight = (document.body.offsetWidth - scrolledBodyWidth) + 'px';\n\n document.getElementById('search-input').value = '';\n document.getElementById('search-input').focus();\n document.getElementById('search-results').style.display = 'none';\n document.getElementById('search-notfound').style.display = 'none';\n document.getElementById('search-help').style.display = 'block';\n}", "function show_this_location(lat,lang)\n{\n \n $('#map-canvas').data('type', 3);\n clearMarkers();\n var my_latlang=new google.maps.LatLng(lat,lang);\n // document.getElementById('searchbytext').style.display=\"none\";\n moveMarker(\"\",my_latlang);\n map.setCenter(my_latlang);\n \n \n}", "function setMapOnAll(map) {\r\n for (var i = 0; i < searchMarkers.length; i++) {\r\n searchMarkers[i].setMap(map);\r\n }\r\n }", "search(term) {\r\n this.searchTerms.next(term);\r\n }", "function toggleCitySearch(){\n\tplaceArray([]);\n\tmap.setCenter(new google.maps.LatLng(37.1, -95.7));\n\tmap.setZoom(3);\n\t$('.csearch').toggleClass('hidden');\n\t$('.csearch input').val(\" \").focus();\n\tinfowindow.close();\n\tif (screen.width < 600) {\n\t\ttoggleMenu();\n\t}\n}", "function searchMarkerRegion() {\n\t\t\tconsole.log(\"searchMarkerRegion()\");\n\n if (vm.markerRegionSearch == null) {\n addMarkerRegion();\n }\n\n\t\t\tif (\n vm.apiDomain.alleleKey == \"\"\n || vm.markerRegionSearch.chromosome == \"\"\n || vm.markerRegionSearch.chromosome == null\n || vm.markerRegionSearch.startCoordinate == \"\"\n || vm.markerRegionSearch.startCoordinate == null\n || vm.markerRegionSearch.endCoordinate == \"\"\n || vm.markerRegionSearch.endCoordinate == null\n || vm.markerRegionSearch.relationshipTermKey == \"\"\n || vm.markerRegionSearch.relationshipTermKey == null\n ) {\n alert(\"Search Marker Count Required Fields:\\n\\nAllele\\nChr\\nStart Coordinate\\nEnd Coordinate\\nRelationship Type\");\n\t\t\t\tdocument.getElementById(\"startCoordinate\").focus();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar params = {};\n\t\t\tparams.chromosome = vm.markerRegionSearch.chromosome;\n\t\t\tparams.startCoordinate = vm.markerRegionSearch.startCoordinate;\n\t\t\tparams.endCoordinate = vm.markerRegionSearch.endCoordinate;\n\t\t\tparams.alleleKey = vm.apiDomain.alleleKey;\n\t\t\tparams.relationshipTermKey = vm.markerRegionSearch.relationshipTermKey;\n \n\t\t\tpageScope.loadingStart();\n\n\t\t\tAlleleFearGetMarkerByRegionAPI.search(params, function(data) {\n\t\t\t\tif (data.length == 0) {\n vm.markerRegionSearch.markerCount = 0;\n\t\t\t\t\talert(\"No Markers Available for this Allele:\\n\\n\" + \n vm.markerRegionSearch.chromosome + \n \"\\n\" + vm.markerRegionSearch.startCoordinate + \n \"\\n\" + vm.markerRegionSearch.endCoordinate);\n\t\t\t\t\tdocument.getElementById(\"startCoordinate\").focus();\n\t\t\t pageScope.loadingEnd();\n\t\t\t\t} else {\n vm.markerRegion = data;\n vm.markerRegionSearch.markerCount = data.length;\n\t\t\t pageScope.loadingEnd();\n }\n\t\t\t}, function(err) {\n\t\t\t\tpageScope.handleError(vm, \"API ERROR: GetMarkerByRegionAPI.search\");\n\t\t\t pageScope.loadingEnd();\n\t\t\t\tdocument.getElementById(\"startCoordinate\").focus();\n\t\t\t});\n\t\t}", "function searchTerm(){\n \n }", "search(term) {\n this.searchTerms.next(term);\n }", "function performSearch(){\n\n\t//The request for the Search\n\tvar request = {\n\t\tbounds: map.getBounds(),\n\t\ttypes: [\"gas_station\"],\n\t\tkeyword: 'Gas Station'\n\t};\n\n\t//Searching in the Map\n\tservice.radarSearch(request, callback);\n}", "function search_phase() {\n game_phase = SEARCHING;\n\n // Start of timer for search time\n begin = new Date();\n\n // Start circle becomes visible, target, cursor invisible\n d3.select('#start').attr('display', 'block').attr('fill', 'none');\n d3.select('#target').attr('display', 'none').attr('fill', target_color);\n d3.select('#cursor').attr('display', 'none');\n // d3.select('#search_ring').attr('display', 'block').attr('r', r);\n d3.select('#message-line-1').attr('display', 'none');\n d3.select('#message-line-2').attr('display', 'none');\n d3.select('#message-line-3').attr('display', 'none');\n d3.select('#message-line-4').attr('display', 'none');\n d3.select('#too_slow_message').attr('display', 'none');\n d3.select('#trialcount').attr('display', 'block');\n }", "function searchLodging() {\n if (document.getElementById('locationSearch').value !== \"\") {\n search = {\n bounds: map.getBounds(),\n types: ['lodging']\n };\n searchNearby();\n }\n else {\n alert('Please type a location!');\n }\n}", "function onSearch() {\n var wasActive = !!activeSearch\n activeSearch = searchBox.value\n if (!wasActive) {\n viewer.addFilter(searchFilter)\n }\n clearOption.style.visibility = \"visible\"\n onSearchBlur()\n viewer.filter()\n refreshFilterPane()\n }", "function search() {\t\t\t\t\n\t\t\tconsole.log(vm.apiDomain);\n\t\t\n\t\t\tpageScope.loadingStart();\n\t\t\t\n\t\t\tAlleleFearSearchAPI.search(vm.apiDomain, function(data) {\n\t\t\t\tvm.results = data;\n\t\t\t\tvm.selectedIndex = 0;\n\t\t\t\tif (vm.results.length > 0) {\n\t\t\t\t\tloadObject();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tclear();\n\t\t\t\t pageScope.loadingEnd();\n\t\t\t\t}\n\t\t\t\tsetFocus();\n\t\t\t}, function(err) {\n\t\t\t\tpageScope.handleError(vm, \"API ERROR: AlleleFearSearchAPI.search\");\n\t\t\t\tpageScope.loadingEnd();\n\t\t\t\tsetFocus();\n\t\t\t});\n\t\t}", "function updateAdanvceSearch(){\n if(typeof searchPnt != \"undefined\"){\n whereClause = searchFilters.buildWhereClause();\n findOptimalSearchRadius(providerFS,searchPnt,whereClause)\n }\n }", "function searchNames() {\r\n\r\n Word.run(function (context) {\r\n\r\n // Mettez en file d'attente une commande pour obtenir la selection actuelle, puis\r\n // creez un objet de plage proxy avec les resultats.\r\n var body = context.document.body;\r\n context.load(body, 'text');\r\n\r\n // Empties the politicians already found since we \"relaunch\" the search.\r\n alreadyFoundPoliticians = {};\r\n\r\n $('#politicians').empty(); // Empties all the content of the panel.\r\n\r\n return context.sync().then(function () {\r\n\r\n var wholeText = body.text; // Get the whole text of the body as a String\r\n\r\n // Launch the search\r\n inspectText(wholeText, context);\r\n\r\n }).then(context.sync);\r\n })\r\n .catch(errorHandler);\r\n\r\n }", "function filter(type) {\n // to delete the current markers on the map witout loading the map again\n clearMarkers();\n\n var request = {\n location: loc,\n radius: 1500,\n type: type\n };\n\n service.nearbySearch(request, callbackFilter); // A Nearby Search lets you search for places within a specified area by keyword or type\n} //end filter", "function search() {\n if (_.isEmpty($scope.user.name)) {\n return;\n }\n\n $scope.step1lock = true;\n $scope.loadingText = 'Searching for Summoner...';\n\n $('.step-1').fadeOut(1000,function(){\n $('.loader').fadeIn(1000, function() {\n $('.loader').fadeOut(1000, function() {\n $('.step-2').fadeIn(1000, function() {\n $(window).resize();\n $('#highchart').highcharts().reflow();\n });\n });\n });\n });\n }", "function initSearch() {\r\n\tconsole.log(\"searchReady\");\r\n}", "function refresh() {\n let toEntities = $scope.entities;\n let toForm = $scope.search.form;\n $scope.results = SearchService.filter(SearchService.search(toEntities, toForm), $scope.search.filters);\n setMarkers();\n }", "function performSearch() {\n // reset the scroll in case they scrolled down to read prior results\n window.scrollTo(0, 0)\n\n fetchSearch(\n // Ensures event properties include \"type\": \"gene\" in search logging.\n 'gene', {\n page: searchParams.page,\n genes: searchParams.genes,\n preset: searchParams.preset\n }).then(results => {\n setSearchState({\n params: searchParams,\n isError: false,\n isLoading: false,\n isLoaded: true,\n results,\n updateSearch\n })\n }).catch(error => {\n setSearchState({\n params: searchParams,\n isError: true,\n isLoading: false,\n isLoaded: true,\n results: error,\n updateSearch\n })\n })\n }", "function doSearchByTerm(location) {\n app.showPreloader();\n\n ps.searchByTerm(searchTerm, searchByTermSuccess, searchByTermError);\n\n function searchByTermSuccess(data) {\n processResponse(data);\n }\n\n function searchByTermError(data) {\n showErrorState({message: 'Other error'});\n }\n }", "get isSearching() {\n return this._isSearching;\n }", "function earthnc_search(){\n // close_menus();\n\n show(\"search_dsp\");\n\n hide(\"link_search_open\");\n show(\"link_search_close\");\n\n}", "function search(){\n var searchInputValue = searchInput.value;\n var uppercaseValue = searchInputValue.toUpperCase();\n if (uppercaseValue == 'QUEENSTOWN' ||\n uppercaseValue == 'WANAKA' ||\n uppercaseValue == 'CADRONA' ||\n uppercaseValue == 'REMARKABLES' ||\n uppercaseValue == 'THE REMARKABLES' ||\n uppercaseValue == 'THE REMARKS' ||\n uppercaseValue == 'CORONET PEAK' ){\n loadThumbnails(locations.queenstown);\n initMap(168.697751, 45.026377);\n } else if (uppercaseValue == 'CHRISTCHURCH'||\n uppercaseValue == 'CANTERBURY'||\n uppercaseValue == 'MT HUTT' ||\n uppercaseValue == 'MOUNT HUTT' ||\n uppercaseValue == 'TEMPLE BASIN' ||\n uppercaseValue == 'ARTHUR\\'S PASS' ||\n uppercaseValue == 'CHEESEMAN' ||\n uppercaseValue == 'PORTERS' ||\n uppercaseValue == 'MT OLYMPUS' ||\n uppercaseValue == 'MOUNT OLYMPUS' ||\n uppercaseValue == 'BROKEN RIVER'){\n loadThumbnails(locations.christchurch);\n initMap(172.493273, 43.538478);\n } else if (uppercaseValue == 'WHAKAPAPA' ||\n uppercaseValue == 'RUAPEHU' ||\n uppercaseValue == 'MOUNT RUAPEHU' ||\n uppercaseValue == 'MT RUAPEHU' ||\n uppercaseValue == 'TONGARIRO' ||\n uppercaseValue == 'OHAKUNE' ||\n uppercaseValue == 'NATIONAL PARK' ||\n uppercaseValue == 'TUROA'){\n loadThumbnails(locations.whakapapa);\n initMap(175.549994, 39.231289);\n } else {\n thumbnailsBox.innerHTML = '<span class=\"no-results\">No location matched your search, please check your spelling and try again. Hint: Try searching by field name or nearest town, Eg. Queenstown.</span>';\n }\n }", "queryChanged(newValue){\n let searchedItems = _.filter(this.items, i => {\n return i.text.toLowerCase().indexOf(newValue.toLowerCase()) != -1 ||\n i.fullText.toLowerCase().indexOf(newValue.toLowerCase()) != -1;\n });\n\n console.log(searchedItems);\n this.fetchMarkers(searchedItems, self.map);\n }", "function handleSearch() {\n triggerSearch({}); // need empty braces here\n }", "setSearchState (newSearchState) {\n const newState = this.prependInputName (newSearchState, 'search');\n this.highlightMatches (newState.searchContent);\n this.setState (extend (newState, this.graphState()));\n }", "function setSearchResult(vm, args) {\n const { $store } = vm;\n $store.dispatch('common/session', {\n //存搜索条件\n key: 'searchCriteria',\n val: args,\n action: {\n isCopy: true,\n isSession: true\n }\n });\n}", "function search(location)\n{\n if (location===\"stasisChamber\")\n {\n advanceTalkCounter=500;\n advanceTalk();\n\t\n } \n if (location===\"embarkationRoom\")\n {\n if(medicine===true)\n\t{\n\t advanceTalkCounter=650;\n advanceTalk();\n\t}\n\telse\n\t{\n\t buttonStart_EmbarkationRoom.style.display='none'\n advanceTalkCounter=514;\n advanceTalk();\n\t medicine=true;\n\t buttonSearch_EmbarkationRoom.style.display='block'\n\t}\n }\n if (location===\"controlRoom\")\n {\n\tbuttonStart_ControlRoom.style.display='none'\n\tadvanceTalkCounter=502;\n advanceTalk();\n buttonSearch_ControlRoom.style.display='block'\n }\n if (location===\"dakaraVillage\")\n {\n\tif(goldChest===true)\n\t{\n\t advanceTalkCounter=650;\n advanceTalk();\n\t}\n\telse\n\t{\n\t buttonStart_DakaraVillage.style.display='none'\n\t advanceTalkCounter=652;\n advanceTalk();\n buttonSearch_DakaraVillage.style.display='block'\n\t goldChest=true;\n\t}\n }\n if (location===\"dakaraTemple\")\n {\n advanceTalkCounter=500;\n advanceTalk();\n\t\n }\n if (location===\"dakaraRuins\")\n {\n\tif(goldChest2===true)\n\t{\n\t advanceTalkCounter=650;\n advanceTalk();\n\t}\n\telse\n\t{\n\t buttonStart_DakaraRuins.style.display='none'\n\t advanceTalkCounter=652;\n advanceTalk();\n buttonSearch_DakaraRuins.style.display='block'\n\t goldChest2=true;\n\t}\n }\n if (location===\"orillaCity\")\n {\n advanceTalkCounter=500;\n advanceTalk();\n\t\n }\n if (location===\"orillaCouncil\")\n {\n advanceTalkCounter=500;\n advanceTalk();\n\t\n }\n if (location===\"orillaShipyard\")\n {\n advanceTalkCounter=500;\n advanceTalk();\n\t\n }\n\nif (location===\"abydosCity\")\n {\n\tif(airFilter===true)\n\t{\n\t advanceTalkCounter=650;\n advanceTalk();\n\t}\n\telse\n\t{\n\t buttonStart_AbydosCity.style.display='none'\n\t advanceTalkCounter=852;\n advanceTalk();\n buttonSearch_AbydosCity.style.display='block'\n\t airFilter=true;\n\t}\n }\n if (location===\"abydosPyramid\")\n {\n advanceTalkCounter=500;\n advanceTalk();\n\t\n }\n if (location===\"abydosRelic\")\n {\n\tif(artifact===true)\n\t{\n\t advanceTalkCounter=650;\n advanceTalk();\n\t}\n\telse\n\t{\n\t buttonStart_AbydosRelic.style.display='none'\n\t advanceTalkCounter=854;\n advanceTalk();\n buttonSearch_AbydosRelic.style.display='block'\n\t artifact=true;\n\t}\n } \n \n}", "function doNearbySearch(service, map){\n //filters results based on whether the user checked opennow or did not check it.\n service.nearbySearch(\n {\n location: map.getCenter(),\n radius: rad,\n type: \"restaurant\",\n openNow: document.getElementById(\"getOpenNow\").checked,\n minPriceLevel: minPriceLvl, \n maxPriceLevel: maxPriceLvl\n },//specific parameters of the search\n (results, status, pagination) => {\n if (status !== \"OK\") { \n document.getElementById(\"result-restaurant\").style.visibility = 'visible';\n document.getElementById(\"places\").innerHTML = \"Oops! You're too picky, please try another search (choose another location, widen the radius, or change your filters)!\";\n document.getElementById(\"title\").innerHTML = \"\";\n document.getElementById(\"icon\").innerHTML = \"\";\n document.getElementById(\"address\").innerHTML = \"\";\n document.getElementById(\"phone\").innerHTML = \"\";\n document.getElementById(\"website\").innerHTML = \"\";\n document.getElementById(\"rating\").innerHTML = \"\";\n };\n createMarkers(results, map);\n }\n );//nearbySearch\n\n removeAllElements();\n}", "function manualsearch() {\n localStorage.removeItem('get_gpslocation');\n loadallbranches_tolocalDB();\n}", "startSearching() {\n // Initializing the pre search data so that the data can be recovered when search is finished\n this._preSearchData = this.crudStore.getData();\n }", "search (query) {\n\t\t// Store lat/lng of locality to use in this url (focus.point.lat, focus.point.lon)\n \t\t//const endpoint = `https://search.mapzen.com/v1/autocomplete?text=${query}&api_key=${this.props.config.mapzen.apiKey}&focus.point.lat=${this.props.coordinates[0]}&focus.point.lon=${this.props.coordinates[1]}&layers=venue`\n \t\tconst placetype = this.state.placetype\n \t\tconst endpoint = `https://whosonfirst-api.mapzen.com/?method=whosonfirst.places.search&api_key=${this.props.config.mapzen.apiKey}&q=${query}&${placetype}=${this.props.source.id}&placetype=venue&per_page=100&extras=geom:latitude,geom:longitude,sg:,addr:full,wof:tags`\n \t\tthis.throttleMakeRequest(endpoint)\n\t}", "function updateSearchCreteria(searchCriteria) {\n if (searchCriteria == \"byname\") {\n STATE.searchOption = 1;\n } else if (searchCriteria == \"cuisine\") {\n STATE.searchOption = 2;\n } else if (searchCriteria == \"random\") {\n STATE.searchOption = 3;\n } else if (searchCriteria == \"roulette\") {\n STATE.searchOption = 4;\n }\n}", "function query(term) {\n $(\"#SearchBox\").val(term);\n search(term);\n $.pageslide.close();\n }", "function examine(word) {\n let lookAt = itemLookUp[word]\n if (player.location.inv.includes(word)) {\n console.log(lookAt.desc)\n }\n}", "function getGroceries() {\n document.getElementById(\"places-list\").innerHTML = \"\";\n searchWord = \"supermarket\";\n initMap()\n}", "function setQuery() {\n getSearch(search.value);\n}", "startSearch() {\n if (!this._isEnabled) {\n return;\n }\n this.showLoading();\n }", "function doubleSearch () {}", "updateQuery(query){\n this.props.closeInfoWindow();\n\n this.setState({\n query:query\n });\n var filteredPlaces=[];\n var places=Data.places;\n\n places.forEach(function(location) {\n if (location.name.toLowerCase().indexOf(query.toLowerCase()) >= 0)\n filteredPlaces.push(location);\n }\n );\n\n this.setState({\n results:filteredPlaces\n });\n\nthis.props.updateMarkers(filteredPlaces);\n }", "function doFind() {\n const minasGerais = people.results.find((person) => {\n return person.location.state === 'Minas Gerais';\n });\n}", "function setSearchFor(){\n $(`.js-wineries`).on('click',function(){\n STATE.searchFor = 'Wineries';\n console.log(STATE.searchFor);\n\n });\n $(`.js-tasteRooms`).on('click',function(){\n STATE.searchFor = 'Tasting Rooms';\n console.log(STATE.searchFor);\n });\n\n}", "function setSearch() {\r\n\tconst btn=document.querySelector('#searchbtn');\r\n\tbtn.addEventListener('click', searchCraft);\r\n\tconst bar = document.querySelector('#searchbar');\r\n\tbar.addEventListener(\"keyup\", function(event) {\r\n if (event.key === \"Enter\"|event.keyCode === 13) {\r\n searchCraft(event);\r\n\t }\r\n\t});\r\n}", "function search(current){\n\n}", "get isSearching() {\n return this._searching;\n }" ]
[ "0.64316845", "0.6083975", "0.60482275", "0.60162365", "0.6009958", "0.59987974", "0.59826374", "0.5971761", "0.5852573", "0.58283406", "0.58159286", "0.5806928", "0.57990044", "0.5785072", "0.5741532", "0.57368064", "0.56941503", "0.5687996", "0.5684281", "0.5669868", "0.5656799", "0.565103", "0.564928", "0.56354684", "0.56324667", "0.56307995", "0.5623164", "0.561808", "0.56156087", "0.56149614", "0.5585018", "0.5584873", "0.5566625", "0.55650765", "0.5564863", "0.55517226", "0.55487204", "0.5537752", "0.55024725", "0.5492725", "0.549192", "0.5490279", "0.54825723", "0.54815906", "0.54815906", "0.5467895", "0.54630274", "0.5460002", "0.54559773", "0.5433879", "0.54288596", "0.5426074", "0.5425815", "0.5422685", "0.5421372", "0.5420534", "0.5413442", "0.54083115", "0.540029", "0.53999805", "0.53957987", "0.53950846", "0.5393367", "0.5393287", "0.5392533", "0.53920645", "0.5382582", "0.53735197", "0.53725314", "0.53699833", "0.53695387", "0.53687704", "0.5368706", "0.53673357", "0.5366049", "0.53583133", "0.5353213", "0.5343585", "0.53420943", "0.53390753", "0.5338333", "0.5335867", "0.53295225", "0.53294516", "0.53292924", "0.5325713", "0.5324366", "0.53242636", "0.5317787", "0.5317462", "0.53162223", "0.53145164", "0.5307205", "0.53064454", "0.5301785", "0.5301367", "0.53000426", "0.52983654", "0.5296496", "0.5294745", "0.5277996" ]
0.0
-1
Examples factorial(5) => 120 5 4 3 2 1 => 120 factorial(4) => 24 4 3 2 1 => 24 Bonus Use a memoize function to cache with recursion
function factorial(n) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoizedFactorial() {\n let cache = [1];\n function inner(n) {\n if (!cache[n]) {\n cache[n] = inner(n - 1) * n \n } \n return cache[n]\n }\n return inner\n }", "function factorial(n){\n //se crea una cache para almecenar los resultados\n if (!this.cache) {\n this.cache = {}\n }\n\n if(this.cache[n]){\n return this.cache[n]\n }\n\n if (n === 1) {\n return 1\n }\n\n this.cache[n] = n * factorial (n - 1)\n return this.cache[n]\n}", "function factorial(n) {\n\t\tif(!this.cache) {\n\t\t\tthis.cache = {}\n\t\t}\n\t\tif (this.cache[n]){\n\t\t\treturn this.cache[n]\n\t\t}\n\t\tif(n === 1) {\n\t\t\treturn 1\n\t\t}\n\t\tthis.cache[n] = n * factorial(n - 1)\n\t\treturn this.cache[n]\n\t}", "function factorial(n) {\n\n let fact = n\n for(let counter = 1; counter < n; counter++) {\n\n fact = multiply(fact, multiply(counter, 1))\n //The first run of code MUST make the factorial answer '20'!\n\n }\n\n return fact\n \n}", "function factorial(num){ //5\n if(num === 1) return 1; //basecase \n\n return num * factorial(num-1); //5 * 4 * 3 * 2 = 120 \n\n}", "function factorial(n) {\n if(n==0) {\n return 1;\n }\n return n * calcFactorial(n-1);\n }", "function factorial(n){\n\n\tif (n ==1){\n\t\treturn 1;\n\t}\n\n\treturn bigInt(n).multiply(factorial(n-1));\n}", "function factorial(n){\n if (n > 1) {\n return n * factorial(n-1)\n }\n return n\n\n}", "function factorial(n) {\n\tif (isFinite(n) && n > 0 && n == Math.round(n)) {\n\t\t// Finite, positive ints only\n\t\tif (!(n in factorial))\n\t\t\t// If no cached result\n\t\t\tfactorial[n] = n * factorial(n - 1); // Compute and cache it\n\t\treturn factorial[n]; // Return the cached result\n\t} else return NaN; // If input was bad\n}", "function factorial(number) { // Recibe un valor entero positivo\n if (number < 0) // Si es valor es un numero negativo entonces devuelve un -1 para hacer saber al usuario que se ingreso un valor invalido\n return -1; // retorno de valor invalido \n else if (number == 0) // Si el valor es 0, por definicion se devuelve un 1 por que 0! es 1, pero tambien sirve para la recursividad dentro de factorial\n return 1; // Devuelve el valor de 1 si es que el numero original es de 0 o si es la ultima iteracion de la funcion recursiva \n else { // Si el numero es un valor mayor a 1 se entra en la recursividad de la funcion \n return (number * factorial(number - 1)); // La recursividad funciona diciendo que el numero se multiplicara por la funcion - 1, y hasta que el numero dentro de la funcion no se vuelva 0 entonces se restara uno del valor del numero y se volver a multiplicar\n // Si el valor fuese 5, seria 5 * 5 - 1 * 5 - 1 - 1,5-1-1-1 * 5-1-1-1-1 * 0, claro que si se multiplica por 0 entonces el valor final seria 0, pero dentro del if si el valor es 0 hay un return de 1. \n // Pero el valor no sera de 1, dado que este return esta dentro de la primera iteracion de la recursividad, entonces el valor seria 5*4*3*2*1*1 = 120\n }\n}", "function factorial(n) { \n let result;\n if(n !== 1) {\n result = n * factorial(n-1);\n } else {\n result = n;\n }\n return result;\n }", "function factorial(n){\r\n\tvar multiplier = 1;\r\n\tfor(var m = 1; m <= n; m++){\r\n\t\tmultiplier *= m;\r\n\t}\r\n\treturn multiplier;\r\n}", "function factorial(n) {\n if(n === 1){return n};\n return n * factorial(n-1);\n}", "function factorial(n) {\n\tif (n === 1) {\n\t\treturn n;\n\t}\n\treturn n * factorial(n-1);\n}", "function factorial(n){\n\tlet ans=1;\n\tfor(let i=1;i<=n;i++) ans*=i;\n\treturn ans;\n}", "function factorial(n){\n if (n < 2) return 1;\n return n * factorial(n - 1);\n}", "function factorial(n){\n if(n === 1){\n return n;\n }\n return n * factorial(n-1);\n}", "function factorial(n){\n if(n === 0){\n return 1\n }\n if (n >= 1){\n return(n) * factorial(n-1);\n\t};\n}", "function factorial(n) {\n var result = n\n if (n <= 1) {\n return 1\n }\n while (n > 1) {\n n--\n result *= n\n }\n return result\n}", "function factorial(n) {\n var total = 1;\n while (n > 0) {\n total *= n;\n n--;\n }\n}", "function factorial(n){\n if (n === 0){\n \t return 1;\n }\n return (n * factorial(n-1));\n }", "function factorial(n) {\n\tif (n === 1) return 1;\n\n\treturn n * factorial(n - 1);\n}", "function factorial(n){\n if( n == 0){\n return 1;\n }\n else{\n return n * factorial(n-1);\n }\n \n}", "function factorial(n) {\n if (n===1) return 1;\n return n * factorial(n - 1);\n}", "function factorial(n) {\n if (n === 1) return 1;\n return n * factorial(n - 1);\n}", "function factorial(n) {\n if (n === 1) return 1;\n return n * factorial(n - 1);\n}", "function factorial(n) {\n if (n <= 1) {\n return 1;\n }\n return n * factorial(n-1);\n\n}", "function factorial(n) {\n if (n <= 1) {\n return 1\n }\n while (n > 1) {\n n--\n result *= n\n }\n return result\n}", "function factorial(n) {\n // base case and exit recursion\n if (n === 0) return 0\n if (n === 1) return 1\n // recurse with different inputs\n return n * factorial(n - 1)\n}", "function factorial(n) {\n if (n===0) return 1;\n else return n * factorial(n-1);\n}", "function factorial(n) {\n if (n <= 1) return 1;\n return n * factorial(n - 1);\n}", "function factorial(num){\n\tif(num == 1) return 1;\n\n\treturn num * factorial(num - 1); // pending multiplier\n}", "function factorial(n) {\n var retVal = 1;\n while (n > 1) {\n retVal *= n;\n n--;\n }\n return retVal;\n}", "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}", "function factorial(n) {\n // var n = 4;\n var result = 1;\n while(n){\n result *= n--;\n }\n return result;\n}", "function factorial(n) {\n if (n < 1) return 1;\n return n * factorial(n - 1);\n}", "function factorial(n) {\n if (n < 2) return 1;\n return n * factorial(n - 1);\n}", "function factorial(n){\n let res = 1;\n for(let i = 1; i <= n; i++){\n res = res * i;\n }\n return res;\n}", "function factorial(n){\n if(n == 0 || n == 1){\n return 1;\n } \n else{\n return n * factorial(n-1);\n }\n}", "function factorialFind(n) {\n var result = 1;\n function getFactorial(limit) {\n if (limit > n) {\n return;\n }\n result *= limit;\n console.log(limit);\n getFactorial(limit + 1);\n // console.log(limit)\n }\n getFactorial(1);\n return result;\n}", "function factorial(n){\n let inicial = n;\n for(let i=n-1;i>0;i--){\n inicial*=i;\n }\n return inicial\n}", "function factorial(number) {\n if(number <= 1) return number\n return factorial(number - 1) * number\n}", "function factorial(n){\n if(n==0){\n return 1;\n }\n else{\n return n * factorial(n-1);\n }\n}", "function factorial(n) {\n if (!n) {\n return (f[n] = 1);\n }\n return (f[n] = factorial(n - 1) * n);\n }", "function factorial(n) {\n if (n == 1) {\n return 1;\n }\n return n = n * factorial(n - 1);\n}", "function factorial(number) {\n if (number <= 1)\n return 1;\n return number * factorial(number-1);\n}", "function factorial(n){\n if(n === 0)\n return 1;\n else\n return (n* factorial(n - 1));\n}", "function factorial(n) {\n if (n === 0) {\n return 1;\n }\n return n * factorial(n-1);\n}", "function factorial(n) {\n if (n === 0) return 1;\n return n * factorial(n - 1);\n}", "function factorial(n) {\n if (n === 1) {\n return 1\n }\n return n * factorial(n - 1);\n}", "function factorial(n) {\n if (n == 1) {\n return 1;\n }\n return n * factorial(n - 1);\n}", "function factorial(n) {\n let result = 1;\n for (let i = 1; i <= n; i++) {\n result = result * i;\n }\n return result;\n}", "function factorial (n){\n\tvar result=1;\n\twhile(n>=1){\n\t\tresult = result * n--;\n\t}\n\treturn result;\n}", "function factorial(n) {\n if (n==0) {\n return 1;\n\n }\n else{\n return n* factorial (n-1);\n }\n}", "function factorial(n) {\n\n if (n == 1) {\n return 1;\n }\n\n else {\n return n * factorial(n - 1)\n }\n}", "function memoization() {\n const cache = {};\n return function (n) {\n if (n in cache) {\n return cache[n];\n } else {\n console.log(\"not cached\");\n cache[n] = n * n;\n return cache[n];\n }\n };\n}", "function factorial(n) {\n var fact = 1;\n for (var i=1; i <= n; i++) {\n\tfact = fact * i;\n }\n return fact;\n}", "function factorial(input) {\n if (input === 0){\n return 1;\n }\n return input * factorial(input-1);\n}", "function factorial(n){\n let answer = 1;\n if (n == 0 || n == 1){\n return answer;\n }else{\n for(var i = n; i >= 1; i--){\n answer = answer * i;\n }\n return answer;\n } \n }", "function getFactorial(num) {\n if (num === 1) {\n return 1\n }\n\n const currFact = num * getFactorial(num - 1)\n console.log(currFact)\n return currFact\n}", "function factorial (n) {\n if (n < 2) {\n return 1\n } else {\n return n * factorial(n-1)\n }\n}", "function factorial(number) {\n if(number==1){\n return number;\n }else{\n return factorial(number-1)*number;\n }\n}", "function factorial(n) {\n if (n < 2)\n return n\n\n return n * factorial(n - 1);\n}", "function factorial(n) {\n\tvar result =1;\n // TODO: your code here\n if( n ===0){\n return 0;\n }\n while(n>=1){\n \tresult*=n;\n n--;\n }\nreturn result;\n}", "function factorial(n, total=1) {\n if (n === 1) return total;\n return factorial(n - 1, n * total);\n}", "function factorial(n){\n if( n === 0){\n return 1;\n }else {\n return n * factorial(n-1);\n }\n}", "function factorial(n) {\n\tif (n <= 1) {\n\t\treturn 1\n\t}\n\n\treturn n * factorial(n - 1)\n}", "function factorial(n){\n return n == 0 || n == 1 ? 1 : n * factorial(n-1);\n}", "function factorial(N){\n if(N==0) return 1;\n else\n return N*factorial(N-1);\n}", "function factorial(n) {\n if (n == 0) {\n return 1;\n }\n return n * factorial(n - 1);\n}", "function factorial(n) {\n \n if (n === 0) {\n return 1;\n }else {\n return n * factorial(n-1);\n }\n }", "function factorial(n) {\n var output = 1;\n \n while (n > 1) {\n\n output *= n;\n \n n--;\n }\n \n return output;\n}", "function factorial(num){\n if(num === 1 ) return 1;\n return num * factorial(num - 1)\n}", "function factorialCount(n){\n if (n==0){\n return 1;\n }\n else{\n return n* factorialCount(n-1);\n }\n}", "function factorial(n) {\n if (n === 0) {\n return 1;\n }\n return n * factorial(n - 1);\n}", "function factorial(n) {\n //Establish base case\n if (n == 0) {\n return 1;\n } else {\n //Run recursive case\n return n * factorial(n - 1);\n }\n}", "function factorial(n){\n if (n === 0 || n === 1) {\n return 1;\n } else {\n var j = 1;\n for(i=1; i<=n; i++){\n j = j*i;\n }\n return j;\n }\n}", "function factorial(n) {\n if (n == 0) {\n return 1;\n } else {\n return n * factorial(n - 1);\n }\n}", "function factorial(n) {\n return (n != 1) ? n * factorial(n - 1) : 1;\n}", "function factorial(n) {\n if (n == 0) {\n return 1;\n } else {\n return n * factorial(n - 1);\n }\n}", "function factorial(num) { \n if(num<=0) { \n return 1; \n } else { \n return (num * factorial(num-1) );\n } \n }", "function factorial(num){\n if(num <= 1){\n return num \n } else {\n return num * factorial(num - 1);\n }\n \n}", "function factorial (n){\n var result = 1\n for (var i = n; i>=1; i--){\n result = result*i\n }\n return result\n}", "function factorial(start){\t\t\r\n\tif (start === 1){\r\n\t\treturn 1;\r\n\t}\r\n\telse{\r\n\t\treturn start * (factorial(start - 1))\r\n\t}\r\n}", "function factorial(n){\n var result =n;\n while(n>1){\n \tn-=1;\n \tresult *= n\n } \t\n}", "function factorial(number) {\n if (number == 0 || number == 1){\n return 1;\n }else{\n return factorial(number - 1) * number;\n }\n}", "function factorial(x) \n{ \n\n if (x === 0)\n {\n return 1;\n }\n return x * factorial(x-1);\n \n}", "function Factorial(n) {\n if (n == 1) {\n return 1;\n } else {\n return n * Factorial(n - 1);\n }\n}", "function nFactorial(num) {\nif (num > 1){\nreturn num * nFactorial(num - 1);\n}\nelse {\nreturn 1;\n}}", "factorial(a) {\n var fact = 1;\n\n for (var i = 1; i <= a; i++) {\n /**\n * calculate factorial of number\n */\n fact = fact * i;\n\n }\n return fact;\n\n\n }", "function factorial(num){\n let fact=1;\n for(let i=1;i<=num;i++){\n fact*=i;\n }\n return fact\n}", "function findFactorial(n) {\n if (n === 1 || n === 0) return 1;\n return n * findFactorial(n - 1);\n}", "function factorial(num) {\n if(num === 1) {\n return 1;\n }\n return num * factorial(num - 1)\n}", "function factorial(n) {\n if( n===0 || n===1 ) {\n return 1;\n } else {\n return factorial(n-1)*n;\n }\n}", "function factorial(num) {\n \n}", "function factorial(n) {\n return (n === 0) ? 1 : n * factorial(n-1);\n}", "function calculateFactorial( number ){\n\tvar output = 0;\n\tfor (var i = number; i >= 0; i--){\n\t\toutput = output + (number * (number-1))\n\t}\n\treturn output;\n}", "function factorial(num) {\r\n\tif(num===1)\r\n\t{\r\n\t\treturn 1;\r\n\t}\r\n\treturn num*factorial(num-1);\r\n}", "function factorial(x){\n if (x < 0 ) return 0;\n if (x <= 1 ) return 1;\n return x * factorial(x-1);\n}", "function factorial(n) {\n var number = 1;\n for (var i = n; i >= 1; i--) {\n number *= i;\n }\n return number;\n}" ]
[ "0.8511063", "0.8230194", "0.797256", "0.76474655", "0.75943184", "0.75881857", "0.7505791", "0.7445432", "0.744183", "0.74265575", "0.74232256", "0.7421188", "0.7414093", "0.73804563", "0.73659635", "0.7353689", "0.7347226", "0.73431563", "0.7342619", "0.7334186", "0.7333285", "0.7332764", "0.7329946", "0.73222065", "0.7307544", "0.7307544", "0.73060596", "0.73050255", "0.72962475", "0.7292473", "0.72919726", "0.7287304", "0.7286385", "0.72853875", "0.7284152", "0.72832566", "0.7282287", "0.7280685", "0.72604334", "0.7253446", "0.7248375", "0.7247671", "0.72475487", "0.72462785", "0.72400624", "0.7238681", "0.7238437", "0.72371554", "0.7230491", "0.7228871", "0.7228613", "0.7224761", "0.72241724", "0.7222272", "0.72203326", "0.7214882", "0.72109157", "0.720963", "0.72076744", "0.72033846", "0.71999466", "0.71926194", "0.7188438", "0.71877974", "0.7187383", "0.7186385", "0.7183154", "0.71827453", "0.71802807", "0.7178974", "0.7164276", "0.7163583", "0.7163267", "0.7159435", "0.71560186", "0.7150688", "0.71500397", "0.71490157", "0.7145446", "0.7145214", "0.7144473", "0.7142772", "0.7139942", "0.7138556", "0.7136618", "0.71319014", "0.71313053", "0.7129299", "0.71262556", "0.71240586", "0.7118996", "0.7116779", "0.71162343", "0.71126884", "0.71031106", "0.71024156", "0.7102338", "0.7093098", "0.70920676", "0.7088006" ]
0.73711735
14
Get random int from range
function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randInt(range) {\n return Math.floor(Math.random()* range);\n}", "function randomInt(range) {\n return Math.floor(Math.random() * range);\n }", "function getRandomInt(range) {\n return 1 + Math.floor(Math.random() * Math.floor(range));\n }", "function randomInt(range) {\n return Math.floor(Math.random() * range);\n}", "function randomInt(range) {\n return Math.floor(Math.random() * range);\n}", "function randomInt(range) {\n return Math.floor(Math.random() * range);\n}", "function randomInt(range) {\n return Math.floor(Math.random() * range);\n}", "function randomInt(range) {\n return Math.floor(Math.random() * range);\n}", "function intRandomRange(range) {\n return Math.random() * (range * 2) - range;\n }", "function randomInteger(range){\n\treturn Math.floor( (Math.random() * range) );\n}", "function randomInt(range) {\n return Math.round(Math.random() * range);\n}", "function randomNum(range) {\n random = Math.floor(Math.random() * range);\n return random;\n}", "function randomNum(range) {\n random = Math.floor(Math.random() * range);\n return random;\n}", "function getRandomNumber(range) {\n\treturn Math.floor(Math.random() * range);\n}", "function getRandom( range )\r\n{\r\n return parseInt( Math.random() * range );\r\n}", "range(max, min){\n let num = Math.round(Math.random()*(min-max)+max);\n return num;\n}", "function randomIntFromInterval(min,max)\n{return Math.floor(Math.random()*(max-min+1)+min);}", "function randomIntFromInterval(min,max){\n var min=20;\n var max=100;\nreturn Math.floor(Math.random()*(max-min+1)+min); \n}", "function random(range){\n var r = Math.random()*range;\n return r\n}", "function randRangeFromInt(low, high) // Get a random int between low and high, inclusive\n{\n return Math.floor(low + Math.random() * (high - low + 1));\n}", "getRandomIntInclusive(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n let number = Math.floor(Math.random() * (max - min + 1)) + min;\n return number;\n }", "function randInt() {\n\tvar min = arguments[0];\n\tvar max = arguments[1];\n\tvar range = max - min;\n\tvar num = min + Math.floor((range + 1) * Math.random());\n\treturn num;\n}", "function randInt(min, max) { return Math.random() * (max - min) + min; }", "function randInt(min, max) { return Math.random() * (max - min) + min; }", "function getRandomValue(range) {\n return Math.round(Math.random() * (range - 1));\n}", "function generateValue(range = 100) {\n let randomFloat = Math.random() * range;\n let randomInt = Math.floor(randomFloat);\n return randomInt;\n}", "function randomIntFromInterval(min, max) { // min and max included \n return Math.floor(Math.random() * (max - min + 1) + min);\n \n }", "function randomIntFromInterval(min, max) {\n return Math.floor(Math.random() * (Math.floor(max) - Math.ceil(min))) + min;\n }", "function intInRange(min, max) {\n return Math.floor(Math.random() * (max - min)) + min;\n}", "range(min, max) {\n\t\tlet r = Math.floor(Math.random() * max);\n\t\twhile(r < min)\n\t\t\tr = Math.floor(Math.random() * max);\n\t\treturn r;\n\t}", "function getRandomInteger(start,end) {\n return (start + Math.floor(Math.random() * (end - start + 1)));\n}", "function randomIntFromInterval(min,max) {\n return Math.floor(Math.random()*(max-min+1)+min);\n }", "function RandIntInRange(min, max) {\n\n return min + Math.floor(Math.random() * (max - min));\n\n} // end function GetRandInt(min, max)", "function randomIntFromInterval(min,max)\n{\n return Math.floor(Math.random()*(max-min+1)+min);\n}", "function randomIntFromInterval(min,max)\n{\n return Math.floor(Math.random()*(max-min+1)+min);\n}", "function iRandomRange(min,max){\n var range = max-min+1;\n var num = Math.floor(Math.random()*range)+min;\n return num;\n}", "function getRandomInt(_range) {\n var range = _range || 1000;\n var number = Math.abs(Math.sin(seed))*range*1000;\n seed++;\n return Math.round(number)%range;\n }", "getRndInteger(min, max) {\n return Math.floor(Math.random() * (max - min) ) + min;\n }", "function randomIntFromInterval(min, max) { // min and max included \n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "function randomIntFromInterval(min, max) { // min and max included \n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "function randomIntFromInterval(min, max) { // min and max included \n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "function randomIntFromInterval(min, max) { // min and max included \n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "function randomInt(min, max){\r\n\treturn Math.floor(Math.random() * (max - min) + min);\r\n} // END - random value.", "function getRndInteger(min, max) {\n return Math.floor(Math.random() * (max - min) ) + min;\n } //max is excluded", "function randomIntFromInterval(min, max) {\n \treturn Math.floor(Math.random() * (max - min + 1) + min);\n\t}", "randomIntFromInterval(min,max)\r\n {\r\n return Math.floor(Math.random()*(max-min+1)+min);\r\n }", "function randomIntFromInterval(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n }", "getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n }", "function randomIntFromInterval(min,max) {\r\n return Math.floor(Math.random()*(max-min+1)+min);\r\n}", "getRandomInteger(min, max) {\n return Math.floor(Math.random() * (max - min) ) + min;\n }", "getRandomIntInclusive (min, max) {\n min = Math.ceil(this.min);\n max = Math.floor(this.max);\n return Math.floor(Math.random() * (max-min +1)) +min;\n }", "function randomIntFromInterval(min, max) { // min and max included\n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "function getRandomIntEx(min, max) {//max not inclusive\r\n return Math.floor(Math.random() * (max - min)) + min;\r\n}", "function randomIntFromInterval(min,max) {\n\t\treturn Math.floor(Math.random()*(max-min+1)+min);\n\t}", "function randomIntFromInterval(min,max) {\n\t\treturn Math.floor(Math.random()*(max-min+1)+min);\n\t}", "getRandomInt(min, max)\n {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min)) + min;\n }", "function randint(lo, hi) { return lo + Math.floor(Math.random() * (hi - lo + 1)); }", "function getRandInt (min, max) { //Randomly generates an interger\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "function randomIntFromInterval(min, max)\n {\n return Math.floor(Math.random() * (max - min + 1) + min);\n }", "function randInt(min, max){\n return(Math.floor(Math.random() * (+max - +min)) + +min); \n }", "function getRandomInt(min,max){\n\n return Math.floor(Math.random()*(max-min+1))+min;\n}", "function rInt(min, max) {\n return Math.floor(Math.random() * (max - min)) + min;\n}", "function getRandomIntInclusive() {\n return Math.floor(Math.random() * 10) + 1;\n}", "getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min) + min); //The maximum is exclusive and the minimum is inclusive\n }", "getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "function getIntRandom(min, max) {\r\n return Math.round(Math.random() * (max - min) + min);\r\n}", "getRandomInt (min:Number = 0, max:Number) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "function randomIntfromInterval(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "function getRandomInt(fromMin, toMax) \n{\n return Math.floor(Math.random() * (toMax - fromMin + 1)) + fromMin;\n}", "function getRndInteger(min, max) {\n return Math.floor(Math.random() * (max - min)) + min;\n }", "function h_getRandomInt(min, max) \n{\n\treturn Math.floor(Math.random() * (max - min + 1)) + min;\n}", "function getRndInteger(min, max) {\n return Math.floor(Math.random() * (max - min) ) + min;\n }", "function getRandomInt(min, max) {\n min = Math.ceil(min); // Rond af op dichtsbij zijnde getal\n max = Math.floor(max); // Rond af naar beneden\n return Math.floor(Math.random() * (max - min)) + min;\n} //https://stackoverflow.com/questions/1527803/generating-random-whole-numbers-in-javascript-in-a-specific-range", "static randInt(min, max, ease) {\n if(max === undefined) {\n max = min;\n min = 0;\n }\n let random = Math.random();\n if(ease) {\n random = ease(Math.random(), 0, 1, 1);\n }\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "function randomIntFromInterval(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "function randomIntFromInterval(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "function randomIntFromInterval(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "function randomIntFromInterval(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "function randomIntFromInterval(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "function getRandomIntegerInRange(min, max){\n\t\treturn Math.floor(min + Math.random() * (max - min));\n\t}", "randomIntFromInterval(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n }", "function getRandomIntFromRange(min, max){\n let result = Math.floor(Math.random()*(max-min+1)+min);\n return result\n}", "function GetRandomNumber (range_min, range_max) {\r\n return Math.floor(Math.random() * (range_max - range_min + 1)) + range_min;\r\n }", "function randomInt(min,max){\n return Math.floor(Math.random()*(max-min+1)+min);\n }", "function getRndInteger(min, max) {\n return Math.floor(Math.random() * (max - min)) + min;\n }", "function getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min) + min); //The maximum is exclusive and the minimum is inclusive\n }", "function randomIntFromInterval(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "function randint(min, max){\r\n\treturn min + Math.floor(Math.random() * (max - min + 1));\r\n}", "function rndInt(min, max) {\n return Math.floor(Math.random() * (max - min) ) + min;\n}", "function RandomInt(max, min)\n{\n return Math.floor(Math.random() * ( max + 1 - min) + min);\n}", "function getRandomIntInclusive(min,max) {\n min = Math.ceil(min)\n max = Math.floor(max)\n return Math.floor(Math.random() * (max - min + 1)) + min\n }", "function getRandomInt(min,max){\r\n min = Math.ceil(min);\r\n max = Math.floor(max);\r\n return Math.floor(Math.random() * (max - min + 1)) + min;\r\n}", "function get_random_integer(min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1)) + min;\r\n}", "getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "function getRndInteger(min, max) {\n return Math.floor(Math.random() * (max - min + 1) ) + min;\n }", "function getRndInteger(min, max) {\n return Math.floor(Math.random() * (max - min + 1) ) + min;\n }", "function getRndInteger(min, max) {\n return Math.floor(Math.random() * (max - min + 1) ) + min;\n }", "function getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min)) + min;\n}", "function getRandomInteger(min, max){\r\n return Math.floor(( Math.random() * (max - min + 1)) + min);\r\n}", "function getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min)) + min;\n }" ]
[ "0.87585855", "0.8697117", "0.868583", "0.8677989", "0.8677334", "0.8677334", "0.8677334", "0.8677334", "0.85963154", "0.85791296", "0.85301936", "0.8410987", "0.8410987", "0.83964527", "0.83625734", "0.83249855", "0.8305281", "0.82484436", "0.8245177", "0.81926924", "0.81846267", "0.8149", "0.81408745", "0.81408745", "0.8128772", "0.8109681", "0.8064261", "0.80573726", "0.8056538", "0.80448097", "0.8033824", "0.80296975", "0.8023301", "0.802219", "0.802219", "0.8004871", "0.80018806", "0.79982", "0.7995034", "0.7995034", "0.7995034", "0.799025", "0.7979331", "0.79741424", "0.79711485", "0.79641044", "0.7961395", "0.79597604", "0.79592884", "0.7958242", "0.7956317", "0.7954476", "0.7948972", "0.7936168", "0.793505", "0.793505", "0.7933308", "0.7930501", "0.793035", "0.792858", "0.7920772", "0.79169893", "0.79157704", "0.79144835", "0.7911056", "0.7909649", "0.7908639", "0.7905384", "0.7897968", "0.78972507", "0.78925544", "0.7891154", "0.7888761", "0.78870994", "0.78856003", "0.7885402", "0.7885402", "0.7885402", "0.7885402", "0.7885402", "0.78835356", "0.78831893", "0.78826374", "0.78817695", "0.7881301", "0.7880893", "0.7877124", "0.7873806", "0.787038", "0.7862085", "0.78595674", "0.78541386", "0.785397", "0.7847073", "0.78470284", "0.7843403", "0.7843403", "0.7843403", "0.78405744", "0.78395253", "0.7837913" ]
0.0
-1
Move to another list item
function listMove(steps = 0){ if (filter().length > 0) itemIndex += steps; if (itemIndex < 0){ itemIndex = filter().length - 1 } itemIndex %= fStorage.length - 1; update(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveToCompletedList(newItem){\n completedList.prepend(newItem);\n}", "function swapItems(fromIndex, toIndex) {\n // get the picked up item and the target position item\n const itemOne = listItems[fromIndex].querySelector(\".draggable-list__detail\");\n const itemTwo = listItems[toIndex].querySelector(\".draggable-list__detail\");\n\n // swap the elements in the listItem array\n listItems[fromIndex].appendChild(itemTwo);\n listItems[toIndex].appendChild(itemOne);\n}", "moveItemUp(itemId){\n let index = -1;\n for(let i = 0; i < this.items.length; i++){\n if(this.items[i].id === Number(itemId)){\n index = i;\n break;\n }\n }\n let tempItem = this.items[index - 1];\n this.items[index - 1] = this.items[index];\n this.items[index] = tempItem;\n }", "moveItemDown(itemId){\n let index = -1;\n for(let i = 0; i < this.items.length; i++){\n if(this.items[i].id === Number(itemId)){\n index = i;\n break;\n }\n }\n let tempItem = this.items[index + 1];\n this.items[index + 1] = this.items[index];\n this.items[index] = tempItem;\n }", "function swapItems(fromIndex, toIndex) {\n // listItems에 들어있는 li 태그를 가져와서 그 li 태그 안에 있는 draggable을 쿼리셀렉터로 가져옴\n const itemOne = listItems[fromIndex].querySelector('.draggable');\n const itemTwo = listItems[toIndex].querySelector('.draggable');\n\n listItems[fromIndex].appendChild(itemTwo);\n listItems[toIndex].appendChild(itemOne);\n}", "function moveListFocus(action) {\n\n var $firstSelected = $(Config.LIST_SELECTED);\n\n // If some list was already selected\n if ($firstSelected.length !== 0 ) {\n\n // Make it unselected\n $firstSelected.removeClass(Config.SELECTED_CLASS);\n\n var $toSelect = null;\n\n if (action === Config.GOING_DOWN) {\n var $nextSelected = $firstSelected.next(Config.LIST_ITEM);\n $toSelect = $nextSelected.length !== 0 ? $nextSelected : $(Config.LIST_ITEM).first();\n } else if (action === Config.GOING_UP) {\n var $prevSelected = $firstSelected.prev(Config.LIST_ITEM);\n $toSelect = $prevSelected.length !== 0 ? $prevSelected : $(Config.LIST_ITEM).last();\n }\n\n $nextSelected = $toSelect.addClass(Config.SELECTED_CLASS);\n } else {\n $nextSelected = $(Config.LIST_ITEM).first().addClass(Config.SELECTED_CLASS);\n }\n\n $nextSelected.get(0).scrollIntoViewIfNeeded();\n }", "jump(item) { this._.unshift(item); return this; }", "function swapItems(fromIndex, toIndex) {\n const itemOne = listItems[fromIndex].querySelector('.draggable');\n const itemTwo = listItems[toIndex].querySelector('.draggable');\n\n listItems[fromIndex].appendChild(itemTwo);\n listItems[toIndex].appendChild(itemOne);\n}", "moveNext() {\n this.current = this.current.next;\n }", "function swapItems(fromIndex, toIndex) {\n // selecting both DOM elements\n const itemOne = listItems[fromIndex].querySelector(\".draggable\");\n const itemTwo = listItems[toIndex].querySelector(\".draggable\");\n\n // swapping places\n listItems[fromIndex].appendChild(itemTwo);\n listItems[toIndex].appendChild(itemOne);\n}", "moveItem( fromIndex = 0, toIndex = 0 ) {\n\t\tthis.models.splice( toIndex, 0, this.models.splice( fromIndex, 1 )[0] );\n this.trigger( 'move' );\n\t}", "prev () {\n if (this._items.length < 2 || this._isMoving) {\n return\n }\n\n var currentIndex = this._items.indexOf(this._current);\n var prevIndex = this._items[currentIndex - 1] !== undefined \n ? currentIndex - 1 : this._items.length;\n this._to(prevIndex);\n }", "moveIn(listPath, index, direction) {\n let list = this.getIn(listPath);\n let newIndex = index + direction;\n if (newIndex >= list.size || newIndex < 0) {\n newIndex = list.size - Math.abs(newIndex);\n }\n const temp = list.get(index);\n list = list\n .set(index, list.get(newIndex))\n .set(newIndex, temp);\n this.setIn(listPath, list);\n this.keysStoreService.swapListElementKeys(listPath, index, newIndex);\n return listPath.concat(newIndex);\n }", "function move_to_history() {\n $('li.queue').first().attr({'class': 'history list-group-item list-group-item-success', 'status': 'played'})\n // movedlist = $('li.history').first()\n // console.log(a = movedlist)\n $('ol.history').append($('ol.queue li').first())\n}", "function swapItems(start, end){\r\n const itemOne = listItems[start].querySelector('.draggable');\r\n const itemTwo = listItems[end].querySelector('.draggable');\r\n\r\n listItems[start].appendChild(itemTwo);\r\n listItems[end].appendChild(itemOne);\r\n}", "function move_list_items(sourceid, destinationid) {\n\t$(\"#\" + sourceid + \" option:selected\").appendTo(\"#\" + destinationid);\n}", "function switchItems($m, remove, add) {\r\n\r\n if (remove == add) add = remove - 1; // ensure that we don't lose any items\r\n\r\n var $remove = $($m.raditems()[remove]); // grab the replacement item\r\n\r\n var toAddto = $m.raditems()[add]; // grab the placeholder \r\n\r\n // insertion is dependent on index of items\r\n if (remove > add)\r\n $remove.insertBefore(toAddto);\r\n\r\n else\r\n $remove.insertAfter(toAddto);\r\n\r\n animateWheel($m, (remove < add)); // posOffset = 5:neat, 10:fireworksesque, 15:subtleish\r\n\r\n }", "function move(list,to) { \r\n var total=list.options.length;\r\n index = list.selectedIndex;\r\n if (index == -1) return false;\r\n if (to == +1 && index == total-1) return false;\r\n if (to == -1 && index == 0) return false;\r\n to = index+to;\r\n var opts = new Array();\r\n for (i=0; i<total; i++) {\r\n opts[i]=new opt(list.options[i].text,list.options[i].value,list.options[i].selected);\r\n }\r\n tempOpt = opts[to];\r\n opts[to] = opts[index];\r\n opts[index] = tempOpt\r\n list.options.length=0; // clear\r\n \r\n for (i=0;i<opts.length;i++) {\r\n list.options[i] = new Option(opts[i].txt,opts[i].val);\r\n list.options[i].selected = opts[i].sel;\r\n }\r\n \r\n list.focus();\r\n}", "undoTransaction() {\n console.log(this.currentList)\n this.currentList.items[this.itemIndex] = this.item;\n }", "function move(list,to) { \n var total=list.options.length;\n index = list.selectedIndex;\n if (index == -1) return false;\n if (to == +1 && index == total-1) return false;\n if (to == -1 && index == 0) return false;\n to = index+to;\n var opts = new Array();\n for (i=0; i<total; i++) {\n opts[i]=new opt(list.options[i].text,list.options[i].value,list.options[i].selected);\n }\n tempOpt = opts[to];\n opts[to] = opts[index];\n opts[index] = tempOpt\n list.options.length=0; // clear\n \n for (i=0;i<opts.length;i++) {\n list.options[i] = new Option(opts[i].txt,opts[i].val);\n list.options[i].selected = opts[i].sel;\n }\n \n list.focus();\n}", "processMoveItemUp(itemArgs) {\n // stop propagation\n event.stopPropagation();\n\n if (itemArgs == 0 ) {\n\n } else {\n // itemArgs is the item card index\n let listBeingEdited = window.todo.model.listToEdit;\n let itemsArray = listBeingEdited.items;\n // swap\n // A is item at itemArgs\n // B, A. temp = B\n // A, A\n // A, temp = B\n let prevIndex = Number(itemArgs) - 1;\n let temp = listBeingEdited.getItemAtIndex(prevIndex);\n itemsArray[prevIndex] = listBeingEdited.getItemAtIndex(itemArgs);\n itemsArray[itemArgs] = temp;\n // update list\n window.todo.model.loadList(listBeingEdited.getName());\n }\n }", "onMoveUp() {\n if (this.state.selectedIndex > 0) {\n this.selectIndex(--this.state.selectedIndex);\n\n // User is at the start of the list. Should we cycle back to the end again?\n } else if (this.props.cycleAtEndsOfList) {\n this.selectIndex(this.state.items.length-1);\n }\n }", "function LR_moveup(list) {\n\tvar selected = list.selectedIndex;\n\tif ( list.length > 0 ) {\n\t\tif ( selected > 0 ) {\n\t\t\tvar moveText = list[selected].text;\n\t\t\tvar moveValue = list[selected].value;\n\t\t\tlist[selected].text = list[selected-1].text;\n\t\t\tlist[selected].value = list[selected-1].value;\n\t\t\tlist[selected-1].text = moveText;\n\t\t\tlist[selected-1].value = moveValue;\n\t\t\tlist.selectedIndex = selected-1; \n\t\t}\n\t}\n}", "function moveAsSubItem(opts, change,\n// The list item to add\nitem,\n// The key of the destination node\ndestKey) {\n var destination = change.value.document.getDescendant(destKey);\n var lastIndex = destination.nodes.size;\n var lastChild = destination.nodes.last();\n\n // The potential existing last child list\n var existingList = (0, _utils.isList)(opts, lastChild) ? lastChild : null;\n\n if (existingList) {\n return change.moveNodeByKey(item.key, existingList.key, existingList.nodes.size // as last item\n );\n }\n var currentList = (0, _utils.getListForItem)(opts, change.value, destination);\n if (!currentList) {\n throw new Error('Destination is not in a list');\n }\n\n var newSublist = _slate.Block.create({\n kind: 'block',\n type: currentList.type,\n data: currentList.data\n });\n\n change.insertNodeByKey(destKey, lastIndex, newSublist, {\n normalize: false\n });\n\n return change.moveNodeByKey(item.key, newSublist.key, 0);\n}", "moveItem(val, key, newKey){\n //console.log(\"VALUE \" + val + \" KEY \" + key + \" NEWKEY \" + direction);\n let listArray = [...this.state.list];\n //console.log(listArray);\n listArray.splice(newKey, 0, listArray.splice(key, 1)[0]);\n //console.log(listArray);\n\n this.setState({\n list: listArray,\n });\n }", "function moveItem2Navbar(pItem) {\n var element = $('#P0_SEARCH_' + pItem).detach();\n $('.navbar-' + pItem).append(element);\n}", "function shift(list) {\n var first = list._idlePrev;\n remove(first);\n return first;\n }", "function moveSelected() {\n viewModel.waitRelease(true)\n viewModel.moveItems = viewModel.selectedItems().slice()\n viewModel.itemList.removeAll(viewModel.moveItems)\n viewModel.selectedItems.removeAll()\n viewModel.moveParent = viewModel.parent()\n}", "function moveUpPropertyList()\n{\n\tvar selectedList = jQuery(\"#selectedList\");\n\n\tjQuery(\"#selectedList\").find(\"tr\").each( function( i, item ){\n\t\titem = jQuery(item);\n\t\tif( item.hasClass(\"selected\") )\n\t\t{\n\t\t\tvar prev = item.prev('#selectedList tr');\n\t\t\tif (prev.length == 1) \n\t\t\t{ \n\t\t\t\tprev.before(item);\n\t\t\t}\n\t\t}\n\t});\n}", "function appendBefore(list, item) {\n remove(item);\n item._idlePrev = list._idlePrev;\n list._idlePrev._idleNext = item;\n item._idleNext = list;\n list._idlePrev = item;\n }", "switchSelected(index) {\n\n if (typeof index == 'number') {\n this.current = index;\n return;\n }\n\n let nextInd = travelArray(this.items, this.current);\n\n if (this.items[nextInd].hidden)\n nextInd = travelArray(this.items, nextInd)\n\n this.current = nextInd;\n }", "undoTransaction() {\n let temp = this.todoList.items[this.previousPosition];\n this.todoList.items[this.previousPosition] = this.listItemCard;\n this.todoList.items[this.newPosition] = temp;\n }", "doTransaction() {\n let temp = this.todoList.items[this.newPosition];\n this.todoList.items[this.newPosition] = this.listItemCard;\n this.todoList.items[this.previousPosition] = temp;\n }", "function updateCurrentNextToGoCandidate(item) {\n item.nextToGo = true;\n}", "function swap_items(source, target) {\n debug.trace(\"Swap items\", source, target);\n var temp;\n if (target.is_empty()) {\n target.set_item(source.get_item());\n source.set_item(null);\n } else {\n temp = target.get_item();\n target.set_item(source.get_item());\n source.set_item(temp);\n }\n }", "function switchToSelectedList() {\n var $firstSelected = $(Config.LIST_SWITCHER).find(Config.LIST_SELECTED).first();\n var listPath = $firstSelected.data('listPath');\n switchToList(listPath);\n }", "next(){\n let next = this.currentId + 1;\n if(next >= this.list.length){\n next = this.list.length;\n }\n this.goto(next);\n }", "function USEITEMMove(p) {\r\n if (CoreState.state == \"\") {auto_keys.push(\"Back\");}\r\n if (CoreState.state == \"MainMenu\" && MainMenuState.state == \"\") {SeekName(MainMenu,\"Items\");}\r\n if (CoreState.state == \"MainMenu\" && MainMenuState.state == \"ItemMenu\") {\r\n if (SeekCursor(ItemMenu,p.item)) {PlanStack.pop();}\r\n }\r\n}", "next(){\n let targetItem = this._currentItem + 1;\n let nextItem = targetItem >= this._itemCount ? 0 : targetItem;\n this._changeActive_keepPlayState(nextItem);\n }", "function move(tab, toIndex) {\n var isSelected = self.selected() === tab;\n\n tabsList.remove(tab);\n tabsList.add(tab, toIndex);\n if (isSelected) self.select(tab);\n\n $scope.$broadcast('$mdTabsChanged');\n }", "function swapMe() {\n // create a variable and store the contents of the third item.\n var tempText = $(\"#myList li:nth-child(3)\").text();\n // Replace the contents of the 3rd item with the contents of the 4rth.\n $(\"#myList li:nth-child(3)\").text($(\"#myList li:nth-child(4)\").text());\n // Replace the contents of item 4 with the contents of the \"tempText\".\n $(\"#myList li:nth-child(4)\").text(tempText);\n}", "function moveCompletedItem() {\n var item = this.parentNode.parentNode,\n parent = item.parentNode,\n id = parent.id,\n value = item.innerText;\n\n if (id === 'todo') {\n data.todo.splice(data.todo.indexOf(value), 1);\n data.completed.push(value);\n } else {\n data.completed.splice(data.completed.indexOf(value), 1);\n data.todo.push(value);\n }\n\n // if : watches if the parent item is the todo most or completed list\n // so that the target variable switches value\n var target = (id === 'todo') ? document.getElementById('completed') : document.getElementById('todo');\n\n parent.removeChild(item);\n target.appendChild(item);\n\n dataObjectUpDated();\n}", "doTransaction() {\n if (this.currentList != undefined)\n this.currentList.items[this.itemIndex] = this.newItem;\n }", "function move(oldID, newID) {\n tasks.splice(newID, 0, tasks.splice(oldID, 1)[0]);\n}", "function moveTeamInPicklist(picklist_index, team_number, new_location) {\n let picklist = picklists[picklist_index];\n if (Number.isInteger(new_location)) {\n // removes val from picklist\n picklist.splice(picklist.indexOf(team_number), 1);\n // re-adds to picklist, in new location\n picklist.splice(new_location - 1, 0, team_number);\n // recreates the table\n createPicklistTable(picklist_index);\n }\n}", "function swapListItemPositions($target, direction) {\n var draggableListIndex = $dragging.data('draggable-index');\n var targetListIndex = $target.data('draggable-index');\n var targetTop;\n var heightDifference = $target.outerHeight() - $dragging.outerHeight();\n\n if (direction === \"up\") {\n targetTop = positions[draggableListIndex] - heightDifference;\n } else {\n targetTop = positions[draggableListIndex];\n positions[targetListIndex] = targetTop + $target.outerHeight();\n }\n $target\n .stop()\n .animate({'top': targetTop}, 'fast');\n $dragging.data('draggable-index', targetListIndex);\n $target.data('draggable-index', draggableListIndex);\n\n }", "function moveQueueItem(msg, args) {\n let arg1 = args.split(\" \")[0], arg2 = args.split(\" \")[1];\n if(isNaN(arg1) || isNaN(arg2))\n throw \"Invalid position.\";\n let pos1 = Number(arg1);\n let pos2 = Number(arg2);\n if(pos1 % 1 != 0 || pos2 % 1 != 0)\n throw \"Invalid position\";\n let queue = globals.connections[msg.guild.id].queue;\n if(pos1 < 2 || pos1 > queue.length || pos2 < 2 || pos2 > queue.length)\n throw \"Invalid position.\";\n msg.channel.send(\"**Song** `\" + queue[pos1 - 1].name + \"` **moved to**`\" + pos2 + \"`**.**\");\n let elem = queue[pos1 - 1];\n queue.splice(pos1 - 1, 1);\n // account for position after splice\n if(pos2 > pos1)\n queue.splice(pos2 - 2, 0, elem);\n else\n queue.splice(pos2 - 1, 0, elem);\n}", "function formal_dynamiclist_moveup_entry(list_cssid, cssid) {\n var list_item = document.getElementById(cssid);\n if (list_item == null) {\n return;\n }\n \n var previous_item = list_item.previousSibling;\n \n if (previous_item == null) {\n return;\n }\n \n formal_dynamiclist_swap_entries(list_cssid, previous_item, list_item);\n}", "function move_books_between_lists(old_list, new_list, book_title){\n for (var i = 0; i < old_list.length; i++){\n if (old_list[i][\"book_title\"] == book_title){\n new_list.push(old_list[i]);\n\n //Apparently this is the best way to remove something from a list in Javascript.\n //http://stackoverflow.com/questions/5767325/remove-a-particular-element-from-an-array-in-javascript\n old_list.splice(i, 1);\n break;\n }\n }\n}", "function moveElement(fromIndex, toIndex) {\n\tvar element = objects[fromIndex];\n\tobjects.splice(fromIndex, 1);\n objects.splice(toIndex, 0, element);\n return objects;\n}", "jump(itemIndex = 0){\n this._changeActive_keepPlayState(itemIndex);\n }", "function moveItem(ctrlSource, ctrlTarget){\t\t\n\tvar Source = document.getElementById(ctrlSource);\n \tvar Target = document.getElementById(ctrlTarget);\n\n\tif ((Source != null) && (Target != null)){\n\t\tfor(var i=Source.options.length-1;i>=0;i--) {\t\t\n\t\t\tif(Source.options[i].selected){\n\t\t\t\tvar newOption = new Option(); // Create a new instance of ListItem\n\t\t\t\tnewOption.text = Source.options[Source.options.selectedIndex].text;\n\t\t\t\tnewOption.value = Source.options[Source.options.selectedIndex].value;\n\t\t\t\n\t\t\t\tTarget.options[Target.length] = newOption; //Append the item in Target\n\t\t\t\tSource.remove(Source.options.selectedIndex); //Remove the item from Source\n\t\t\t} //end-if\n\t\t} //-for\n\t} //end-if\n}", "next () {\n if (this._items.length < 2 || this._isMoving || document.hidden || !this._isOnScreen()) {\n return\n }\n\n var currentIndex = this._items.indexOf(this._current);\n var nextIndex = this._items[currentIndex + 1] !== undefined \n ? currentIndex + 1 : 0;\n var remaining = this._items.length - currentIndex;\n\n if (remaining === this._visible) {\n nextIndex = 0;\n }\n\n this._to(nextIndex);\n }", "function swap_items(source, target) {\n debug.trace(\"Swap items\", source, target);\n var temp;\n if (target.is_empty()) { // target jest pusty\n if (target.set_item(source.get_item())) { // jesli target przyjal przedmiot\n source.set_item(null); // nullujemy source\n }\n } else {\n temp = target.get_item();\n if (target.set_item(source.get_item())) { // jesli target przyjal przedmiot\n if (source.set_item(temp)) { // jesli source przyjal przedmiot z targeta\n } else { // source nie przyjal, przywracamy przedmiot targeta\n target.set_item(temp);\n }\n }\n }\n }", "function _insertAfter(todo, dest, id) {\n var parent = _.pluck(_.where(todoItems, {'parent_id': dest}));\n var index = todo.position;\n _insert(todo, parent, index + 1, id);\n}", "function changeItem(index) {\n\t\tvar count = anchors.length;\n\t\tif (index != current && (settings.loop || index >= 0 && index < count)) {\n\t\t\tcurrent = (index + count) % count; // avoid mod operator with negative numbers\n\t\t\t_setShrunk(true);\n\t\t\t_changeItem();\n\t\t}\n\t}", "function switchItem(ev) {\n ev.preventDefault();\n var id = ev.dataTransfer.getData(\"id\");\n //console.log(\"dragged id: \" + id); // debug log\n\n let oldItem = document.getElementById(ev.target.id);\n //console.log(\"moving \" + oldItem.id); // debug log\n document.getElementById(\"inventory\").appendChild(oldItem);\n\n let idWithoutNumber = ev.target.id.replace(/[0-9]/g, '');\n let slot = idWithoutNumber + \"Slot\";\n\n // delay of moving replaced item - had to be done, if there is no delay, cannot move it...\n var delayInMilliseconds = 1;\n setTimeout(function() {\n document.getElementById(slot).appendChild(document.getElementById(id));\n }, delayInMilliseconds);\n \n //console.log(\"putting \" + document.getElementById(id).id + \" into \" + document.getElementById(slot).id); // debug log\n}", "setNextItemActive() {\n this._activeItemIndex < 0 ? this.setFirstItemActive() : this._setActiveItemByDelta(1);\n }", "function move(array, element, toIndex) {\n // @todo this implementation must be the same as the List.moveValue method\n // @todo don't do anything if the desired index is the same as the current index\n var index = indexOf(array, element);\n // @todo remove all old values rather than only the first ?\n if (index !== -1) {\n removeIndex(array, index);\n }\n if (toIndex == null) {\n array.push(element);\n }\n else {\n insertIndex(array, toIndex, element);\n }\n}", "function movePos (bullet, drop) {\n const tmpB = listItems[bullet]\n const tmpD = delBtns[bullet]\n\n /* delete old bullet then put it in new spot in array */\n listItems.splice(bullet, 1)\n delBtns.splice(bullet, 1)\n if (drop === 0) {\n listItems.splice(drop, 0, tmpB)\n delBtns.splice(drop, 0, tmpD)\n } else {\n listItems.splice(drop - 1, 0, tmpB)\n delBtns.splice(drop - 1, 0, tmpD)\n }\n}", "function rotateMove() {\r\n\r\n\t\t\t\t\t// If item paused exit\r\n\t\t\t\t\tif (obj.hasClass('pause')) return;\r\n\t\t\r\n\t\t\t\t\t// Scroll in chosen direction\r\n\t\t\t\t\tif (options.direction == 'down') {\r\n\r\n\t\t\t\t\t\t// Get last list item and copy\t\r\n\t\t\t\t\t\tvar item = obj.children('li:last').clone(true);\r\n\r\n\t\t\t\t\t\t// Scroll item\r\n\t\t\t\t\t\tobj.css('top', '-'+ rowHeight +'px').prepend(item);\r\n\t\t\t\t\t\tobj.animate({top: 0}, options.speed, function() {\r\n\t\t\t\t \t\t$(this).children('li:last').remove();\r\n\t\t \t\t\t});\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t// Get first list item and copy\r\n\t\t\t\t\t\tvar item = obj.children('li:first').clone(true);\r\n\r\n\t\t\t\t\t\t// Scroll item\r\n\t\t\t\t\t\tobj.animate({top: '-=' + rowHeight + 'px'}, options.speed, function() {\r\n\t\t\t\t \t\t$(this).children('li:first').remove();\r\n\t \t\t\t\t\t$(this).css('top', '0');\r\n\t\t \t\t\t});\r\n\r\n\t\t\t\t\t\t// Append copied item to end of list\r\n\t\t\t\t\t \titem.appendTo(obj);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "function switchToList(listPath) {\n\n function navigateToListPath() {\n window.location.href = Config.WUNDERLIST_URL + listPath;\n }\n\n // Hack... if one of the list elements is selected on wunderlist the action to navigate to a different\n // URL will not work. It navigates there but is immediately pulled back to the page with the element's\n // details open\n if($(Config.SELECTED_TASK).length != 0) {\n setTimeout(navigateToListPath, 1000);\n } else {\n navigateToListPath();\n }\n }", "addNewItemToCurrentList() {\n let newItem = new ToDoListItem(this.nextListItemId++);\n this.addItemToList(this.currentList, newItem);\n return newItem;\n }", "function toggleSelectItem(item, event, list)\n {\n if ( event )\n {\n event.stopPropagation();\n }\n\n if ( list.indexOf(item) > -1 )\n {\n list.splice(list.indexOf(item), 1);\n }\n else\n {\n list.push(item);\n }\n }", "swapItems(itemIndex1, itemIndex2) {\n const items = this.props.items.slice();\n const temp = items[itemIndex1];\n items[itemIndex1] = items[itemIndex2];\n items[itemIndex2] = temp;\n\n this.props.onChange(items);\n }", "slideTo(index) {\n const that = this;\n\n index = index ? parseInt(index) : 0;\n\n if (that.disabled || index < 0 || index> that._items.length) {\n return;\n }\n\n that._goToItem(index);\n }", "insertAt(newItem, pos) {\n let stepper = 0;\n let currNode = this.head;\n while (stepper !== pos) {\n stepper++;\n currNode = this.head.next;\n }\n if (currNode === null) {\n return console.log(\"Item not found\");\n }\n if (stepper === pos) {\n this.insertAfter(newItem, currNode.value);\n return;\n }\n }", "setNextItemActive() {\n this._activeItemIndex < 0 ? this.setFirstItemActive() : this._setActiveItemByDelta(1);\n }", "setNextItemActive() {\n this._activeItemIndex < 0 ? this.setFirstItemActive() : this._setActiveItemByDelta(1);\n }", "setNextItemActive() {\n this._activeItemIndex < 0 ? this.setFirstItemActive() : this._setActiveItemByDelta(1);\n }", "selectItem(index) {\n\t\tthis.checklistItem = this.company.checklist[index];\n\t\tthis.removeItem(index);\n\t}", "function remove(list, item) {\n\n let prev = parent(list, item)\n\n // case 1\n if (prev === undefined) {\n return item.next\n }\n\n // case 2 & 3\n prev.next = item.next\n return list\n}", "function moveToFirst() {\n loadTaskList(1);\n}", "function moveToSlide() {\n $('.menu li').click(function (e) {\n e.preventDefault();\n var slideIndex = $(this).attr('data-link-id');\n console.log(slideIndex);\n slickWrapper.slickElement.slick('slickGoTo', parseInt(slideIndex));\n });\n }", "function moveUp() {\n //your code\n const fromFridge = fridge.pop();\n if (fromFridge) {\n buyList.push(fromFridge);\n updateDisplay();\n } else {\n return;\n }\n}", "function moveSelected(delta) {\n setSelectedIndex(selectedIndex + delta);\n }", "insertAfter(newItem, prevItem) {\n if (!this.head) {\n return null;\n }\n let currNode = this.head;\n\n while (currNode !== null && currNode.value !== prevItem) {\n currNode = currNode.next;\n }\n if (currNode === null) {\n return console.log(\"Item not found\");\n }\n if (prevItem.next === null) {\n this.insertLast(newItem);\n return;\n }\n let newNode = new _Node(newItem, currNode.next);\n currNode.next = newNode;\n }", "function toggleTouchItem($element){\n $element\n .siblings('li')\n .removeClass('open')\n .end()\n .toggleClass('open');\n }", "function moveUpModelTypeAttribute()\n{\n\tvar selectedList = jQuery(\"#selectedList\");\n\n\tjQuery(\"#selectedList\").find(\"tr\").each( function( i, item ){\n\t\titem = jQuery(item);\n\t\tif( item.hasClass(\"selected\") )\n\t\t{\n\t\t\tvar prev = item.prev('#selectedList tr');\n\t\t\tif (prev.length == 1) \n\t\t\t{ \n\t\t\t\tprev.before(item);\n\t\t\t}\n\t\t}\n\t});\n}", "function toggleTouchItem($element){\n $element\n .siblings('li')\n .removeClass('open')\n .end()\n .toggleClass('open');\n }", "function toggleTouchItem($element){\n $element\n .siblings('li')\n .removeClass('open')\n .end()\n .toggleClass('open');\n }", "function toggleTouchItem($element){\n $element\n .siblings('li')\n .removeClass('open')\n .end()\n .toggleClass('open');\n }", "function toggleTouchItem($element){\n $element\n .siblings('li')\n .removeClass('open')\n .end()\n .toggleClass('open');\n }", "function moveRightIndex() {\n const fromVal = parseInt(fromInput.value);\n const toVal = parseInt(toInput.value);\n from = fromVal - 1;\n to = toVal;\n const listLeft = document.querySelectorAll(\".listLeft li\");\n elementArray = Array.from(listLeft);\n pushArray = elementArray.slice(from, to);\n // debugger;\n pushArray.forEach(event => {\n listRightParent.appendChild(event);\n });\n pushArray = [];\n}", "function move_list_items_all(sourceid, destinationid) {\n\t$(\"#\" + sourceid + \" option\").appendTo(\"#\" + destinationid);\n}", "function toggleTouchItem($element){\n $element\n .siblings('li')\n .removeClass('open')\n .end()\n .toggleClass('open');\n }", "function move(clmn, toClmn) {\r\n\r\n var popped = null;\r\n\r\n if(clmn.length > 0) {\r\n\r\n popped = clmn.pop();\r\n addToColumn(toClmn, popped);\r\n\r\n\r\n }\r\n}", "function swapToMove(srcIndex, targetIndex, moveDDMControl){\n\tvar tempOption = new Option();\n\n\t// Swap the position of srcIndex item with targetIndex Item\n\ttempOption.text = moveDDMControl.options[targetIndex].text;\n\ttempOption.value = moveDDMControl.options[targetIndex].value;\n moveDDMControl.options[targetIndex].text = moveDDMControl.options[srcIndex].text;\n\tmoveDDMControl.options[targetIndex].value = moveDDMControl.options[srcIndex].value;\n moveDDMControl.options[srcIndex].text = tempOption.text;\n\tmoveDDMControl.options[srcIndex].value = tempOption.value;\n\n\t// Adjust item's \"selected\" status after change position\n\tmoveDDMControl.options[srcIndex].selected = false;\n\tmoveDDMControl.options[targetIndex].selected = true;\n}", "function movePluginListForward() {\n loadCurrentPageFromHTML();\n\n // go to the next page\n loadPluginListPage(pluginListPage + 1);\n}", "moveOverPossibleNewTarget(item) {\n\t\tthis.$powerUi.tmp.dropmenu._possibleNewTarget = item;\n\t}", "function dropMove (event, item) {\n /* NOTE: there is definitely a more clever way of doing this\n involving the indexOf function\n these weird for loops basically find out where the item\n and dropzone is in their respective arrays */\n let bulletIndex\n let dropIndex\n event.preventDefault()\n for (let i = 0; i < listItems.length; i++) {\n if (curr === listItems[i]) {\n bulletIndex = i\n }\n }\n\n for (let i = 0; i < dropZones.length; i++) {\n if (item === dropZones[i]) {\n dropIndex = i\n }\n }\n\n /* then we rearrange their array positions and re-draw the task list */\n movePos(bulletIndex, dropIndex)\n redrawList()\n\n dropEnd()\n}", "shift() {\n if (!this.head || !this.head.next){\n return undefined;\n \n }\n var current = this.head;\n current = current.next;\n this.head = current;\n }", "move(list, prevNode) {\n prevNode = Node.sanitizeNode(prevNode);\n \n if (prevNode && prevNode.list !== list) {\n Node.throw(\"illegal-move\");\n return;\n }\n \n if (!(list instanceof LinkedList)) {\n Node.throw(\"invalid-list\");\n return;\n }\n \n // Remove node from its current list\n this._list.remove(this, true);\n \n // Move node to the new list\n this._list = list;\n \n list.insertNode(\n this,\n prevNode instanceof Node ? prevNode : list.last(true)\n );\n }", "ModifyListItem (Mode) \n\t{\n\t\tvar NewTodo = this.state.TodoItems;\n\t\tvar NKey = this.state.NextKey;\n\t\t\n\t\tif (this.state.Mode){\n\t\t\tNewTodo[NKey] = {id: NKey.toString(), Item: this.state.value};\n\t\t\tNKey = NKey + 1;\n\t\t\tthis.setState({NextKey: NKey});\n\t\t\t\n\t\t\talert(\"Item Added.\");\n\t\t}\n\t\telse {\n\t\t\t\t\t\n\t\t\tNewTodo[this.state.ActiveKey].Item = this.state.value;\n\t\t\t\n\t\t\talert(\"Change Confirmed.\");\n\t\t\tthis.setState({Mode: true});\n\t\t}\n\t\tthis.setState({TodoItems: NewTodo});\n\t\tthis.setState({value: \"\"});\n\t}", "_nextItem() {\n if (this.newItemNumber === \"review\") {\n this.set('looped.all', true);\n }\n this.set('route.path', '/' + this.newItemNumber);\n this.set('looped.last', this.itemNumber);\n }", "function moveDown() {\n //your code\n const fromBuyList = buyList.pop();\n if (fromBuyList) {\n fridge.push(fromBuyList);\n updateDisplay();\n } else {\n return;\n }\n}", "next(){\r\n (this.position == this.testimonial.length - 1) ? this.position = 0 : this.position++\r\n }", "function toggleTouchItem($element){\n $element\n .siblings('li')\n .removeClass('open')\n .end()\n .toggleClass('open');\n }", "function MoveOrder(action) {\n if (selectedPieces.length == 1) {\n var orderIndex = WIP.PiecesList.indexOf(selectedPieces[0]);\n if ($(this).attr('id') == \"piecePositionOrderUp\") {\n if (orderIndex < WIP.PiecesList.length - 1) {\n ArraySwap(WIP.PiecesList, orderIndex, orderIndex + 1);\n Redraw();\n }\n }\n else {\n if (orderIndex > 0) {\n ArraySwap(WIP.PiecesList, orderIndex, orderIndex - 1);\n Redraw();\n }\n }\n }\n}", "function toggle(list, item) {\n // Item does not exist, add it\n if (list.indexOf(item) === -1) {\n return [...list, item];\n }\n // Item already exists, remove it\n return list.filter((currentItem) => currentItem !== item);\n}" ]
[ "0.6548707", "0.6519676", "0.6505136", "0.6421122", "0.636212", "0.6265601", "0.6242285", "0.6227965", "0.6185981", "0.61780155", "0.6133683", "0.6131711", "0.6095885", "0.6070714", "0.6066016", "0.6041052", "0.60210586", "0.6017752", "0.5978422", "0.5971671", "0.5956477", "0.5955279", "0.59340763", "0.5929377", "0.591737", "0.58844686", "0.5884023", "0.5879067", "0.5878344", "0.5877688", "0.5873536", "0.5870832", "0.5841516", "0.58203804", "0.5819002", "0.5794591", "0.5786564", "0.5759676", "0.57546663", "0.5733495", "0.5733379", "0.57319605", "0.57263017", "0.57065094", "0.56995386", "0.5698181", "0.5694744", "0.56901646", "0.56859547", "0.56661314", "0.5662937", "0.56534714", "0.5651673", "0.56336653", "0.56142694", "0.56124747", "0.56123817", "0.56098276", "0.5595796", "0.5593254", "0.55639863", "0.5553736", "0.5549452", "0.5525854", "0.5483122", "0.5480496", "0.54793185", "0.5476207", "0.5476207", "0.5476207", "0.54644126", "0.5455199", "0.5451643", "0.5436112", "0.5433662", "0.5429946", "0.54280525", "0.54050565", "0.5403569", "0.54025286", "0.54025286", "0.54025286", "0.54025286", "0.5401675", "0.53889996", "0.53806376", "0.53719574", "0.53630793", "0.5358408", "0.53575116", "0.5353211", "0.53521544", "0.5346364", "0.53439057", "0.5343412", "0.5337947", "0.5335295", "0.53227353", "0.53211844", "0.53205407" ]
0.5823854
33
Filter array by type
function filter(){ fStorage.length = 0; for (let i = 0; i < storage.length; i++){ if (storage[i].type == fType || fType == "all") { fStorage[fStorage.length] = storage[i]; } } return fStorage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeAllElements(array, type) {\n return array.filter(function(item) {\n return (item.indexOf(type) === -1);\n });\n }", "function filterArrayy(arr){\r\n return arr.filter ((element) => typeof element ===\"number\");\r\n}", "function filterItems (array, filter) {\n if(filter.trim().toLowerCase() === \"all\"){\n return array;\n };\n\n let filteredArray = array.filter ((element) => {\n return element.type == filter;\n });\n return filteredArray;\n}", "function filterType(array,container) {\r\n print(array,container);\r\n $('#type').change(\r\n function(){\r\n let value= $('#type').val();\r\n console.log(value);\r\n if(value!=\"all\"){\r\n const arrayForType= array.filter((element)=>{\r\n return element.type==value;\r\n });\r\n print(arrayForType,container);\r\n } else {\r\n print(array,container);\r\n }\r\n});\r\n\r\n}", "function filterIconsByType(iconsArray, type) {\n\n\tif ( type.length == 0 ) {\n\t\treturn iconsArray;\n\t}\n\n\tconst filterdeArray = iconsArray.filter((element) => {\n\t\treturn element.type == type;\n\t} );\n\n\treturn filterdeArray;\n}", "function filterArray(arr) {\n return arr.filter(o => typeof o === 'number')\n}", "function filterObject(filter, type, data) { \n filter = _.filter(filter, function(item) {\n return (item !== false) ? item : false;\n }); \n if (filter.length < 1) { return data }\n return _.filter(data, function(item) {\n var boo = false;\n for(var i in filter) { \n if(_.contains(item[type], filter[i])) {\n boo = true;\n } else {\n boo = false;\n break; \n } \n }\n return (boo === true) ? item : false; \n }); \n }", "function filterArray(someArr, word) {\n return someArr.filter(function (item) {\n if (item.type != word) {\n return item;\n }\n });\n}", "function typeNum(arr) {\n const newArr = arr.filter(function (item, index) {\n return typeof item == \"number\";\n });\n return newArr;\n}", "function filterElementsByType(objectList, type) {\n var list = objectList || [];\n var result = [];\n forEach(list, function(obj) {\n if(is(obj, type)) {\n result.push(obj);\n }\n });\n return result;\n}", "function filterElementsByType(objectList, type) {\n var list = objectList || [];\n var result = [];\n forEach(list, function (obj) {\n if (is(obj, type)) {\n result.push(obj);\n }\n });\n return result;\n}", "static filter(events, types){\n if(events && types){\n let data = events.filter(function(e) {\n return types.indexOf(e.type) > -1;\n });\n return data;\n } else {\n if (events){\n return events;\n }else{\n return [];\n }\n }\n }", "function filterTypes(type) {\r\n const typesNodeList = type.querySelectorAll('.pokemon-type');\r\n const typesArray = [...typesNodeList];\r\n\r\n //Function stops and returns full array\r\n if (filterButtonText === \"all\") {\r\n return typesArray;\r\n }\r\n\r\n //If button text = type text then filter works\r\n for (let i = 0; i < typesArray.length; i++) {\r\n if (typesArray[i].textContent == filterButtonText) {\r\n return typesArray[i];\r\n }\r\n }\r\n }", "function getType(array) {\r\n \r\n const types = [];\r\n\r\n array.forEach((item) => {\r\n if (!types.includes(item.type)) {\r\n types.push(item.type);\r\n }\r\n });\r\n return types;\r\n}", "function filterQuestionsByType(arr,bool){\n return arr.filter(({isEssayQuestion})=> isEssayQuestion === bool)\n}", "static filterPokemonByType(type, weaknessArray) {\n return Pokemon.allPokemons.filter((pokemons) => pokemons.type1 === type || pokemons.type2 === type)\n }", "function filtrify(array, currentChoice) {\n if (currentChoice == \"all\") {\n console.log(array);\n return array;\n }\n const filteredArray = array.filter((obj) => {\n return obj.type == currentChoice;\n });\n console.log(filteredArray);\n return filteredArray;\n }", "function filter_list(l) {\n \n let newArray = l.filter((item) => {\n return typeof(item) !== 'string'\n })\n console.log(newArray);\n }", "function filter (type) {\n const filteredType = []\n for (let i = 0; i < actionList.length; i++) {\n const action = actionList[i]\n if (action.type === type) {\n filteredType.push(action)\n }\n }\n return filteredType\n }", "elementsOfType(types) {\n return _.chain(this.getTableEntries())\n .filter(e => {\n var elemType = getElemFieldVal(e, FIELD_TYPE);\n return _.includes(types, elemType);\n })\n .map(e => {\n return getElemFieldVal(e, FIELD_NAME);\n })\n .value();\n }", "filter(type) {\n return this.blocks.filter((x) => { return x.type == type; });\n }", "filterByType(type) {\n return axios.get(`${API_URL}/findByType/${type}`)\n }", "function filter(array) {\n\tvar arr = [];\n\tfor (var i = 0 ; i < array.length ; i++) {\n\t\tif(typeof array[i] === 'number'){\n\t\t\tarr.push(array[i])\n\t\t}\n\t}\n\treturn arr;\n}", "static gatherByTypes(data, typesToSearchFor) {\n return typesToSearchFor.map(type => data.filter(d => d.type === type));\n }", "function removeTypeFilter() {\n if (typeFilter.length !== 0) {\n const selectedTypeIndex = typeFilter[0];\n typeFilter = typeFilter.filter(f => f !== selectedTypeIndex);\n chordChart.highlightActiveType(selectedTypeIndex)\n }\n}", "function getFilters(obj, type) {\n return _.result(obj, 'filters').reduce((arr, filter) => {\n const fn = filter[type];\n return fn ? [...arr, fn.bind(obj)] : arr;\n }, []);\n }", "function filterByNodeType(arr, n) {\n return arr.filter((e) => e.nodeType === 1);\n}", "function filter(array,func){\n\t\tif(array.filter){\n\t\t\treturn array.filter(func)\n\t\t}\n\t\tthrow new Error(\"Can only filter on arrays, not objects\");\n\t}", "function get_filtered_types() {\n\t\n\tvar filters = [ 'locales' , 'skyshard' , 'lorebook' , 'boss' , 'treasure' ];\n\t$( '#marker-filters :checked' ).each( function() {\n\t\tfor( i = filters.length; i >= 0; i-- ) {\n\t\t\tif ( $(this).val() == filters[i] )\tfilters.splice( i , 1 );\n\t\t}\n });\n\t return filters;\n}", "function filterIsCard(array) {\n return array.filter(function(item) {\n return item.type === 'card';\n });\n }", "function filterCards(property, type) {\n const output = ideasArray.filter(card => {\n return card[property] === type;\n });\n filteredIdeas = output;\n appendCards(filteredIdeas);\n}", "function aoj_select(array, filter) {\n var res = [];\n for (var i in array) {\n if (json_filter(array[i], filter))\n res.push(array[i]);\n }\n return res;\n}", "function filter_list(l) {\n return l.filter(num => typeof num === 'number');\n}", "function myFilter (arr, cond) {\n\t\tvar filteredArray = [];\n\t\tfunction filtered (element) {\n\t\t\tif (cond(element)) {\n\t\t\t\tfilteredArray.push(element);\n\t\t\t}\n\t\t}\n\t\tarr.forEach(filtered);\n\t\treturn filteredArray;\n\t}", "function filterEventsByType(events, type){\n var results = [];\n events.forEach(function(event) {\n if(event.getTitle().indexOf(type) == 0){\n Logger.log('%s (at %s) is an event of type %s', event.getTitle(), event.getStartTime(), type);\n results.push(event);\n }\n });\n \n return results;\n}", "filterDataSet(selectedTypes) {\r\n if(selectedTypes && selectedTypes.length > 0) {\r\n let itemSet = new Set();\r\n this.state.items.map(item => (item.types.map(type => {if(selectedTypes.indexOf(type) > -1){itemSet.add(item); return;}})));\r\n this.setState({filteredData: Array.from(itemSet)});\r\n } else {\r\n this.setState({filteredData: this.state.allowedData});\r\n }\r\n }", "mixedArrayFilter(array, checkFunc) {\n let filteredArray = [];\n\n array.forEach((item) => {\n // if have subItems filter subItems\n if (Array.isArray(item)) {\n let filteredSubItems = [];\n\n item.forEach((subDoc) => {\n if (checkFunc(subDoc)) filteredSubItems.push(subDoc);\n });\n\n // skip if have no subItems after filter\n filteredSubItems.length && filteredArray.push(filteredSubItems);\n } else {\n if (checkFunc(item)) filteredArray.push(item);\n }\n });\n\n return filteredArray;\n }", "afilter (callback) {\n return this.asArray().filter(callback)\n }", "function filteredReleaseGroupResponse(array) {\n const filteredArr = [];\n for (let i = 0; i < array.length; i++) {\n if (array[i][`first-release-date`].length > 0\n && array[i][`secondary-types`].length == 0\n && array[i][`primary-type`] != `Single`\n && array[i][`primary-type`] != `EP`\n && array[i][`primary-type`] != `Compilation`\n && array[i][`primary-type`] != `Remix`\n && array[i][`primary-type`] != `Interview`\n && array[i][`primary-type`] != `Audiobook`\n && array[i][`primary-type`] != `Other`\n // || array[i][`primary-type`] == `Soundtrack`\n ) {\n filteredArr.push(array[i])\n }\n }\n // console.log(filteredArr)\n STORE.releaseGroupResponseReleaseGroupFiltered = filteredArr\n }", "function filter_list(l) {\n return l.filter(function(v) {return typeof v == 'number';});\n}", "function filterInteger(arr) {\n let newArray = arr.filter((num) => {\n return Number.isInteger(num);\n\n })\n return newArray;\n}", "function filter_list(l) {\n // iterate through list array, check each item to see if it matches datatype of string.\n // only save the the integers and save them into anther list array as output\n \n let output = [];\n let i = 0;\n let eachItem;\n while (i < l.length) {\n eachItem = l[i];\n if(typeof(eachItem) === \"number\") {\n output.push(eachItem);\n }\n i++;\n }\n return output;\n}", "function filter_list(l) {\n return l.filter( function filt(value){return typeof value === \"number\"});\n}", "function filter (array,fn) {\n return array.filter(fn)\n}", "function filter_list(l) {\n return l.filter(function(v) {return typeof v == 'number'})\n}", "function useFilter1(inputArr) {\n inputArr.filter((obj) => {\n if (obj.gender == \"male\") {\n console.log(obj)\n }\n })\n}", "function filter_list(l) {\n return l.filter(function(item) {\n return typeof(item) === 'number';\n });\n}", "function extractType(data, slices, type) {\n // return if no data or empty array\n if (!data || data.length === 0) { return data; }\n var ids = {};\n // filter the first item in array for the fieldname based on type\n var typeField = Object.keys(data[0].$$struct).filter(function (key) {\n return data[0].$$struct[key].$$resource && data[0].$$struct[key].$$resource.type === type;\n })[0];\n\n // derive list of ids from objects of specified type\n data.forEach(function (item) {\n item = item[typeField];\n if (item) {\n if (item instanceof Array) {\n item.forEach(function (sub) {\n ids[sub[sub.$$idField]] = true;\n });\n } else {\n ids[item[item.$$idField]] = true;\n }\n }\n });\n\n // filer the list from the derived list of ids\n return filterById(slices[type].$$arr, Object.keys(ids));\n}", "function selectActivityTypeFilter() {\n return function (items, activityTypeId, withCommutes) {\n var retArray = [];\n if (activityTypeId.id == ALL_ACTIVITIES && withCommutes) {\n return items;\n }\n angular.forEach(items, function (obj) {\n // activityTypeId can either be an activity type or a bike type because we use a flat selector\n if (((activityTypeId.id == ALL_ACTIVITIES) || (obj.bike_type == activityTypeId.label || obj.activity_type == activityTypeId.label)) && (withCommutes || !obj.commute)) {\n retArray.push(obj);\n }\n });\n return retArray;\n };\n}", "function filter(arr, fn) {\n\tlet test = [];\n\tfor(let item of arr){\n\t\tif(fn(item)){\n\t\t\ttest.push(item);\n\t\t}\n\t\n\t}\n\treturn test;\n}", "getElementsByType(type) {\n if (!this[$elementsByType].has(type)) {\n return [];\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return Array.from(this[$elementsByType].get(type));\n }", "function getByType(type) {\n let listnew = [];\n dataPost.forEach((item, index) => {\n if (item.type.toLowerCase() == type) {\n listnew.push(item);\n }\n });\n showPost(listnew);\n // console.log(listnew);\n }", "filterByType(typeId) {\n let filter = this.plays.filter(play => {\n return typeId === play.playTypeId\n });\n return new internal.Game(filter);\n }", "function filterProcesses(jsonData) {\n var filter = $('#filterSelect').val().toLowerCase().replace(/ /g,''),\n ret = [],\n type,\n i;\n for(i=0;i<jsonData.length;i++) {\n // debugger;\n type = jsonData[i].info.type;\n if(filter === 'all' || (type === 'tab' && filter==='tabsonly') || (type !== 'tab' && filter==='notabs')){\n ret.push(jsonData[i]);\n }\n }\n return ret;\n}", "function filterArr (node, array) {\n return array.filter((e) => {\n return e !== node;\n });\n }", "function filterOptions () {\n var opts = [\n {\n name : \"general\",\n on : true,\n klass : \"general-type\",\n type : 'type-general'\n },\n {\n name : \"text\",\n on : true,\n klass : \"text-type\",\n type : 'type-text'\n },{\n name : \"image\",\n on : true,\n klass : \"image-type\",\n type : 'type-image'\n }, {\n name : \"color\",\n on : true,\n klass : \"color-type\",\n type : 'type-color'\n }, {\n name : \"layout\",\n on : true,\n klass : \"layout-type\",\n type : 'type-layout'\n }\n ];\n\n return opts;\n }", "function all(filter, type) {\n switch (type) {\n case \"make\":\n return cars.filter(function (car) {\n return car.make === filter;\n });\n break;\n case \"price\":\n // code block\n break;\n case \"year\":\n\n default:\n // code block\n }\n}", "function filter(array, test) {\r\n\tlet passed = [];\r\n\tfor(let element of array) {\r\n\t\tif(test(element)) {\r\n\t\t\tpassed.push(element);\r\n\t\t}\r\n\t}\r\n\treturn passed;\r\n}", "function filterNumbers(arr) {\n // Create the result list\n const result = arr.filter(function (value, i) {\n // Filter based on the rules for checking the input is number\n if (isNaN(value) || isBoolean(value) || isEmptyString(value)) {\n return false;\n }\n return true;\n });\n // Return numbers only list\n return result;\n}", "function filter(value) {\n\n\t\t\t\t var items = [[], []];\n\n\t\t\t\t // If a single value is provided it can be pushed\n\t\t\t\t // immediately.\n\t\t\t\t if (ser(value)) {\n\t\t\t\t items[0].push(value);\n\t\t\t\t } else {\n\n\t\t\t\t // Otherwise, determine whether this is an\n\t\t\t\t // array of single elements or sets.\n\t\t\t\t $.each(value, function (i, val) {\n\n\t\t\t\t // Don't handle an overflow of elements.\n\t\t\t\t if (i > 1) {\n\t\t\t\t return;\n\t\t\t\t }\n\n\t\t\t\t // Decide if this is a group or not\n\t\t\t\t if (ser(val)) {\n\t\t\t\t items[i].push(val);\n\t\t\t\t } else {\n\t\t\t\t items[i] = items[i].concat(val);\n\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t }\n\n\t\t\t\t return items;\n\t\t\t\t }", "function filter_list(l) {\n result = [];\n for (let i = 0; i < l.length; i++){\n if (typeof l[i] !== 'string'){\n result.push(l[i])\n }\n }\n return result;\n}", "function filterArray(arr,func){\n return arr.filter(func);\n}", "function getOfType(a, types) {\r\n a = collection(a)\r\n types = collection(types)\r\n\r\n var result = []\r\n for (var i = 0; i < a.length; i++) {\r\n if (hasCommon(types, toType(a[i]))) {\r\n result.push(a[i])\r\n }\r\n }\r\n return result\r\n}", "filterByType(e) {\n\t\tdocument.getElementById(\"selected-service\").innerHTML = e.target.innerHTML;\t\t\n\t\tthis._setActiveClass(e);\n\n\t\tlet selected = e.target.getAttribute(\"data-value\");\n\n\t\tif(!selected) {\n\t\t\treturn this.clearFilter(\"typeFilter\").apply();\n\t\t}\n\n\t\treturn this.addFilter(\"typeFilter\", selected).apply();\t\n\t}", "function filter(array, f) {\n if (array) {\n var len = array.length;\n var i = 0;\n while (i < len && f(array[i]))\n i++;\n if (i < len) {\n var result = array.slice(0, i);\n i++;\n while (i < len) {\n var item = array[i];\n if (f(item)) {\n result.push(item);\n }\n i++;\n }\n return result;\n }\n }\n return array;\n }", "function filterValidator(arr, store = []) {\n result = [];\n store.forEach((e) => {\n if (arr.includes(e)) {\n result.push(true);\n } else {\n result.push(false);\n }\n });\n\n let res = result.every((e) => e == true);\n if (res === true) {\n return store;\n } else {\n return store.filter((e, i) => result[i] === true);\n }\n }", "function filterArray(arr, filterFn) {\r\n var tempArr = [];\r\n for (var i = 0; i < arr.length; i++) {\r\n if (filterFn(arr[i], i, arr)) {\r\n tempArr.push(arr[i]);\r\n }\r\n }\r\n return tempArr;\r\n}", "function filterType() {\r\n const filterButtonText = this.textContent.toLowerCase(); //Takes text value from filter button\r\n const liFilterNodeList = document.querySelectorAll('li'); //Selects all list items\r\n const liFilterArray = [...liFilterNodeList]; //Converts NodeList to Array\r\n\r\n function filterTypes(type) {\r\n const typesNodeList = type.querySelectorAll('.pokemon-type');\r\n const typesArray = [...typesNodeList];\r\n\r\n //Function stops and returns full array\r\n if (filterButtonText === \"all\") {\r\n return typesArray;\r\n }\r\n\r\n //If button text = type text then filter works\r\n for (let i = 0; i < typesArray.length; i++) {\r\n if (typesArray[i].textContent == filterButtonText) {\r\n return typesArray[i];\r\n }\r\n }\r\n }\r\n\r\n let results = [];\r\n results = liFilterArray.filter(filterTypes); //Adds filtered values to empty array\r\n\r\n //Function compares filtered items to full array and leaves items which are ===\r\n function compare(arr1, arr2) {\r\n arr1.forEach(function (a1) {\r\n a1.style.display = 'none';\r\n arr2.forEach(function (a2) {\r\n if (a1 === a2) {\r\n a1.style.display = '';\r\n }\r\n })\r\n })\r\n }\r\n\r\n compare(liFilterArray, results);\r\n}", "function filter(array, test){\n let passed = [];\n for(let element of array){\n if(test(element)){\n passed.push(element);\n }\n }\n return passed;\n}", "function filter(arr, fn) {\n let newArray = [];\n for (const item of arr) {\n if (fn(item)) newArray.push(item);\n }\n return newArray;\n}", "function filter(arr, fn) {\n let newArray = [];\n\n for (let elem of arr) {\n if(fn(elem)) newArray.push(elem);\n }\n\n return newArray;\n}", "function checkIfPrimitive(typeArray) {\n\t\t\t\treturn array.every(typeArray, function(item) {\n\t\t\t\t\treturn typeof item != \"object\";\n\t\t\t\t});\n\t\t\t}", "_setFilter(name, type) {\n let filters = this.filters;\n\n if (type) {\n if (!(name in filters)) {\n filters[name] = new PIXI.filters[type]();\n\n let unitContainer = this.getContainerByName('unit');\n unitContainer.filters = Object.values(filters);\n }\n }\n else {\n if (name in filters) {\n delete filters[name];\n\n let unitContainer = this.getContainerByName('unit');\n if (unitContainer.filters.length > 1)\n unitContainer.filters = Object.values(filters);\n else\n unitContainer.filters = null;\n }\n }\n\n return filters[name];\n }", "function filter(array, test) {\n let passed = [];\n for (let element of array) {\n if (test(element)) {\n passed.push(element);\n }\n }\n return passed;\n}", "function filter(el, filterFn) {\n Array.prototype.filter.call(el, filterFn);\n } //https://jsfiddle.net/w1rktecz/", "filterToArray() {\n return this.filter.apply(this, arguments).base;\n }", "function peopleInTheIlluminati(arr) {\n const result = arr.filter(function(str) {\n if (peopleInTheIlluminati.member == true) {\n return arr;\n }});\n return result;\n}", "function filter(array, test) {\n let passed = [];\n for (let element of array) {\n if (test(element)) {\n passed.push(element);\n }\n }\n\n return passed;\n}", "function filter(arr, fn) {\n let newArray = [];\n\n arr.forEach(element => { if (fn(element) === true) {\n newArray.push(element);\n }\n });\n\n return newArray;\n}", "function camRemoveDuplicates(array)\n{\n\tvar prims = {\"boolean\":{}, \"number\":{}, \"string\":{}};\n\tvar objs = [];\n\n\treturn array.filter(function(item) {\n\t\tvar type = typeof item;\n\t\tif (type in prims)\n\t\t{\n\t\t\treturn prims[type].hasOwnProperty(item) ? false : (prims[type][item] = true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn objs.indexOf(item) >= 0 ? false : objs.push(item);\n\t\t}\n\t});\n}", "function bouncer(arr) {\n return arr.filter((item) => {\n return Boolean(item);\n });\n }", "function returnBoo (arr) { \n\treturn arr.filter(function(element){\n\t\treturn typeof element === \"boolean\";\n\t})\n}", "function filter(array,test){\n //Create a new array to populate and return\n let passed = [];\n //Apply the test to each element of the array, if passes add to return array\n for(let element of array){\n if(test(element)){\n passed.push(element);\n }\n }\n return passed;\n}", "function treatArray(raw_arr)\n{\n var arr;\narr=sortArray(raw_arr)\narr=filterArray(arr)\nreturn arr\n}", "function bouncer(arr) {\n return arr.filter(function(val) {\n return Boolean(val);\n });\n}", "function uc1_getFilteredData(data, mutationTypes) {\n\n return data.filter( function(mutation) {\n\n return mutationTypes.map( \n function(t){ \n if(t.from==\"*\") \n return t.to==mutation[2] \n if(t.to==\"*\") \n return t.from==mutation[1] \n\n return t.from == mutation[1] && t.to==mutation[2]\n }\n ).reduce( function(t1,t2){ return t1 || t2 });\n\n });\n\n}", "function sortByType(data) {\n // take isolated copy keep the reference safe\n let sortedByType = data.slice();\n return sortedByType.sort(function (a, b) {\n //make case insensitive compare\n if (a.type.toLowerCase() < b.type.toLowerCase()) {\n return -1;\n } else {\n return 1;\n }\n });\n}", "async _applyTypeFilter(type) {\n if (!this._callsDone.type.find(e => e === type) && !this._filtersObject.firstFilter) {\n const cardsByType = await requestCardsByType(type);\n if (cardsByType) {\n cardsByType.forEach(e => {\n const cachedCard = this._cardsCache.find(card => card.cardId === e.cardId);\n if (!cachedCard) {\n this._cardsCache.push(\n new Card(e.cardId, e.cardSet, e.type, e.faction, e.rarity, e.race, e.playerClass)\n );\n }\n });\n }\n\n this._callsDone.type.push(type);\n }\n\n if (!this._filtersObject.firstFilter) this._filtersObject.firstFilter = 'type';\n\n await this._rebuildCardsShownArray('type', type);\n }", "function getDivFromarray(array,type){\n var comp;\n for(var i in array){\n if(array[i].getAttribute(\"compType\") == type){\n comp = array[i];\n array.splice(i,1);\n break;\n }\n }\n return comp;\n}", "function filter(array, fn) {\n let filteredArray = [];\n array.forEach(element => {\n if (!fn(element)) {\n filteredArray.push(element);\n }\n });\n console.log(filteredArray); \n}", "function bouncer(arr) {\n return arr.filter((val) => Boolean(val));\n}", "function destroyer(arr) {\n let array = Array.from(arguments).slice(1);\n return arr.filter(function(item){\n return !array.includes(item)\n });\n }", "function selectByTypes(e) {\n\tbtnLoadMore.style.display = 'none';\n\tcardsList.innerHTML = '';\n\tlet keyType = e.target.value;\n\tlet arrByType = dataArr.filter((card) => card.types.join(', ').toLowerCase().includes(keyType.toLowerCase()));\n\t\n\trenderCardList(arrByType);\n}", "function filter(arr,fn){\n let filteredArray=[];\n for(let i =0;i<arr.length;i++){\n if(fn(arr[i])===true){\n filteredArray.push(arr[i]);\n }\n }\n return filteredArray;\n}", "getUniqueTypes() {\r\n let typesSet = this.state.types;\r\n this.state.items.map(item => (item.types.map(type => {if(this.state.allowedTypes.indexOf(type) > -1) typesSet.add(type)})));\r\n return Array.from(typesSet);\r\n }", "function bouncer(arr) {\n return arr.filter(val => Boolean(val));\n}", "function filter(arr,fn) {\n const newArray = [];\n for(let i = 0; i<arr.length; i++){\n if(fn(arr[i])){\n newArray.push(arr[i]);\n }\n } \n return newArray;\n}", "function filter (array, filters) { // filter an array of objects.\n let itemstoinclude = Object.keys(filters);\n return array.filter((item) => itemstoinclude.every((key) => (filters[key].indexOf(item[key]) !== -1)));\n} // filtered array.", "function filter (array, filters) { // filter an array of objects.\n let itemstoinclude = Object.keys(filters);\n return array.filter((item) => itemstoinclude.every((key) => (filters[key].indexOf(item[key]) !== -1)));\n} // filtered array.", "function filter(arr, func){\n let filtered = []\n for(let i=0; i < arr.length; i++){\n if(func(arr[i])){\n filtered.push(arr[i])\n }\n }\n return filtered;\n}" ]
[ "0.7333189", "0.73054296", "0.7120849", "0.7100422", "0.7059188", "0.6935863", "0.6863183", "0.67732817", "0.67341924", "0.67005223", "0.66774344", "0.66760725", "0.66048586", "0.65725523", "0.6528385", "0.64564", "0.6439021", "0.6296112", "0.62323815", "0.6227997", "0.6216211", "0.6210078", "0.6192726", "0.6150964", "0.6092619", "0.6089932", "0.60278016", "0.5975625", "0.59432113", "0.59242487", "0.5919977", "0.58460075", "0.5806774", "0.58051986", "0.5769091", "0.57208055", "0.5695975", "0.5691282", "0.56846666", "0.56792533", "0.5647489", "0.5641331", "0.5637141", "0.56244177", "0.56180215", "0.5615109", "0.5580466", "0.5575393", "0.5564643", "0.5559624", "0.5559311", "0.55536115", "0.5538808", "0.5491176", "0.54796857", "0.5457112", "0.54446685", "0.54304045", "0.54183245", "0.541453", "0.5386816", "0.5386103", "0.5383379", "0.53795516", "0.5374843", "0.53700554", "0.5369313", "0.53688157", "0.5359663", "0.5359348", "0.5350033", "0.53488976", "0.53405035", "0.5336613", "0.53352934", "0.53309584", "0.53125453", "0.53120095", "0.5308203", "0.53074664", "0.529939", "0.529535", "0.5293194", "0.5288068", "0.5283411", "0.5280176", "0.52800065", "0.52789533", "0.5275583", "0.5274483", "0.52696836", "0.52640986", "0.5258912", "0.52565545", "0.52532715", "0.52493834", "0.5248939", "0.5247441", "0.5247441", "0.5245908" ]
0.5677626
40
middleware to check if user is logged in or not.
function requireAuth(nextState, replace) { if (!LoginStore.isLoggedIn()) { replace({ pathname: '/login', state: { nextPathname: nextState.location.pathname } }) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLoggedIn(request, response, next){\n // If they are authenticated, carry on\n if(request.isAuthenticated()){ return next();}\n // If they aren't, redirect them to the home page\n response.redirect('/');\n}", "function isLoggedIn(request, response, next) {\n // if user is authenticated in the session, carry on\n if (request.isAuthenticated())\n return next();\n // if they aren't redirect them to the starting page\n response.redirect('/');\n}", "function isLoggedIn(request, response, next) {\n\n\t// if user is authenticated in the session, carry on\n\tif (request.isAuthenticated())\n\t\treturn next();\n\n\t// if they aren't redirect them to the home page\n\tresponse.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n console.log(\"Show User: \", req.isAuthenticated())\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) return next();\n else res.redirect('/signin');\n }", "function isLoggedIn(req, res, next) {\n \n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n \n // if they aren't redirect them to the home page\n res.redirect('/');\n }", "function isLoggedIn(req, res, next) {\n console.log(\"checking to see if they are authenticated!\")\n // if user is authenticated in the session, carry on\n res.locals.loggedIn = false\n if (req.isAuthenticated()){\n console.log(\"user has been Authenticated\")\n res.locals.loggedIn = true\n return next();\n } else {\n console.log(\"user has not been authenticated...\")\n res.redirect('/');\n }\n}", "function isLoggedIn(req, res, next){\n if (req.isAuthenticated())\n return next();\n res.redirect('/signin');\n }", "function isLoggedIn(req, res, next) {\n\t// if user is authenticated in the session, carry on\n\tif (req.isAuthenticated())\n\t\tif (req.user.verified) {\n\t\t\treturn next();\n\t\t}\n\t// if they aren't redirect them to the home page\n\tres.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/voting_app');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, pass to next middleware\n if (req.isAuthenticated()) return next();\n // if user not authenticated redirect them to the home page\n res.redirect('/');\n }", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n\n return next();\n\n // redirect to sign-in if user isn't logged in.\n res.redirect('/signin');\n }", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n }", "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()) {\n return next();\n } else {\n res.redirect('/signin');\n }\n }", "function isLoggedIn(req, res, next) {\n\tconsole.log('isLoggedIn middleware');\n if (req.isAuthenticated()) {\n \treturn next();\n } else {\n \tres.redirect('/users');\n }\n}", "function isLoggedIn(req, res, next) {\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n }", "function isLoggedIn(req,res,next){\n\n //if user is authenticated, go on\n if(req.isAuthenticated()){\n console.log(\"User is authenticated\")\n return next();\n }\n else{ //if not authenticated, redirect to homepage\n res.redirect(\"/\");\n }\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n }", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n console.log('user isLoggedIn and Authenticated');\n return next();\n } else {\n console.log('user is not isLoggedIn not Authenticated');\n res.redirect('/login');\n }\n }", "function isLoggedIn(req, res, next) {\n if (req.user) return next();\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n // if they aren't redirect them to the home page\n res.redirect('/');\n }", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n }", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/');\n }", "function isLoggedIn(req, res, next) {\n // console.log(\"=============================\");\n // console.log(req);\n // console.log(\"=============================\");\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n console.log('checking for logged in user');\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next){\n\n //if user is authenticated in the session, go ahead\n if(req.isAuthenticated())\n return next();\n\n //if they aren't redirect them to the home page\n res.redirect('/');\n\n\n }", "function isLoggedIn(req, res, next){\n \n if(req.isAuthenticated()){\n \n return next();\n }\n \n res.redirect(\"/login\");\n }", "function isLoggedIn(req, res, next) {\n if (res.locals.currentUser) {\n next();\n } else {\n res.sendStatus(403);\n }\n}", "function isLoggedIn(req, res, next) {\n console.log(\"in inloggedin\");\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated()){\n console.log(\"is authenticated\");\n return next();\n }\n\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n }", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/#/');\n }", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n return next();\n } else {\n res.sendStatus(401);\n }\n }", "function isLoggedIn(request, response, next) {\n if(request.isAuthenticated()){\n return next();\n }\n response.redirect(\"/catalog/login\");\n}", "function isLoggedIn(req, res, next) {\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated()) {\n console.log('isLoggedin');\n return next();\n }\n console.log('is not logged in');\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n }", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) \n \n return next();\n\n res.redirect(\"/\");\n }", "function isLoggedIn(req, res, next) {\n\n if (req.isAuthenticated())\n\n return next();\n\n res.redirect('/signin');\n\n }", "function isLoggedIn (req, res, next) {\n\t\tif (req.isAuthenticated()) {\n\t\t\treturn next();\n\t\t} \n\n\t\t// otherwise redirect to login\n\t\tres.redirect('/login');\n\t}", "function isLoggedIn() {\n\treturn(req, res, next) => {\n// \t\tconsole.log(`req.session.passport.user: $(JSON.stringify(req.session.passport)}`);\n\t\tif(req.isAuthenticated()) return next();\n\t\treturn res.redirect('/login');\n\t}\n}", "function isLoggedIn(req, res, next) {\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated() && req.user){ return next(); }\n\n // if they aren't, send 401: Unauthorized\n res.sendStatus(401);\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n\t\t // if user is authenticated in the session, carry on \n\t\t if (req.isAuthenticated())\n\t\t return next();\n\n\t\t // if they aren't redirect them to the home page\n\t\t res.redirect('/');\n\t}", "function isLoggedIn(req, res, next) {\r\n\r\n // if user is authenticated in the session, carry on \r\n if (req.isAuthenticated())\r\n return next();\r\n\r\n // if they aren't redirect them to the home page\r\n res.redirect('/');\r\n \r\n}", "function isLoggedIn(req, res, next) {\r\n\r\n // if user is authenticated in the session, carry on\r\n if (req.isAuthenticated())\r\n return next();\r\n\r\n // if they aren't redirect them to the home page\r\n res.redirect('/');\r\n}", "function isLoggedIn(req, res, next) {\r\n\r\n // if user is authenticated in the session, carry on \r\n if (req.isAuthenticated())\r\n return next();\r\n\r\n // if they aren't redirect them to the home page\r\n res.redirect('/');\r\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n\n}", "function isLoggedIn(req, res, next) {\n console.log('running isloggedin');\n\n if (req.isAuthenticated()) {\n\n console.log('log in succeeded');\n return next();\n\n }\n console.log('log in failed');\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated()) {\n console.log('User is authenticated')\n return next();\n }\n console.log('User is already logged in')\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n console.log(req.user)\n}", "function isLoggedIn(req, res, next) {\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n else\n // if they aren't redirect to login page\n res.redirect('/');\n }", "function isLoggedIn(req,res,next){\n\tconsole.log(\"Check user is logged in!!!!!\");\n\tconsole.log(req.isAuthenticated());\n\t//if user is authenticated in the session; continue\n\tif(req.isAuthenticated()){\n\t\treturn next();\n\t}\n\n\t//if not, redirect to home page\n\tres.redirect('/');\n}", "function isLoggedIn (req, res, next) {\n\t\tif (req.isAuthenticated()) {\n\t\t\treturn next();\n\t\t} else {\n\t\t\tres.redirect('/');\n\t\t}\n\t}", "function isAuthenticated(req, res, next) {\n if (req.session.user) {\n return next();\n }\n res.json({ error: \"No logged in user!\", success: false });\n}", "function isLoggedIn(req, res, next) {\n\n if (req.isAuthenticated())\n\n return next();\n\n res.redirect('/login');\n\n }", "function isLoggedIn(req, res, next) {\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n console.log(\"isAuthenticated: \", req.isAuthenticated());\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('login');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated()) {\n return next();\n }\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n /* jslint unparam: true */\n if (req.user) {\n res.json({\n success: true,\n user: req.user,\n });\n } else {\n res.json({\n success: false,\n user: '',\n });\n }\n}", "function isLoggedIn(req, res, next) {\n\n\t\t// if user is authenticated in the session, carry on\n\t\tif (req.isAuthenticated()) {\n\t\t\treturn next();\n\t\t}\n\n\t\t// if they aren't redirect them to the home page\n\t\tres.redirect('/');\n\n\t}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/');\n }", "function isLoggedIn(req, res, next) {\n // if user is authentificated in the session, carry on\n if (req.isAuthenticated()) {\n return next();\n }\n\n // if the aren't redirect them to the home page\n res.redirect(\"/#/login\");\n }", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n // if the user is authenticated, proceed to the request route\n if (req.isAuthenticated()) return next()\n // Otherwise, return them to the login page\n res.redirect('/users/login');\n}", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated()) {\n return next();\n }\n // if they aren't redirect them to the home page\n res.redirect('/');\n}" ]
[ "0.8130827", "0.80180913", "0.7876595", "0.782581", "0.7809108", "0.7793106", "0.77660173", "0.7759402", "0.7758418", "0.77542377", "0.7750908", "0.77412885", "0.7731095", "0.7715523", "0.7710746", "0.76985776", "0.7694054", "0.7693698", "0.7691954", "0.7687467", "0.768662", "0.7681497", "0.76813585", "0.7679675", "0.76756114", "0.76732475", "0.7669172", "0.76682115", "0.766663", "0.7663373", "0.7661634", "0.765162", "0.7651559", "0.7644533", "0.76438624", "0.7627676", "0.7626902", "0.76253515", "0.7624272", "0.7620594", "0.7620594", "0.7619761", "0.76182526", "0.7616049", "0.7614543", "0.76125515", "0.76117283", "0.7610635", "0.7610635", "0.7610635", "0.7607633", "0.76059306", "0.7600908", "0.7599259", "0.7592396", "0.75912076", "0.75895405", "0.7578751", "0.7577694", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.7576901", "0.757343", "0.75733244", "0.7569093", "0.75679433", "0.75657517", "0.7564583", "0.7564583", "0.7564583", "0.7564583", "0.7564583", "0.7564583", "0.7564583", "0.7564583", "0.7564583", "0.7564583", "0.7564583", "0.7564583", "0.7564583", "0.7564583", "0.756397", "0.7563649" ]
0.0
-1
if winningPlayer is null then its a draw
constructor(gamePage, winningPlayer=null){ super(); this.gamePage = gamePage; this.winningPlayer = winningPlayer; this.addEvents({ 'click .rematch-btn' : 'rematch', 'click .new-game-btn' : 'newGame', 'click .hide-window-btn' : 'hideWindow' }); FixEverything.navbar.render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForWin() {\r\n if (game_1.isWinningState(board)) {\r\n var winner = game_1.detectWinner(board);\r\n view_1.displayGameOver(winner);\r\n }\r\n else if (game_1.isDrawState(board)) {\r\n view_1.displayGameOver(null);\r\n }\r\n}", "checkWinner() {\n this.checkInHorizontal(player.getPlayerColor()[0]);\n this.checkInVertical(player.getPlayerColor()[0]);\n this.checkInDiagonalTopLeftBottomRight(player.getPlayerColor()[0]);\n this.checkInDiagonalTopRightBottomLeft(player.getPlayerColor()[0]);\n\n //If board is full of pawns and no-one win then send that is draw \n const drawMessage = 'Game ended with draw';\n if (this.checkdraw()) {\n socket.emit('gameEnded', {\n room: this.getRoomId(),\n message: drawMessage,\n });\n this.endGameMessage(drawMessage);\n }\n }", "function win(){\n //logic for if the game is over\n //return who won the game of if its a draw\n var winner2 = win1(sendObj.Board);\n if (winner2 != \"none\"){\n if(winner2 == \"draw\"){\n sendObj.info = \"It's a draw!\";\n return true;\n }else{\n sendObj.info = winner2 + \" wins!\";\n return true;\n }\n }\n}", "function gameIsDraw(game) {\n return game.winner === undefined && game.turn === 9;\n}", "function drawChecker(){\r\n if (!winChecker(gameField) && isFull()){\r\n document.getElementById('winner').innerHTML = \"Nobody wins! We have a draw(standoff)!\";\r\n disableAllbuttons();\r\n showButton(\"new_game\");\r\n}\r\n }", "function checkWinner() {\n stopLoop();\n Game.powerUpCanvas.font = \"italic 36px calibri\";\n\n if (Game.players[1].score > Game.players[0].score) {\n Game.powerUpCanvas.fillStyle = \"Purple\";\n Game.powerUpCanvas.fillText(\"Purple player wins!\", 100, 250);\n }\n\n else if (Game.players[0].score > Game.players[1].score) {\n Game.powerUpCanvas.fillStyle = \"Green\";\n Game.powerUpCanvas.fillText(\"Green player wins!\", 500, 250);\n Game.players[0].srcX = 326;\n Game.players[0].srcY = 1182;\n }\n else if (Game.players[1].score === Game.players[0].score) {\n Game.powerUpCanvas.fillText(\"Draw!\", 390, 250);\n }\n}", "displayWinner() {\n var winningPiece = game.isXTurn ? 'x' : 'o'\n if(game.singleplayer || game.vsAi)\n game.winner = winningPiece\n else\n {\n if(game.player === winningPiece)\n game.winner = game.username\n else\n game.winner = game.opponent\n }\n\n\n game.saveBoard()\n\n game.state.start('win')\n }", "function isDraw() {\n if (occupiedCells === 9 && !isGameOver()) {\n playerDisplay.textContent = \"IT'S A TIE!\";\n modalHeader.textContent = \"IT'S A TIE!\";\n modalText.textContent = \"\";\n\n isGameOver(true);\n }\n}", "function decideWinner() {\n\tgameOver = true;\n\tcardOpacity();\n\tif (player1.score > 21 && player2.score > 21) {\n\t\ttextTitle.textContent = \"No one won!\";\n\t\tdrawSound.play();\n\t\tplayer1.draws++;\n\t\tplayer2.draws++;\n\t\tdocument.querySelector(\".player1-draws\").textContent = player1.draws;\n\t\tdocument.querySelector(\".player2-draws\").textContent = player2.draws;\n\t} else if (player1.score > 21) {\n\t\ttextTitle.textContent = \"Player 2 won!\";\n\t\tlossSound.play();\n\t\tplayer2.wins++;\n\t\tplayer1.losses++;\n\t\tdocument.querySelector(\".player1-losses\").textContent = player1.losses;\n\t\tdocument.querySelector(\".player2-wins\").textContent = player2.wins;\n\t} else if (player2.score > 21) {\n\t\ttextTitle.textContent = \"Player 1 won!\";\n\t\twinSound.play();\n\t\tplayer1.wins++;\n\t\tplayer2.losses++;\n\t\tdocument.querySelector(\".player1-wins\").textContent = player1.wins;\n\t\tdocument.querySelector(\".player2-losses\").textContent = player2.losses;\n\t} else {\n\t\tconst player1Complement = 21 - player1.score;\n\t\tconst player2Complement = 21 - player2.score;\n\t\tif (player1Complement < player2Complement) {\n\t\t\ttextTitle.textContent = \"Player 1 won!\";\n\t\t\twinSound.play();\n\t\t\tplayer1.wins++;\n\t\t\tplayer2.losses++;\n\t\t\tdocument.querySelector(\".player1-wins\").textContent = player1.wins;\n\t\t\tdocument.querySelector(\".player2-losses\").textContent = player2.losses;\n\t\t} else if (player2Complement < player1Complement) {\n\t\t\ttextTitle.textContent = \"Player 2 won!\";\n\t\t\tlossSound.play();\n\t\t\tplayer2.wins++;\n\t\t\tplayer1.losses++;\n\t\t\tdocument.querySelector(\".player1-losses\").textContent = player1.losses;\n\t\t\tdocument.querySelector(\".player2-wins\").textContent = player2.wins;\n\t\t} else {\n\t\t\ttextTitle.textContent = \"Draw\";\n\t\t\tdrawSound.play();\n\t\t\tplayer1.draws++;\n\t\t\tplayer2.draws++;\n\t\t\tdocument.querySelector(\".player1-draws\").textContent = player1.draws;\n\t\t\tdocument.querySelector(\".player2-draws\").textContent = player2.draws;\n\t\t}\n\t}\n}", "function drawPlayer(player){\n ctx.fillStyle = 'red';\n if (player.id != selfID){\n ctx.fillRect(\n (player.x - (player.width/2)) + objOffsetX,\n (player.y - (player.height/2)) + objOffsetY,\n player.width,\n player.height\n );\n ctx.fillText(player.id, player.x+player.width + objOffsetX, player.y + objOffsetY);\n } else {\n ctx.fillRect(\n cameraPositionX - (player.width/2),\n cameraPositionY - (player.height/2),\n player.width,\n player.height\n );\n ctx.fillText(player.id, cameraPositionX+player.width, cameraPositionY);\n }\n\n //ctx.fillText(player.id, player.x+player.width, player.y);\n}", "function drawWinner(board, player) {\r\n let winningCoords;\r\n if (backwardSlashWinCoords.length === winCondition)\r\n winningCoords = backwardSlashWinCoords\r\n else if (rowWinCoords.length === winCondition)\r\n winningCoords = rowWinCoords\r\n else if (forwardSlashWinCoords.length === winCondition)\r\n winningCoords = forwardSlashWinCoords\r\n else if (columnWinCoords.length === winCondition)\r\n winningCoords = columnWinCoords\r\n\r\n for (let column = 0; column < heightLimit; column++) {\r\n for (let row = 0; row < board.length; row++){\r\n if (board[row][column] === 1) {\r\n getCell(row, column).css('background-color', 'grey')\r\n } else if (board[row][column] === 2) {\r\n getCell(row, column).css('background-color', 'grey')\r\n }\r\n }\r\n }\r\n for (let x = 0; x < winningCoords.length; x++) {\r\n let winningPair = winningCoords[x]\r\n if (player === 1)\r\n getCell(winningPair[0], winningPair[1]).css('background-color', 'red')\r\n else if (player === 2)\r\n getCell(winningPair[0], winningPair[1]).css('background-color', 'yellow')\r\n }\r\n const firstPlayer = $('#player-one').val()\r\n const secondPlayer = $('#player-two').val()\r\n if (player === 1) {\r\n if(firstPlayer)\r\n $('h2').text(`${firstPlayer} has won!`)\r\n else \r\n $('h2').text(`You have won!`)\r\n } else if (player === 2) {\r\n if (twoPlayer)\r\n $('h2').text(`${secondPlayer} has won!`)\r\n else\r\n $('h2').text(`Computer has won!`)\r\n }\r\n}", "function checkForWin() {\n\n var d = $vast.MathUtil.getPointDistance(mainPlayer.x, mainPlayer.y, goal.x, goal.y);\n if (d <= 1) {\n mainPlayer.setPosition(64, 64);\n }\n }", "function winCondition(sprite){\n if (playerGroup.length == 1) {\n endNextFrame = 1\n }\n}", "checkForDraw() {\n if (turn == 8 && this.match == false) {\n document.getElementById(\"winner\").innerHTML = \"The game ended in a draw\";\n document.getElementById(\"reset-button\").disabled = false;\n running = false;\n }\n }", "function checkWinner() {\n if (winnerCalled()) {\n gameOver();\n }\n}", "function checkForDraw () {\n\tif (usedBoxes.length === 9 && player1.hasWon === false && player2.hasWon === false) {\n\t\t$('#board').hide();\n\t\t$('.draw').show();\n\t}\n}", "function checkWin(player) {\n // Variables to keep track of win, start at true and are proved false\n var horizontalWin = true;\n var verticalWin = true;\n var d1Win = true;\n var d2Win = true;\n\n // Check horizontally\n for(var cIndex = 0; cIndex < NUM_COLS; cIndex++) {\n // Check each column at the same row value\n if(!boxes[row][cIndex].classList.contains(player)) {\n horizontalWin = false;\n }\n }\n\n // Check vertically\n for(var rIndex = 0; rIndex < NUM_ROWS; rIndex++) {\n // Check each row at the same column value\n if(!boxes[rIndex][column].classList.contains(player)) {\n verticalWin = false;\n }\n }\n\n // Check if the latest piece was placed in a position that could win\n // diagonally\n if((row === column) || (Math.abs(row - column) === NUM_ROWS - 1)) {\n for(var d = 0; d < NUM_ROWS; d++) {\n // Check diagonally from top left to bottom right\n if(!boxes[d][d].classList.contains(player)) {\n d1Win = false;\n }\n\n // Check diagonally from bottom left to top right\n if(!boxes[NUM_ROWS - d - 1][d].classList.contains(player)) {\n d2Win = false;\n }\n }\n }\n\n // Couldn't have won diagonally\n else {\n d1Win = false;\n d2Win = false;\n }\n\n //console.log(\"H: \" + horizontalWin + \", V: \" + verticalWin + \", D: \" + d1Win + \", \" + d2Win);\n\n // Player wins\n if(horizontalWin || verticalWin || d1Win || d2Win) {\n if(player === xClass) {\n victoryText.textContent = \"X Player Wins!\";\n // Increase score of X player\n xScore.textContent = Number(xScore.textContent) + 1\n }\n else {\n victoryText.textContent = \"O Player Wins!\";\n // Increase score of O player\n oScore.textContent = Number(oScore.textContent) + 1\n }\n\n $(victoryText).show('slow');\n gameOver = true;\n return true;\n }\n\n // If all spaces are taken and nobody has won\n if(boxCount === NUM_ROWS * NUM_COLS) {\n victoryText.textContent = \"Cat's Game\";\n $(victoryText).show('slow');\n gameOver = true;\n }\n\n // Didn't win... yet\n return false;\n\n }", "function drawWinner(){\n var isWinner = true;\n for (var i = 0; i < answers.length; i++){\n if (!answers[i].found){\n isWinner = false;\n }\n }\n if (isWinner){\n tile.beginPath();\n tile.strokeStyle = '#36a500';\n tile.fillStyle = '#000000';\n tile.lineWidth = 25;\n tile.fillRect(100, 90, 300, 200);\n tile.clearRect(110, 100, 280, 180);\n tile.strokeRect(120, 110, 260, 160);\n tile.font = 'bold 42pt serif';\n tile.fillText('You Win!', 137, 208);\n tile.closePath();\n }\n}", "function checkDrawRound(){\r\n\talert('Do you won\"t to create another draw?');\r\n\t\t\tif(confirm){\r\n\t\t\t\t\tenterPlayer();\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t\r\n}", "function winInform (letterWon, isDraw){\n gameOver = true;\n if (isDraw == undefined){\n //Win 1\n if (letterWon == \"X\" && playerIsX == true){\n $(\"#win-celebrate\").html(\"You won!\");\n $(\"#win-celebrate\").show(\"fast\");\n console.log(\"Win 1\");\n setTimeout(resetBoard(), 1000);\n //Win 2\n } else if (letterWon == \"X\" && playerIsX == false){\n $(\"#win-celebrate\").html(\"You lost :/\");\n $(\"#win-celebrate\").show(\"fast\");\n console.log(\"Win 2\");\n setTimeout(resetBoard(), 1000);\n //Win 3\n } else if (letterWon == \"O\" && playerIsX == false){\n $(\"#win-celebrate\").html(\"You won!\");\n $(\"#win-celebrate\").show(\"fast\");\n console.log(\"Win 3\");\n setTimeout(resetBoard(), 1000);\n //Win 4\n } else if (letterWon == \"O\" && playerIsX == true){\n $(\"#win-celebrate\").html(\"You lost :/\");\n $(\"#win-celebrate\").show(\"fast\");\n console.log(\"Win 4\");\n setTimeout(resetBoard(), 1000);\n }\n } else {\n $(\"#win-celebrate\").html(\"Draw!\");\n $(\"#win-celebrate\").show(\"fast\");\n setTimeout(resetBoard(), 1000);\n }\n}", "function isMatchDraw() {\n\tif(_selectedFighterObj.healthPoints <= 0 && _selectedDefenderObj.healthPoints <= 0) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "function renderOpponentPlayed(card) {\n var xpos = canvas.width / 3 * 2 - playingCard.width / 2;\n var ypos = canvas.height / 3 - playingCard.height / 2;\n ctx.beginPath();\n ctx.rect(xpos - 20, ypos - 20, playingCard.width + 40, playingCard.height + 40);\n if (playerWonTurn === 0) {\n ctx.fillStyle = winColor;\n ctx.fill();\n }\n if (playerWonTurn === 1) {\n ctx.fillStyle = loseColor;\n ctx.fill();\n }\n if (playerWonTurn === 2) {\n ctx.fillStyle = tieColor;\n ctx.fill()\n }\n ctx.strokeStyle = colorThemeSecondary;\n ctx.stroke();\n ctx.closePath();\n if (card !== undefined && (card.name)) {\n var cardName = cardInitial(card.name);\n if (playerPlayed) {\n renderPlayingCard(xpos, ypos, playingCard.frontColor, cardName);\n } else {\n //play animation here\n renderPlayingCard(xpos, ypos);\n }\n }\n }", "function winner() {\n var playerTotal = playerHand.calculatePoints();\n if (playerHand.calculatePoints() < dealerHand.calculatePoints()) {\n var dealerTotal = dealerHand.calculatePoints();\n $('#messages').append('Dealer wins');\n $('#again-button').show();\n $('#hit-button, #stand-button').attr('disabled', true);\n } else if (dealerHand.calculatePoints() < playerHand.calculatePoints()) {\n $('#messages').append('You win!');\n $('#again-button').show();\n $('#hit-button, #stand-button').attr('disabled', true);\n } else {\n $('#messages').append('Push');\n }\n }", "function checkWin () {\n\t\tif (scores[0] === 10) {\n \t\treturn player1;\n } else if (scores[1] === 10) {\n \t\treturn player2;\n } else {\n \t\treturn null;\n }\n}", "function win(tie) {\n if (true) {\n let message = document.querySelector('.message')\n screenWin.style.display = 'block';\n screenStart.style.display = 'none';\n if (tie) {\n message.textContent = \"I'ts a Draw\";\n screenWin.classList.add('screen-win-tie');\n } else if (player2.classList.contains('active')) {\n screenWin.classList.add('screen-win-one');\n changeWinner();\n } else {\n screenWin.classList.add('screen-win-two');\n changeWinner();\n }\n }\n }", "function __playerWon(player) {\n var playerScores = [], winningPlayer, lostPlayers = [];\n\n for (var i = 0; i < __players.length; i++) {\n var p = __players[i],\n playerScore = p.getScore();\n\n if (p === player) {\n playerScore++;\n }\n\n playerScores.push(playerScore);\n\n }\n\n //console.log()\n\n //__setGamePauseStatus(true);\n __resetGame(playerScores);\n\n for (var i = 0; i < __players.length; i++) {\n var p = __players[i];\n\n if (player.getName() === p.getName()) {\n winningPlayer = p;\n }\n else {\n lostPlayers.push(p);\n }\n\n p.setScore(playerScores[i]);\n }\n\n __eventCallbacks['gameWin'].call(__game, winningPlayer, lostPlayers);\n\n //__showTitleScreen();\n\n }", "function renderPlayerPlayed(card) {\n var xpos = canvas.width / 3 - playingCard.width / 2;\n var ypos = canvas.height / 3 * 2 - playingCard.height / 2;\n ctx.beginPath();\n ctx.rect(xpos - 20, ypos - 20, playingCard.width + 40, playingCard.height + 40);\n if (playerWonTurn === 0) {\n ctx.fillStyle = loseColor;\n ctx.fill();\n }\n if (playerWonTurn === 1) {\n ctx.fillStyle = winColor;\n ctx.fill();\n }\n if (playerWonTurn === 2) {\n ctx.fillStyle = tieColor;\n ctx.fill()\n }\n ctx.strokeStyle = colorThemeSecondary;\n ctx.stroke();\n ctx.closePath();\n if (card !== undefined && (card.name)) {\n var cardName = cardInitial(card.name);\n renderPlayingCard(xpos, ypos, playingCard.frontColor, cardName);\n }\n }", "function gameOver(playerWins) {\n isGameOver = true;\n if (playerWins == true) {\n songWin.play();\n renderPlayerWins();\n } else {\n songLose.play();\n renderPlayerLoses();\n }\n}", "function checkWinner(player, x, y) {\n if (isWinning(player, x, y) ) {\n playSound('pacman_intermission.wav');\n player.winCount++;\n animUpdateScoreboard();\n updateLocalStorage(player);\n $('.battlefield li').off('click', computeAndCheckWinner);\n alert(player.name + ' wins!');\n // animation on Clear button to make it stand out, disappears on click\n\n } else if (usedFields.length === 9){\n playSound('pacman_death.wav');\n return alert('Tie game!');\n $('.battlefield li').off('click', computeAndCheckWinner);\n // animation on Clear button to make it stand out\n }\n}", "function checkForWinner(player) {\n let racetrack = document.getElementById('container');\n if ((player.xPosition + player.width) >= racetrack.offsetWidth) {\n winAnimation(player, players);\n } \n }", "checkForWinner(){\n if (turn >= 4) {\n var x;\n if (this.choice == \"x\") {\n canvas.strokeStyle = \"#E93636\";\n }\n\n else {\n canvas.strokeStyle = \"#4C4CEE\";\n }\n\n for (var i = 0;i<3; i++) {\n x = i*3\n if (boardSquares[x].choice ==\n this.choice && boardSquares[x+1].choice == this.choice && boardSquares[x+2].choice == this.choice) {\n this.match = true;\n this.draw = {\n \"rightX\": .11,\n \"rightY\": .14+(i)*(.333),\n \"leftX\": .89,\n \"leftY\": .14+(i)*(.333)\n };\n this.drawLine();\n }\n }\n\n for (var i = 0;i<3;i++) {\n if (boardSquares[i].choice ==\n this.choice && boardSquares[i+3].choice == this.choice && boardSquares[i+6].choice == this.choice) {\n this.match = true;\n this.draw = {\n \"rightX\": .168+(i)*(.333),\n \"rightY\": .064,\n \"leftX\": .168+(i)*(.333),\n \"leftY\": .89\n };\n this.drawLine();\n }\n }\n\n if (boardSquares[0].choice == this.choice && boardSquares[4].choice == this.choice && boardSquares[8].choice == this.choice){\n this.match = true;\n this.draw = {\n \"rightX\": .108,\n \"rightY\": .067,\n \"leftX\": .897,\n \"leftY\": .883\n };\n this.drawLine();\n }\n\n else if (boardSquares[2].choice == this.choice && boardSquares[4].choice == this.choice && boardSquares[6].choice == this.choice){\n this.match = true;\n this.draw = {\n \"rightX\": .897,\n \"rightY\": .067,\n \"leftX\": .108,\n \"leftY\": .883\n }\n this.drawLine()\n }\n\n if (this.match) {\n document.getElementById(\"myCanvas\").hidden = false;\n document.getElementById(\"winner\").innerHTML = \"Winner is: \" + player.toUpperCase();\n document.getElementById(\"reset-button\").disabled = false;\n running = false;\n }\n }\n }", "function declareDraw (draw) {\n drawResult.css('display', 'block')\n reset.css('display', 'block')\n //winner = winner === player1 ? 'player2' : 'player1'\n drawResult.html('DRAW!')\n}", "function playerWins() {\n if (scoreOne === 5) {\n winner = winPlayerOne;\n fill(255, 51, 153);\n textSize(48);\n text(winner, width / 4, height / 2);\n setTimeout(endGame, 1500); // Wait 1.5 secons and calls endGame function\n\n } else if (scoreTwo === 5) {\n winner = winPlayerTwo;\n fill(255, 51, 153);\n textSize(48);\n text(winner, width / 4, height / 2);\n setTimeout(endGame, 1500); // Wait 1.5 secons and calls endGame function\n\n }\n}", "function win() {\n winner.play();\n $(\"#outcome\").show().text(\"Winner!\")\n wins++;\n $(\"#wins\").text('Wins: ' + wins);\n gameReset();\n }", "function checkForWin() {\n var winner = true;\n var youWin = document.getElementById(\"win\");\n for (var i = 0; i < board.cells.length; i++) {\n if (board.cells[i].isMine === true && board.cells[i].isMarked === false) {\n return \"\";\n }\n if (board.cells[i].isMine === false && board.cells[i].hidden === true) {\n return \"\";\n }\n }\n lib.displayMessage(\"You win!\");\n youWin.play();\n document.getElementById(\"fireworks.wav\").play();\n }", "function draw() {\n background(0);\n strokeWeight(6);\n stroke(255);\n\n // Draw board shape\n line(w, 0, w, height);\n line(w * 2, 0, w * 2, height);\n line(0, h, width, h);\n line(0, h * 2, width, h * 2);\n\n for (let j = 0; j < 3; j++) {\n for (let i = 0; i < 3; i++) {\n let xCord = w * i + w / 2;\n let yCord = h * j + h / 2;\n let spot = gameBoard[i][j];\n textSize(32);\n let xRadius = w / 4;\n if (spot === Human_Player) {\n noFill();\n ellipse(xCord, yCord, xRadius * 2);\n } else if (spot === AI_Player) {\n line(\n xCord - xRadius,\n yCord - xRadius,\n xCord + xRadius,\n yCord + xRadius\n );\n line(\n xCord + xRadius,\n yCord - xRadius,\n xCord - xRadius,\n yCord + xRadius\n );\n }\n }\n }\n\n let result = checkWinner();\n if (result) {\n noLoop();\n let resultDiv = createDiv(\"\");\n resultDiv.style(\"font-size\", \"32pt\");\n resultDiv.style(\"color\", \"white\");\n\n if (result === \"tie\") {\n resultDiv.html(\"Tie!\");\n } else {\n resultDiv.html(`${result} is the Winner!`);\n }\n }\n}", "render() {\n ctx.drawImage(Resources.get(this.sprite), this.x, this.y);\n\t\t // wait half second to check if player is in winner area\n\t\t setTimeout(()=> {\n\t\t\t if (this.y === (gameBoard.topEdge - 20)) {\n\t\t\t\t alert('You Won!');\n\t\t\t\t this.playerReset();\n\t\t\t }\n\t\t }, 500)\n }", "function gameOver1(trio) {\n\tif (!trio) {\n\t\tconsole.log(\"This game is a draw.\");\n\t} else {\n\t\tconsole.log(trio.winner+\" wins!\")\n\t}\n}", "function win() {\n if (defenders == 0) {\n console.log('Game Win');\n $('#display').empty();\n var winText = document.createElement('h2');\n winText.className = 'text-light';\n winText.textContent ='You have won the game... Click Resart Game to play again...'\n $('#display').append(winText);\n };\n }", "function gameOver()\r\n{\r\n ctx.beginPath();\r\n ctx.font = \"40px Arial\";\r\n ctx.textAlign = \"center\";\r\n ctx.fillStyle = '#9e7516';\r\n if (gameState == states.end.won) {\r\n ctx.fillText(\"The WINNER is...\", 350, 205);\r\n ctx.fillText(\"Player: \" + (!Player+1), 350, 255);\r\n }\r\n if (gameState == states.end.tie) {\r\n ctx.fillText(\"The game ended in a Tie!!!\", 350, 225);\r\n }\r\n ctx.closePath();\r\n for (elemnt in gameButtons)\r\n gameButtons[elemnt].draw();\r\n}", "DrawPlayer() {\n this.DrawQuad(this.m_player.GetTransform().p, Fracker.LerpColor(FrackerSettings.k_playerColor, FrackerSettings.k_playerFrackColor, b2.Max(this.m_frackingFluidChargeTime /\n FrackerSettings.k_frackingFluidChargeTime, 0.0)), true);\n }", "function checkWinner() {\r\n\t\t//check rows, cols, diags\r\n\t\t//if empty is 9, then we declare draw and end the game\r\n\r\n\t\tfor(var i = 0; i < winCombo.length; i++) {\r\n\t\t\tif(board[winCombo[i][0]].innerHTML != \" \" &&\r\n\t\t\t\tboard[winCombo[i][0]].innerHTML == board[winCombo[i][1]].innerHTML &&\r\n\t\t\t\tboard[winCombo[i][1]].innerHTML == board[winCombo[i][2]].innerHTML ) {\r\n\t\t\t\tboard[winCombo[i][0]].style.color = \"red\";\r\n\t\t\t\tboard[winCombo[i][1]].style.color = \"red\";\r\n\t\t\t\tboard[winCombo[i][2]].style.color = \"red\";\r\n\t\t\t\tcleanBgColor();\r\n\t\t\t\tdocument.getElementById(\"message\").innerHTML = board[winCombo[i][0]].innerHTML + \" wins!\";\r\n\t\t\t\tendGame();\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\r\n\t\t//check if the game is a draw \r\n\t\tif (empty == 0) {\r\n\t\t\tdocument.getElementById(\"message\").innerHTML = \"It's a draw.\";\r\n\t\t\tendGame();\r\n\t\t}\r\n\t}", "function selWinnerFin(){\n mainCard.src = \"images/card.svg\";\n gameData.win = Math.round(Math.random());\n console.log(`${gameData.win}`);\n if (gameData.win == 0) {\n turn.innerHTML = `The computer chooses: ${gameData.players[0]}`;\n deck1.remove();\n deck2.remove();\n gameData.score[0]++;\n }\n else if (gameData.win == 1) {\n turn.innerHTML = `The computer chooses: ${gameData.players[1]}`;\n deck1.remove();\n deck2.remove();\n gameData.score[1]++;\n }\n setTimeout(function(){showWinner();}, 1000);\n}", "function WON()\n{\n moveCounter++;\n pSwitch();\n if(moveCounter>4)\n {\n let winner=winnerCheck();\n if (winner!=null)\n {\n gameOver(winner,line,coordonate);\n } \n }\n}", "function endGame(draw) {\n if (draw) {\n winningMessageTextElement.textContent = \"Draw!\";\n } else {\n winningMessageTextElement.textContent = `${ currentPlayer == playerOne ? playerOne.getSign() : playerTwo.getSign() }'s win!`;\n }\n displayController.on();\n }", "function whoWon(){\n\tif(gameOver() == true){\n\t\tmodal.style.display = \"block\";\n\t\t$(\".modalContent\").removeClass(\"closeModal\");\n\t\t$(\".modalContent\").addClass(\"openModal\");\n\n\t\tif(playerScores[0] > playerScores[1]){\n\t\t\t$(\".modalBody\").empty().append(\"Player 1 has won!\");\n\t\t\t// $(\".modalBody\").append(\"Player 1 has won!\");\n\t\t} \n\n\t\telse if(playerScores[1] > playerScores[0]){\n\t\t\t$(\".modalBody\").empty().append(\"Player 2 has won!\");\n\t\t\t// $(\".modalBody\").append(\"Player 2 has won!\");\n\t\t} \n\n\t\telse{\n\t\t\t$(\".modalBody\").empty().append(\"It's a draw...\");\n\t\t\t// $(\".modalBody\").append(\"It's a draw...\");\n\t\t}\n\t}\n}", "function renderWinnings() {\n var myXpos = canvas.width / 3 - playingCard.width - 90;\n var myYpos = canvas.height / 3 * 2 - playingCard.height / 2;\n var theirXpos = canvas.width / 3 * 2 + playingCard.width + 30;\n var theirYpos = canvas.height / 3 - playingCard.height / 2;\n var offset = 0;\n var increment = 2;\n var myCurrentWinnings = myWinnings;\n var theirCurrentWinnings = theirWinnings;\n \n ctx.beginPath();\n ctx.font = \"20px Pacifico\" || \"20px cursive\";\n ctx.fillStyle = colorThemeSecondary;\n ctx.fillText(\"My winnings\", myXpos - playingCard.width - 80, myYpos + playingCard.height / 2);\n ctx.closePath();\n myCurrentWinnings.forEach(function (card) {\n renderPlayingCard(myXpos - offset, myYpos - offset, playingCard.frontColor, cardInitial(card.name));\n offset = offset + increment;\n });\n offset = 0;\n ctx.beginPath();\n ctx.font = \"20px Pacifico\" || \"20px cursive\";\n ctx.fillStyle = colorThemeSecondary;\n ctx.fillText(\"Their winnings\", theirXpos + playingCard.width + 50, theirYpos + playingCard.height / 2);\n ctx.closePath();\n theirCurrentWinnings.forEach(function (card) {\n renderPlayingCard(theirXpos - offset, theirYpos - offset, playingCard.frontColor, cardInitial(card.name));\n offset = offset + increment;\n });\n }", "function drawPlayers() {\n var players = [\"p1\", \"p2\", \"p3\", \"p4\"];\n for (var i = 0; i < players.length; i++) {\n var obj = GameObjects[players[i]];\n if (obj) {\n if (PlayerData[players[i]].player_num == player_num) {\n ctx.fillStyle = player_active_color;\n } else {\n ctx.fillStyle = game_color;\n }\n var start_vect = convert(obj.bounding_box.x1, obj.bounding_box.y1);\n var end_vect = convert(obj.bounding_box.x2, obj.bounding_box.y2);\n ctx.fillRect(start_vect.x, start_vect.y, end_vect.x-start_vect.x, end_vect.y-start_vect.y);\n }\n ctx.fillStyle = game_color;\n }\n}", "function checkWinningCondition(){\n if (gameData.score[gameData.index] > gameData.gameEnd) {\n winsound.play(); //winner sound plays once someone wins\n score.innerHTML = `<h2 style=\"text-align:center;\">${gameData.players[gameData.index]}\n wins with ${gameData.score[gameData.index]} points!</h2>`;\n \n actionArea.innerHTML = \"\";\n document.getElementById(\"quit\").innerHTML = \"Start a New Game\";\n showCurrentScore();\n document.getElementById(\"gamecontrol\").style.backgroundColor = 'LightCyan';\n document.getElementById(\"score\").style.backgroundColor = 'LightCyan';\n document.getElementById(\"game\").style.backgroundColor = 'LightCyan';\n document.getElementById(\"actions\").style.backgroundColor = 'LightCyan';\n document.getElementById(\"rules\").style.backgroundColor = 'MediumTurquoise';\n document.getElementById(\"quit\").style.backgroundColor = 'MediumTurquoise';\n }\n else {\n //update score\n showCurrentScore();\n }\n }", "gameOver(winning) {\n document.getElementById(\"main-game\").removeEventListener('click', MODIFIER.turn, false);\n let winner = winning.player === DATA.human ? \"YOU WIN!\" : winning.player === DATA.ai ? \"YOU LOSE!\" : \"IT'S A TIE!\";\n VIEW.displayEndGame(winner);\n }", "static drawCard ({ username, matchId }) {\n const currentMatch = this._getCurrentMatch(matchId)\n if (!currentMatch) {\n return 'Match not found'\n }\n\n if (currentMatch.currentTurn !== username) {\n return 'Not your turn bitch!'\n }\n\n currentMatch.drawCard()\n\n return currentMatch\n }", "function selWinner(){\n mainCard.src = \"images/card.svg\";\n gameData.win = Math.round(Math.random());\n console.log(`${gameData.win}`);\n if (gameData.win == 0) {\n turn.innerHTML = `The computer chooses: ${gameData.players[0]}`;\n gameData.score[0]++;\n setTimeout(function(){player2Turn();}, 4000);\n deck2.style.display = \"none\";\n setTimeout(function(){turn.innerHTML = `${gameData.players[1]}'s turn`;}, 2000);\n setTimeout(function(){setMainCard();}, 2000);\n }\n else if (gameData.win == 1) {\n turn.innerHTML = `The computer chooses: ${gameData.players[1]}`;\n gameData.score[1]++;\n setTimeout(function(){player1Turn();}, 4000);\n deck1.style.display = \"none\";\n setTimeout(function(){turn.innerHTML = `${gameData.players[0]}'s turn`;}, 2000);\n setTimeout(function(){setMainCard();}, 2000);\n }\n showCurrentScore();\n}", "function drawGameOver() {\n\tdrawBackground();\n\tdrawBanner();\n\tif (livesRemaining === 0) {\n\t\tcolorTxt('OUT OF LIVES', canvas.width / 2, canvas.height / 2, '100px Arial', 'center', 'middle', '#fff');\n\t} else {\n\t\tcolorTxt('GAME COMPLETE', canvas.width / 2, canvas.height / 2, '100px Arial', 'center', 'middle', '#fff');\n\t}\n}", "function playGame() {\n if (options.indexOf(player.choice) > -1 && options.indexOf(opponent.choice) > -1) {\n if (player.choice === \"rock\" && opponent.choice === \"scissors\") {\n console.log(\"You Win\");\n $('#playerImage').prepend('<img id=\"rock\" src=\"./assets/images/rock.png\" />');\n $('#opponentImage').prepend('<img id=\"scissors\" src=\"./assets/images/scissors.png\" />');\n $('#winLose').text(\"Winner\");\n player.wins++;\n\n } else if (player.choice === \"paper\" && opponent.choice === \"rock\") {\n console.log(\"You Win\");\n $('#playerImage').prepend('<img id=\"paper\" src=\"./assets/images/paper.png\" />');\n $('#opponentImage').prepend('<img id=\"rock\" src=\"./assets/images/rock.png\" />');\n $('#winLose').text(\"Winner\");\n player.wins++;\n\n } else if (player.choice === \"scissors\" && opponent.choice === \"paper\") {\n console.log(\"You Win\");\n $('#playerImage').prepend('<img id=\"scissors\" src=\"./assets/images/scissors.png\" />');\n $('#opponentImage').prepend('<img id=\"paper\" src=\"./assets/images/paper.png\" />');\n $('#winLose').text(\"Winner\");\n player.wins++;\n\n } else if (player.choice === opponent.choice) {\n console.log(\"It's a Tie\");\n $('#winLose').text(\"TIE!\");\n } else {\n\n console.log(\"Opponent Wins\")\n $('#winLose').text(\"LOSER!!\");\n player.losses++;\n\n }\n\n con.update({\n choice: \"\",\n wins: player.wins,\n losses: player.losses\n\n });\n\n $(\"#playerScore\").text(player.wins)\n $(\"#opponentScore\").text(player.losses)\n setTimeout(function () {\n $('#playerImage').html('');\n $('#opponentImage').html('');\n $('#winLose').text(\"\");\n $(\"#player-button\").attr(\"disabled\", false);\n }, 3000);\n\n\n }\n\n\n }", "function winOrLoseScreen(){\n if (!win){\n GameOverGraphic()\n BGM.pause()\n } else {\n youWinGraphic()\n BGM.pause()\n }\n }", "function draw() \r\n{\r\n\tctx.fillRect(0, 0, WIDTH, HEIGHT);\r\n\tctx.save();\r\n\tball.draw();\r\n\tplayer1.draw();\r\n\tplayer2.draw();\r\n\t//var t = player1.score + \" - \" + player2.score;\r\n\t//ctx.fillText(t, canvas.width/2 - ctx.measureText(t).width/2, 100);\r\n\tctx.restore();\r\n\t/*document.getElementById(\"red\").innerHTML = (player1.score < 10)?'0'+ player1.score : player1.score;\r\n\tdocument.getElementById(\"green\").innerHTML = (player2.score < 10)?'0'+ player2.score : player2.score;*/\r\n\t\r\n\t/*if(player1.score == 15)\r\n\t\talert(\"Player 1 wins 15 to \"+ player2.score);\r\n\tif(player2.score == 15)\r\n\t\talert(\"Player 2 wins 15 to \"+player1.score);*/\r\n}", "winGame() {\n gameWon();\n }", "function checkWin () {\n if (p1.score > p2.score) {\n $('#hero-player-1').stop()\n $('#hero-player-1').removeClass('onechop onebreathe')\n setTimeout(function () {\n $('h1').text('Player One Wins!')\n }, 1000)\n } else if (p1.score < p2.score) {\n $('#hero-player-2').stop()\n $('#hero-player-2').removeClass('twochop twobreathe')\n setTimeout(function () {\n $('h1').text('Player Two Wins!')\n }, 1000)\n } else {\n $('h1').text(`It's a draw!`)\n }\n}", "check_GameOver() {\n if (this.model.winner == 0) {\n if (this.currentPlayerBot == 0) {\n this.scene.undo_play = false;\n this.state = 'WAIT_UNDO';\n }\n else\n this.state = 'CHANGE_PLAYER';\n }\n else{\n this.state = 'GAME_OVER';\n this.scene.showGameMovie = false;\n this.view.incWinsPlayer(this.model.winner);\n }\n }", "isDraw() {\n\tif(!this.isFinished()||this.getWinner()!==null)\n return false;\n else\n return true;\n }", "winningTemplate(level, player, keyCode, state, img) {\n ctx.font = '28px coda,arial';\n ctx.fillStyle = 'mediumseagreen';\n ctx.fillText('YES! YOU WIN',(this.canvas.width/2),(this.canvas.height/2)/2);\n\n ctx.fillStyle = 'rgba(0,0,0,0.0)';\n ctx.fillRect((this.canvas.width/5),(this.canvas.height/2)/3, 150, 200);\n ctx.beginPath();\n ctx.rect((this.canvas.width/5),(this.canvas.height/2)/3, 150, 200);\n ctx.strokeStyle = 'mediumseagreen';\n ctx.stroke();\n ctx.closePath();\n\n ctx.fillStyle = 'gold';\n ctx.fillText('Lifes: '+ player.lifes, (this.canvas.width/4),(this.canvas.height/2)/2);\n ctx.fillText('Gems: '+ player.gems, (this.canvas.width/4),(this.canvas.height/2)/2+50);\n ctx.fillText('Keys: '+ player.keys, (this.canvas.width/4),(this.canvas.height/2)/2+100);\n ctx.drawImage(Resources.get('img/Star.png'), (this.canvas.width/4.7),(this.canvas.height/2)/2+125);\n\n ctx.fillStyle = '#fff';\n ctx.fillText('Hit Enter key to play again',(this.canvas.width/2),(this.canvas.height/2)/2+50);\n // ctx.drawImage(Resources.get('img/Selector.png'), (this.canvas.width/2 - (player.width/2)),(this.canvas.height/2)/2+190);\n if(img){\n // ctx.drawImage(Resources.get(img), (this.canvas.width/2 - (player.width/2)),(this.canvas.height/2)/2+190);\n ctx.save();\n this.onDrawFrame(ctx, player, img);\n ctx.restore();\n }\n ctx.fillStyle = 'mediumseagreen';\n ctx.fillText('Congratulation Bug thieve!', global.mx+120, global.my);\n\n }", "noWinner() {\n return Players.findOne({score: 100}) == null;\n }", "function drawPlayer(){\n\t//draw hard drop position\n\tplayer.shape.forEach((row,y)=>{\n\t\trow.forEach((value,x)=>{\n\t\t\tif(player.shape[y][x] != 0){\n\t\t\t\tcontext.lineWidth = 3;\n\t\t\t\tcontext.strokeStyle = 'white';\n\t\t\t\tcontext.strokeRect(25*(x+player.hPos.X)+4,25*(y+player.hPos.Y)+4,16,16);\n\t\t\t}\n\t\t});\n\t});\n\t\n\t//draw player piece\n\tplayer.shape.forEach((row,y) =>{\n\t\trow.forEach((value, x) =>{\n\t\t\tif(player.shape[y][x] != 0){\n\t\t\t\tswitch(player.shape[y][x]){//tioszlj\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tfillPiece(context,player.pos.X+x,player.pos.Y+y,'mediumpurple','purple');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tfillPiece(context,player.pos.X+x,player.pos.Y+y,'darkcyan','cyan');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tfillPiece(context,player.pos.X+x,player.pos.Y+y,'goldenrod','gold');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\tfillPiece(context,player.pos.X+x,player.pos.Y+y,'green','lawngreen');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\tfillPiece(context,player.pos.X+x,player.pos.Y+y,'darkred','red');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\tfillPiece(context,player.pos.X+x,player.pos.Y+y,'darkorange','orange');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\t\t\t\n\t\t\t\t\t\tfillPiece(context,player.pos.X+x,player.pos.Y+y,'darkblue','blue');\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t});\t\n}", "update() {\n // On every win\n win();\n // If player goes outside\n this.outsideCanvas();\n }", "function draw() {\r\n \r\n /* Get a random card and display in card-container */\r\n getNextCard();\r\n\r\n /* Update playerlist with current playerInTurn */ \r\n refreshPlayerList();\r\n\r\n /* Update message text with current playerInTurn */ \r\n refreshMessageText();\r\n\r\n /* Advance to next player */\r\n advancePlayerInTurn();\r\n}", "function gameOver(gameWon) {\n\t/*\n\tEvidentiem castigatorul , combinatia care a castigat\n\n\t*/\n\tfor (let index of winCombos[gameWon.index]) {\n\n\t\tdocument.getElementById(index).style.backgroundColor =\n\t\t\tgameWon.player == huPlayer ? \"blue\" : \"red\";\n\n\t}\n\t/*\n\tAnulam event Listener-ul ca sa nu putem da click pe nicio celula\n\t*/\n\tfor (var i = 0; i < cells.length; i++) {\n\t\tcells[i].removeEventListener('click', turnClick, false);\n\t}\n\t/*\n\tDepinde de castigator transmitem functie declareWinner \"You win\"\n\t/ \"You lose\"\n\t*/\n\tdeclareWinner(gameWon.player == huPlayer ? \"You win!\" : \"You lose.\");\n}", "function whoWins(winner) {\r\n var winString = document.createElement(\"DIV\");\r\n winString.classList.add(\"winnerText\");\r\n\r\n if (winner == 1) {\r\n winString.innerHTML = \"Player Wins\";\r\n playerwins.innerHTML = ++playerHand.wins;\r\n\r\n } else {\r\n winString.innerHTML = \"Dealer Wins\";\r\n dealerwins.innerHTML = ++dealerHand.wins;\r\n }\r\n winnerarea.appendChild(winString);\r\n gameOver();\r\n }", "function checkForWinner () {\t\t\n\t\tif ($scope.slotData[0].result === $scope.slotData[1].result && $scope.slotData[0].result === $scope.slotData[2].result)\t{\t\t\t\t\n\t\t\t// determine the reward\n\t\t\tif ($scope.slotData[0].result === 0) {$scope.reward = 'coffee'; }\n\t\t\telse if ($scope.slotData[0].result === 1) {$scope.reward = 'tea'; }\n\t\t\telse {$scope.reward = 'espresso'; }\n\t\t\t// flash the border\n\t\t\tvar flashInterval = setInterval(function() {\n \t\t\t$('.reel-container').toggleClass('orange-border');\n\t\t\t}, 100);\t\t\t\t\t\n\t\t\tsetTimeout(function() {\n\t\t\t\t// stop the border flash but keep border, show prize\t\t\n\t\t\t\twindow.clearInterval(flashInterval);\n\t\t\t\twinningEffects(); \n\t\t\t}, 1000);\t\t\t\n\t\t}\n\t\t$scope.$apply(function () {\n\t\t\t$scope.gameStatus = true;\t\t\t\t\n\t\t})\n\t}", "function gamePlay(event) {\n\n // Alternate between player 1 and player 2\n alternatePlayer(event)\n\n // Get values of each row, column and diagonal\n row1Values = lineValues(document.querySelectorAll(\".r1\"))\n row2Values = lineValues(document.querySelectorAll(\".r2\"))\n row3Values = lineValues(document.querySelectorAll(\".r3\"))\n column1Values = lineValues(document.querySelectorAll(\".c1\"))\n column2Values = lineValues(document.querySelectorAll(\".c2\"))\n column3Values = lineValues(document.querySelectorAll(\".c3\"))\n diagonalsValues = getDiagonalValues(document.querySelectorAll('div'))\n\n // Determine if there are 3 of the same token in a row, column or diagonal\n threeInALine(diagonalsValues[0])\n threeInALine(diagonalsValues[1])\n threeInALine(row1Values)\n threeInALine(row2Values)\n threeInALine(row3Values)\n threeInALine(column1Values)\n threeInALine(column2Values)\n threeInALine(column3Values)\n\n // If the max number of moves (9) is reached and there is no winner, it is considered a draw\n movesCounter++\n if (winner === false && movesCounter === 9) {\n alert(\"draw!\")\n gameStatus.innerText = \"It's a draw! Play again?\"\n endGame()\n }\n}", "function endTurn() {\n checkWin(currentTurn);\n if(winStatus == false && drawCounter < boardWidth) {\n switchTurn()\n } else if(winStatus == true){declareWinner()\n }\n}", "function gameOver(gameWon) {\n\n // Change background color of winning cells to blue if winning player is human\n // else change it to red.\n\tfor (let index of winCombos[gameWon.index]) {\n\t\tdocument.getElementById(index).style.backgroundColor =\n\t\t\tgameWon.player == huPlayer ? \"blue\" : \"red\";\n\t}\n\n // Remove event listener to prevent any other clicks after game has ended\n\tfor (var i = 0; i < cells.length; i++) {\n\t\tcells[i].removeEventListener('click', turnClick, false);\n\t}\n\n // Call function declareWinner to display result of game\n\tdeclareWinner(gameWon.player == huPlayer ? \"You win!\" : \"You lose.\");\n}", "checkForWinner(){\n //if someone has a winning combination\n if(this.hasWinningCombo()){\n this.setState({\n gameOver: true,\n winner: this.state.currentTurn + \" wins!\",\n winnerShort: this.state.currentTurn\n });\n return true;\n }\n //if the board is full and no one its a draw\n else if(this.boardIsFull()){\n this.setState({\n gameOver: true,\n winner: \" It's a draw!\"\n }); \n return true;\n }\n //keep playing since no one won and the board isn't full\n else\n {\n return false;\n }\n }", "function updatedScore(wins) {\n if (wins != null) {\n var msg = \"Your score is \" + wins;\n localBoard.drawMessage(msg, \"gold\");\n }\n }", "function gameOver() {\n\tctx.fillStlye = \"white\";\n\tctx.font = \"20px Arial, sans-serif\";\n\tctx.textAlign = \"center\";\n\tctx.textBaseline = \"middle\";\n\n\tvar playerWinner = (score_jugadores[0] > score_jugadores[1])?\"P1\":\"P2\";\n\tplayerWinner += \" wins!!!\";\n\tvar messageGame = \"\";\n\tif(usuario_id === -1)\n\t\tmessageGame = playerWinner;\n\telse\n\t\tmessageGame = playerWinner +\" - Game Over - You scored \"+score_jugadores[usuario_id -1]+\" points!\"\n\tctx.fillText( messageGame , W/2, H/2 + 25 );\n\t\n\t// Stop the Animation\n\t\t\n\tvar playPromise = perder.play();\n\n\t if (playPromise !== undefined) {\n\t playPromise.then(_ => {\n\t perder.pause();\n\t })\n\t .catch(error => {\n\t // Auto-play was prevented\n\t // Show paused UI.\n\t console.log(\"Error...\");\n\t });\n\t }\n\tcancelRequestAnimFrame(init);\n\t\n\n\t// Set the over flag\n\tover = 1;\n\t\n\t// Show the restart button\n\tif(usuario_id !== -1)\n\t\trestartBtn.draw();\n}", "function drawRace(canvas, ctx){\n \tctx.clearRect(0, 0, canvas.width, canvas.height);\n\n \t//Chooses distance moved in this frame from 1 to 5\n for(var i = 0; i < raceHorses.length; i++){\n \t\traceHorses[i].x += Math.floor(Math.random() * 5) + 1;\n }\n\n //Draws horses and selects sprite based on number of frames passed\n\tvar startY = 0;\n\tctx.beginPath();\n\tfor(var i = 0; i < raceHorses.length; i++){\n\t\tctx.drawImage(raceHorses[i].imageArr[Math.floor((frameCount % 16) / 4)], raceHorses[i].x, startY, 20, 16);\n\t startY += 25;\n\t}\n\tctx.closePath();\n\tframeCount++;\n\n\t//Checks if a horse has won\n\tif(raceFinished()){\n\t\tvar winningHorse = {x: 0};\n \tfor(var i = 0; i < raceHorses.length; i++){\n \tif(raceHorses[i].x > winningHorse.x)\n \t\twinningHorse = raceHorses[i];\n \t}\n\n \t//Doubles player bet if correct\n\t if(winningHorse.bet > 0)\n\t \twallet += winningHorse.bet * 2;\n\n\t //Alerts player to who won and resets menus and tables\n\t alert(winningHorse.name + \" Wins!\");\n\t $('#selectArea').show();\n\t\t$('#buttons').show();\n\t raceArea.hide();\n\t \tupdatePlayerTable();\n\t \tsetRaceHorses();\n\t\tupdateHorseTable();\n\t\tclearInterval(raceInterval);\n\n\t\t//Game Over Scenario\n\t\tif(wallet === 0){\n\t \talert(\"You Have Run Out Of Money! Thanks For Playing!\");\n\t \tdocument.location.reload();\n\t }\n\t}\n }", "drawPlayers(){\n if(this.board.length > 0) {\n // Clear whole canvas\n this.playersCtx.clearRect(0, 0, this.playersCanvas.width, this.playersCanvas.height);\n\n // Loop through players\n for (let key in this.playerView) {\n if (!this.playerView.hasOwnProperty(key)) continue;\n\n if(this.playerView[key].lives <= 0) continue; // Player is dead\n\n // Draw player\n this.playersCtx.drawImage(\n this.playerSprites[this.playerView[key].playerNumber][this.playerView[key].direction][this.playerView[key].num], // Image\n 0, // x of image\n 0, // y of image\n 64, // Width of image\n 128,// Height of image\n this.playerView[key].x, // x on board\n this.playerView[key].y, // y on board\n this.playerView[key].w, // Player width on board\n this.playerView[key].h); // Player height on board\n \n // Draw the playername\n this.playersCtx.font = \"20px Arial\";\n this.playersCtx.fillStyle = \"white\";\n this.playersCtx.textAlign = \"center\";\n this.playersCtx.fillText(\n this.playerView[key].name + \" (\" + this.playerView[key].lives + \")\",\n ( this.playerView[key].x + 20 ),\n this.playerView[key].y\n );\n\n // New player animation image\n this.playerView[key].num++;\n\n // Reset animation to 0 by end\n if (this.playerView[key].num > 7) this.playerView[key].num = 0;\n }\n }\n // Renew players\n let t = this;\n setTimeout(function(){\n window.requestAnimationFrame(function(){\n t.drawPlayers();\n });\n },1000/FPS);\n\n }", "function gameHasWinner(game) {\n return game.winner !== undefined;\n}", "function draw() {\n // The background color is now a dark indigo color to\n // mimic a night sky\n background(59, 32, 102);\n\n if (!gameOver) {\n handleInput();\n\n movePlayer();\n movePrey();\n\n updateHealth();\n checkEating();\n\n drawPrey();\n\n // Add a fuction for the tiny fireflies\n drawTinyFireflies();\n\n drawPlayer();\n } else {\n showGameOver();\n // Added function to check on the reset\n checkResetGame();\n }\n}", "function matchOver(currentWorm)\r\n{\r\n\tplaySound(\"win\");\r\n\tcurrentRound = 0;\r\n\tisNewRound = false;\r\n\talert(\"Winner!\\nThe Winner Worm with \"+maxScore+\" points is....\\nThe Glorious \"+colors[winningWorm]+\" Worm!!\");\r\n\tstartGame();\r\n}", "gameWon() {\n if (this._gameBoard[0] == this._currentPlayer && this._gameBoard[1] == this._currentPlayer && this._gameBoard[2] == this._currentPlayer ||\n this._gameBoard[3] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[5] == this._currentPlayer ||\n this._gameBoard[6] == this._currentPlayer && this._gameBoard[7] == this._currentPlayer && this._gameBoard[8] == this._currentPlayer ||\n this._gameBoard[0] == this._currentPlayer && this._gameBoard[3] == this._currentPlayer && this._gameBoard[6] == this._currentPlayer ||\n this._gameBoard[1] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[7] == this._currentPlayer ||\n this._gameBoard[2] == this._currentPlayer && this._gameBoard[5] == this._currentPlayer && this._gameBoard[8] == this._currentPlayer ||\n this._gameBoard[0] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[8] == this._currentPlayer ||\n this._gameBoard[2] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[6] == this._currentPlayer) {\n this._gameOver = true;\n if (this._currentPlayer == 'X') {\n this._xWins += 1;\n } else {\n this._yWins += 1; \n }\n }\n //checks to see if the game is tied\n var isTie = true;\n for (var i = 0; i < this._gameBoard.length; i++) {\n if (this._gameBoard[i] == \"\") { //there is an empty spot on the board\n isTie = false; \n }\n }\n if (isTie) {\n this._gameOver = true;\n this._ties += 1;\n }\n this._tiedGame = isTie;\n }", "function draw() {\n background(0);\n drawPath();\n drawPlayer();\n\n if(!lost){\n if (keyIsDown(LEFT_ARROW)){\n checkCollision(LEFT_ARROW);\n x -= xSpeed;\n\n }\n if (keyIsDown(RIGHT_ARROW)){\n checkCollision(RIGHT_ARROW);\n x += xSpeed;\n }\n if (keyIsDown(UP_ARROW)){\n checkCollision(UP_ARROW);\n y -= ySpeed;\n }\n if (keyIsDown(DOWN_ARROW)){\n checkCollision(DOWN_ARROW);\n y += ySpeed;\n }\n }\n\n //tells the user what happened\n if (lost){\n reset();\n }else if (won == true){\n level++;\n if(level == 3){\n loseColor = 255;\n }else{\n loseColor = 0;\n }\n won = false;\n if (level == 4){\n game = true;\n }\n }\n\n if(game){\n fill(100, 55, 222);\n textSize(30);\n var t = \"You won the game! Good job!\";\n text(t, width/2 - textWidth(t)/2, height/2);\n }\n}", "checkWin(owner) {\n const playerCanWin = owner === 'opponent';\n const board = playerCanWin ? this.opponentBoard : this.playerBoard;\n const discoveredShips = board.cells\n .flat()\n .filter(\n (cell) => cell.classList.contains('ship') && cell.children[0].disabled\n ).length;\n const win = this.totalCells === discoveredShips;\n if (win)\n new GameOverView({\n win: playerCanWin,\n }).render(this.container);\n return win;\n }", "function drawPlayer () {\r\n rect(player.x, player.y, player.w, player.h, player.col, \"fill\");\r\n}", "gameOver() {\n if (playerScore === winningScore || computerScore === winningScore) {\n isGameOver = true;\n // Set Winner\n let winner = playerScore === winningScore ? 'Player' : 'Computer';\n this._showGameOverEl(winner);\n }\n }", "function drawEverything() {\n //background black\n colorRect(0, 0, canvas.width, canvas.height, \"black\");\n //Winner Screen\n if (showWinScreen) {\n ctx.fillStyle = \"white\";\n ctx.font = `25px \"${fontName}\"`;\n ctx.fillText(\"Click here to Play Again\", 100, 400);\n if (playerOneScore >= winningScore) {\n ctx.fillText(\"Winner You Are!!!\", 100, 200);\n } else if (playerTwoScore >= winningScore) {\n ctx.fillText(\"Winner You Are Not!!!\", 100, 200);\n }\n return;\n }\n //draw net\n drawNet();\n //left paddle\n colorRect(10, paddleOneY, paddleThickness, paddleHeight, \"white\");\n //right paddle (computer)\n colorRect(\n canvas.width - paddleThickness - 10,\n paddleTwoY,\n paddleThickness,\n paddleHeight,\n \"white\"\n );\n //ball\n colorCircle(ballX, ballY, 10, \"red\");\n //score keeper\n ctx.font = `20px \"${fontName}\"`;\n ctx.fillText(playerOneScore, 100, 100);\n ctx.fillText(playerTwoScore, canvas.width - 100, 100);\n ctx.font = \"10px 'Press Start 2P'\";\n ctx.fillText(\"Instructions:\", 40, 540);\n ctx.fillText(\"Move mouse to control left paddle\", 40, 560);\n ctx.fillText(\"First to 3 points wins\", 450, 560);\n}", "function checkWin(a, b) {\n const total = 1 + checkDirection(a) + checkDirection(b);\n if (total >= 4 && total < 5) {\n return that.currentPlayer;\n } else {\n return null;\n }\n }", "function declareWinner() {\n\n if (gameOn === true) {\n if (winner(board, player)) {\n winnerMsg.innerHTML = \"Player wins!\";\n gameOn = false;\n playerWins.innerHTML = playerWinsNum++;\n } else if (winner(board, computer)) {\n winnerMsg.innerHTML = \"Computer wins!\";\n gameOn = false;\n computerWins.innerHTML = computerWinsNum++;\n } else if (validMoves().length === 0) {\n winnerMsg.innerHTML = \"It's a draw!\";\n gameOn = false;\n draws.innerHTML = drawsNum++;\n }\n }\n}", "function checkWinner() {\n if(playerPosition <= 0) {\n alert('Player 1 Wins!')\n } else if(compPosition <= 0) {\n alert('Computer Wins!')\n }\n }", "function winner() {\n \t$('.winner').remove();\n \tdocument.getElementById('yay').play();\n \tvar newWinnerElement = $(\"<p>Player \" + player + \" is the winner!</p>\").addClass('winner').insertAfter('button:last').hide();\n \tnewWinnerElement.fadeIn(2000);\n \tif (player == 1) {\n\t\t playerOneWins++;\n\t\t $(\"#black\").text(playerOneWins);\n\t\t $('.winner').css(\"animation\", \"highlightBlack 1s infinite alternate\");\n\t\t $('.playerone').css(\"animation\", \"highlightBlack 1s 4 alternate\");\n\t\t} else {\n\t\t playerTwoWins++;\n\t\t $(\"#red\").text(playerTwoWins);\n\t\t $('.winner').css(\"animation\", \"highlightRed 1s infinite alternate\");\n\t\t $('.playertwo').css(\"animation\", \"highlightRed 1s 4 alternate\");\n\t\t}\n\t\treturn gameRunning = false;\n }", "checkForWinner() {\n if (this.primaryWinConditionsCheck()) {\n this.endGame();\n }\n }", "function isWinner() {\n //store player if x or o or undefined//\n const tile0 = tiles[0].classList[2];\n const tile1 = tiles[1].classList[2];\n const tile2 = tiles[2].classList[2];\n const tile3 = tiles[3].classList[2];\n const tile4 = tiles[4].classList[2];\n const tile5 = tiles[5].classList[2];\n const tile6 = tiles[6].classList[2];\n const tile7 = tiles[7].classList[2];\n const tile8 = tiles[8].classList[2];\n\n const winningConditions = [\n //row are the same//\n [tile0, tile1, tile2],\n [tile3, tile4, tile5],\n [tile6, tile7, tile8],\n //column are the same//\n [tile0, tile3, tile6],\n [tile1, tile4, tile7],\n [tile2, tile5, tile8],\n //diagonally are the same//\n [tile0, tile4, tile8],\n [tile2, tile4, tile6],\n ];\n\n //any winning condition//\n winningConditions.some((tile) => {\n if (tile[0] && tile[0] === tile[1] && tile[0] === tile[2]) {\n playerDisplay.textContent = `Player ${tile[0]} won!`;\n modalHeader.textContent = \"\";\n modalText.textContent = `Player ${tile[0]} won`;\n isGameOver(true);\n //display previous button//\n return tile;\n } else {\n isDraw();\n }\n });\n}", "function isGameOver(board) {\r\n var y= checkWinningCondition(board);\r\n if (y === 0) {\r\n return false\r\n } else if (y === 1) {\r\n var turnInfo = document.getElementById(\"turnInfo\");\r\n tieSound.play()\r\n turnInfo.innerHTML = messages[0];\r\n } else if (y === 2) {\r\n var turnInfo = document.getElementById(\"turnInfo\");\r\n winSound.play();\r\n turnInfo.innerHTML = messages[1];\r\n } else {\r\n var turnInfo = document.getElementById(\"turnInfo\");\r\n loseSound.play();\r\n turnInfo.innerHTML = messages[2];\r\n }\r\n return true;\r\n}", "pointMade(winner){\n\n //identify what player to add point to\n let winnerIdx = this.players.findIndex(player => player.name === winner);\n let winnerPlyr = this.players[winnerIdx];\n \n\n //if not a game ending point, add point to winner\n if(winnerPlyr.points <= 3){\n //winning player adds a point\n winnerPlyr.addPoint();\n }\n\n //if player is over 3, game is won by player\n if(winnerPlyr.points > 3){\n\n //Show player is winner on screen\n this.winningPlayer = winner + \" is the winner!\";\n }\n }", "function gameWon() {\n if (winGame == true) {\n endScreen();\n }\n}", "function winnerFound() {\n hideDice();\n gamePlaying = false;\n //Change player name to winner\n document.getElementById(\"name-\" + activePlayer).textContent = \"Winner\";\n // Change classes to Winner\n document\n .querySelector(\".player-\" + activePlayer + \"-panel\")\n .classList.add(\"winner\");\n document\n .querySelector(\".player-\" + activePlayer + \"-panel\")\n .classList.remove(\"active\");\n }", "function checkWin(){\n\t//ROW WIN CONDITIONS\nif (oneV === twoV && twoV === threeV && oneV === threeV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\tconsole.log(whoPlayerTemp);\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t} else if (fourV === fiveV && fourV === sixV && fiveV === sixV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t} else if (sevenV === eightV && sevenV === nineV && eightV === nineV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t//COLUMN WIN CONDITIONS\n\t} else if (oneV === fourV && oneV === sevenV && fourV === sevenV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t} else if (twoV === fiveV && twoV === eightV && fiveV === eightV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t} else if (threeV === sixV && threeV === nineV && sixV === nineV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t//CROSS WIN CONDITIONS\n\t} else if (oneV === fiveV && oneV === nineV && fiveV === nineV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t} else if (threeV === fiveV && threeV === sevenV && fiveV === sevenV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t}\n\t$('#p2Score').text(playerTwoWins);\n\t$('#p1Score').text(playerOneWins);\n\t// checkTie();\n\tbestOfFiveWinner();\n}", "#determineIfGameOver() {\n const p1victory = this.players[1].gameboard.allShipsSunk();\n const p2victory = this.players[0].gameboard.allShipsSunk();\n \n if (p1victory) {\n this.#page.setDialog(GAME_STATE.p1victory);\n this.#isWinnerP1 = true;\n } else if (p2victory) {\n this.#page.setDialog(GAME_STATE.p2victory);\n this.#isWinnerP1 = false;\n }\n\n if (p1victory || p2victory) {\n this.#gameOver = true;\n this.#endGame();\n }\n }", "function isWinner() {\n if (board.isWinner() === true) {\n query(\"#notification h2\").innerHTML = currentPlayer.name +\n \" has won! Another round?\";\n END = true;\n return true;\n } else {\n return false;\n }\n}", "checkForWin() {\n if (this.numMafia <= 0) { this.gameState = TOWN_WIN; }\n if (this.getInnocentPlayerCount() <= 0) { this.gameState = MAFIA_WIN; }\n }", "async win(game, data) {\n\t\tthis._won = true;\n\t}", "function getWinner(){\n if(scores.redPieceCount === 0){\n scores.winner = scores.player2;\n message.innerHTML = `Player 2 Wins!!`\n }else if(scores.blackPieceCount === 0){\n scores.winner = scores.player1;\n message.innerHTML = `Player 1 Wins!!`\n }\n}" ]
[ "0.72864866", "0.72530013", "0.7111277", "0.71056974", "0.7091193", "0.7054453", "0.69548905", "0.6899447", "0.6873821", "0.6819291", "0.6819221", "0.68048704", "0.6789152", "0.6788011", "0.6784978", "0.677317", "0.67339456", "0.67260045", "0.6716584", "0.67137426", "0.6708917", "0.67068577", "0.6701356", "0.6695904", "0.6684397", "0.668006", "0.66691697", "0.66487116", "0.6600275", "0.658322", "0.6569718", "0.6564544", "0.65633625", "0.65567505", "0.6556723", "0.65254265", "0.65146387", "0.65138865", "0.6510685", "0.6508341", "0.65076715", "0.6504946", "0.6498863", "0.64910895", "0.64870834", "0.6487014", "0.64820576", "0.64801234", "0.64784086", "0.6477998", "0.64683926", "0.6449753", "0.6449485", "0.64481634", "0.64426935", "0.64418495", "0.6439285", "0.64370215", "0.6433053", "0.6431013", "0.642896", "0.64250785", "0.6424742", "0.64234024", "0.64173126", "0.64129835", "0.6408408", "0.63962543", "0.6395709", "0.6393328", "0.63908464", "0.6384369", "0.6382474", "0.63796836", "0.6378299", "0.6377353", "0.6374925", "0.6372948", "0.6372445", "0.6371785", "0.63705933", "0.6369755", "0.6357583", "0.63517845", "0.6347368", "0.634232", "0.634023", "0.6339563", "0.63364893", "0.6336007", "0.63339275", "0.63319314", "0.6330955", "0.63303024", "0.63299924", "0.6318169", "0.63176006", "0.6315729", "0.63088524", "0.62966675", "0.6293957" ]
0.0
-1
Publish tutor availability for subject(s)
function publish(subjects) { subjects_ = subjects; var arr = hangoutURL.split('/'); gid = arr[arr.length - 1]; pid = localParticipant.person.id; var payload = 'subjects=' + subjects + '&gid=' + gid + '&pid=' + pid + '&pName=' + localParticipant.person.displayName + '&count=' + count + '&maxParticipants=' + MAX_COUNT; try { $('#message').html(""); httpRequest('POST', SERVER_PATH, 'publishsubjects', payload); $('#message').html("Submitted"); } catch (e) { console.log(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function onPublish() {\n setPublishing(true);\n try {\n const response = await api.request({ method: 'PUT', url: `${PUBLICATION_PATH}/publish/${id}`, data: {} });\n mutate(`${PUBLICATION_PATH}/${id}`);\n setPublishing(false);\n setPublishSuccess(true);\n setTimeout(() => setPublishSuccess(false), 2000);\n } catch (err) {\n setPublishing(false);\n setPublishError(true);\n setTimeout(() => setPublishError(false), 2000);\n }\n }", "function onPublisherPresReq() {\n if (!uuid) return;\n socket.emit(\"publisher-pres-req-sub\", uuid);\n socket.on(\"publisher-pres-req-done\", () => {\n socket.emit(\"publisher-pres-req-unsub\", uuid);\n setPublisherPresentationRequest(false);\n mutate(`${PUBLICATION_PATH}/${id}`);\n });\n setPublisherPresentationRequest(true);\n }", "publish() {\n if (Meteor.isServer) {\n const instance = this;\n Meteor.publish(this._collectionName, function publish() {\n if (!!Meteor.settings.mockup || Roles.userIsInRole(this.userId, [ROLE.ADMIN, ROLE.ADVISOR, 'FACULTY'])) {\n return instance._collection.find();\n }\n return instance._collection.find({ studentID: this.userId });\n });\n }\n }", "function Publish_Topic(incident){\n $currentElement = $(incident.target)\n $pub = $currentElement.closest('.publisher');\n name = $pub.find('h5').html();\n TopicName = $pub.find('input')[0].value;\n Details = $pub.find('textarea')[0].value;\n\n\t\tsection = {\n\t\t\t'name':name,\n\t\t\t'TopicName': TopicName,\n\t\t\t'Details': Details\n\t\t};\n\n\t\tpubs = publishers_array.map(function(publisher){\n\t\t\treturn publisher.name;\n\t\t});\n\n\t\tpos = pubs.indexOf(section.name);\n\n\t\tpublishers_array[pos].Tweets = publishers_array[pos].Tweets || []\n\n\t\tpublishers_array[pos].Tweets.push({\n\t\t\t'TopicName':TopicName,\n\t\t\t'Details':Details\n\t\t});\n\n\t\t_render();\n\n\t\tincidents.change('notify', section)\n\t}", "_updatePublisher(uPCs) {\t\t\n\t\tvar key = this._loaderAndLoads(uPCs);\t\t\t \n\t\tif(key !== null && uPCs[key].situation === \"CONTRIBUTING\"){\n\t\t\tthis.$.content.readonly = false;\n\t\t\tthis.$.content.focus();\n\t\t\tthis.$.save.style.display = \"inline\";\n\t\t\tthis.$.check.disabled = true;\n\t\t} else {\n\t\t\tthis.$.content.readonly = true;\n\t\t\tthis.$.save.style.display = \"none\";\n\t\t\tthis.$.check.disabled = false;\n\t\t}\n\t}", "function startPublishing() {\n\t\tif (!publisher) {\n\t\t\tvar parentDiv = document.getElementById(\"myCamera\");\n\t\t\tvar publisherDiv = document.createElement('div'); // Create a div for the publisher to replace\n\t\t\tpublisherDiv.setAttribute('id', 'opentok_publisher');\n\t\t\t\n\t\t\t// Remove loading screen and append the video \n\t\t\t$('div#user1_loading').css('display', 'none');\n\t\t\tparentDiv.appendChild(publisherDiv);\n\t\t\t\n\t\t\tvar publisherProps = {width: VIDEO_WIDTH, height: VIDEO_HEIGHT};\n\t\t\tpublisher = TB.initPublisher(apiKey, publisherDiv.id, publisherProps); // Pass the replacement div id and properties\n\t\t\tsession.publish(publisher);\n\t\t}\n\t}", "async publish () {}", "init() {\n this.initSubject.next(true);\n }", "function addSubject() {\n var subjectID = $(\"#bootbox-subject-id\").val();\n addSubjectIDtoDataBase(subjectID);\n if (subjectsTableData.length !== 0) {\n $(\"#div-import-primary-folder-sub\").hide();\n }\n if (subjectsTableData.length === 2) {\n onboardingMetadata(\"subject\");\n }\n}", "function subscribe(nid, language) {\n showMessage('Preparing to save...');\n jQuery.ajax({url: '/ajax/ibm_tmgmt_concurrency/status_semaphore/subscribe/' + route + '/' + nid + '/' + language}).done(function (response) {\n localStorage.setItem('MODERATION-DISABLED-' + nid, Date.now() + '-enabled');\n requestPublishing(nid, language, response.before);\n }\n );\n }", "enterSubject(ctx) {\n\t}", "function scheduleArticlePublicationSuccess(data) {\n log.info('Success: ' + config.api.schedule_article_publication);\n log.info(data);\n log.info(schedule.scheduleData);\n $('#schedule-modal .modal-body').html(schedule.template.modalStatus({\n response: data,\n actionType: schedule.scheduleActionType\n }));\n $('#schedule-close', '#schedule-modal').text('Close');\n schedule.isScheduling = false;\n schedule.isAllScheduled = true;\n }", "publish() {\n if (Meteor.isServer) {\n const boxEventPublications = require('./BoxEventCollectionPublications.js').boxEventCollectionPublications;\n boxEventPublications();\n }\n }", "function pubsub() {\n var subscribers = [];\n return Object.freeze({ // freeze to repair\n subscribe: function (subscriber) {\n subscribers.push(subscriber);\n },\n publish: function (publication) {\n // var i, length = subscribers.length;\n // for (i =0; i< length; i +=1) {\n subscribers.forEach(function (s) {\n /* try {\n subscribers[i](publication);\n } catch (ignore) {} */\n setTimeout(function (s) { // this is to prevent las exploit\n setTimeout(function () {\n s(publication);\n }, 0)\n });\n });\n }\n });\n}", "async publishAddToTeam () {\n\t\t// get the team again since the team object has been modified,\n\t\t// this should just fetch from the cache, not from the database\n\t\tconst team = await this.data.teams.getById(this.team.id);\n\t\tawait new AddTeamPublisher({\n\t\t\trequest: this.request,\n\t\t\tbroadcaster: this.api.services.broadcaster,\n\t\t\tusers: this.invitedUsers.map(userData => userData.user),\n\t\t\tteam: team,\n\t\t\tteamUpdate: this.transforms.teamUpdate,\n\t\t\tuserUpdates: this.transforms.userUpdates\n\t\t}).publishAddedUsers();\n\t}", "function publishDatePlan(check){\n\tvar datePlanUser = new Object();\n\tdatePlanUser.datePlanID = datePlanActivity.DatePlanID;\n\tdatePlanUser.userID = user.UserID;\n\n\t$.ajax({\n\t\ttype: 'POST', \n\t\turl: 'api/index.php/shareDatePlan',\n\t\tcontent: 'application/json',\n\t\tdata: JSON.stringify(datePlanUser),\n\t\tsuccess: function(data){\n\t\t\tconsole.log(\"Date Plan is now public\");\n\t\t}\n\t});\n}", "publish () {}", "async publishUserToTeams () {\n\t\tawait new UserPublisher({\n\t\t\tuser: this.user,\n\t\t\tdata: this.user.getSanitizedObject({ request: this }),\n\t\t\trequest: this,\n\t\t\tbroadcaster: this.api.services.broadcaster\n\t\t}).publishUserToTeams();\n\t}", "doPublish(program, targetDate) {\n }", "function assignChapter() {\n manageSubjectService.getNotLinkedSubjectList($scope.selectedSubject).then(notLinkedSubjectSuccess, notLinkedSubjectError);\n $scope.selectedSubject.SubjectId;\n }", "function publish() {\n\tif(confirm(\"Are you sure you want to publish these changes?\")) {\n\t\t// tells server to publish\n\t\t$.get(\"backend.php\", {'loginInfo': {'allowed': true, 'user': 'me'}, 'publish': true},\n\t\t\t\tfunction(data, status, jqXHR) {\n\t\t\t\t\t// called on server response, alerts the user to the success or failure\n\t\t\t\t\t// TODO replace alert with a less intrusive notification\n\t\t\t\t\tif(data['status']['type'] == 'success') {\n\t\t\t\t\t\talert(\"published successfully\");\n\t\t\t\t\t\t//since this causes lots of changes, just reload the table\n\t\t\t\t\t\tsubmitSearch(true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\talert(\"publishing failed\");\n\t\t\t\t\t}\n\t\t\t\t}, 'json');\n\t}\n}", "get canSubscribe()\n\t{\n\t\treturn true;\n\t}", "async postProcess () {\n\t\t// grant permissions for all added users to subscribe to the stream channel,\n\t\t// revoke permissions for all removed users to subscribe to the stream channel\n\t\tawait awaitParallel([\n\t\t\tthis.grantUserMessagingPermissions,\n\t\t\tthis.revokeUserMessagingPermissions\n\t\t], this);\n\n\t\t// publish the update as needed, and \n\t\t// explicitly publish to any users added to a stream\n\t\tawait awaitParallel([\n\t\t\tthis.publishStream,\n\t\t\tthis.publishToUsers,\n\t\t\tthis.publishUserUpdates\n\t\t], this);\n\t}", "async function getSubject() {\n if (isMounted) {\n try {\n let fetchedSubject = await firebase.getSubject(subjectID, true)\n setSubject(fetchedSubject)\n } catch (err) {\n console.log(err)\n setSubject(null)\n }\n }\n }", "__broker_allow_pub(client, topic, payload, callback) {\n if (that.authPubCallback != null) {\n callback(null, that.authPubCallback(client, topic, payload));\n } else {\n callback(null, false); // block every publish if no callback defined\n }\n }", "submit() {\n this.rooms.forEach(room => room.sendPresence());\n }", "publish() {\n if (Meteor.isServer) {\n // get the InventoryCollection instance.\n const instance = this;\n /** This subscription publishes only the documents associated with the logged in user */\n Meteor.publish(inventoryPublications.inventory, function publish() {\n if (this.userId) {\n const username = Meteor.users.findOne(this.userId).username;\n return instance._collection.find({ owner: username });\n }\n return this.ready();\n });\n }\n }", "ready(){\n this.crew.forEach(function(member) { \n if((member.job == \"Pilot\" && member.vehicle.type == \"Plane\") ||\n (member.job == \"Captain\" && member.vehicle.type == \"Boat\"))\n {\n console.log(`The ${member.vehicle.type} is ready to depart!`)\n } else {\n return false\n }\n })\n }", "function requestPublishing(nid, language, before = false, times = 0, delete_language = false, error = false) {\n if (times == maxTimes) {\n if (error) {\n // A potentially compromising error has been detected. Aborting.\n userSubmitted = false;\n jQuery(targetButtonSelector).prop('disabled', false);\n showMessage('Something went wrong. Please try again.', false, true);\n }\n else {\n // Maximum threshold of intents reached. \n // Assuming something went wrong in a previous tab.\n jQuery.ajax({url: '/ajax/ibm_tmgmt_concurrency/status_semaphore/reset/' + route + '/' + nid}).done(function (response) {\n requestPublishing(nid, language, before, maxTimes, delete_language, true);\n }).fail(function () {\n requestPublishing(nid, language, before, maxTimes, delete_language);\n });\n }\n }\n else if (!before || before == language) {\n // This is the next element to be processed.\n // Notify this language is about to start processing.\n jQuery.ajax({url: '/ajax/ibm_tmgmt_concurrency/status_semaphore/start/' + route + '/' + nid + '/' + language + '/' + delete_language}).done(function (checkResponse) {\n showMessage('Submitting...');\n\n // Briefly enable the submit button to submit the form.\n submitButton.prop('disabled', false);\n submitButton.click();\n submitButton.prop('disabled', true);\n\n // Schedule this process for finishing once the request is done.\n var moderationControl = localStorage.getItem('MODERATION-CONTROL-SUBMITTED');\n moderationControl = moderationControl != null ? moderationControl.split(',') : [];\n moderationControl.push(entityId + ':' + entityLanguage + ':' + route);\n localStorage.setItem('MODERATION-CONTROL-SUBMITTED', moderationControl.toString());\n\n // Post request measures, if necessary.\n confirmFinished(nid, language);\n });\n }\n else {\n // Check if the language that goes before has finished.\n jQuery.ajax({url: '/ajax/ibm_tmgmt_concurrency/status_semaphore/check/' + route + '/' + nid + '/' + before + '/' + Date.now()}).done(function (checkResponse) {\n if (checkResponse.proceed) {\n // It's this element's turn.\n requestPublishing(nid, language, false, times, before);\n }\n else if (checkResponse.error) {\n requestPublishing(nid, language, before, maxTimes, true);\n }\n else {\n // Not our turn yet.\n if (checkResponse.beforeStarted) {\n // The process before this one has started. \n // Let's count how many times we ask from now on so we report an error if the threshold is met.\n times++;\n }\n showMessage('Waiting for other processes to finish...');\n sleep(time * 1000).then(() => {\n // Keep asking until it's our turn.\n requestPublishing(nid, language, before, times);\n });\n }\n }\n );\n }\n }", "get subject () {\n\t\treturn this._subject;\n\t}", "get subject () {\n\t\treturn this._subject;\n\t}", "get subject () {\n\t\treturn this._subject;\n\t}", "get subject () {\n\t\treturn this._subject;\n\t}", "get subject () {\n\t\treturn this._subject;\n\t}", "reserve() {\n this.error = false;\n\n this.api.updateDoctorSchedule(this.doctor, this.selectedDateTime)\n .then(result => {\n this.success = 'You have successfuly reserved visit time';\n })\n .catch(error => {\n this.error = error.message\n });\n }", "function TopicPublisher() {\n\t\tthis.subscribers = {\n\t\t}\n\t}", "async publishToAuthor () {\n\t\tif (!this.user.get('isRegistered')) {\n\t\t\t// this can happen from the NR comment engine\n\t\t\treturn;\n\t\t}\n\t\tconst channel = `user-${this.user.id}`;\n\t\tconst message = {\n\t\t\trequestId: this.request.request.id,\n\t\t\tuser: this.transforms.updatePostCountOp\n\t\t};\n\t\ttry {\n\t\t\tawait this.api.services.broadcaster.publish(\n\t\t\t\tmessage,\n\t\t\t\tchannel,\n\t\t\t\t{ request: this.request }\n\t\t\t);\n\t\t}\n\t\tcatch (error) {\n\t\t\t// this doesn't break the chain, but it is unfortunate...\n\t\t\tthis.request.warn(`Could not publish author update message to user ${this.user.id}: ${JSON.stringify(error)}`);\n\t\t}\n\t}", "function initialSubject(subject) {\n return subject.id === option;\n }", "function initialSubject(subject) {\n return subject.id === option;\n }", "function canSchedule() {\n\n // sched is enabled if\n // 1) when mandatory langs are not published AND all mandatory langs are selected AND all mandatory langs have a release date\n // 2) OR all mandatory langs are published\n // 3) OR all mandatory langs are are scheduled for publishing\n // 4) OR there has been a persisted schedule for a variant and it has now been changed\n\n var selectedWithDates = [];\n for (var i = 0; i < vm.variants.length; i++) {\n var variant = vm.variants[i];\n\n //if the sched dates for this variant have been removed then we must allow the schedule button to be used to save the changes\n var schedCleared = (origDates[i].releaseDate && origDates[i].releaseDate !== variant.releaseDate)\n || (origDates[i].expireDate && origDates[i].expireDate !== variant.expireDate);\n if (schedCleared) {\n return true;\n }\n\n var isMandatory = variant.segment == null && variant.language && variant.language.isMandatory;\n\n //if this variant will show up in the publish-able list\n var publishable = dirtyVariantFilter(variant);\n var published = !(variant.state === \"NotCreated\" || variant.state === \"Draft\");\n var isScheduledPublished = variant.releaseDate;\n\n if (isMandatory && !published && !isScheduledPublished && (!publishable || !variant.save)) {\n //if a mandatory variant isn't published or scheduled published\n //and it's not publishable or not selected to be published\n //then we cannot continue\n\n // TODO: Show a message when this occurs\n return false;\n }\n\n if (variant.save && (variant.releaseDate || variant.expireDate)) {\n selectedWithDates.push(variant.save);\n }\n }\n return selectedWithDates.length > 0;\n }", "assigned_task_completed(){\n var task_id = this._id;\n console.log(task_id);\n Session.setPersistent('check_2',task_id);\n // Meteor.subscribe(\"assigned_task_completed\",task_id);\n var result = task_assignment.find({_id : task_id}).fetch()\n\n if(result[0].task_completion_status == true){\n return true;\n }\n }", "async function publishStatus(status = getStatus()) {\n await client.publish('vpn/status', status);\n}", "function publish(book){\n// return book.set(\"isPublished\",true);\nreturn produce(book,draftBook=>{ // immer library\n draftBook.isPublished=true;\n})\n}", "function canPublish() {\n\n var hasSomethingToPublish = false;\n\n vm.variants.forEach(variant => {\n // if varaint is mandatory and not already published:\n if (variant.publish === false && notPublishedMandatoryFilter(variant)) {\n return false;\n }\n if (variant.publish === true) {\n hasSomethingToPublish = true;\n }\n });\n\n return hasSomethingToPublish;\n }", "publish() {\n if (Meteor.isServer) {\n const eventDataPublications = require('./EventDataCollectionPublications.js').eventDataCollectionPublications;\n eventDataPublications();\n }\n }", "function setupSubscribers(mediator, $scope) {\n // Workflow CRUDL subscribers\n mediator.subscribe(CONSTANTS.WORKFLOWS.CREATE, function(data) {\n data.workflowToCreate = JSON.parse(angular.toJson(data.workflowToCreate));\n data.workflowToCreate.id = data.topicUid;\n sampleWorkflows.push(data.workflowToCreate);\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.CREATE + ':' + data.topicUid, data.workflowToCreate);\n });\n\n mediator.subscribeForScope(CONSTANTS.WORKFLOWS.READ, $scope,function(data) {\n var obj = _.find(sampleWorkflows, function(obj) {\n return obj.id == data.topicUid;\n });\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.READ + ':' + data.topicUid, obj)\n });\n\n mediator.subscribe(CONSTANTS.WORKFLOWS.UPDATE, function(data) {\n sampleWorkflows.forEach(function(obj) {\n if(obj.id === data.topicUid) {\n obj = data.workflowToUpdate;\n }\n });\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.UPDATE + ':' + data.topicUid, data.workflowToUpdate);\n });\n\n mediator.subscribe(CONSTANTS.WORKFLOWS.DELETE, function(data) {\n sampleWorkflows = sampleWorkflows.filter(function(obj) {\n return obj.id !== data.topicUid;\n });\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.DELETE + ':'+ data.topicUid, data.topicUid);\n });\n\n mediator.subscribe(CONSTANTS.WORKFLOWS.LIST, function() {\n console.log('>>>>>>>DATA', sampleWorkflows);\n console.log('>>>>>>>RESULTS', sampleResults);\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.LIST, sampleWorkflows)\n });\n\n\n //Subscribers for results, workorders and appforms\n mediator.subscribe(CONSTANTS.RESULTS.LIST, function() {\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.RESULTS.LIST, sampleResults);\n });\n\n mediator.subscribe(CONSTANTS.WORKORDERS.LIST, function() {\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKORDERS.LIST, sampleWorkorders);\n });\n\n mediator.subscribe(CONSTANTS.APPFORMS.LIST, function() {\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.APPFORMS.LIST, []);\n });\n\n //Subscribers for Workflow process\n mediator.subscribe(CONSTANTS.WORKFLOWS.STEP.SUMMARY, function(data) {\n var result = _.find(sampleResults, function(obj) {\n return obj.workorderId === data.workorderId;\n });\n\n if(!result) {\n result = {};\n result.id = shortid.generate();\n result.workorderId = data.workorderId;\n result.nextStepIndex = 0;\n result.stepResults = {};\n result.status = 'New';\n }\n\n var workorder = _.find(sampleWorkorders, function(obj) {\n return obj.id === data.workorderId;\n });\n\n var workflow = _.find(sampleWorkflows, function(obj) {\n return obj.id === workorder.workflowId;\n });\n\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.STEP.SUMMARY + ':' + data.topicUid, {\n workorder: workorder,\n workflow: workflow,\n status: result.status,\n nextStepIndex: result.nextStepIndex,\n result: result\n })\n });\n\n mediator.subscribe(CONSTANTS.WORKFLOWS.STEP.BEGIN, function(data) {\n //TODO\n var result = _.find(sampleResults, function(obj) {\n return obj.workorderId === data.workorderId;\n });\n\n if(!result) {\n result = {};\n result.workorderId = data.workorderId;\n result.nextStepIndex = 0;\n result.stepResults = {};\n result.status = 'In Progress';\n\n sampleResults.push(result);\n }\n\n\n var workorder = _.find(sampleWorkorders, function(obj) {\n return obj.id === data.workorderId;\n });\n\n var workflow = _.find(sampleWorkflows, function(obj) {\n return obj.id === workorder.workflowId;\n });\n\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.STEP.BEGIN + ':' + data.topicUid, {\n workorder: workorder,\n workflow: workflow,\n result: result,\n nextStepIndex: result.nextStepIndex,\n step: result.nextStepIndex > -1 ? workflow.steps[result.nextStepIndex] : workflow.steps[0]\n });\n });\n\n mediator.subscribe(CONSTANTS.WORKFLOWS.STEP.COMPLETE, function(data) {\n var result = _.find(sampleResults, function(obj) {\n return obj.workorderId === data.workorderId;\n });\n\n var workorder = _.find(sampleWorkorders, function(obj) {\n return obj.id === data.workorderId;\n });\n\n var workflow = _.find(sampleWorkflows, function(obj) {\n return obj.id === workorder.workflowId;\n });\n\n result.nextStepIndex = _.findIndex(workflow.steps, function(obj) { return obj.code === data.stepCode}) + 1;\n result.stepResults[data.stepCode] = data.submission;\n\n if(result.nextStepIndex >= workflow.steps.length) {\n result.status = 'Complete';\n }\n\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.STEP.COMPLETE + ':' + data.topicUid, {\n workorder: workorder,\n workflow: workflow,\n result: result,\n nextStepIndex: result.nextStepIndex,\n step: result.nextStepIndex > -1 ? workflow.steps[result.nextStepIndex] : workflow.steps[0]\n })\n\n });\n}", "function assignDeliverables() {\n vm.booking.technical_specifications.deliverables = vm.deliverables;\n isDoneAllDeliverables();\n }", "async publishToUsers () {\n\t\tconst stream = await this.data.streams.getById(this.updater.stream.id);\n\t\t// only applies to private streams, and only if there are users added\n\t\tif (\n\t\t\tstream.get('privacy') !== 'private' ||\n\t\t\t!this.transforms.addedUsers ||\n\t\t\tthis.transforms.addedUsers.length === 0\n\t\t) {\n\t\t\treturn;\t\n\t\t}\n\t\tconst userIds = this.transforms.addedUsers.map(user => user.id);\n\t\tawait new StreamPublisher({\n\t\t\tdata: { stream: stream.getSanitizedObject({ request: this }) },\n\t\t\trequest: this,\n\t\t\tbroadcaster: this.api.services.broadcaster,\n\t\t\tstream: this.updater.stream.attributes\n\t\t}).publishStreamToUsers(userIds);\n\t}", "function eventChecker() {\n if(isSubscribed)\n pubsubEvents();\n}", "checkActivateAuthor () {\n /* nothing */\n }", "initPublisherListener() {\n // Enable keyevents in redis and subsribe for EXPIRED event\n redisPSub.config('SET', 'notify-keyspace-events', 'Ex');\n redisPSub.psubscribe('__keyevent@0__:*');\n redisPSub.on('pmessage', (pattern, channel, message) => {\n if (message === 'publisherHere') {\n this.check().then(mode => {\n if (mode === 'IamPublisher') {\n this.emit('mode:change', 'publisher');\n }\n });\n }\n });\n }", "_onPublishClicked(options={}) {\n if (options.publishToOwnerOnly) {\n this.model.set('publishToOwnerOnly', true);\n }\n\n if (options.publishAndArchive) {\n this.model.set('publishAndArchive', true);\n }\n\n this.model.publish({\n attrs: ['public', 'publishToOwnerOnly', 'publishAndArchive'],\n });\n\n return false;\n }", "function publishPermissions ($group) {\n if (!$group.find('.hidden').attr('data-publish')) {\n $group.find('.cmb-add-row button').prop('disabled', true).prop('title', 'You do not have permission for this');\n }\n }", "function publishAns() {\n dailyCode.publish({\n message: aArea.value,\n channel: ['dailyCodeA'],\n x : (aArea.value='')\n });\n}", "constructor(utorid, name, email,isInstructor, courses, meetings, availability){\n this.utorid = utorid;\n this.name = name;\n this.email = email;\n this.isInstructor = isInstructor;\n this.courses = courses;\n this.meetings = meetings;\n this.availability = availability;\n }", "function tveAuthorized(){\n\n\t// video home page\n\tif (typeof videoHomeReplaceClipLinks == 'function') {\n\t\tvideoHomeReplaceClipLinks(true);\n\t}\n\t// Video Property template\n\tif (typeof videoPropertyAuthCheckComplete == 'function') {\n\t\tvideoPropertyAuthCheckComplete('authorized');\n\t}\n}", "async publish(options={}, context=undefined) {\n if (_.isFunction(options.success) ||\n _.isFunction(options.error) ||\n _.isFunction(options.complete)) {\n console.warn('RB.ReviewReply.publish was called using ' +\n 'callbacks. Callers should be updated to use ' +\n 'promises instead.');\n return RB.promiseToCallbacks(options, context, newOptions =>\n this.publish(newOptions));\n }\n\n this.trigger('publishing');\n\n await this.ready();\n\n this.set('public', true);\n\n try {\n await this.save({\n data: {\n 'public': 1,\n trivial: options.trivial ? 1 : 0\n },\n });\n } catch (err) {\n this.trigger('publishError', err.message);\n throw err;\n }\n\n this.trigger('published');\n }", "function checkPublish(){\n \n publish = $(\"input[type='radio']:checked\").val().trim(); //get published status\n \n //if article is not published warn user it will not be visible \n if(publish.trim() !== \"1\") {\n setError($(\"#warning-publish\"),\"*Unpublished articles will not be visible to other users!\");\n return true;\n }else{\n resetError($(\"#warning-publish\"));\n return false;\n }\n \n}//END checkPublish function", "function Subject() {\n // our subject keeps a record of its subscribers\n this.subscribers = new Set();\n // clients can can subscribe to it\n this.subscribe = (subscriber) => {\n this.subscribers.add(subscriber);\n // provite the ability to unsubscribe\n return {\n unsubscribe: () => this.subscribers.delete(subscriber)\n };\n };\n // our subject can emit values to each subscriber\n this.next = (value) => {\n this.subscribers.forEach(subscriber => subscriber(value));\n }\n}", "function publish(selector) {\n return selector ?\n multicast(function () { return new Subject/* Subject */.xQ(); }, selector) :\n multicast(new Subject/* Subject */.xQ());\n}", "success() {\n console.log(\"join meeting success\");\n }", "async function newSubject() {\r\n try {\r\n clearStatusBar();\r\n\r\n //Variables\r\n ///Array containing the topics pulled from the file system\r\n var topics = [];\r\n\r\n ///The file path of the topics file\r\n userSession.filePath = encodeURIComponent($(\"#qualification\").val()) + \"/\" + encodeURIComponent($(\"#examBoard\").val()) + \"/\" + encodeURIComponent($(\"#subject\").val()) + \"/\";\r\n\r\n ///The api to be called to get the topics file for the correct subject\r\n var api = filterAPI(userSession.filePath, true);\r\n\r\n\r\n //Get topics\r\n ///Awaits the topic file from S3\r\n topics = await callGetAPI(api, \"topics\");\r\n\r\n ///Puts the topics into the user session variable\r\n userSession.topics = topics.filters;\r\n\r\n ///Log the topics, for testing\r\n //console.log(userSession.topics);\r\n\r\n ///Loads the topics display\r\n loadTopicDisplay();\r\n } catch (error) {\r\n generateErrorBar(error);\r\n }\r\n}", "function Publisher() {\r\n this.subscribers = [];\r\n }", "setupSubscribers() {\n DomainEvents.subscribe(MemberEntryViewEvent, async (ev) => {\n const event = AnalyticEvent.create({\n name: 'entry_view',\n memberId: ev.data.memberId,\n memberStatus: ev.data.memberStatus,\n entryId: ev.data.entryId,\n sourceUrl: ev.data.entryUrl,\n timestamp: ev.timestamp\n });\n\n await this.repository.save(event);\n });\n\n DomainEvents.subscribe(MemberUnsubscribeEvent, async (ev) => {\n const event = AnalyticEvent.create({\n name: 'unsubscribe',\n memberId: ev.data.memberId,\n memberStatus: ev.data.memberStatus,\n entryId: ev.data.entryId,\n sourceUrl: ev.data.sourceUrl,\n timestamp: ev.timestamp\n });\n\n await this.repository.save(event);\n });\n\n DomainEvents.subscribe(MemberSignupEvent, async (ev) => {\n const event = AnalyticEvent.create({\n name: 'signup',\n memberId: ev.data.memberId,\n memberStatus: 'free',\n entryId: ev.data.entryId,\n sourceUrl: ev.data.sourceUrl,\n timestamp: ev.timestamp\n });\n\n await this.repository.save(event);\n });\n\n DomainEvents.subscribe(MemberPaidCancellationEvent, async (ev) => {\n const event = AnalyticEvent.create({\n name: 'paid_cancellation',\n memberId: ev.data.memberId,\n memberStatus: ev.data.memberStatus,\n entryId: ev.data.entryId,\n sourceUrl: ev.data.sourceUrl,\n metadata: ev.data.subscriptionId,\n timestamp: ev.timestamp\n });\n\n await this.repository.save(event);\n });\n\n DomainEvents.subscribe(MemberPaidConverstionEvent, async (ev) => {\n const event = AnalyticEvent.create({\n name: 'paid_conversion',\n memberId: ev.data.memberId,\n memberStatus: ev.data.memberStatus,\n entryId: ev.data.entryId,\n sourceUrl: ev.data.sourceUrl,\n metadata: ev.data.subscriptionId,\n timestamp: ev.timestamp\n });\n\n await this.repository.save(event);\n });\n }", "notifySubscribers(artistId, subject, content){\n let subscribers = subscriptions.get(artistId)\n if (subscribers !== undefined){\n subscribers.forEach(subEmail => { //TODO: cambiar forEach por algun otro lambda\n gmailClient.users.messages.send(\n {\n userId: 'me',\n requestBody: {\n raw: this.createMessage(subEmail, subject, content),\n },\n }\n )\n });\n }\n \n}", "publish (data) {\n this.subscribers.forEach(subscriber => {\n subscriber(data);\n });\n }", "function checkIfReady (peer) {\n if (peer && peer.isWritable) {\n peer.sendUnsubscriptions(topics)\n } else {\n setImmediate(checkIfReady.bind(peer))\n }\n }", "function checkIfReady (peer) {\n if (peer && peer.isWritable) {\n peer.sendUnsubscriptions(topics)\n } else {\n setImmediate(checkIfReady.bind(peer))\n }\n }", "get subject() {\n\t\treturn this.__subject;\n\t}", "get subject() {\n\t\treturn this.__subject;\n\t}", "get subject() {\n\t\treturn this.__subject;\n\t}", "get subject() {\n\t\treturn this.__subject;\n\t}", "get subject() {\n\t\treturn this.__subject;\n\t}", "get subject() {\n\t\treturn this.__subject;\n\t}", "get subject() {\n\t\treturn this.__subject;\n\t}", "async function checkForTeachersPresence(entities) {\n await updateAndSort(\"TEACHER\", Teacher.getComparator(\"serialNumber\"));\n entities.forEach((entity) => getTeacherIdFromSerialNumber(entity.Teacher));\n}", "function Subject(){\n this.observers = new ObserverList();\n}", "task_assigned_to(){\n var user_id = Session.get('mySession');\n Meteor.subscribe('fetch_assigned_task_to', user_id);\n // var task_assign_by_1 = Session.get('task_assign_to');\n // return task_assignment.find({ 'user_id_by' : task_assign_by },{sort: {created_at: -1}}).fetch();\n return task_assignment.find({\"assigned_by\" : user_id},{sort: {created_at: -1}}).fetch(); \n \n }", "isReady() {\n return this.age >= this.period;\n }", "async sendPublication() {\n\n Keyboard.dismiss()\n\n if (this.state.screenMode == 'PostPublication' && this.state.textInput.replace(/\\s/g, '') == '') {\n return Snackbar.show({ text: 'ERROR-MESSAGE.Your-wiins-is-empty', duration: Snackbar.LENGTH_LONG })\n }\n\n if (this.state.textInputHastag !== '') {\n return Snackbar.show({ text: 'ERROR-MESSAGE.Please-complete-your-hastag-or-delete-it', duration: Snackbar.LENGTH_LONG })\n }\n\n let publicationCreated\n\n // create story or publication\n if (this.state.ifStories) { publicationCreated = await createStoryPublication(this.state) }\n else { publicationCreated = await createPublication(this.state) }\n\n if (!publicationCreated) return null\n\n // send story or publication\n if (this.state.ifStories) { \n this.props.actions.addPublicationStoryInPendingList(publicationCreated, () => this._refreshPageAfterSentStory()) \n }\n else { this.props.actions.addPublicationInPendingList(publicationCreated, () => this._refreshPageAfterSentPublication()) }\n\n this.handlerGoBack()\n\n }", "loadVehiclesList(){\n PubSub.publish('loadVehiclesList', {});\n }", "approveconference(conference){\n let id = conference._id;\n let approval = {aStatus:\"Approved\"}\n ConferenceService.ConferenceApproval(id,approval)\n .then(response =>{\n let conf = response;\n if(conf.status=== \"Approved\"){\n /**\n * TODO:display the message appropriately\n */\n console.log(\"Approved\")\n }else{\n /**\n * TODO:display the message appropriately\n */\n console.log(\"Something went wrong, try again!!\")\n }\n })\n }", "run({ text, agentName }) {\n var today = moment().format();\n var yesterday = moment().subtract(1, 'days').format();\n \n var todaysAnnouncements = Announcements.find({date: {$lt: today, $gt: yesterday} }, {sort: {date: 1}}).fetch()\n var users = Meteor.users.find({\"emails.verified\": true}).fetch();\n if (todaysAnnouncements.length !== 0) {\n let announcements = \"\";\n todaysAnnouncements.forEach(an => {\n if (an.agentName === 'Admin') {\n announcements += \"The Assassins Admin sent the following message:\\n\" + an.text + \"\\n\\n\";\n } else {\n announcements += \"Agent \" + an.agentName + \" passed today. Here are their dying words:\\n\" + an.text + \"\\n\\n\";\n }\n });\n users.forEach(user => {\n let text = \"Hello Agent \" + user.agentName + \",\\n\\nAnother day has concluded. Here are some things that are happening:\\n\" + announcements;\n if (!user.alive) {\n text += \"\\n\\nAs always: don't reveal the identity of any assassins, but help trap any target you wish.\";\n } else if (user.targetName.length !== 0) {\n text += \"\\n\\nAs always: stay alert, travel in groups, and be armed at all times.\";\n text += \"Your current target is \" + user.targetName + \" and you have \" + user.kills;\n if (user.kills === 1) {text += \" kill.\\n\";}\n else {text += \" kills.\\n\";}\n text += \"Visit ballroom-assassins.herokuapp.com for more information.\\nGood luck!\"\n } else {\n text += \"\\n\\nStay tuned for more information on your target.\";\n }\n text += \"\\n--Ballroom Assassins Admin\";\n Meteor.call('sendEmail',\n user.emails[0].address,\n 'Ballroom Assassins Admin',\n \"[Ballroom Assassins] Daily Debrief\",\n text\n ); \n });\n }\n }", "async function register_a_tutor(o) {\n const {name, app_instance, xray} = o;\n const {tutor_name =name, label, data} = o;\n _assert(tutor_name, o, \"Missing tutor name\")\n _assert(label, o, \"Missing tutor label\")\n _assert(app_instance, o, \"Missing app_instance\")\n const {package_id, app_folder,\n tutors_folder} = app_instance;\n _assert(package_id, o, \"Missing package_id\")\n _assert(app_folder, o, \"Missing app_folder\")\n _assert(tutors_folder, o, \"Missing tutors_folder\")\n\n /*\n lookup for an existing tutor.\n */\n\n const _tutors = app_instance._tutors;\n let tutor = _tutors && _tutors[tutor_name];\n\n if (!tutor) {\n await api.content_folder__new({\n parent_id: tutors_folder,\n name: tutor_name,\n label,\n package_id,\n context_id: tutors_folder\n })\n .then(folder_id =>{\n// _assert(folder_id, o, 'fatal@38')\n tutor = {\n folder_id,\n name: tutor_name,\n label: label\n }\n })\n .catch(err =>{\n if (err.code != 23505) throw err;\n console.log(`ALERT tutor@42 : `, err.detail)\n })\n }\n\n//console.log(`@51:`,{tutor})\n\n if (!tutor) {\n // already exists.\n tutor = await db.query(`\n select *\n from cr_folders, cr_items i\n left join cr_revisions on (revision_id = latest_revision)\n where (i.item_id = folder_id)\n and (parent_id = $(parent_id))\n and (name = $(name));\n `,{parent_id:tutors_folder, name: tutor_name},{single:true});\n }\n\n\n const {folder_id:tutor_id} = tutor;\n _assert(tutor_id, tutor, 'fatal@53')\n\n if (o.data) { // check latest_revision checksum\n await api.content_revision__new({\n item_id: tutor_id,\n data\n })\n .catch(err =>{\n if (err.code != 23505) throw err;\n console.log(`api.content_revision__new =>`,err.detail)\n })\n }\n\n\n\n/*\n await db.query(`\n update cr_items set content_type = 'tapp.contract'\n where (item_id = ${folder_id})\n `, {folder_id},{single:true})\n\n await db.query(`\n update acs_objects set object_type = 'tapp.contract'\n where (object_id = ${folder_id})\n `, {folder_id},{single:true})\n\n\n if (xray) {\n await tapp.xray_folder({folder_id})\n }\n\n*/\n\n\n\n //const {item_id:tutor_id} = tutor;\n\n await db.query(`\n update acs_objects\n set object_type = 'tapp.tutor'\n where object_id = $(tutor_id);\n `, {tutor_id}, {single:true});\n\n\n return tutor;\n\n}", "function publishDeal() {\n $.when(ActionModule.ajax({\n action: 'publishDeal',\n node_ins_id: $('#id_listing_body').find('div.active-tr').data('id'),\n node_id: $('#id_listing_body').find('div.active-tr').data('node-id'),\n 'login_user_id': login_user_id,\n })).then(function (response) {\n var dealSpaceRole = $('.action-accept-invitation.deals-space-roles');\n if ($(dealSpaceRole)) {\n $(dealSpaceRole).removeClass('deals-space-roles inactive-btn');\n }\n hideFullLoader('full_page_loader');\n });\n }", "function addSubject(idString, type, url){\n const elem = document.querySelector(`#${idString}`);\n makeSceneSubject(type, elem, url).then(({scene, camera, root}) => {\n renderer.render(scene, camera);\n subjectList.push({idString, fn: (rect) => {\n camera.aspect = rect.width / rect.height;\n camera.updateProjectionMatrix();\n root.rotation.y += 0.005;\n renderer.render(scene, camera);\n }});\n });\n }", "async postCreate (options) {\n\t\t// all these operations are independent and can happen in parallel\n\t\tawait awaitParallel([\n\t\t\tthis.publishCreatedStreamsForMarkers,\t// publish any streams created on-the-fly for the markers, as needed\n\t\t\tthis.publishRepos,\t\t\t\t\t// publish any created or updated repos to the team\n\t\t\tthis.publishPost.bind(this, options && options.postPublishData), // publish the actual post to members of the team or stream\n\t\t\t//this.publishParents,\t\t\t\t// if this post was a reply and we updated the parent post or codemark, publish that\n\t\t\tthis.triggerNotificationEmails,\t\t// trigger email notifications to members who should receive them\n\t\t\tthis.publishToAuthor,\t\t\t\t// publish directives to the author's me-channel\n\t\t\tthis.trackPost,\t\t\t\t\t\t// for server-generated posts, send analytics info\n\t\t\tthis.updateMentions\t\t\t\t\t// for mentioned users, update their mentions count for analytics\n\t\t], this);\n\n\t\tawait this.postProcessInvitedUsers();\n\t}", "constructor() {\n // The name of this collection.\n this.name = 'UserTransportationCollection';\n // Define the Mongo collection.\n this.collection = new Mongo.Collection(this.name);\n // Define the structure of each document in the collection.\n this.schema = new SimpleSchema({\n transport: {\n type: String,\n allowedValues: UserTransportationTypeEnum.Array,\n },\n date: Date,\n miles: Number,\n mpg: { type: Number, optional: true },\n userID: String,\n }, { tracker: Tracker });\n // Attach the schema to the collection, so all attempts to insert a document are checked against schema.\n this.collection.attachSchema(this.schema);\n // Define names for publications and subscriptions\n this.userPublicationName = `${this.name}.publication.user`;\n this.adminPublicationName = `${this.name}.publication.admin`;\n // TODO: might have to write publication method for different types of publication if needed\n // Can make a get function for the collection name, then use that with publish method\n this.communityPublicationName = `${this.name}.publication.community`;\n }", "getSchedule() {\n return getSubjectSchedule(this._subject, this._school, this._degree, this._course);\n }", "notifyBeforePostingStandup() {\n let rmUserArr = [];\n this.getUsers().then(res => {\n if (res.length > 0) {\n res.forEach(res => {\n rmUserArr.push(res.username);\n });\n console.log(\"Unsubscribed users = \" + rmUserArr)\n }\n });\n this.getLateSubmitters().then(res => {\n let lateSubmitters\n if (res.length > 0) {\n lateSubmitters = res\n console.log(\"Late submitters before filter = \" + lateSubmitters)\n lateSubmitters = lateSubmitters.filter(\n item => !rmUserArr.includes(item)\n );\n console.log(\"Late submitters after filter = \" + lateSubmitters)\n if (lateSubmitters.length > 0) {\n res.forEach(user => {\n this.sendMessageToUser(user, pickRandomReminderMsg());\n });\n }\n }\n\n });\n }", "function filter(err, res, callback) {\n if (err) {\n callback(err);\n } else {\n const streams = res.body.subscriptionSubjects;\n // debug('Got streams from server: %j', streams);\n callback(null, {\n public: streams.public,\n private: streams.authenticationRequired,\n all: streams.public.concat(streams.authenticationRequired),\n });\n }\n}", "function shareSubjectFactory() {\n return new Subject/* Subject */.xQ();\n}", "success() {\n janus.attach(\n {\n plugin: 'janus.plugin.videoroom',\n success(pluginHandle) {\n handle = pluginHandle;\n handle.send({\n message: {\n request: 'join', ptype: 'publisher', room: roomId,\n },\n });\n },\n onmessage(msg, feedJsep) {\n if (msg.configured === 'ok') {\n showInfoMessage($('#mic-connected-msg').val());\n $('#mic-spin').hide();\n $('#toggle-mic').show();\n }\n\n if (msg.unpublished === 'ok') {\n showInfoMessage($('#mic-disconnected-msg').val());\n $('#mic-spin').hide();\n $('#toggle-mic').show();\n }\n\n if (typeof msg.error !== 'undefined') {\n switch (msg.error_code) {\n case 432: \n displayMaxPublishersReachedWarning();\n disconnectMicrophone();\n $('#toggle-mic').removeClass('fa-microphone');\n $('#toggle-mic').addClass('fa-microphone-slash');\n $('#toggle-mic').show();\n $('#mic-spin').hide();\n default: break;\n }\n }\n\n if (feedJsep && feedJsep.type === 'answer') {\n handle.handleRemoteJsep({\n jsep: feedJsep\n });\n }\n const status = msg.videoroom;\n switch (status) {\n case 'joined':\n joinFeed(msg.publishers);\n break;\n case 'event':\n if (typeof msg.publishers !== 'undefined') {\n joinFeed(msg.publishers);\n }\n break;\n default: break;\n }\n },\n },\n );\n }", "static alreadyPublished(){\n Quas.each(\".toolbar-btn-right\", function(el){\n el.visible(false);\n });\n Quas.getEl(\"#save-update\").visible(true);\n Toolbar.published = true;\n }", "async postProcess () {\n\t\tawait awaitParallel([\n\t\t\tthis.publishAddToTeam,\n\t\t\tthis.sendInviteEmails,\n\t\t\tthis.publishNumUsersInvited\n\t\t], this);\n\t}", "function suitableTeacher(){\n\tvar sid = $(\"select[name=sid] option:selected\").val();\n\t\n\tvar url = \"/uuplex/fitness/teacher/suitable\";\n\tvar method = \"GET\";\n\tvar params = \"sid=\" + sid; \n\tsendRequest(teacherSelect, url, method, params);\n}", "createPublication(topic, range, duration, properties, deviceId, completion) {\n return this.withDevice(deviceId)(deviceId => {\n let p = new Promise((resolve, reject) => {\n let api = new ScalpsCoreRestApi.PublicationApi();\n let callback = function (error, data, response) {\n if (error) {\n reject(\"An error has occured while creating publication '\" +\n topic +\n \"' :\" +\n error);\n }\n else {\n // Ensure that the json response is sent as pure as possible, sometimes data != response.text. Swagger issue?\n resolve(JSON.parse(response.text));\n }\n };\n let publication = {\n worldId: this.token.sub,\n topic: topic,\n deviceId: deviceId,\n range: range,\n duration: duration,\n properties: properties\n };\n api.createPublication(deviceId, publication, callback);\n });\n return p.then((publication) => {\n this._persistenceManager.add(publication);\n if (completion)\n completion(publication);\n return publication;\n });\n });\n }", "function Subject() {\n this.observers = [];\n}", "function subscribe()\n{\t\n var forumId = getUrlParameter(\"id\");\n var userId = Cookies.get(\"userId\");\n \n\tif(userId != null && forumId != null)\n\t{\n\t\t$.ajax({\n\t\t\turl : \"/CampusTalk/rest/CampusTalkAPI/subscribe\",\n\t\t\tdatatype:'json',\n\t\t\ttype: \"post\",\n\t\t\tcontentType: \"application/json\",\n\t\t\tdata: JSON.stringify({userId: userId, forumId: forumId}),\n\t\t}).done(function(data){\n\t\t\t//console.log(\"user Id and forum Id sent to server\");\n\t\t\t$(\"#btnSubscribe\").hide();\n\t\t\t$(\"#btnUnsubscribe\").show();\n\t\t\t$(\"#btnNewPost\").show();\n\t\t\t$(\"#buttons\").toggle().toggle();\n\t\t});\n\t}\n}", "makeTrialsReady() {\n let trials = this.state.trials,\n readyTrials = trials.filter(t => t.checked && !t.completed),\n readyTrialEZIDs = readyTrials.map(r => r.ezid);\n this.fetchData({type: \"MAKE_TRIALS_READY\", data: {ezids: readyTrialEZIDs.join(\",\")}})\n }" ]
[ "0.5720583", "0.54572177", "0.5431891", "0.53924656", "0.5275281", "0.52708536", "0.523012", "0.5229384", "0.52283525", "0.5170004", "0.5148517", "0.51289713", "0.5124613", "0.51207703", "0.51160693", "0.5102971", "0.50965893", "0.5042826", "0.5026513", "0.50139827", "0.49968702", "0.4992469", "0.4981563", "0.49721268", "0.49635953", "0.49609536", "0.49558693", "0.49476987", "0.49368745", "0.493416", "0.493416", "0.493416", "0.493416", "0.493416", "0.49274108", "0.4921862", "0.49118614", "0.49116063", "0.49116063", "0.49108422", "0.49101925", "0.490736", "0.4901724", "0.48932293", "0.48919076", "0.48884162", "0.4880716", "0.48770624", "0.48767203", "0.48691374", "0.48691103", "0.4868923", "0.4867712", "0.48633596", "0.48612702", "0.485702", "0.4850087", "0.48499128", "0.48410273", "0.4833926", "0.48186532", "0.48163363", "0.48150924", "0.48137766", "0.4808126", "0.48071438", "0.4796012", "0.4796012", "0.4786131", "0.4786131", "0.4786131", "0.4786131", "0.4786131", "0.4786131", "0.4786131", "0.47723603", "0.47697753", "0.47385114", "0.4735203", "0.4728541", "0.4723274", "0.47178876", "0.47076476", "0.47046375", "0.47001597", "0.46935216", "0.46910948", "0.46829355", "0.4678866", "0.4673994", "0.46528536", "0.46525034", "0.4650352", "0.4648502", "0.46466106", "0.46443206", "0.4639062", "0.46356705", "0.46347794", "0.46332747" ]
0.635756
0
Post a heartbeat to inform host that this tutor HO is still available
function heartBeat() { httpRequest('GET', SERVER_PATH, 'heartbeat', 'gid=' + gid + '&pid=' + pid + "&count=" + count); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function heartbeat () { this.isAlive = true }", "queueHeartbeat() {\n\t\t\tif (this.options.ignoreHeartbeat) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!(this.hasHandshook && this.open)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.heartbeatTimeout !== undefined) {\n\t\t\t\tclearTimeout(this.heartbeatTimeout);\n\t\t\t}\n\n\t\t\tthis.heartbeatTimeout = setTimeout(\n\t\t\t\t() => {\n\t\t\t\t\tthis.sendMessage([\n\t\t\t\t\t\t___R$project$rome$$internal$events$types_ts$BridgeMessageCodes.HEARTBEAT,\n\t\t\t\t\t]);\n\t\t\t\t},\n\t\t\t\t1_000,\n\t\t\t);\n\t\t}", "_onHeartbeatTimeout() {\n\t\tDebug( '%s: heartbeat timeout', this.node.id );\n\n\t\tthis.emit( 'heartbeat timeout' );\n\n\t\tthis.node.transition( 'candidate', true );\n\t}", "ackHeartbeat() {\n this.debug(`Heartbeat acknowledged, latency of ${Date.now() - this.lastPingTimestamp}ms`);\n this.client._pong(this.lastPingTimestamp);\n }", "function sendHeartbeat() {\n _.forOwn(_this.socks, function (sock) {\n sock.write('hb');\n });\n setTimeout(sendHeartbeat, _this.heartbeatFreq);\n }", "sendHeartbeat() {\n this.sendPacket({ op: Constants.VoiceOPCodes.HEARTBEAT, d: null }).catch(() => {\n this.emit('warn', 'Tried to send heartbeat, but connection is not open');\n this.clearHeartbeat();\n });\n }", "heartbeat () {\n }", "function heartbeat() {\n\n board.updateEnemy();\n var data = {\n player_dico: board.player_dic,\n enemy_list: board.enemy,\n waveNum: board.wave_num\n };\n io.sockets.emit('heartbeat', data);\n}", "function heartbeat() {\n client.publish('/heartbeat', { id: '1', type: 'emitter' });\n}", "heartbeat() {\n const now = Date.now();\n if (now - this.lastHeartbeat >= this.heartbeatInterval) {\n util.promisify(fs.writeFile)(this.heartbeatPath, \"\").catch((error) => {\n this.services.get(log_1.ILogService).warn(error.message);\n });\n this.lastHeartbeat = now;\n clearTimeout(this.heartbeatTimer); // We can clear undefined so ! is fine.\n this.heartbeatTimer = setTimeout(() => {\n if (this.onlineConnections.length > 0) {\n this.heartbeat();\n }\n }, this.heartbeatInterval);\n }\n }", "schedule_heartbeat() {\n\t\tclearTimeout(this.heartbeat_timer);\n\t\tif (this.heartbeat_period > 0) {\n\t\t\tthis.heartbeat_timer = setTimeout(() => this.ws.ping(), this.heartbeat_period);\n\t\t}\n\t}", "function sendHeartbeat() {\n send(json_heartbeat_message());\n}", "_heartbeatTimeoutFired() {\n this._heartbeatTimeoutHandle = null;\n\n this._onTimeout();\n }", "sendHeartbeat() {\n this.lastHeatbeatSend = Date.now();\n this.missedHeartbeats++;\n const nonce = this.lastHeatbeatSend;\n return this.sendPacket({\n op: 3 /* Heartbeat */,\n d: nonce,\n });\n }", "_startHardbeat() {\n var timeout = this.get('heartbeatTimeout');\n this.storage.setItem('singleton:heartbeat', Date.now());\n return setInterval(() => {\n this.storage.setItem('singleton:heartbeat', Date.now());\n }, timeout);\n }", "function wrf_heartbeat(req, res) {\n\tconsole.log(\"WRF: heartbeat\");\n\tres.json({success: true, ready: true, status: \"Online\"});\n}", "function sendHeartbeat(hostName) {\n\t\tvar socket \t = connections[hostName];\n\t\tvar heartBeat = {\"messagetype\":\"heartbeat\", \"hostName\": util.address.val, \"port\": util.port};\n\t\tsendSecure(socket, hostName, JSON.stringify(heartBeat));\t\t\n\t}", "sendHeartbeat() {\n this._clearHeartbeatTimeouts();\n if (!this.heartbeatsEnabled) {\n return;\n }\n\n if (this.socket && !this.canSend('text/x-msrp-heartbeat')) {\n MsrpSdk.Logger.warn(`[Session]: Cannot start heartbeats for session ${this.sid}. Peer does not support 'text/x-msrp-heartbeat' content.`);\n return;\n }\n\n let timedOut = false;\n\n const msgQueued = this.sendMessage('HEARTBEAT', 'text/x-msrp-heartbeat', null, status => {\n if (timedOut) {\n return;\n }\n this._clearHeartbeatTimeouts();\n if (status === MsrpSdk.Status.OK) {\n MsrpSdk.Logger.debug('Successful heartbeat for session', this.sid);\n } else {\n this._raiseHeartbeatFailure(status);\n }\n this.resetHeartbeat();\n });\n\n if (!msgQueued) {\n this._raiseHeartbeatFailure(MsrpSdk.Status.INTERNAL_SERVER_ERROR);\n this.resetHeartbeat();\n return;\n }\n\n this.heartbeatTimeout = setTimeout(() => {\n timedOut = true;\n this.heartbeatTimeout = null;\n this._raiseHeartbeatFailure(MsrpSdk.Status.REQUEST_TIMEOUT);\n this.resetHeartbeat();\n }, MsrpSdk.Config.heartbeatTimeout * 1000);\n }", "function heartbeat()\n{\n\tvar fn = function(key, val)\n\t{\n\t\tvar queue = val.queue;\n\t\tvar msg = (typeof queue != \"undefined\" && queue != null && queue.length > 0) ? queue.shift() : getSpam();\n\t\tvar skt = io.sockets.connected[val.id];\n\t\tif (skt)\n\t\t{\n\t\t\tif (msg.event && msg.data)\n\t\t\t\tskt.emit(msg.event, msg.data);\n\t\t}\n\t}\n\n\tkeyTree.inorder(fn, false);\n}", "function heartbeat() {\n this.isAlive = true;\n}", "_heartbeatIntervalFired() {\n // don't send ping if we've seen a packet since we last checked,\n // *or* if we have already sent a ping and are awaiting a timeout.\n // That shouldn't happen, but it's possible if\n // `this.heartbeatInterval` is smaller than\n // `this.heartbeatTimeout`.\n if (!this._seenPacket && !this._heartbeatTimeoutHandle) {\n this._sendPing(); // Set up timeout, in case a pong doesn't arrive in time.\n\n this._startHeartbeatTimeoutTimer();\n }\n\n this._seenPacket = false;\n }", "function _heartbeat(menusComp)\n {\n //don't send heartbeat if one is pending\n if(menusComp.get(\"beatPending\")) return\n \n menusComp.set(\"beatPending\", true) \n //send ajax request to server\n Ajax.Get(\"SearchHeartbeat\", {clientVersion: menusComp.get(\"version\")}, function(response)\n {\n menusComp.set(\"beatPending\", false)\n //if a response was given, parse it for its value\n if(response)\n response = JSON.parse(response)\n //if the parsed response has content\n if(response)\n {\n menusComp.set(\"Version\", response.Version)\n menusComp.set(\"Venders\", response.VenderData)\n }\n })\n }", "function intervalHeartbeat() {\n if (document.webkitHidden || document.hidden) {\n clearTimers();\n document.location = \"http://bestpint.net\";\n }\n }", "function heartbeat() {\n io.sockets.emit('heartbeatUsers', users);\n io.sockets.emit('heartbeatMarks', marks);\n}", "heartbeat() {\n logger.info(`[${P2P_PREFIX}] Start heartbeat`);\n this.intervalHeartbeat = setInterval(() => {\n this.server.clients.forEach(ws => {\n ws.ping();\n });\n }, HEARTBEAT_INTERVAL_MS);\n }", "onKeepAliveInterval() {\n let update_difference = Date.now() - this.keepalive_timestamp_;\n\n // The valid threshold value is 3 to 7 seconds.\n // A value greater than 7 seconds is considered as a previous session\n // or other garbage value.\n if( update_difference > 4000 && update_difference < 7000) {\n logger.error('Sending bye command triggered by KeepAlive timeout : ' + update_difference);\n\n // send bye message to device\n this.websocketClient_.doSendMessage(JSON.stringify({ \n what: \"hangup\"\n }));\n\n // reset the connection state\n this.deactivateSession_();\n }\n }", "sendHeartbeats() {\n // Send heartbeats to idle workers if it's time\n if ((new Date()).getTime() >= this.heartbeatAt) {\n this.waiting.forEach((worker) => {\n this.sendToWorker(worker, MDP.W_HEARTBEAT, null, null);\n })\n this.heartbeatAt = (new Date()).getTime() + HEARTBEAT_INTERVAL;\n }\n }", "sendHeartbeat(localNode) {\n\t\treturn this.publish(new Packet(P.PACKET_HEARTBEAT, null, {\n\t\t\tcpu: localNode.cpu\n\t\t})).catch(err => this.logger.error(\"Unable to send HEARTBEAT packet.\", err));\n\n\t}", "async triggerHeartbeat() {\r\n const platformLogger = this.container\r\n .getProvider('platform-logger')\r\n .getImmediate();\r\n // This is the \"Firebase user agent\" string from the platform logger\r\n // service, not the browser user agent.\r\n const agent = platformLogger.getPlatformInfoString();\r\n const date = getUTCDateString();\r\n if (this._heartbeatsCache === null) {\r\n this._heartbeatsCache = await this._heartbeatsCachePromise;\r\n }\r\n // Do not store a heartbeat if one is already stored for this day\r\n // or if a header has already been sent today.\r\n if (this._heartbeatsCache.lastSentHeartbeatDate === date ||\r\n this._heartbeatsCache.heartbeats.some(singleDateHeartbeat => singleDateHeartbeat.date === date)) {\r\n return;\r\n }\r\n else {\r\n // There is no entry for this date. Create one.\r\n this._heartbeatsCache.heartbeats.push({ date, agent });\r\n }\r\n // Remove entries older than 30 days.\r\n this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter(singleDateHeartbeat => {\r\n const hbTimestamp = new Date(singleDateHeartbeat.date).valueOf();\r\n const now = Date.now();\r\n return now - hbTimestamp <= STORED_HEARTBEAT_RETENTION_MAX_MILLIS;\r\n });\r\n return this._storage.overwrite(this._heartbeatsCache);\r\n }", "function startPing()\n{\n var heartbeat = 90;\n heartbeatTimerId = window.setInterval(opPing, heartbeat*1000);\n}", "function doHeartbeat() {\n\t\n\t\t// JSON call to do the heartbeat.\n $.ajax({\n url:'http://' + hostname + ':5000/heartbeat',\n type:\"POST\",\n dataType:\"json\"\n }).done(function(data) {\n wifiSSID = data.SSID;\n wifiQuality = data.Quality;\n wifiSignal = data.Signal;\n });\n }", "heartbeat(message)\n {\n WebsocketClient.LogMsg('heartbeat(' + message.id + ')');\n\n // Clear timeout\n clearTimeout(this.#pingTimeout);\n\n // Ping server\n const msg = WebsocketClient.#instance.#idMsg;\n msg.type = 'heartbeat';\n msg.id = message.id;\n this.#client.send(JSON.stringify(msg));\n\n this.#pingTimeout = setTimeout(() =>\n {\n WebsocketClient.LogMsg('[websocket] pingTimeout() reconnect');\n // WebsocketClient.#instance.#client.close();\n WebsocketClient.#instance.connect();\n }, 8000 + 5000);\n }", "function sendHeartbeat () {\n var options = {\n host : 'team200-service-lister.mybluemix.net',\n path : '/heartbeat?service='+ id +'&desc=' + escape(desc) + '&url=' + link,\n method : \"GET\"\n };\n\n var callback = function(resp){\n\n resp.on('data', function(data){\n });\n\n resp.on('end', function(){\n console.log('Heartbeat Sent');\n });\n }\n var req = http.request(options, callback);\n req.end();\n}", "function sendHeartbeat () {\n var options = {\n host : 'team200-service-lister.mybluemix.net',\n path : '/heartbeat?service='+ id +'&desc=' + escape(desc) + '&url=' + link,\n method : \"GET\"\n };\n\n var callback = function(resp){\n\n resp.on('data', function(data){\n });\n\n resp.on('end', function(){\n console.log('Heartbeat Sent');\n });\n }\n var req = http.request(options, callback);\n req.end();\n}", "function sendHeartbeat () {\n var options = {\n host : 'team200-service-lister.mybluemix.net',\n path : '/heartbeat?service='+ id +'&desc=' + escape(desc) + '&url=' + link,\n method : \"GET\"\n };\n\n var callback = function(resp){\n\n resp.on('data', function(data){\n });\n\n resp.on('end', function(){\n console.log('Heartbeat Sent');\n });\n }\n var req = http.request(options, callback);\n req.end();\n}", "function heartbeat(){\n this.isAlive = true;\n}", "function handle_timeout() {\n\tif(!heating) {\n\t\tif(happenen) {\n\t\t\tconsole.log(\"on :\"+Date());\n\t\t}else {\n\t\t\tconsole.log(\"off:\"+Date());\n\t\t}\n\t}\n\tif(brew_last != 0.0) {\n\t\tconsole.log(\"last brew was \"+ (Date.now() - brew_last)/60000 + \" Minutes Ago\");\n\t}\n\tstartTimeout(handle_timeout, warming_interval);\n}", "_onHangup() {\n this.enable(false);\n }", "heartbeat() {\n if (this.trackPageViewCalled) {\n error(\n `heartbeat() was called after a pageViewed() call, which is not supported by Snowplow.\n Remove the pageViewed() call.`\n )\n }\n\n // The arguments to enableActivityTracking are secsBeforeFirstHeartbeat and secsBetweenHeartbeats;\n // we have no need to have these as different values though.\n this.tracker('enableActivityTracking', secsBetweenHeartbeats, secsBetweenHeartbeats)\n this.viewed()\n }", "clearHeartbeat() {\n if (!this.heartbeatInterval) {\n this.emit('warn', 'Tried to clear a heartbeat interval that does not exist');\n return;\n }\n clearInterval(this.heartbeatInterval);\n this.heartbeatInterval = null;\n }", "_beat() {\n\t // We should not be running heartbeat if the idle transaction is finished.\n\t if (this._finished) {\n\t return;\n\t }\n\n\t const heartbeatString = Object.keys(this.activities).join('');\n\n\t if (heartbeatString === this._prevHeartbeatString) {\n\t this._heartbeatCounter += 1;\n\t } else {\n\t this._heartbeatCounter = 1;\n\t }\n\n\t this._prevHeartbeatString = heartbeatString;\n\n\t if (this._heartbeatCounter >= 3) {\n\t (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');\n\t this.setStatus('deadline_exceeded');\n\t this.finish();\n\t } else {\n\t this._pingHeartbeat();\n\t }\n\t }", "function keepConectionAlive() {\n GLOBAL.conectionIntervalID = setInterval(() => {\n GLOBAL.api.post(\"/status\", { name: GLOBAL.username }).catch(error => {\n console.log(\"Falha na conexão\");\n console.log(error.toJSON());\n history.go();\n })\n }, 5000)\n}", "_beat() {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n\n const heartbeatString = Object.keys(this.activities).join('');\n\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter += 1;\n } else {\n this._heartbeatCounter = 1;\n }\n\n this._prevHeartbeatString = heartbeatString;\n\n if (this._heartbeatCounter >= 3) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');\n this.setStatus('deadline_exceeded');\n this.finish();\n } else {\n this._pingHeartbeat();\n }\n }", "function timerConnected(client, server) { setInterval(function() { checkLastStanza(client, server); }, 100); }", "_beat() {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n\n const heartbeatString = Object.keys(this.activities).join('');\n\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter++;\n } else {\n this._heartbeatCounter = 1;\n }\n\n this._prevHeartbeatString = heartbeatString;\n\n if (this._heartbeatCounter >= 3) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');\n this.setStatus('deadline_exceeded');\n this.finish();\n } else {\n this._pingHeartbeat();\n }\n }", "async heartbeat(hostname) {\n if(this.token() === null) {\n // This is The Magic Function(tm) that will check if your token is valid\n // and clear out your session if it's not. However, if we have an invalid\n // token, this function clears it, and it gets caught in a loop because\n // of this. Because of that, we can just return nothing in the case of \n // having no token, because things should handle that correctly. \n return null\n }\n return await this.authRequest(async headers => {\n try {\n const out = await axios.get(`${backendUrl(hostname)}/api/auth/heartbeat`, {headers: headers})\n return out.data\n } catch(e) {\n if(typeof window !== \"undefined\") {\n storage.setToken(null, window.location.hostname)\n } else {\n storage.setToken(null)\n }\n }\n })\n }", "function connect() {\n\t\t\tvar ajaxData, heartbeatData;\n\n\t\t\t// If the connection to the server is slower than the interval,\n\t\t\t// heartbeat connects as soon as the previous connection's response is received.\n\t\t\tif ( settings.connecting || settings.suspend ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsettings.lastTick = time();\n\n\t\t\theartbeatData = $.extend( {}, settings.queue );\n\t\t\t// Clear the data queue, anything added after this point will be send on the next tick\n\t\t\tsettings.queue = {};\n\n\t\t\t$document.trigger( 'heartbeat-send', [ heartbeatData ] );\n\n\t\t\tajaxData = {\n\t\t\t\tdata: heartbeatData,\n\t\t\t\tinterval: settings.tempInterval ? settings.tempInterval / 1000 : settings.mainInterval / 1000,\n\t\t\t\t_nonce: typeof window.heartbeatSettings === 'object' ? window.heartbeatSettings.nonce : '',\n\t\t\t\taction: 'heartbeat',\n\t\t\t\tscreen_id: settings.screenId,\n\t\t\t\thas_focus: settings.hasFocus\n\t\t\t};\n\n\t\t\tif ( 'customize' === settings.screenId ) {\n\t\t\t\tajaxData.wp_customize = 'on';\n\t\t\t}\n\n\t\t\tsettings.connecting = true;\n\t\t\tsettings.xhr = $.ajax({\n\t\t\t\turl: settings.url,\n\t\t\t\ttype: 'post',\n\t\t\t\ttimeout: 30000, // throw an error if not completed after 30 sec.\n\t\t\t\tdata: ajaxData,\n\t\t\t\tdataType: 'json'\n\t\t\t}).always( function() {\n\t\t\t\tsettings.connecting = false;\n\t\t\t\tscheduleNextTick();\n\t\t\t}).done( function( response, textStatus, jqXHR ) {\n\t\t\t\tvar newInterval;\n\n\t\t\t\tif ( ! response ) {\n\t\t\t\t\tsetErrorState( 'empty' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tclearErrorState();\n\n\t\t\t\tif ( response.nonces_expired ) {\n\t\t\t\t\t$document.trigger( 'heartbeat-nonces-expired' );\n\t\t\t\t}\n\n\t\t\t\t// Change the interval from PHP\n\t\t\t\tif ( response.heartbeat_interval ) {\n\t\t\t\t\tnewInterval = response.heartbeat_interval;\n\t\t\t\t\tdelete response.heartbeat_interval;\n\t\t\t\t}\n\n\t\t\t\t$document.trigger( 'heartbeat-tick', [response, textStatus, jqXHR] );\n\n\t\t\t\t// Do this last, can trigger the next XHR if connection time > 5 sec. and newInterval == 'fast'\n\t\t\t\tif ( newInterval ) {\n\t\t\t\t\tinterval( newInterval );\n\t\t\t\t}\n\t\t\t}).fail( function( jqXHR, textStatus, error ) {\n\t\t\t\tsetErrorState( textStatus || 'unknown', jqXHR.status );\n\t\t\t\t$document.trigger( 'heartbeat-error', [jqXHR, textStatus, error] );\n\t\t\t});\n\t\t}", "function callAtInterval() {\n apiSrvc.getData($rootScope.apiUrl + '/Default.aspx?remotemethodaddon=heartbeat').then(function (response) {\n });\n }", "restartHeartbeat() {\n this.stopHeartbeat()\n\n let [name, password, branchExtId] = getCredentials()\n\n // the heartbeat process returns a callback that should be\n // called when shutting down to send the shutdown event. \n this.stopHeartbeat = heartbeat(this.getClient(), branchExtId, getTerminalId())\n }", "function heartBeat() {\n $.ajax({\n url: 'http://google.com'\n })\n .done(function() {\n console.log('hb...');\n })\n .fail(function() {\n console.log('hb ERR...');\n\n\t\t\t\tvar e = document.createEvent('Event'); \n\t\t\t\te.initEvent('noHb',true,true); \n\t\t\t\twindow.dispatchEvent(e);\n })\n .always(function() {\n }); \n }", "function keepSessionAlive() {\n$.post('/fenland/ping');\n}", "function checkClientsHeartbeat() {\n var now = Date.now();\n _.forOwn(_this.socks, function (sock) {\n if (sock.hb + _this.clientTimeout < now) {\n logout(sock);\n }\n });\n setTimeout(checkClientsHeartbeat, 1000)\n }", "setHeartbeatInterval(ms) {\n if (typeof this.heartbeatInterval !== 'undefined')\n clearInterval(this.heartbeatInterval);\n if (ms > 0) {\n this.heartbeatInterval = setInterval(() => {\n if (this.lastHeatbeatSend !== 0 && this.missedHeartbeats >= 3) {\n // Missed too many heartbeats - disconnect\n this.ws.close();\n this.setHeartbeatInterval(-1);\n }\n this.sendHeartbeat();\n }, ms);\n }\n }", "function tick() {\n var now = new Date().toISOString();\n userSockets.notifyAll('clock', {data:now});\n}", "function heartbeat(){\n setTimeout(function(){\n $.ajax({ url: \"/thumpthump\", cache: false,\n success: function(data){\n //Next beat\n heartbeat();\n }, dataType: \"json\"});\n }, 10000);//10secs\n}", "function ack() {\n Twibble.sendMessage();\n }", "onConnect() {\n this.socket && this.socket.write(this.handshake);\n this.healthCheck = setInterval(() => {\n if (new Date() - this.lastRead > 35000) {\n this.close(false);\n }\n }, 5 * 1000);\n }", "keepAlive () {\n this._debug('keep-alive')\n this._push(MESSAGE_KEEP_ALIVE)\n }", "keepAlive () {\n this._debug('keep-alive')\n this._push(MESSAGE_KEEP_ALIVE)\n }", "keepAlive() {\n\t\tif (this.portalId === undefined) {\n\t\t\treturn\n\t\t}\n\t\tthis.client.send(`R/${this.portalId}/system/0/Serial`, '')\n\t}", "function update_hb(mid,ts){\n\tif($(\"#\"+mid+\"_lastseen\").length){\n\t\tvar a = new Date(parseFloat(ts)*1000);\n\t\tvar min = a.getMinutes() < 10 ? '0' + a.getMinutes() : a.getMinutes(); \n\t\tvar hour = a.getHours();\n\t\tvar text = \"Ping \"+hour+\":\"+min;\n\n\t\tvar delay=parseInt((Date.now()-(1000*parseFloat(ts)))/1000);\n\t\tif(delay>86400){\t\t\n\t\t\ttext=\"Last online \"+a.getFullYear()+\"/\"+(a.getMonth()+1)+\"/\"+a.getDate();\n\t\t} else if(delay<999) {\n\t\t\ttext += \" - delay \"+delay+\" sec\";\n\t\t};\n\n\t\t$(\"#\"+mid+\"_lastseen\").text(text);\n\t\t//console.log(\"hb ts updated\");\n\t}\n}", "function checkstatus()\n\t{\n\t\tif(disconnectwarned || !AjaxLife.Network.Connected) return;\n\t\tvar now = new Date();\n\t\tif(!now.getTime() - lastmessage.getTime() > 60000)\n\t\t{\n\t\t\tdisconnectwarned = true;\n\t\t\talert(\"No data has been received for over a minute. You may have been disconnected.\");\n\t\t}\n\t}", "_keepAlive() {\n Utils_1.logWithLevelInternal(Utils_1.LogLevel.DEBUG, () => `[CLIENT] _keepAlive() ${this._state}/${this._currentConnectionStartTime}`);\n if (this._state === exports.ClientState.ACTIVE && this._currentConnectionStartTime) {\n const now = Date.now();\n const lastPacketDuration = now - (this._lastPacketTime || this._currentConnectionStartTime);\n const lastStatePacketDuration = now - (this._lastStatePacketTime || this._currentConnectionStartTime);\n if (lastPacketDuration > this._options.silenceTimeout\n || (this._choseToLogIn && lastStatePacketDuration > this._options.stateSilenceTimeout)) {\n if (this._client !== undefined) {\n Utils_1.logWithLevelInternal(Utils_1.LogLevel.DEBUG, () => `[CLIENT] _keepAlive silence tripped, lastPacket: ${lastPacketDuration}, lastStatePacket: ${lastStatePacketDuration}`);\n const msg = `Server has not responded for too long, forcing disconnect`;\n Utils_1.logWithLevelInternal(Utils_1.LogLevel.INFO, msg);\n this._disconnected(msg);\n }\n }\n else {\n this.TxCmd(constants.FCTYPE.NULL, 0, 0, 0);\n }\n }\n }", "function timer() {\n client.publish(\n \"mqtt/dht\",\n JSON.stringify(`123`) //convert number to string\n ); //publish sensor data to broker on topic mqtt/dht\n\n console.log(\"topic published to the broker\");\n \n }", "function keepAlive() {\n\tconsole.log('XMPP keepAlive');\n\tsetTimeout(keepAlive, 60000);\n\tcl.send(new xmpp.Element('message',\n { to: username,\n type: 'chat'}).\n c('body').\n t('keepAlive'));\n\n}", "function tick() {\n\t\tpollStatus();\n\t\tscheduleNextTick();\n\t}", "__init2() {this._heartbeatCounter = 0;}", "__init2() {this._heartbeatCounter = 0;}", "__init2() {this._heartbeatCounter = 0;}", "activateHealthCheckUp() {\n setInterval(() => {\n if (this.master.masterActivated) {\n let totalWorkers = this.master.totWorker();\n let workersOnline = this.master.onlineWorkers();\n\n if (totalWorkers == workersOnline)\n console.log(`Cluster Health: ${chalk.green.bold.italic(this.health[1])}`);\n else if (workersOnline > 0) {\n console.log(`Cluster Health: ${chalk.yellow.bold.italic(this.health[0])}`);\n winston.warn('Cluster health: YELLOW')\n }\n else if (workersOnline == 0) {\n console.log(`Cluster Health: ${chalk.red.bold.italic(this.health[-1])}`);\n winston.error('Cluster health: RED');\n }\n let workerStats = this.master.workerStats()\n winston.info(`Engaged: ${workerStats.engaged} Idle: ${workerStats.idle}`);\n // Log the worker stats\n }\n }, 20000);\n }", "function keepAlive(){\n if(config.goPro.states.btIsConnected){\n if(config.goPro.debug){\n writeLog(`Send Keep alive message`, false, true);\n }\n writeToChildProcess(cmdProcess, KEEPALIVEMSG);\n }\n }", "function onHelloAck() {\n disconnected.value = false;\n self.disconnected = disconnected.value;\n $log.log('(Hello:ack) monitor is connected');\n }", "function setupKernelBusyHeartbeat() {\n events.on('kernel_busy.Kernel', function() {\n util.debug.log('kernel_busy event received');\n _runBusyTimer();\n });\n events.on('kernel_idle.Kernel', function() {\n util.debug.log('kernel_idle event received');\n _clearBusyTimer();\n _maybeResetIdleTimeout();\n });\n }", "function pingCheck() {\n if (timer) { clearTimeout(timer);}\n var pong = new Date() - start;\n if (typeof callback === \"function\") {\n callback(pong);\n }\n }", "function kickedOut(config) {\n let peer_name = config.peer_name;\n let timerInterval;\n Swal.fire({ allowOutsideClick: false, background: background, position: \"top\",\n html: `<p>` + peer_name + ` is removing you </p>`,\n timer: 2000, \n didOpen: () => { Swal.showLoading(); timerInterval = setInterval(() => {}, 100); },\n willClose: () => { clearInterval(timerInterval); }, \n })\n .then(() => { window.location.href = \"/main\"; });\n}", "resetHeartbeat(immediate) {\n if (!this.heartbeatsEnabled || this.heartbeatTimeout) {\n // Either heartbeat is not enabled OR we are waiting for a heartbeat response.\n return;\n }\n this._clearHeartbeatTimeouts();\n MsrpSdk.Logger.debug('Reset heartbeat timer for session', this.sid);\n this.sendHeartbeatTimeout = setTimeout(() => {\n this.sendHeartbeatTimeout = null;\n this.sendHeartbeat();\n }, immediate ? 0 : MsrpSdk.Config.heartbeatInterval * 1000);\n }", "function armHALT() {\n arm.publish(armHALTMessage);\n console.log(\"ARM HALT\");\n armInterval = setInterval(function() {\n arm.publish(armHALTMessage);\n console.log(\"ARM HALT\");\n }, 10000);\n}", "function hangup(){\n socket.emit(\"hangup\");\n}", "function pong(){primus.timers.clear(\"pong\");//\n// The network events already captured the offline event.\n//\nif(!primus.online)return;primus.online=false;primus.emit(\"offline\");primus.emit(\"incoming::end\")}", "start() {\n Bangle.on('HRM', handleHeartBeat)\n Bangle.setHRMPower(true)\n }", "function checkPulse(){\n var heartbeat = this.node.heartbeat();\n var stale = Date.now() - this.timeout > heartbeat;\n if (stale) this.emit('change', 'candidate');\n}", "function keepAlive(){\n testChannel.postMessage(JSON.stringify({type: \"add-client\", clientId}));\n timer = setTimeout(keepAlive, 3000);\n }", "function pingCallback() {\n\n $.get('Window/ping/ ', function(response) {\n\n if (response == \"blocked\") {\n $('#block').triggerHandler('click');\n return;\n }\n\n if (response == 'dead') {\n\n alertify.alert('Sua sessão expirou, favor fazer login novamente.', function() {\n window.close();\n });\n }\n }, 'text');\n\n }", "start () {\n\t\tthis.updateTask.setRepeating ((callback) => {\n\t\t\tthis.update (callback);\n\t\t}, App.HeartbeatPeriod * 4, App.HeartbeatPeriod * 8);\n\t}", "function sendAlive(id) {\n\tresetTimer(id);\n\tsessions[id]++;\n\tsendMessage(ALIVE, id);\n}", "function sentTimer() {\n pubsub.publish(\"serverClock\");\n}", "function keepAlive() {\n\t\tif(!server || !websockets || !connected)\n\t\t\treturn;\n\t\twsKeepaliveTimeoutId = setTimeout(keepAlive, keepAlivePeriod);\n\t\tvar request = { \"janus\": \"keepalive\", \"session_id\": sessionId, \"transaction\": Janus.randomString(12) };\n\t\tif(token)\n\t\t\trequest[\"token\"] = token;\n\t\tif(apisecret)\n\t\t\trequest[\"apisecret\"] = apisecret;\n\t\tws.send(JSON.stringify(request));\n\t}", "function ping(){var value=+new Date;primus.timers.clear(\"ping\");primus._write(\"primus::ping::\"+value);primus.emit(\"outgoing::ping\",value);primus.timers.setTimeout(\"pong\",pong,primus.options.pong)}", "start() {\n\t\tthis._stopped = false;\n\t\tthis.heartbeatTimeout.restart();\n\t}", "start () {\n\t\tthis.updateTask.setRepeating ((callback) => {\n\t\t\tthis.update (callback);\n\t\t}, App.HeartbeatPeriod, App.HeartbeatPeriod * 2);\n\t}", "function voteForSelfToDie() {\n voteForUser(getParticipantID());\n stopTimer();\n}", "function resetTimeout () {\n if (timeoutWarning !== undefined) {\n clearTimeout(timeoutWarning);\n }\n timeoutWarning = setTimeout(function () {\n noty.update('warning',\n 'The server has not sent updates in the last ' +\n SECONDS + ' seconds.');\n }, 1000 * SECONDS);\n }", "function socketAlive() {\n setTimeout(function() {\n socket.emit('socket_alive');\n socketAlive();\n }, 3200);\n }", "_onTimeout() {\n this.send(421, 'Timeout - closing connection');\n }", "async function sendHeartBeatToLeader(numberHigh){\n console.log('Escoger al server mayor')\n for (const server in servers) {\n if(servers[server].id == numberHigh){\n console.log(servers[server].path)\n leaderHost = servers[server].path\n servers[server].isLeader = true;\n console.log('Serverhigh', server)\n //Hacer un post enviandole\n await axios({\n method: 'post',\n url : `${servers[server].path}leader`,\n data: {\n high: server\n }\n }).then(response => {\n console.log('Resultado:', response.data);\n taskheartbeat.start()\n }).catch(err => {\n console.log(\"Error\")\n });\n }\n }\n //Otra vez envia el mensaje a todos con el nuevo lider.\n console.log('Enviando server mayor a todos...')\n sendLeader('new_leader')\n}", "function pingEnd(x) {\n if(x.attached) {\n console.log(\"Interrupt handler attached\");\n return;\n }\n if(startTime) {\n pulseTime = process.hrtime(startTime);\n b.digitalWrite(trigger, 1);\n console.log('pulseTime = ' + (pulseTime[1]/1000000-0.8).toFixed(3));\n }\n}", "function tick() {\n\n if (playing) {\n var chat = $.connection.chatHub;\n chat.server.tick(GameID);\n setTimeout(tick, ticktime);\n }\n \n}", "teardown() {\n\t\tclearInterval(this._heartbeatPing);\n\t\tthis.ws.close();\n\t}", "function funCheckHB() {\n try {\n\n // Check for auto print\n // if (Date.now() - timLastPrint > intMustPrintOnceTime) {\n // console.log('auto print to keep printer on');\n // funPrint(['自动打印...']);\n // }\n\n // Disconnect client if client has no HB for a long time\n for (let i = 0; i < aryClients.length; i++) {\n if (Date.now() > aryClients[i].lastHB + intHBTimeout) {\n funUpdateServerMonitor(\"No HB Disconnect: \" + aryClients[i].connectionCode, true);\n aryClients[i].socket.disconnect();\n }\n }\n } catch (err) {\n // If someone disconnect, there will be an error because aryClients.length changes\n // funUpdateServerMonitor(\"No HB Disconnect Error: \" + err, true);\n }\n\n // let dtTemp = Date.now();\n setTimeout(funCheckHB, intHBTimeout);\n}", "function comeOnline() {\n self.status = \"online\";\n loggerConsole.system.debug(\"Logger onReady\", loggerClientName);\n // timer calibration must be done so the messages will be correctly sorted in the central logger;\n // this is necessary because there is timer drift between windows --- this appears to be a Chromium\n // bug we have to work around it. The timeOffset value adjusts the time using the routerService's\n // time as a central reference point.\n self.RouterClient.calibrateTimeWithRouterService(function (timeOffset) {\n newCalibratedTimeStampOffset = timeOffset;\n registerOnceWhenStarted();\n });\n }" ]
[ "0.72263926", "0.7109383", "0.71085775", "0.6915055", "0.68861634", "0.688286", "0.6869308", "0.67477936", "0.67313135", "0.67250514", "0.67086905", "0.6685666", "0.6644593", "0.65829605", "0.6556017", "0.64808047", "0.645904", "0.6414704", "0.64124084", "0.64010787", "0.6392993", "0.63822436", "0.6357995", "0.6348832", "0.6323632", "0.6238301", "0.6217088", "0.6189644", "0.61704814", "0.6135505", "0.6132104", "0.60710144", "0.60636973", "0.60636973", "0.60636973", "0.60450315", "0.60263973", "0.5977681", "0.5938682", "0.5881335", "0.58644146", "0.5799548", "0.57977223", "0.57966185", "0.57965195", "0.5749445", "0.5743763", "0.5732532", "0.57203144", "0.5690617", "0.56724715", "0.5661693", "0.5661073", "0.565141", "0.56508857", "0.56394094", "0.55621463", "0.5559587", "0.5559587", "0.5547828", "0.5542507", "0.55323666", "0.553122", "0.553084", "0.55243933", "0.551929", "0.5513193", "0.5513193", "0.5513193", "0.5503884", "0.5494842", "0.54787564", "0.5476303", "0.54732877", "0.54575855", "0.5457308", "0.5451322", "0.54470885", "0.5446497", "0.5438633", "0.5435063", "0.54151523", "0.54078215", "0.5385553", "0.5382128", "0.53812176", "0.53624964", "0.5337318", "0.5330188", "0.53284746", "0.5325919", "0.53126746", "0.5288369", "0.5267689", "0.5258351", "0.5238805", "0.52380323", "0.5228116", "0.52271867", "0.5226147" ]
0.640519
19
Save settings, overwrite tracker.js file
function saveSettings() { DEBUG && console.log("Saving settings..."); jQuery.ajax({ type: "POST", url: 'helpers/saveSettings.php', data: { delay: jQuery('#delayRange').val(), static: jQuery('#staticWebsite').is(':checked'), recordClick: jQuery('#recordClicks').is(':checked'), recordMove: jQuery('#recordMove').is(':checked'), recordKey: jQuery('#recordKey').is(':checked'), maxMove: jQuery('#maxMoves').val(), serverPath: jQuery('#serverPath').val(), ignoreGET: jQuery('#ignoreGET').val(), percentangeRecorded: jQuery('#percentangeRecorded').val(), }, success: function () { alert("Settings successfully saved!"); }, error: function (data) { alert("Could not save settings!" + data.responseText); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveSettings() {\n fs.writeFileSync(SETTINGS_FILE, settings, SETTINGS_TYPE);\n}", "function save() {\n require('Storage').writeJSON('qmsched.json', settings);\n}", "_saveSettings(settings = null) {\n if (settings == null) {\n settings = this.settings.toJS();\n }\n\n ss.set(\"settings_v4\", this._replaceDefaults(\"saving\", settings));\n }", "static save(settings) { window.localStorage.setItem('settings', JSON.stringify(settings)); }", "function saveSettings() {\n var settings = {\n \"automaticLights\": 1,\n \"sunsetTime\": sunsetTime,\n \"sunriseTime\": sunriseTime,\n \"apiParams.lat\": apiParams.lat,\n \"apiParams.lng\": apiParams.lng,\n \"tzName\": tzName,\n \"tzOffsetHours\": tzOffsetHours\n };\n var settingsJson = JSON.stringify(settings);\n var l = settingsJSON.length;\n storage.write(\"settings\",settingsJSON,0,FILESIZE);\n}", "function saveSettings() {\n if (typeof settings === 'undefined') {\n console.log('Was going to save settings as undefined, exiting');\n return;\n }\n\n console.log('Saving settings to filesystem');\n writeFileSync(SETTINGS_FILE, settings, SETTINGS_TYPE);\n}", "saveSettings() {\n if (!this.options_.persistTextTrackSettings) {\n return;\n }\n\n const values = this.getValues();\n\n try {\n if (Object.getOwnPropertyNames(values).length > 0) {\n window.localStorage.setItem('vjs-simple-text-track-settings', JSON.stringify(values));\n } else {\n window.localStorage.removeItem('vjs-simple-text-track-settings');\n }\n } catch (e) {\n log.warn(e);\n }\n }", "function saveSettings(){\n\t//Get the user settings\n\tgetSettings();\n\n\t//Create a variable with all user settings\n\tvar settings = {\n\t\tcountry: country,\n\t\tincludeOldResults: String(includeOldResults),\n\t\tsearchStrings: searchStrings,\n\t\tlocations: locations,\n\t\tradiuses: radiuses,\n\t}\n\n\t//Save the user settings to the local storage\n\tlocalStorage.setItem(\"settings\",JSON.stringify(settings));\n\n\tconsole.log(\"Settings saved\");\n\tconsole.log(JSON.stringify(settings));\n}", "function saveToStorage(){\n\tchrome.storage.sync.set(settings);\n}", "function save () {\n svl.storage.set(\"tracker\", actions);\n }", "saveSettings() {\n if (this.hasLoadedIntoDOM) {\n this.updateSettings();\n }\n this.closeSettings();\n }", "function saveSettings(newSettings){\n fs.writeFile(settingsFile, JSON.stringify(newSettings), function(err){\n if(err) console.log(\"err in saveSettings: \"+err);\n else console.log(\"saved settings file!\");\n });\n}", "function savePrefs() {\r\ttry\t{\r\t\tprefsFile.open(\"w\");\r\t\tprefsFile.write(myPrefs.toSource());\r\t\tprefsFile.close();\r\t }catch(e){\r\t\tthrowError(\"Could not save preferences: \" + e, false, 2, prefsFile);\r\t}\r}", "async function saveSettingsToFile() {\n let settings = {};\n settings.arduinoConstants = arduinoConstants;\n settings.bounds = bounds;\n await fs.writeFile(SETTINGS_FILE, JSON.stringify(settings), \"utf8\");\n}", "function saveSettings() {\n\tvar settings = {\n\t\tbuttons: _appInfo.buttons,\n\t\tlabels: _appInfo.labels\n\t};\n\tHomey.api('POST', '/save-settings/', settings, function(err, result){\n\t\tif (err) console.log('Error during saving of your settings. Please try again.');\n\t});\n}", "function save() {\n\t\t$$invalidate(1, excluded_files = allExcludedFiles());\n\t\tplugin.settings.set({ exluded_folders: excluded_folders });\n\t}", "function save() {\n\t\t$$invalidate(1, excluded_files = allExcludedFiles());\n\t\tplugin.settings.set({ exluded_filename_components });\n\t}", "function saveSettings() {\n // debug('Saved');\n localStorage.setItem('autoTrimpSettings', JSON.stringify(autoTrimpSettings));\n}", "async save() {\n const settings = await Settings.getData();\n settings[this.id] = this.settings;\n\n await storage.init();\n await storage.setItem(\"settings\", settings);\n }", "function saveSettings(){\n\n showMenu();\n\n for (key in settingTmp){\n if (settingTmp.hasOwnProperty(key)){\n setting[key] = settingTmp[key];\n }\n }\n\n PopupModule.hide();\n }", "function saveSettings(channel, botName, botPw, ytKey){\n var data = {\n channel: channel,\n botName: botName,\n botPw: botPw,\n ytKey: ytKey\n }\n fs.writeFile(\"settings.json\", JSON.stringify(data), (err) => {\n if(err) throw err;\n console.log(\"saved settings: \" + data.channel);\n })\n}", "function updateSettingsFile() {\r\n\tvar fileId = BumpTop.openFile(\"sharingTemp.json\", \"w\");\r\n\tvar settings = $.map(tabArray, function (tab) { \r\n\t\treturn tab.dropAccessParams; \r\n\t});\r\n\tvar fileContents = JSON.stringify(settings);\r\n\tBumpTop.writeFile(fileId, fileContents);\r\n\tBumpTop.renameAndCloseFile(fileId, \"sharing.json\");\r\n}", "function savesettings() {\r\n _('savesettings');\r\n var settings = storage.get(':TWEETFILTER:', {});\r\n deleteexpiredrelationships();\r\n settings[user.id] = {\r\n queries: [],\r\n options: options,\r\n relationships: relationships\r\n };\r\n for (var q in queries) {\r\n settings[user.id].queries.push({\r\n query: queries[q].query,\r\n enabled: queries[q].enabled\r\n });\r\n }\r\n storage.set(':TWEETFILTER:', settings);\r\n }", "function commitSettings() {\n console.log(\"Save settings: \"+JSON.stringify(settings));\n localStorage.settings = JSON.stringify(settings);\n}", "function save() {\n\tvar conf = chrome.extension.getBackgroundPage().conf;\n\n\tif ($('#show-alert')[0].checked) {\n\t\tconf.show_alert = true;\n\t\tconf.alert_bubble_pos = $('#alert-bubble-pos').val();\n\t\tconf.alert_bubble_timeout = +$('#alert-bubble-timeout').val();\n\t} else {\n\t\tconf.show_alert = false;\n\t}\n\n\tconf.show_sources = $('#show_sources')[0].checked;\n\tconf.enable_autoupdate = $('#enable_autoupdate')[0].checked;\n\tconf.ghostrank = $('#ghostrank')[0].checked;\n\n\tconf.selected_app_ids = window.browser.getSelectedAppIds();\n\n\tvar site_whitelist = [];\n\t$('#whitelist option').each(function () {\n\t\tsite_whitelist.push($(this).text());\n\t});\n\tconf.site_whitelist = site_whitelist;\n\n\tconf.block_by_default = $('#block-by-default')[0].checked;\n\tconf.notify_library_updates = $('#notify-library-updates')[0].checked;\n\n\twindow.close();\n}", "function saveSettings() {\n var settings = [];\n if (options.orderby != defaults.orderby) {\n settings.push('\"orderby\":\"' + options.orderby + '\"');\n }\n if (options.thsize != defaults.thsize) {\n settings.push('\"thsize\":\"' + options.thsize + '\"');\n }\n if (options.extended != defaults.extended) {\n settings.push('\"extended\":' + (options.extended ? 'true' : 'false'));\n }\n if (options.proxy != defaults.proxy) {\n settings.push('\"proxy\":' + (options.proxy ? 'true' : 'false'));\n }\n if (settings.length > 0) {\n settings = '{' + settings.join(',') + '}';\n $.cookie('4cat', settings, {\n expires: 30,\n path: options.cookiePath,\n domain: options.cookieDomain\n });\n }\n else {\n $.cookie('4cat', null, {\n path: options.cookiePath,\n domain: options.cookieDomain\n });\n }\n }", "function exportSettings() {\n var filename = Connector.getNamespace() + \".\" + new Date().toLocaleDateString() + \".json\";\n var ns = Connector.getNamespace();\n var data = JSON.stringify(Storage.settings);\n downloadFile(filename, data);\n }", "function saveDatSettings(data) { // { behaviour: ___, preset: ____ }\n \n console.log( Date(Date.now()) + \" Saving: \" + data.behaviour + \"_settings_\" + data.preset + \".json\");\n fs.copyFile(behaviourdir + data.behaviour + \"_settings_current.json\", behaviourdir + data.behaviour + \"_settings_\" + data.preset + \".json\", (err) => {\n if (err) throw err;\n console.log(\" Success.\");\n });\n\n // sync all my clients' preset lists...\n socket.broadcast.emit('syncClients', { beh: data.behaviour, param: 'reloadPresetList', val: data.preset });\n\n }", "function savePrefs()\n{\n let preferences = collatePrefs( prefs );\n browser.storage.local.set({\"preferences\": preferences});\n}", "function saveSettings() {\n localStorage.setItem(\"emailToggle\", emailToggleButton.checked);\n localStorage.setItem(\"privacyToggle\", privacyToggleButton.checked);\n localStorage.setItem(\"timezone\", select.value);\n}", "function save() {\n\tchrome.runtime.getBackgroundPage(background => {\n\t\tconst ExtensionOptions = background.ExtensionOptions;\n\n\t\tExtensionOptions\n\t\t\t.setBackgroundColor(element.backgroundColorPicker.getHexString())\n\t\t\t.setTextColor(element.textColorPicker.getHexString())\n\t\t\t.setThreadRemovalSeconds(element.frequencyInput.value * 86400)\n\t\t\t.setBorder(element.borderInput.checked)\n\t\t\t.setClearComment(element.clearCommentInput.checked, element.clearChildrenInput.checked)\n\t\t\t.setRedirect(element.redirectInput.checked)\n\t\t\t.setCustomCSS(element.customCSSRadioButton.checked ? element.CSSTextArea.value : '')\n\t\t\t.setCustomCSSClassName(element.CSSClassNameInput.value);\n\n\t\tExtensionOptions.save().then(() => {\n\t\t\tshowMessage('Settings saved!');\n\t\t});\n\t});\n}", "function saveSettings() {\r\n\t\t//Get values from page form elements and save\r\n\t\tGM_setValue(\"wTorrent_FQDN\",settingsWindow.document.getElementById(\"wtorrent_host\").value);\r\n\t\tGM_setValue(\"wTorrent_Port\",settingsWindow.document.getElementById(\"wtorrent_port\").value);\r\n\t\tGM_setValue(\"wTorrent_User\",settingsWindow.document.getElementById(\"wtorrent_username\").value);\r\n\t\tGM_setValue(\"wTorrent_Pass\",settingsWindow.document.getElementById(\"wtorrent_password\").value);\r\n\t\tGM_setValue(\"wTorrent_SSL\",settingsWindow.document.getElementById(\"wtorrent_ssl\").checked);\r\n\t\tGM_setValue(\"wTorrent_PrivateLinks\",settingsWindow.document.getElementById(\"wtorrent_showprivatelinks\").checked);\r\n\t\tGM_setValue(\"wTorrent_AllwaysPrivateLinks\",settingsWindow.document.getElementById(\"wtorrent_alwaysdownloadprivate\").checked);\r\n\t\tGM_setValue(\"wTorrent_AutoStartTorrents\",settingsWindow.document.getElementById(\"wtorrent_autostarttorrents\").checked);\r\n\t\tGM_setValue(\"wTorrent_DownloadDirectory\",settingsWindow.document.getElementById(\"wtorrent_downloaddirectory\").value);\r\n \r\n alert(\"Settings Updated\") //Alert user\r\n \r\n settingsWindow.close() //Close Settings Window\r\n \r\n // refresh values from configuration\r\n\t\tlocation.reload(true);\r\n\t\t// wtorrent_host = GM_getValue(\"wTorrent_FQDN\",\"wtorrent\") ; \r\n\t\t// wtorrent_port = GM_getValue(\"wTorrent_Port\",\"80\");\r\n\t\t// wtorrent_username = GM_getValue(\"wTorrent_User\",\"\"); \r\n\t\t// wtorrent_password = GM_getValue(\"wTorrent_Pass\",\"\");\r\n\t\t// wtorrent_ssl = GM_getValue(\"wTorrent_SSL\",false);\r\n\t\t// wtorrent_showprivatelinks = GM_getValue(\"wTorrent_PrivateLinks\",false);\r\n\t\t// wtorrent_alwaysdownloadprivate = GM_getValue(\"wTorrent_AllwaysPrivateLinks\",false);\r\n\t\t// wtorrent_autostarttorrents = GM_getValue(\"wTorrent_AutoStartTorrents\",true);\r\n\t\t// wtorrent_downloaddirectory = GM_getValue(\"wTorrent_DownloadDirectory\",\"default\");\r\n }", "async saveAll() {\r\n // Make sure we are able to save\r\n await this.canSave();\r\n // Make a copy of the dirty settings since items will be removed by saving\r\n const copy = [...this.dirtySettings];\r\n if (copy.length > 0)\r\n console.log(\"saved:\", copy.map(sf => sf[\"path\"]));\r\n // Save the settings\r\n copy.forEach(settingsFile => settingsFile.save());\r\n }", "updateSettings (saved) {\n this._saved = saved\n }", "function saveSettings() {\n $('#settings').removeClass('opensettings');\n}", "function saveToStorage(){\n console.debug('saving settings', self);\n\n try {\n localStorage.setItem(self.name, JSON.stringify(self.data));\n } catch (e) {\n }\n }", "function saveSettings() {\r\n \"use strict\";\r\n localStorage.setItem('TrimpzSettings', JSON.stringify(trimpzSettings));\r\n}", "function saveSettings() {\n\n\tconst pseudo = document.getElementById('pseudo').value,\n\n\t\tbsoundOn = document.getElementById('bsound_on').checked,\n\n\t\tfsoundOn = document.getElementById('fsound_on').checked,\n\n\t\tsaveScoreOn = document.getElementById('save-score-online-on').checked;\n\n\tsetCurrentPseudo(pseudo);\n\tsetBSoundState(bsoundOn);\n\tsetFSoundState(fsoundOn);\n\tsetSaveOnlineState(saveScoreOn);\n\n\tlet p = document.getElementById('info-setting');\n\n\tif(!p) {\n\t\tp = document.createElement('p');\n\t\tp.id = 'info-setting';\n\t}\n\tp.innerHTML = 'Settings saved successfuly !';\n\tdocument.getElementById('save-button').appendChild(p);\n\tsetTimeout(() => p.remove(), 5000);\n}", "function saveWebsiteSettings(site,settings){\n //Save the current policy to the map\n websiteMap[site] = settings;\n if(mode == \"userset\"){\n var blocked = []\n for (var i in settings){\n // if the extension is blocked\n if(settings[i] == false){\n blocked.push(i);\n }\n }\n // update the newly blocked or unblocked extensions\n usersetWebsites[site] = blocked;\n }\n //Refresh policies\n chrome.storage.sync.clear();\n chrome.storage.sync.set(mapToSettings());\n}", "function saveSettingsValues() {\n browser.storage.local.set({delayBeforeClean: document.getElementById(\"delayBeforeCleanInput\").value});\n\n browser.storage.local.set({activeMode: document.getElementById(\"activeModeSwitch\").checked});\n\n browser.storage.local.set({statLoggingSetting: document.getElementById(\"statLoggingSwitch\").checked});\n\n browser.storage.local.set({showNumberOfCookiesInIconSetting: document.getElementById(\"showNumberOfCookiesInIconSwitch\").checked});\n\n browser.storage.local.set({notifyCookieCleanUpSetting: document.getElementById(\"notifyCookieCleanUpSwitch\").checked});\n\n browser.storage.local.set({contextualIdentitiesEnabledSetting: document.getElementById(\"contextualIdentitiesEnabledSwitch\").checked});\n\n page.onStartUp();\n}", "updateStoredSettings(obj, level) {\n if (window.localStorage) {\n window.localStorage.setItem(`SNAKE_SETTINGS_${level}`, JSON.stringify(obj));\n }\n }", "function saveSetting(obj) {\n if (typeof chrome != 'undefined') {\n console.log('saving setting for ', JSON.stringify(obj, null, '\\t'));\n chrome.storage.sync.set(obj);\n } else {\n console.log('saving setting for other clients not implemented.');\n }\n }", "function saveExtSettings() {\n var settings = {\n \"showFoldersInList\": showFoldersInList,\n \"showSortDataInList\": showSortDataInList,\n \"numberOfFiles\": numberOfFiles,\n \"zoomFactor\": zoomFactor,\n \"orderBy\": orderBy\n };\n localStorage.setItem('perpectiveGridSettings', JSON.stringify(settings));\n }", "function setTrackerVals(value){\n var tracker = getTrackerVals();\n if(!tracker){\n tracker = {};\n }\n \n $.extend(tracker, value);\n \n localStorage.trackers = JSON.stringify(tracker);\n}", "function saveLocalSettings() {\n if (typeof (window.localStorage) === 'undefined') {\n console.log(\"Local settings cannot be saved. No web storage support!\");\n return;\n }\n\n localStorage.favoritePresets = JSON.stringify(favoritePresetID);\n console.log(\"Saving Parameter [localStorage.favoritePresets]:\");\n console.log(localStorage.favoritePresets);\n\n localStorage.currentAddress = address;\n console.log(\"Saving Parameter [localStorage.currentAddress]:\");\n console.log(localStorage.currentAddress);\n}", "async writeSettings(newSettings) {\n this.settings = Object.assign(Object.assign({}, this.settings), newSettings);\n try {\n await util.promisify(fs.writeFile)(this.settingsPath, JSON.stringify(this.settings));\n }\n catch (error) {\n this.services.get(log_1.ILogService).warn(error.message);\n }\n }", "function saveToStorage() {\n\tlocalStorage.setItem(\"trackers\", JSON.stringify(trackers));\n}", "function saveResolution(){\n var element = document.getElementById(\"resolutions\");\n var resolution = element.options[element.selectedIndex].value;\n console.log(resolution);\n\n var settings = JSON.parse(fs.readFileSync(settings_path, 'utf8'));\n settings.EPG[0].resolution = resolution;\n\n var fd = fs.openSync(settings_path, 'w');\n fs.writeFile(settings_path, JSON.stringify(settings, null, \"\\t\"), function(err) {\n if (err)\n {\n console(\"Could not save settings: \" + err);\n alert(\"Could not save settings!\");\n }\n else {\n console.log('settings.json updated!');\n showResolution();\n }\n });\n}", "function storeSettings(){\n localStorage.setItem('settings', JSON.stringify(settings));\n}", "function exportSettings() {\n\t\tconst settings = JSON.parse(localStorage.getItem(SETTINGS_NAME));\n\t\tdelete settings.chatLogs;\n\t\tmarkProblem('textarea#importExportTextarea', false);\n\t\treturn JSON.stringify(settings, '\\n', 4);\n\t}", "function saveSettings() {\n\n chrome.storage.local.set({\n\n words: wordArray,\n pages: pagesArray\n\n }, function() {\n\n \t//**********************************\n\t// OPTIONS SAVED INTO LOCAL STORAGE\n\t//**********************************\n\n });\n\n}", "function saveOptions() {\n // assigns the parameters to what is set in the settings\n var key = document.getElementById('trigger').value;\n\n\t// chrome API to store data in JSON, anon function for when saved\n\tchrome.storage.sync.set({\n \tcolor: highlight,\n \topac: opacity,\n \trad: radius,\n \ttrigger: key,\n \ttoggle: check,\n activePage: false\n \t}, function() {\n \t\t// sets div status element to options saved for 1 second, then to empty\n \t\t$(\"#save-status\").text(\"Options saved!\");\n \t\tsetTimeout(function() {\n \t\t\t\t$(\"#save-status\").text(\"\");\n \t\t}, 1000);\n\t});\n}", "static _saveSettings(timer, obj) {\n if (MP.DEBUG)\n console.group(`_saveSettings()`);\n const savestate = (document.querySelector('span.mp_savestate'));\n const gmValues = GM_listValues();\n // Reset timer & message\n savestate.style.opacity = '0';\n window.clearTimeout(timer);\n console.log('[M+] Saving...');\n // Loop over all values stored in GM and reset everything\n for (const feature in gmValues) {\n if (typeof gmValues[feature] !== 'function') {\n // Only loop over values that are feature settings\n if (!['mp_version', 'style_theme'].includes(gmValues[feature])) {\n //if not part of preferences page\n if (gmValues[feature].indexOf('mp_') !== 0) {\n GM_setValue(gmValues[feature], false);\n }\n }\n }\n }\n // Save the settings to GM values\n this._setSettings(obj);\n // Display the confirmation message\n savestate.style.opacity = '1';\n try {\n timer = window.setTimeout(() => {\n savestate.style.opacity = '0';\n }, 2345);\n }\n catch (e) {\n if (MP.DEBUG)\n console.warn(e);\n }\n if (MP.DEBUG)\n console.groupEnd();\n }", "function saveSettings() {\n\tlocalStorage.mylanguagesetting = \"en\"\n }", "function saveSettings() {\n\tif (typeof (Storage) !== \"undefined\") {\n\t\tlocalStorage.fixIncome = document.getElementById(\"fixIncome\").value;\n\t\tlocalStorage.fixCost = document.getElementById(\"fixCost\").value;\n\t\tlocalStorage.fixSaving = document.getElementById(\"fixSaving\").value;\n\t\tlocalStorage.interval = document.getElementById(\"interval\").selectedIndex + 1;\n\t} else {\n\t\talert(\"Ihr Browser unterstützt LocalStage nicht!!!\");\n\t}\n}", "function save_options() {\n var autorefresh = document.getElementById(autorefreshId).checked;\n chrome.storage.sync.set({\n autorefresh: autorefresh\n }, function() {\n var status = document.getElementById('status');\n status.textContent = statusUpdateText;\n setTimeout(function() {\n status.textContent = '';\n }, 750);\n });\n\n _gaq.push(['_trackEvent', 'Options', 'Save']);\n}", "function glyphsSaveTrackConfig(trackID) {\n var glyphTrack = glyphsTrack_global_track_hash[trackID];\n if(glyphTrack == null) { return; }\n\n eedbShowLogin();\n if(!current_user) {\n zenbuGeneralWarn(\"In order to save a track configuration, you must first log into ZENBU.\", \"Warning: Not logged into the ZENBU system\");\n eedbLoginAction(\"login\");\n return;\n }\n\n glyphTrack.glyphsSaveTrackConfig = new Object;\n glyphTrack.glyphsSaveTrackConfig.title = glyphTrack.title;\n glyphTrack.glyphsSaveTrackConfig.desc = glyphTrack.description;\n\n var trackDiv = glyphTrack.trackDiv;\n if(!trackDiv) return;\n\n var svg = glyphTrack.svg;\n if(!svg) return;\n\n var divFrame = document.createElement('div');\n divFrame.setAttribute('style', \"position:absolute; background-color:LightYellow; text-align:left; \"\n +\"border:inset; border-width:1px; padding: 3px 3px 3px 3px; \"\n +\"left:\" + ((winW/2)-250) +\"px; \"\n +\"top:\" + (toolTipSTYLE.ypos-300) +\"px; \"\n +\"width:350px;\"\n );\n\n var tdiv, tspan, tinput;\n\n tdiv = document.createElement('h3');\n tdiv.setAttribute('align', \"center\");\n tdiv.innerHTML = \"Save gLyphs Track\";\n divFrame.appendChild(tdiv)\n\n //----------\n var userDiv = divFrame.appendChild(document.createElement('div'));\n userDiv.setAttribute('style', \"margin: 0px 0px 3px 0px; font-size:12px; font-family:arial,helvetica,sans-serif;\");\n var userSpan = userDiv.appendChild(document.createElement('span'));\n userSpan.setAttribute('style', \"padding:0px 0px 0px 0px;\");\n userSpan.innerHTML = \"user:\";\n var name_span = userDiv.appendChild(document.createElement('span'));\n name_span.setAttribute(\"style\", \"padding:0px 0px 0px 10px; font-weight:bold; color:rgb(94,115,153);\");\n name_span.innerHTML = \"guest\";\n if(current_user) {\n if(current_user.nickname) { name_span.innerHTML = current_user.nickname; }\n else { name_span.innerHTML = current_user.openID; }\n }\n\n var div1 = divFrame.appendChild(document.createElement('div'));\n var collabWidget = eedbCollaborationSelectWidget();\n div1.appendChild(collabWidget);\n\n //----------\n tdiv = document.createElement('div');\n tspan = document.createElement('span');\n tspan.setAttribute('style', \"padding: 0px 2px 0px 0px; font-size:12px; font-family:arial,helvetica,sans-serif;\");\n tspan.innerHTML = \"track name:\";\n tdiv.appendChild(tspan);\n var tinput = document.createElement('input');\n tinput.setAttribute('style', \"width:200px; margin: 1px 1px 1px 1px; font-size:10px; font-family:arial,helvetica,sans-serif;\");\n tinput.setAttribute('type', \"text\");\n tinput.setAttribute('value', glyphTrack.title);\n tinput.setAttribute(\"onkeyup\", \"glyphsSaveTrackConfigParam(\\\"\"+ trackID+\"\\\", 'title', this.value);\");\n tdiv.appendChild(tinput);\n divFrame.appendChild(tdiv)\n\n //----------\n var descSpan = document.createElement('span');\n descSpan.setAttribute('style', \"font-size:12px; font-family:arial,helvetica,sans-serif;\");\n descSpan.innerHTML = \"description:\";\n divFrame.appendChild(descSpan);\n var descInput = document.createElement('textarea');\n descInput.setAttribute('style', \"width:340px; margin: 3px 5px 3px 5px; font-size:10px; font-family:arial,helvetica,sans-serif;\");\n descInput.setAttribute('rows', 7);\n descInput.setAttribute(\"onkeyup\", \"glyphsSaveTrackConfigParam(\\\"\"+ trackID+\"\\\", 'desc', this.value);\");\n divFrame.appendChild(descInput);\n if(glyphTrack.description) {\n descInput.setAttribute('value', glyphTrack.description);\n descInput.innerHTML = glyphTrack.description;\n }\n\n\n //----------\n divFrame.appendChild(document.createElement('hr'));\n //----------\n var button1 = document.createElement('input');\n button1.setAttribute(\"type\", \"button\");\n button1.setAttribute(\"value\", \"cancel\");\n button1.className = \"medbutton\";\n button1.style.float = \"left\";\n button1.setAttribute(\"onclick\", \"glyphsSaveTrackConfigParam(\\\"\"+ trackID+\"\\\", 'cancel');\");\n divFrame.appendChild(button1);\n\n var button2 = document.createElement('input');\n button2.setAttribute(\"type\", \"button\");\n button2.setAttribute(\"value\", \"save track config\");\n button2.className = \"medbutton\";\n button2.style.float = \"right\";\n button2.setAttribute(\"onclick\", \"glyphsSaveTrackConfigParam(\\\"\"+ trackID+\"\\\", 'accept');\");\n divFrame.appendChild(button2);\n\n //----------\n trackDiv.appendChild(divFrame);\n glyphTrack.glyphsSaveTrackConfig.interface = divFrame;\n}", "function save_settings() {\r\n feed_id = document.getElementById('cagle_folder').value;\r\n GM_setValue('cagle_feed', feed_id);\r\n cagle_feed = GM_getValue('cagle_feed', 'none');\r\n add_click_listener(cagle_feed);\r\n alert('Settings saved!');\r\n}", "function save_settings() {\n settings.set('map', $('select[name=\"map\"] option:selected').attr('value'));\n settings.set('time', $('select[name=\"time\"] option:selected').attr('value'));\n settings.set('caps', $('select[name=\"caps\"] option:selected').attr('value'));\n\n /* var select_settings = [];\n $('.form-control.js-customize option').each(function(i, obj) { // get all the available settings in the select-box\n select_settings.push($(obj).attr('value'));\n });\n\n for(var i = 0; i < select_settings.length; i++) { // get the value for each of the settings and store it\n if (select_settings[i] === '') continue;\n var val = '';\n val = $('select[name=\"' + select_settings[i] + '\"] option:selected').attr('value');\n if (val === undefined) { // no selectbox, but a checkbox\n val = $('input[name=\"' + select_settings[i] + '\"]')[0].checked;\n }\n select_settings[i] = val;\n }\n\n $('.non-default.col-md-12').each(function(i, obj) {\n select_settings[$(obj).attr('name')] = true;\n });\n settings.set('select_settings', select_settings);*/\n}", "function storeSettings() {\n check();\n browser.storage.local.set(f2j(form));\n}", "function lc_savePreferences(prefs){\r\n if(!GM_setValue) return;\r\n for(opt in prefs){\r\n // prefs we do not save\r\n if(/^(debug|styles)$/.test(opt)) continue;\r\n if(typeof prefs[opt] == 'object'){\r\n // loop through objects (as in lc_Prefs.accel.altKey)\r\n for(oopt in prefs[opt]){\r\n GM_setValue(oopt, prefs[opt][oopt]);\r\n }\r\n }else{\r\n GM_setValue(opt, prefs[opt]);\r\n }\r\n }\r\n}", "function glyphsSaveTrackConfig(trackID) {\n var glyphTrack = gLyphTrack_array[trackID];\n if(glyphTrack == null) { return; }\n\n eedbCurrentUser = eedbShowLogin();\n if(!eedbCurrentUser) {\n gLyphsNoUserWarn(\"save a track configuration\");\n return;\n }\n\n glyphTrack.glyphsSaveTrackConfig = new Object;\n glyphTrack.glyphsSaveTrackConfig.title = glyphTrack.title;\n glyphTrack.glyphsSaveTrackConfig.desc = glyphTrack.description;\n\n var trackDiv = glyphTrack.trackDiv;\n if(!trackDiv) return;\n\n var svg = glyphTrack.svg;\n if(!svg) return;\n\n var divFrame = document.createElement('div');\n divFrame.setAttribute('style', \"position:absolute; background-color:LightYellow; text-align:left; \"\n +\"border:inset; border-width:1px; padding: 3px 3px 3px 3px; \"\n +\"left:\" + ((winW/2)-250) +\"px; \"\n +\"top:\" + (toolTipSTYLE.ypos-300) +\"px; \"\n +\"width:350px;\"\n );\n\n var tdiv, tspan, tinput;\n\n tdiv = document.createElement('h3');\n tdiv.setAttribute('align', \"center\");\n tdiv.innerHTML = \"Save gLyphs Track\";\n divFrame.appendChild(tdiv)\n\n //----------\n var userDiv = divFrame.appendChild(document.createElement('div'));\n userDiv.setAttribute('style', \"margin: 0px 0px 3px 0px; font-size:12px; font-family:arial,helvetica,sans-serif;\");\n var userSpan = userDiv.appendChild(document.createElement('span'));\n userSpan.setAttribute('style', \"padding:0px 0px 0px 0px;\");\n userSpan.innerHTML = \"user:\";\n var name_span = userDiv.appendChild(document.createElement('span'));\n name_span.setAttribute(\"style\", \"padding:0px 0px 0px 10px; font-weight:bold; color:rgb(94,115,153);\");\n name_span.innerHTML = \"guest\";\n if(eedbCurrentUser) {\n if(eedbCurrentUser.nickname) { name_span.innerHTML = eedbCurrentUser.nickname; }\n else { name_span.innerHTML = eedbCurrentUser.openID; }\n }\n\n var div1 = divFrame.appendChild(document.createElement('div'));\n var collabWidget = eedbCollaborationSelectWidget();\n div1.appendChild(collabWidget);\n\n //----------\n tdiv = document.createElement('div');\n tspan = document.createElement('span');\n tspan.setAttribute('style', \"padding: 0px 2px 0px 0px; font-size:12px; font-family:arial,helvetica,sans-serif;\");\n tspan.innerHTML = \"track name:\";\n tdiv.appendChild(tspan);\n var tinput = document.createElement('input');\n tinput.setAttribute('style', \"width:200px; margin: 1px 1px 1px 1px; font-size:10px; font-family:arial,helvetica,sans-serif;\");\n tinput.setAttribute('type', \"text\");\n tinput.setAttribute('value', glyphTrack.title);\n tinput.setAttribute(\"onkeyup\", \"glyphsSaveTrackConfigParam(\\\"\"+ trackID+\"\\\", 'title', this.value);\");\n tdiv.appendChild(tinput);\n divFrame.appendChild(tdiv)\n\n //----------\n var descSpan = document.createElement('span');\n descSpan.setAttribute('style', \"font-size:12px; font-family:arial,helvetica,sans-serif;\");\n descSpan.innerHTML = \"description:\";\n divFrame.appendChild(descSpan);\n var descInput = document.createElement('textarea');\n descInput.setAttribute('style', \"width:340px; margin: 3px 5px 3px 5px; font-size:10px; font-family:arial,helvetica,sans-serif;\");\n descInput.setAttribute('rows', 7);\n descInput.setAttribute(\"onkeyup\", \"glyphsSaveTrackConfigParam(\\\"\"+ trackID+\"\\\", 'desc', this.value);\");\n divFrame.appendChild(descInput);\n if(glyphTrack.description) {\n descInput.setAttribute('value', glyphTrack.description);\n descInput.innerHTML = glyphTrack.description;\n }\n\n\n //----------\n divFrame.appendChild(document.createElement('hr'));\n //----------\n var button1 = document.createElement('input');\n button1.setAttribute(\"type\", \"button\");\n button1.setAttribute(\"value\", \"cancel\");\n button1.className = \"medbutton\";\n button1.style.float = \"left\";\n button1.setAttribute(\"onclick\", \"glyphsSaveTrackConfigParam(\\\"\"+ trackID+\"\\\", 'cancel');\");\n divFrame.appendChild(button1);\n\n var button2 = document.createElement('input');\n button2.setAttribute(\"type\", \"button\");\n button2.setAttribute(\"value\", \"save track config\");\n button2.className = \"medbutton\";\n button2.style.float = \"right\";\n button2.setAttribute(\"onclick\", \"glyphsSaveTrackConfigParam(\\\"\"+ trackID+\"\\\", 'accept');\");\n divFrame.appendChild(button2);\n\n //----------\n trackDiv.appendChild(divFrame);\n glyphTrack.glyphsSaveTrackConfig.interface = divFrame;\n}", "export() {\n // Save before exporting\n settings.set({ rules: rulesGrid.getRules() })\n .then(settingsObj => {\n notifier.progressStart('Exporting...');\n\n settings.exportToFile(settingsObj)\n .then(notifier.progressEnd);\n });\n }", "function saveSettings() {\n\tlocalStorage.setItem (\"favs\", favs.join (','));\n\tlocalStorage.setItem (\"mode\", \"\"+mode);\n}", "function saveSettings() {\r\n messenger.storage.local.set({\r\n MailFolderKeyNav: MailFolderKeyNavInput.checked,\r\n MailFolderKeyNavMenuItem: MailFolderKeyNavMenuItemInput.checked\r\n });\r\n}", "function saveConfigToFile() {\n saveSession()\n var configString = JSON.stringify(getConfig())\n saveToFile(configString, \"titan-project-config.json\", \"application/json\")\n}", "function save_options() {\n if (doReload) {\n // just saving app_name and reloading extension to start the oAuth process\n var browser_name = $appName.value;\n localStorage.setItem(\"app_name\", browser_name);\n $status.textContent = \"Options Saved.\";\n _.delay(chrome.runtime.reload, 500);\n } else {\n // saving new URL and reseting local copy of DB\n var sheet_url_val = $sheet_url.value;\n localStorage.setItem(\"sheet_url\", sheet_url_val);\n DrivePass.Settings.gs_sheet_init.sheet_url = sheet_url_val;\n DrivePass.ResetLocal().init(function() {\n $status.textContent = \"Options Saved.\";\n });\n }\n }", "function saveOptions() {}", "function iniSave() {\n\tfs.writeFileSync(iniFile, ini.stringify(config));\n}", "function save_options() {\n\t//retrieve the settings from the page\n\t//Processing\n\tvar autoNotifications = document.getElementById('autoNotifications').checked;//---\n\tvar visitSite\t\t= document.getElementById('visitThresholdSite').value;\n\tif (visitSite < 1) //Default to 1 if they set it too low\n\t\tvisitSite = 1;\n\tvar visitPage \t\t= document.getElementById('visitThresholdPage').value; \t//--\n\tif (visitPage < 1) //Default to 1 if they set it too low\n\t\tvisitPage = 1;\n\tvar weight \t \t\t= document.getElementById('typedWeight').value; \t\t//-- No default because they may want typed values to remove visits\n\tvar timer \t \t\t= document.getElementById('timeThreshold').value;\n\tif (timer < 0) //Default to 0 if they set it too low\n\t\ttimer = 0;\n\tvar ignored \t\t= document.getElementById('blacklist').value;\n\tvar checkFrequency = document.getElementById('checkFrequency').value;\t\t//---\n\tif (checkFrequency < 1) //Default to 1 if they set it too low\n\t\tcheckFrequency = 1;\n\tvar timeRounding \t= document.getElementById('timeRounding').value;\t\t//---\n\tif (timeRounding < 1) //Default to 1 if they set it too low\n\t\ttimeRounding = 1;\n\tvar newZero \t\t= document.getElementById('newZero').value;\t\t\t\t//---\n\t//Make sure \"trackAfter\" is the smaller value\n\tvar trackAfter \t= document.getElementById('trackAfter').value;\t\t\t//---\n\tvar trackBefore \t= document.getElementById('trackBefore').value;\t\t\t//---\n\tif(trackAfter > trackBefore) {\n\t\tvar trackAfter = document.getElementById('trackBefore').value;\t\t\t//---\n\t\tvar trackBefore = document.getElementById('trackAfter').value;\t\t\t//---\n\t}\n\tvar autoCount \t= document.getElementById('autoCount').value;\t\t\t\t//---\n\tif (autoCount < 1) //Default to 1 if they set it too low\n\t\tautoCount = 1;\n\tvar rejectedThreshold = document.getElementById('rejectedThreshold').value; //---\n\tif (rejectedThreshold < 0) //Default to 0 if they set it too low\n\t\trejectedThreshold = 0;\n\n\n\t//Save the settings to memory\n\tchrome.storage.sync.set({\n\t\tvisitThreshold: \tvisitSite,\n\t\tpageVisitThreshold: visitPage,\t\t\t//--\n\t\ttypedWeight: \t\tweight,\t\t\t\t//--\n\t\ttimeThreshold: \t\ttimer,\n\t\tignoreList: \t\tignored,\n\t\tcheckFrequency: \tcheckFrequency,\t\t//--\n\t\ttimeRounding: \t\ttimeRounding,\t\t//--\n\t\tnewZero: \t\t\tnewZero,\t\t\t//--\n\t\ttrackAfter: \t\ttrackAfter, \t\t//--\n\t\ttrackBefore: \t\ttrackBefore, \t\t//--\n\t\tautoNotifications: \tautoNotifications, //--\n\t\tautoCount: \t\t\tautoCount,\t\t\t//--\n\t\trejectedThreshold: \trejectedThreshold\t//--\n\t}, function() {\n\t\t// Update status to let user know options were saved.\n\t\tvar status = document.getElementById('status');\n\t\tstatus.textContent = 'Options saved.';\n\t\tsetTimeout(function() {\n\t\t\tstatus.textContent = \"\";\n\t\t\tstatus.appendChild(document.createElement('br'));\n\t\t}, 750);\n\t});\n}", "function storeSettings(settings = []) {\n localStorage.setItem('settings', JSON.stringify(settings));\n saveSettings.innerHTML = 'SAVED'\n}", "function writeSetting(key, value) {\n // change key in global.sleeplog\n if (typeof global.sleeplog === \"object\") global.sleeplog[key] = value;\n // reread settings to only change key\n settings = Object.assign(settings, storage.readJSON(filename, true) || {});\n // change the value of key\n settings[key] = value;\n // write to storage\n storage.writeJSON(filename, settings);\n }", "function Save() \n{\n /* var savearr = [holdname, playerlvl, health, mana, gold, savecoord];\n var savedata = JSON.stringify(savearr);*/\n savedatasw = 1;\n playerinfo.playername=playername;\n playerinfo.playerlvl=playerlvl;\n playerinfo.health=health;\n playerinfo.mana=mana;\n playerinfo.gold=gold;\n playerinfo.savecoord=savecoord;\n playerinfo.savedatasw=savedatasw;\n \n fs.writeFileSync(\"save.json\", JSON.stringify(playerinfo));\n \n return;\n}", "function save_options() {\n localStorage[_trackIdKey] = document.getElementById(_trackIdKey).value;\n localStorage[_trackIdKeyCa] = document.getElementById(_trackIdKeyCa).value;\n localStorage[_trackIdKeyUk] = document.getElementById(_trackIdKeyUk).value;\n localStorage[_trackIdKeyDe] = document.getElementById(_trackIdKeyDe).value;\n localStorage[_trackIdKeyEs] = document.getElementById(_trackIdKeyEs).value;\n localStorage[_trackIdKeyFr] = document.getElementById(_trackIdKeyFr).value;\n localStorage[_trackIdKeyIt] = document.getElementById(_trackIdKeyIt).value;\n localStorage[_trackIdKeyJp] = document.getElementById(_trackIdKeyJp).value;\n localStorage[_trackIdKeyCn] = document.getElementById(_trackIdKeyCn).value;\n localStorage[_trackIdKeyIn] = document.getElementById(_trackIdKeyIn).value;\n localStorage[_trackIdKeyFlipkart] = document.getElementById(_trackIdKeyFlipkart).value;\n\t\n // Update status to let user know options were saved.\n document.querySelector('button').innerHTML = \"Saved.\";\n // Close tab/popup\n setTimeout(\n function() { \n window.close();\n }, 750);\n}", "function save_options() {\n chrome.storage.sync.set({\n repo_src: updateRepoField.value\n }, function() {\n });\n}", "function saveSpeed() {\n chrome.storage.sync.set({ settings: speedObj }, () => {\n console.log('Saved: ', speedObj);\n });\n }", "saveSettings() {\n\t\tthis.setState( { loading: true } );\n\n\t\tconst data = WPHB_Admin.minification.getMultiSelectValues(\n\t\t\t'wphb-auto-exclude'\n\t\t);\n\n\t\tconst settings = {\n\t\t\ttype: this.state.view,\n\t\t\tstyles: this.state.enabled.styles,\n\t\t\tscripts: this.state.enabled.scripts,\n\t\t\tdata: JSON.stringify( data ),\n\t\t};\n\n\t\tthis.state.api.post( 'minify_save_settings', settings ).then( ( r ) => {\n\t\t\t// Automatic type has not changed.\n\t\t\tif (\n\t\t\t\tundefined !== typeof r.typeChanged &&\n\t\t\t\tfalse === r.typeChanged\n\t\t\t) {\n\t\t\t\tWPHB_Admin.notices.show();\n\t\t\t} else {\n\t\t\t\tWPHB_Admin.notices.show( r.typeChanged, 'success', false );\n\n\t\t\t\t// Allow opening a \"how-to\" modal from the notice.\n\t\t\t\tconst noticeLink = document.getElementById(\n\t\t\t\t\t'wphb-basic-hdiw-link'\n\t\t\t\t);\n\t\t\t\tif ( noticeLink ) {\n\t\t\t\t\tnoticeLink.addEventListener( 'click', () => {\n\t\t\t\t\t\twindow.SUI.closeNotice( 'wphb-ajax-update-notice' );\n\t\t\t\t\t\twindow.SUI.openModal(\n\t\t\t\t\t\t\t'automatic-ao-hdiw-modal-content',\n\t\t\t\t\t\t\t'automatic-ao-hdiw-modal-expand'\n\t\t\t\t\t\t);\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst view =\n\t\t\t\t'undefined' === typeof r.view ? this.state.view : r.view;\n\n\t\t\tthis.setState( {\n\t\t\t\tassets: r.assets,\n\t\t\t\tenabled: r.enabled,\n\t\t\t\texclusions: r.exclusions,\n\t\t\t\tloading: false,\n\t\t\t\tview,\n\t\t\t} );\n\t\t} );\n\t}", "function saveConfig(){\n fs.writeFileSync(path.join(appdata.base , \"config.json\"), JSON.stringify(config,null,4) ) //\n}", "function saveSetting() {\n new CookieUtil().set(\n \"webchatUserName\",\n $(\"input[name='webchatUserNameTB']\").val(),\n 365\n );\n new CookieUtil().set(\n \"webchatUserColor\",\n $(\"input[name='webchatUserColorCC']\").val(),\n 365\n );\n new CookieUtil().set(\n \"webchatFontSize\",\n $(\"input[name='webchatFontSizeNB']\").val(),\n 365\n );\n new CookieUtil().set(\n \"webchatRememberOpened\",\n $(\"input[name='webchatRememberOpenedCB']\").is(\":checked\"),\n 365\n );\n applySetting();\n\n if (confirm(\"새로고침 하시겠습니까?\")) {\n window.location.reload();\n }\n}", "function save_options() {\n\n chrome.storage.sync.set({ settings:\n {\n targethost: document.getElementById('targethost').value,\n targetport: document.getElementById('targetport').value,\n targetproto: document.getElementById('targetproto').value,\n targetuser: document.getElementById('targetuser').value,\n targetpasswd: document.getElementById('targetpasswd').value\n }\n }, function() {\n // Update status to let user know options were saved.\n var status = document.getElementById('status');\n status.textContent = ' Saved.';\n\n //reload background script\n chrome.extension.getBackgroundPage().window.location.reload();\n \n setTimeout(function() {\n status.textContent = '';\n }, 750);\n });\n}", "function updateSettings() {\n localStorage.setItem(\"mafiaSettings\", JSON.stringify(settings));\n}", "function save() {\n storage.write(filename, data);\n }", "function setSavedOptions() {\n log('Getting saved options.');\n GM_setValue(\"opt_loggingEnabled\", opt_loggingEnabled);\n GM_setValue(\"opt_hidefedded\", opt_hidefedded);\n GM_setValue(\"opt_hidefallen\", opt_hidefallen);\n GM_setValue(\"opt_hidetravel\", opt_hidetravel);\n GM_setValue(\"opt_showcaymans\", opt_showcaymans);\n GM_setValue(\"opt_hidehosp\", opt_hidehosp);\n GM_setValue(\"opt_disabled\", opt_disabled);\n }", "function saveConfig() {\n console.info(\"Saving configuration\", synthea.configs);\n fs.writeFile(synthea.config_path,JSON.stringify(synthea.configs), function(err) {\n if (err) throw err;\n });\n}", "function save_options() {\n var url = elements.url.value;\n storage.sync.set({\n serverUrl: url\n }, showSaveTimedMessage);\n }", "_setPersistedViewSettings() {\n this.settings.setPreferences();\n }", "function saveOptions() {\n clearAlerts();\n var prj = document.getElementById('project').value;\n var usr = document.getElementById('user').value;\n \n chrome.storage.sync.set({\n project: prj,\n user: usr\n }, function() {\n addAlert(\"Options updated\", \"success\");\n setTimeout(function(){ \n clearAlerts(); \n }, 1000);\n });\n}", "function saveScript() {\n\tvar rules = {};\n\tvar co = 0;\n\n\t$(\"#scripts_list .script_boxes\").each(function() {\n\t\tvar script_location = stripHTMLTags($(this).find('.script_location').text());\n\t\tvar execute_type = stripHTMLTags($(this).find('.execute_type').prop(\"selectedIndex\"));\n\t\t\n\t\tvar active = stripHTMLTags($(this).find('.active').prop('checked'));\n\t\tvar global = stripHTMLTags($(this).find('.global').prop('checked'));\n\t\tvar caseinsensitive = stripHTMLTags($(this).find('.caseinsensitive').prop('checked'));\n\t\t// prepare the object\n\t\trules[co] = {id: co, script_location:script_location, execute_type:execute_type, active: active, global:global, caseinsensitive:caseinsensitive}\n\t\tco++;\n\t});\n\t\t\n\tlocalStorage.scripts_settings = JSON.stringify(rules);\n}", "function saveOptionsToFile() {\n fs.writeFile(optionsFileName, JSON.stringify(userOptions), 'utf8', (error) => {\n if (error) {\n alertOptionsSaved(false);\n }\n alertOptionsSaved(true);\n });\n }", "function saveSettings(){\n\t\tvar checkboxes = document.querySelectorAll('.accordion-header input[type=\"checkbox\"]');\n\t\tvar toSave = {};\n\t\t[].forEach.call(checkboxes,\tfunction (el) {\n\t\t\tvar id = el.parentNode.id;\n\t\t\tvar checked = el.checked;\n\t\t\ttoSave[id] = checked;\n\t\t});\n\t\t// console.log(\"Saving block preferences\", toSave);\n\t\tlocalStorage['__' + language + '_hidden_blocks'] = JSON.stringify(toSave);\n\t}", "function save_options() {\n let sheetIdValue = document.getElementById('sheet_id').value;\n\tlet baseUrlValue = document.getElementById('base_url').value;\n\tconst debugModeValue = document.getElementById(\"debug_mode\").checked;\n\n\tbaseUrlValue = baseUrlValue\n .replace(/(^\\w+:|^)\\/\\//, \"\")\n .replace(/\\/+$/, \"\");\n\n\tsheetIdValue = sheetIdValue.trim();\t\n\n\tbrowser.storage.sync.set({ sheetIdValue, baseUrlValue, debugModeValue }).then( () => {\n\t\tvar status = document.getElementById('status');\n\t\tstatus.textContent = 'Options saved...';\n\t\tsetTimeout(function () {\n\t\t\tstatus.textContent = '';\n\t\t}, 750);\n\t})\n\n}", "function save_options() {\n\tsetLocal(\"sense_facebook\");\n\tsetLocal(\"sense_google\");\n\tsetLocal(\"sense_twitter\");\n\tsetLocal(\"sense_youtube\");\n\tsetLocal(\"sense_4Chan\");\n\tsetLocal(\"sense_selector\");\n\tsetLocal(\"sense_color\");\n\tcheckAPI();\n}", "SaveAndReimport() {}", "saveSettings(){\n\t\tif(Object.keys(this.changes).length === 0) {\n\t\t\talertify.closeLogOnClick(true).delay(1000).log(\"No settings have been changed!\");\n\t\t\treturn;\n\t\t}\n\t\tconsole.log('Saving all settings...');\n\t\teel.api_save_settings(this.changes)(n => {\n\t\t\tif(n){\n\t\t\t\tif('interface.host' in this.changes || 'interface.port' in this.changes){\n\t\t\t\t\talertify\n\t\t\t\t\t\t.alert('Changes to the Web UI will apply the next time you start RMD.')\n\t\t\t\t\t\t.then(()=>{location.reload()})\n\t\t\t\t}else {\n\t\t\t\t\talertify.closeLogOnClick(true).success(\"Saved settings! UI will reload in 5 seconds...\");\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tlocation.reload()\n\t\t\t\t\t}, 5000);\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\talertify.closeLogOnClick(true).error(\"Error saving settings!\")\n\t\t\t}\n\t\t\tthis.changes = {};\n\t\t\tthis.setState({changes: {}})\n\t\t});\n\t}", "function saveSettingsLocalStorage(){\n settingsObject = {email: emailSwitch.checked, profile: profileSwitch.checked, timezone: timezoneSelect.selectedIndex}; \n localStorage.setItem('settings', JSON.stringify(settingsObject));\n \n}", "function save(key) {\n return function(value) {\n s[key] = value;\n storage.write(SETTINGS_FILE, s);\n WIDGETS[\"batwarn\"].reload();\n };\n }", "function save(){\r\n\tconsole.log(\"Auto-saving Database..\");\r\n\tjsonfile.writeFile(\"./channels.json\", channels, function (err) {\r\n\t\tif (err){\r\n\t\t\tconsole.log(err);\r\n\t\t}\r\n\t})\r\n\tchanges=false;\r\n\tconsole.log(\"Autosave Complete\");\r\n}", "saveSong (path) {\n const data = {\n patterns: this.sequencer.tracks,\n scaler: this.scaler.getConfig(),\n channels: this.channels.map((ch) => ch.getConfig()),\n settings: {\n tempo: this.sequencer.tempo,\n syncOuts: this.sequencer.syncOuts,\n swing: this.sequencer.swing,\n accent: this.matrixView.accent\n },\n version: '2.0'\n }\n const fs = require('fs')\n fs.writeFile(path, JSON.stringify(data, null, 2), (err) => {\n if (err) {\n console.log('Error saving Song', err)\n } else {\n console.log('Song saved')\n localStorage.setItem('currentFile', path)\n this.adjustSaveAsMenu()\n }\n })\n }", "save() {\n // Delete unsaved scripts\n let scriptFileNames = [];\n try {\n if (fse.pathExistsSync(SCRIPTS_DIRECTORY_PATH)) {\n scriptFileNames = fse.readdirSync(SCRIPTS_DIRECTORY_PATH);\n }\n scriptFileNames.forEach(scriptFileName => {\n if (\n isValidYamlFileName(scriptFileName) &&\n !this.hasScript(path.basename(scriptFileName, '.yml')) &&\n !this.hasScript(path.basename(scriptFileName, '.simple.yml'))\n ) {\n deleteYamlFile(`${SCRIPTS_DIRECTORY_PATH}/${scriptFileName}`);\n }\n if (\n isValidJsonFileName(scriptFileName) &&\n !this.hasScript(path.basename(scriptFileName, '.json')) &&\n !this.hasScript(path.basename(scriptFileName, '.simple.json'))\n ) {\n deleteJsonFile(`${SCRIPTS_DIRECTORY_PATH}/${scriptFileName}`);\n }\n });\n } catch (error) {\n printMessage(\n formatMessage(messages.errorDeletingScript, {\n error,\n }),\n );\n safeExit();\n }\n\n saveConfigJson({\n shell: this.shell,\n npmAlias: this.npmAlias,\n scriptNames: this.scriptNames,\n });\n }", "function saveState () {\n winston.info('Saving current state');\n jsonfile.writeFileSync(STATE_FILE, {\n subscriptions: subscriptions,\n callback: callback,\n history: history,\n version: CURRENT_VERSION\n }, {\n spaces: 4\n });\n}", "save(){\n\t\tvar dataString = JSON.stringify(this.getData());\n\t\tfs.writeFile('app/json/saveData.txt', dataString);\n\t}" ]
[ "0.73162335", "0.69485545", "0.69398546", "0.6905729", "0.6787198", "0.6755092", "0.6753151", "0.66769636", "0.6666348", "0.66618085", "0.6630609", "0.6620979", "0.6598296", "0.65770036", "0.6547662", "0.6458316", "0.6441682", "0.6436496", "0.63869256", "0.63647985", "0.63399583", "0.6331921", "0.628051", "0.6277325", "0.6234344", "0.61822397", "0.6176697", "0.61472327", "0.6134485", "0.612534", "0.6109215", "0.61029977", "0.6087779", "0.6084184", "0.60694695", "0.60581046", "0.6048294", "0.60406494", "0.60340023", "0.6024562", "0.60178286", "0.5999766", "0.59780097", "0.59723157", "0.5945123", "0.5944834", "0.59419477", "0.59417707", "0.59181625", "0.5910129", "0.5869597", "0.5869081", "0.5868572", "0.58642155", "0.5860835", "0.5858005", "0.58492374", "0.58454645", "0.58384216", "0.58359754", "0.5817545", "0.5814488", "0.58050406", "0.57998157", "0.57958347", "0.5792143", "0.57755524", "0.57500577", "0.57455415", "0.57231843", "0.5716887", "0.57155514", "0.5708918", "0.57070684", "0.56996316", "0.5692226", "0.5687375", "0.5686362", "0.56846976", "0.5681329", "0.5671303", "0.5636923", "0.5636693", "0.56269175", "0.5623904", "0.56087005", "0.56075484", "0.56043714", "0.560401", "0.5602162", "0.55998605", "0.5583917", "0.55727667", "0.5571314", "0.5567692", "0.55629265", "0.55628014", "0.5548204", "0.5535286", "0.5529556", "0.5526635" ]
0.0
-1
Get settings, read from tracker.js file
function loadSettings() { jQuery.getJSON('helpers/loadSettings.php', function (data) { settings = data; }).fail(function (data) { if (data.responseText.indexOf('login') != -1) window.location = 'login.php'; else alert("Could not load settings from file." + data.responseText); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get() {\n return settings;\n }", "function getSettings(){\n if(localStorage.getItem('settings') !== null){\n settings = JSON.parse(localStorage.getItem('settings'));\n }\n}", "function getSettings() {\n chrome.storage.sync.get({\n apiToken: '',\n addresses: {}\n }, function(items) {\n apiToken = items.apiToken;\n addresses = items.addresses;\n checkTravelTimes();\n });\n}", "function getSettings(){\n\tchrome.storage.sync.get(\n\t\tsettings,\n\t\tfunction(results){\n\t\t\tupdateSettings(results);\n\t\t}\n\t);\n}", "function getSettings() {\n return user.settings;\n }", "readSettings() {\n\n this.hue.bridges = this._settings.get_value(\n Utils.HUELIGHTS_SETTINGS_BRIDGES\n ).deep_unpack();\n\n this._indicatorPosition = this._settings.get_enum(\n Utils.HUELIGHTS_SETTINGS_INDICATOR\n );\n\n this._zonesFirst = this._settings.get_boolean(\n Utils.HUELIGHTS_SETTINGS_ZONESFIRST\n );\n\n this._showScenes = this._settings.get_boolean(\n Utils.HUELIGHTS_SETTINGS_SHOWSCENES\n );\n }", "loadSettings(){\n let result = {};\n // check if config file exists\n if(jetpack.exists('settings.ini')){\n try{\n // load settings.ini\n let settings = jetpack.read('settings.ini');\n // split settings string\n const pairs = settings.split('\\n');\n pairs.forEach((pair) => {\n if(!pair.startsWith('#')){\n pair = pair.trim();\n // check if pair is empty\n if(pair.length > 0){\n // split key value pair\n let keyValue = pair.split('=');\n\n // parse key value pair\n if(keyValue[0]==='USER-AGENT'){\n // parse user agent settings\n switch(keyValue[1]){\n case '/':\n result['Generic']=true;\n result['Special']=false;\n break;\n default:\n result['Generic']=false;\n result['Special']=true;\n result['custom_ua']=keyValue[1];\n break;\n }\n }else if(keyValue[0]==='HEADER'){\n // parse header settings\n switch(keyValue[1]){\n case '0':\n result['DNT']=true;\n result['GPC']=false;\n break;\n case '1':\n result['DNT']=false;\n result['GPC']=true;\n break;\n default:\n console.error('unknown header value!');\n return;\n }\n }else if(keyValue[0]==='MODE'){\n // parse mode settings\n switch(keyValue[1]){\n case '0':\n result['Breadth']=true;\n result['Single']=false;\n break;\n case '1':\n result['Breadth']=false;\n result['Single']=true;\n break;\n default:\n console.error('unknown mode value!');\n return;\n }\n }else{\n console.error('unknown key for settings!');\n }\n }\n }\n });\n SmartCrawler.setSettings(result);\n }catch(err){\n console.error(err);\n }\n }\n }", "function readSettings(settings) {\n breaktod = settings.breaktod || (settings.breaktod === 0 ? 0 : 10); // time of day when to start/end graphs\n maxawake = settings.maxawake || 36E5; // 60min in ms\n minconsec = settings.minconsec || 18E5; // 30min in ms\n}", "function settings_load(){\n\t\tvar send_params = {};\n\t\tsend_params['_object'] = 'settings';\n\t\tsend_params['_action'] = 'get';\n\t\tapi_get(send_params, settings_load_callback);\n\t}", "function getPreferences() {\n return settings.get('preferences');\n}", "static load() { return JSON.parse(window.localStorage.getItem('settings')) || {}; }", "get settings() {\n return this._settings;\n }", "get settings() {\n return this._settings;\n }", "get settings() {\n return this._settings;\n }", "function loadSettings() {\n try {\n return fs.readFileSync(SETTINGS_FILE, SETTINGS_TYPE);\n } catch (ex) {\n return {};\n }\n}", "function _getSettings(){\n var keys = ManagerSettings.getKeys();\n keys.forEach(function(key){\n settings[key] = ManagerSettings.get(key)\n }); // keys.forEach\n}", "async readSettings() {\n try {\n const raw = (await util.promisify(fs.readFile)(this.settingsPath, \"utf8\")).trim();\n this.settings = raw ? JSON.parse(raw) : {};\n }\n catch (error) {\n if (error.code !== \"ENOENT\") {\n this.services.get(log_1.ILogService).warn(error.message);\n }\n }\n return this.settings;\n }", "getSettings () {\r\n\t\tvar defaultSettings = {\r\n\t\t\tenableEmojiHovering: true,\r\n\t\t\tenableEmojiStatisticsButton: true\r\n\t\t};\r\n\t\tvar settings = BDfunctionsDevilBro.loadAllData(this.getName(), \"settings\");\r\n\t\tvar saveSettings = false;\r\n\t\tfor (var key in defaultSettings) {\r\n\t\t\tif (settings[key] == null) {\r\n\t\t\t\tsettings[key] = settings[key] ? settings[key] : defaultSettings[key];\r\n\t\t\t\tsaveSettings = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (saveSettings) {\r\n\t\t\tBDfunctionsDevilBro.saveAllData(settings, this.getName(), \"settings\");\r\n\t\t}\r\n\t\treturn settings;\r\n\t}", "function parse_settings() {\n console.log(\"parsing settings\");\n var tissues = [],\n datasets = [],\n dataset_names = Object.keys($scope.datasets), \n freq = [];\n for(var i = 0; i < dataset_names.length;i++){\n if($scope.datasets[dataset_names[i]].selected === true){\n datasets.push(dataset_names[i]);\n }\n }\n freq = getLogFrequencies($scope.selected.pointsPerDecade,$scope.selected.startFreq,log10($scope.selected.stopFreq/$scope.selected.startFreq));\n return {\n tissues: tissues,\n datasets: datasets,\n freq: freq\n };\n}", "function loadSettings(){\n var obj;\n fs.readFile('settings.json', 'utf8', (err, data) => {\n if(err){\n console.log(\"settings file doesnt exist\"); // we create one later\n return;\n }\n obj = JSON.parse(data);\n settings = {\n channel: obj.channel,\n botName: obj.botName,\n botPw: obj.botPw,\n ytKey: obj.ytKey\n }\n console.log(\"loaded settings: \" + settings.channel);\n });\n}", "getSettings(){\n this.send(\"settings-get\");\n }", "getStoredSettings(level) {\n if (window.localStorage && window.localStorage.getItem(`SNAKE_SETTINGS_${level}`)) {\n let settings = new Settings(level, JSON.parse(window.localStorage.getItem(`SNAKE_SETTINGS_${level}`)));\n return settings;\n } else {\n return null;\n }\n }", "function getSettingsAndStart() {\n chrome.storage.local.get(null, function (settings) {\n // Begin parsing and injecting views\n if (window.location.href.indexOf('spryker-simplicity') !== -1) {\n if (window.location.href.indexOf('merge_requests') !== -1) {\n if ($.isNumeric(window.location.pathname.split('/')[4])) {\n addPipelineButton()\n addEnvironmentButton()\n }\n }\n }\n })\n}", "get settings() {\n return this._settings.state\n }", "function loadSettings() {\r\n\tvar fileId = BumpTop.openFile(\"sharing.json\", \"r\");\r\n\tif (fileId !== -1) {\r\n\t\tvar contents = BumpTop.readFile(fileId);\r\n\t\tBumpTop.closeFile(fileId);\r\n\t\tvar settings = JSON.parse(contents);\r\n\t\tdebug.assert(typeof settings !== \"undefined\");\r\n\t\tif (!$.isArray(settings)) {\r\n\t\t\tsettings = [settings];\r\n\t\t}\r\n\t\tfor (var i = 0; i < settings.length; i++) {\r\n\t\t\ttabArray.push(new Tab(settings[i]));\r\n\t\t}\r\n\t}\r\n}", "function getSettings() {\n var docProperties = PropertiesService.getDocumentProperties();\n\n t = HtmlService.createTemplateFromFile('Settings');\n\n t.apiKey = docProperties.getProperty('FUZZYAI_API_KEY');\n t.agentID = docProperties.getProperty('FUZZYAI_AGENT_ID');\n\n return t.evaluate();\n}", "function getSettings() {\n\t\tlog.debug( 'getSettings()' );\n\t\tvar getApiURLDeferredObj = $.Deferred();\n\t\tchrome.storage.local.get('ldengine_api_url', function(items) {\n\n\t\t\t// If there's nothing in there, default to the default production version.\n\t\t\tAPI_URL = items.ldengine_api_url || \"https://apps.ldengine.com\";\n\n\t\t\t// If there's no protocol specified, use https by default.\n\t\t\tif( API_URL.indexOf( \"http\" ) < 0 )\n\t\t\t\tAPI_URL = \"https://\" + API_URL;\n\n\t\t\tgetApiURLDeferredObj.resolve();\n\t\t});\n\t\treturn getApiURLDeferredObj.promise();\n\t}", "function loadSettings() {\r\r if ( !app.project.file ) {\r alert(\"No AEP opened\");\r return null;\r }\r\r aepPath = app.project.file.toString();\r aepDir = aepPath.match( /^(.*)\\// )[1]; \r settingsPath = aepDir + '/project-settings.json';\r settingsFile = File( settingsPath );\r\r if ( settingsFile === false ) { // if it is really there\r alert(\"Cannot open project-settings.json\");\r return null;\r }\r\r try {\r settingsFile.open('r');\r var content = settingsFile.read(); \r settings = JSON.parse( content );\r settingsFile.close();\r \r } catch ( err ) {\r alert(\"Cannot parse project-settings.json\");\r }\r\r settings[\"project_path\"] = aepDir;\r\r return settings;\r}", "function retrieve_settings() {\n display_setting = wkof.settings.dashboard_level.display;\n }", "function loadSettings() {\n let savedSettings = {};\n try {\n savedSettings = readFileSync(SETTINGS_FILE, SETTINGS_TYPE);\n if (typeof savedSettings === 'undefined') {\n savedSettings = {};\n }\n } catch (ex) {\n // Allow fallthrough\n }\n\n return objectAssign(getDefaultSettings({ hasElevationGain }), savedSettings);\n}", "function getGlobalSettings() {\n return global_settings;\n}", "function load_settings() {\n var defaults = {\n lock: 100,\n display_as: \"score\",\n display_lessons_left: false,\n apprentice1: 1,\n apprentice2: 1,\n apprentice3: 1,\n apprentice4: 1,\n guru1: 0,\n guru2: 0,\n master: 0,\n enlightened: 0\n };\n return wkof.Settings.load('lesson_lock', defaults);\n }", "getCurrentSettings () {\n\t\t\treturn this.settings\n\t\t}", "function getWebsiteSettings(site){\n return websiteMap[site];\n}", "function loadSettings(settings) {\n try {\n return __webpack_require__(\"./settings sync recursive ^\\\\.\\\\/.*\\\\.json$\")(\"./\" + settings + '.json');\n } catch(e) {\n return {};\n }\n}", "function getSettings () {\n return new Promise(function(resolve) {\n browser.storage.sync.get(['settings'], function(storage) {\n settings = storage.settings\n resolve()\n }); \n });\n}", "function getTemplateSettings(){\n return TEMPLATE_SETTINGS;\n }", "function enviroGetSettings () {\n\t document.querySelector('[environment]').components['environment'].logPreset();\n\t}", "function getUserOptions() {\n\n\t/* READ USER SETTINGS FILE HERE */\t\n\twindow.gBulkDeleteDays = 3;\n\twindow.gMarkReadOnVisit = true;\n\twindow.gFeedOrder = 0;\n\twindow.gDefaultFormats = [ 0, 1, 0];\n\twindow.gFormat = gDefaultFormats[gcSTATUS_UNREAD];\n}", "configure(level) {\n const storage = window.localStorage;\n const key = `SNAKE_SETTINGS_${level}`;\n if (storage && storage.getItem(key)) {\n this.settings = new Settings(level, this.getStoredSettings(level));\n\n } else {\n this.settings = new Settings(level);\n this.saveHighScore(this.settings, level);\n this.updateStoredSettings(settings, level)\n }\n return this.settings;\n }", "function load_settings() {\n chrome.storage.local.get(usedKeys, function (result) {\n enabled.checked = result[usedKeys[0]];\n interval.value = result[usedKeys[1]];\n });\n}", "function loadOptions() {\n chrome.storage.sync.get(\"settings\", function(items) {\n loadSetting(items.settings.timerLength, 'time', 300);\n loadSetting(items.settings.tabGoal, 'tabGoal', 10);\n loadSetting(items.settings.tabLimit, 'tabLimit', 15);\n });\n}", "function getSettings() {\n var tx = db.transaction(['setting'], 'readonly');\n var store = tx.objectStore('setting');\n //Since there is only one setting, we just get the first one\n let request = store.get(1);\n return request;\n}", "static _getSettings(page) {\n // Util.purgeSettings();\n const allValues = GM_listValues();\n if (MP.DEBUG) {\n console.log('_getSettings(', page, ')\\nStored GM keys:', allValues);\n }\n Object.keys(page).forEach((scope) => {\n Object.keys(page[Number(scope)]).forEach((setting) => {\n const pref = page[Number(scope)][Number(setting)];\n if (MP.DEBUG) {\n console.log('Pref:', pref.title, '| Set:', GM_getValue(`${pref.title}`), '| Value:', GM_getValue(`${pref.title}_val`));\n }\n if (pref !== null && typeof pref === 'object') {\n const elem = (document.getElementById(pref.title));\n const cases = {\n checkbox: () => {\n elem.setAttribute('checked', 'checked');\n },\n textbox: () => {\n elem.value = GM_getValue(`${pref.title}_val`);\n },\n dropdown: () => {\n elem.value = GM_getValue(pref.title);\n },\n };\n if (cases[pref.type] && GM_getValue(pref.title))\n cases[pref.type]();\n }\n });\n });\n }", "function Settings() {\n\tthis.s = new Array()\n\tthis.load()\n}", "function loadSettings()\n {\n if (typeof localStorage.unit != 'undefined') {\n my.settings.unit = localStorage.unit\n }\n }", "function loadSettings() {\r\n// load settings, if nothing is loaded, use default settings\r\n\tlet loadedSettings = localStorage.getItem(\"highlightFriendsSettings\");\r\n\tif (loadedSettings !== null) {\r\n\t\tsaveData = JSON.parse(loadedSettings);\r\n\t}\r\n}", "function getSettingsValues(){\n const settingsValues = localStorage.getItem('settingValues');\n if(settingsValues){\n return JSON.parse(settingsValues);\n }else{\n return[];\n }\n}", "function loadSettings() {\n const jsonSettings = localStorage.getItem(\"mafiaSettings\");\n try {\n if (jsonSettings) {\n settings = JSON.parse(jsonSettings);\n }\n } catch (e) {\n debug.log(\"String is not valid JSON\");\n // No point storing it then\n localStorage.removeItem(\"mafiaSettings\");\n // Use the current definition of settings (above)\n }\n}", "function getSettings(){\n\t//Reset the search settings arrays\n\tsearchStrings = [];\n\tlocations = [];\n\tradiuses =[];\n\n\t//Get the country\n\tcountry = document.getElementById(\"country\").value;\n\t//Get whether to include old results\n\tincludeOldResults = document.getElementById(\"includeOldResults\").checked;\n\n\t//For each search, get the info for the search\n\tfor(var i = 1; i <= searches; i++){\n\t\tsearchStrings[i-1] = document.getElementById(\"searchString\" + i).value;\n\t\tlocations[i-1] = document.getElementById(\"location\" + i).value;\n\t\tradiuses[i-1] = document.getElementById(\"radius\" + i).value;\n\t}\n\n\tconsole.log(\"Got settings\");\n}", "function initSettings() {\n\t\tns.settings.exampleSetting = 1337;\n\t}", "function loadSettings () {\n storage.get(vatobeStorage, function (error, data) {\n if (error) throw error\n // load storage into app state\n var intervalRange = data.intervalRange || data.interval // for backwards compatibility\n appState.interval = convertRangeToMillis(intervalRange)\n appState.speak = data.speak\n appState.notification = data.notification\n // match UI to the stored settings\n range.value = data.intervalRange\n speak.checked = data.speak\n notification.checked = data.notification\n })\n}", "function loadLocalSettings() {\n if (typeof (window.localStorage) === 'undefined') {\n console.log(\"Local settings cannot be saved. No web storage support!\");\n return;\n }\n\n if (typeof (localStorage.favoritePresets) !== 'undefined' && localStorage.favoritePresets !== null) {\n favoritePresetID = JSON.parse(localStorage.favoritePresets);\n console.log(\"Loading Parameter [localStorage.favoritePresets]:\");\n console.log(favoritePresetID);\n }\n\n if (typeof (localStorage.currentAddress) !== 'undefined' && localStorage.currentAddress !== null) {\n address = localStorage.currentAddress;\n console.log(\"Loading Parameter [localStorage.currentAddress]:\");\n console.log(address);\n }\n}", "_loadSettingFor(type, template) {\n\t\tconst setting_name = template.label || template.panelName;\n\t\tif(!setting_name) return null;\n\n\t\tconst setting = Storage.get(settings_map[setting_name.toLowerCase()]);\n\n\t\tif(type === ValueField) {\n\t\t\treturn ['value', setting || '', setting_name];\n\t\t}\n\t\telse if(type === ToggleButton) {\n\t\t\treturn ['isOn', setting, setting_name];\n\t\t}\n\t\telse if(type === RadioPanel || type === Dropdown) {\n\t\t\treturn ['selected', setting, setting_name];\n\t\t}\n\n\t\treturn null;\n\t}", "function getglobalsettings() {\r\r\n // get these/set from local storage when loading the any page\r\r\n coinpricearray = getitem('coinpricearray', []); // TES coinlist. refreshed on successful api call\r\r\n global_num = getitem('global_num', \"100\"); // how many in total to load?\r\r\n global_smallnum = getitem('global_smallnum', \"10\"); // load top '10's\r\r\n global_interval = getitem('global_interval', \"300000\"); //5mins in miliseconds\r\r\n global_icons = getitem('global_icons', \"1\"); // show icons in (use -1 for false)\r\r\n global_allicons = getitem('global_allicons', \"1\"); // show icons everywhere\r\r\n global_numindex = getitem('global_numindex', \"10\"); // index, how many coins to count in summary\r\r\n global_tickerurl = getitem('global_tickerurl', \"https://api.coinmarketcap.com/v1/ticker/?limit=\"); + global_num; // watchlist\r\r\n\r\r\n // defaultwatchlist = [\"BTC\", \"ETH\", \"BCH\", \"XRP\", \"LTC\"] // top 5 by market cap\r\r\n global_coinlist = getitem('global_coinlist', [\"BTC\", \"ETH\", \"BCH\", \"XRP\", \"LTC\"]); // default watchlist (note: Object) \r\r\n\r\r\n global_currency = getitem('global_currency', \"USD\"); // not used yet.\r\r\n\r\r\n}", "function getAnalyticsConfig()\n\t{\n\n\n\t\tvar configuration = {};\n\n\t\t//Update default settings from window._analytics\n\t\tvar _analytics = window._analytics || {};\n\t\tObject.keys( _analytics ).forEach( function( key ){\n\t\t\tconfiguration[key] = configuration[key] || _analytics[key];\n\t\t});\n\n\t\t//Add updates from local storage\n\t\tObject.keys( configuration ).forEach( function( key ){\n\t\t\tif ( localStorage.getItem(key) !== null ){\n\t\t\t\tconfiguration[key] = localStorage.getItem(key);\n\t\t\t}\n\t\t});\n\n\t\t//Add updates from the url\n\t var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');\n\t for(var i = 0; i < hashes.length; i++)\n\t {\n\t var hash = hashes[i].split('=');\n\t var key = hash[0];\n\t var value = hash[1];\n\t if ( key in configuration ){\n\t \tconfiguration[key] = ( value === 'true' || value === true );\n\t \t//Cache update in session storage to persist it across pages\n\t \tlocalStorage.setItem( key, value );\n\t }\n\t }\n\t return configuration;\n\t}", "function initSettings() {\n const PUBLIC_CONFIGURE_SETTINGS = [\n {\n key: SETTING_KEYS.TOOLTIP_POSITION,\n settings: {\n name: i18n('settings.TOOLTIP_POSITION.name'),\n hint: i18n('settings.TOOLTIP_POSITION.hint'),\n type: String,\n config: true,\n default: 'right',\n choices: {\n top: i18n('settings.TOOLTIP_POSITION.choices.top'),\n right: i18n('settings.TOOLTIP_POSITION.choices.right'),\n bottom: i18n('settings.TOOLTIP_POSITION.choices.bottom'),\n left: i18n('settings.TOOLTIP_POSITION.choices.left'),\n overlay: i18n('settings.TOOLTIP_POSITION.choices.overlay'),\n surprise: i18n('settings.TOOLTIP_POSITION.choices.surprise'),\n doubleSurprise: i18n('settings.TOOLTIP_POSITION.choices.doubleSurprise'),\n },\n },\n },\n {\n key: SETTING_KEYS.FONT_SIZE,\n settings: {\n name: i18n('settings.FONT_SIZE.name'),\n hint: i18n('settings.FONT_SIZE.hint'),\n type: Number,\n config: true,\n range: {\n min: 1,\n step: 0.1,\n max: 2.5,\n },\n default: 1.2,\n },\n },\n {\n key: SETTING_KEYS.MAX_ROWS,\n settings: {\n name: i18n('settings.MAX_ROWS.name'),\n hint: i18n('settings.MAX_ROWS.hint'),\n type: Number,\n config: true,\n range: {\n min: 1,\n step: 1,\n max: 20,\n },\n default: 5,\n },\n },\n {\n key: SETTING_KEYS.DATA_SOURCE,\n settings: {\n name: i18n('settings.DATA_SOURCE.name'),\n hint: i18n('settings.DATA_SOURCE.hint'),\n type: String,\n scope: 'world',\n config: true,\n restricted: true,\n default: 'actor.data.data',\n },\n },\n {\n key: SETTING_KEYS.DARK_THEME,\n settings: {\n name: i18n('settings.DARK_THEME.name'),\n hint: i18n('settings.DARK_THEME.hint'),\n type: Boolean,\n config: true,\n default: false,\n },\n },\n {\n key: SETTING_KEYS.SHOW_ALL_ON_ALT,\n settings: {\n name: i18n('settings.SHOW_ALL_ON_ALT.name'),\n hint: i18n('settings.SHOW_ALL_ON_ALT.hint'),\n type: Boolean,\n scope: 'world',\n config: true,\n restricted: true,\n default: true,\n },\n },\n {\n key: SETTING_KEYS.SHOW_TOOLTIP_FOR_HIDDEN_TOKENS,\n settings: {\n name: i18n('settings.SHOW_TOOLTIP_FOR_HIDDEN_TOKENS.name'),\n hint: i18n('settings.SHOW_TOOLTIP_FOR_HIDDEN_TOKENS.hint'),\n type: Boolean,\n scope: 'world',\n config: true,\n restricted: true,\n default: false,\n },\n },\n {\n key: SETTING_KEYS.DEBUG_OUTPUT,\n settings: {\n name: i18n('settings.DEBUG_OUTPUT.name'),\n hint: i18n('settings.DEBUG_OUTPUT.hint'),\n type: Boolean,\n scope: 'world',\n config: true,\n restricted: true,\n default: false,\n },\n },\n ];\n const HIDDEN_CONFIGURE_SETTINGS = [\n {\n key: SETTING_KEYS.GM_SETTINGS,\n settings: {\n type: Object,\n scope: 'world',\n restricted: true,\n default: {},\n },\n },\n {\n key: SETTING_KEYS.PLAYER_SETTINGS,\n settings: {\n type: Object,\n scope: 'world',\n restricted: true,\n default: {},\n },\n },\n {\n key: SETTING_KEYS.ACTORS,\n settings: {\n type: Object,\n scope: 'world',\n restricted: true,\n default: [],\n },\n },\n {\n key: SETTING_KEYS.CLIPBOARD,\n settings: {\n type: Object,\n default: [],\n },\n },\n ];\n\n registerTooltipManager();\n registerSettings([...PUBLIC_CONFIGURE_SETTINGS, ...HIDDEN_CONFIGURE_SETTINGS]);\n}", "function loadPageVariables() {\r\n \"use strict\";\r\n var tmp = JSON.parse(localStorage.getItem('TrimpzSettings'));\r\n if (tmp !== null) {\r\n trimpzSettings = tmp;\r\n }\r\n}", "function getSettings() {\n\treturn {\n\t\tstandard: {\n\t\t\talwaysUseBid: false,\n\t\t\tadserverTargeting: [{\n\t\t\t\tkey: 'hb_bidder',\n\t\t\t\tval: function val(_ref) {\n\t\t\t\t\tvar bidderCode = _ref.bidderCode;\n\t\t\t\t\treturn bidderCode;\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tkey: 'hb_adid',\n\t\t\t\tval: function val(_ref2) {\n\t\t\t\t\tvar adId = _ref2.adId;\n\t\t\t\t\treturn adId;\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tkey: 'hb_pb',\n\t\t\t\tval: function val(bidResponse) {\n\t\t\t\t\tvar maxCpm = DEFAULT_MAX_CPM;\n\t\t\t\t\tif (videoBiddersCap50.includes(bidResponse.bidderCode)) {\n\t\t\t\t\t\tmaxCpm = 50;\n\t\t\t\t\t}\n\t\t\t\t\treturn transformPriceFromCpm(bidResponse.cpm, maxCpm);\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tkey: 'hb_size',\n\t\t\t\tval: function val(_ref3) {\n\t\t\t\t\tvar size = _ref3.size;\n\t\t\t\t\treturn size;\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tkey: 'hb_uuid',\n\t\t\t\tval: function val(bidResponse) {\n\t\t\t\t\treturn bidResponse.bidderCode === 'appnexusAst' && ad_engine_[\"context\"].get('custom.appnexusDfp') || bidResponse.bidderCode === 'rubicon' && ad_engine_[\"context\"].get('custom.rubiconDfp') ? bidResponse.videoCacheKey : 'disabled';\n\t\t\t\t}\n\t\t\t}]\n\t\t}\n\t};\n}", "function loadExtSettings() {\n extSettings = JSON.parse(localStorage.getItem(\"perpectiveGridSettings\"));\n }", "get settingsPath() {\n const environment = this.services.get(environment_1.IEnvironmentService);\n return path.join(environment.userDataPath, \"coder.json\");\n }", "function getSettings(){\n $.get(SERVER_ADDRESS+'/settings',function(data){\n var settings = $.parseJSON(data);\n for (var i=0; i<settings.length;i++){\n $('#'+settings[i][0]).attr('value',settings[i][1]);\n }\n });\n}", "function getSettings(callback2) {\n var settings = _cacheSettings;\n var callback = function(csettings) {\n _cacheSettings = csettings;\n refresh = csettings.refresh;\n debug = csettings.debug;\n apikey = csettings.apikey;\n if (csettings.resolverURL) {\n resolverURL = csettings.resolverURL;\n }\n if (csettings.rendererURL) {\n rendererURL = csettings.rendererURL;\n }\n if (callback2) callback2(csettings);\n };\n\n getValue(\"settings\", function(val) {\n if (val != undefined) {\n settings = val;\n }\n callback(settings);\n });\n return settings;\n}", "function GetSettings(key = null) {\n var Settings = GetFromStorage(\"Proxer-Playlist_Settings\");\n if(Settings === null) {\n Settings = SetSettings();\n }\n return (key!==null)?Settings[key]:Settings;\n}", "function getSettings() {\n var settings = _printerDialog.getSettings();\n return settings;\n }", "function getUserSettings() {\n\treturn setUIPanelSettings();\n}", "function GetSettingAndGenerate(source) {\r\n if (isLocalComputer) {\r\n var requestURL = hostAddress + 'php/readSetting.php?setting=all&source=' + source;\r\n } else {\r\n var requestURL = hostAddress + 'php/readSetting.php?setting=all';\r\n }\r\n $.ajax({\r\n url: requestURL,\r\n async: true,\r\n success: function (result) {\r\n setting = JSON.parse(result);\r\n },\r\n complete: function () {\r\n losVisible = setting.initial_los_marker == 1;\r\n cpaVisible = setting.cpa == 1;\r\n syncPointVisible = setting.syncpoint == 1;\r\n feedbackVisible = setting.feedback == 1;\r\n autoplayConflict = setting.autoplay_conflict == 1;\r\n autoplayResolution = setting.autoplay_resolution == 1;\r\n dataRecording = setting.data_recording == 1;\r\n playSpeed = parseFloat(setting.play_speed);\r\n timeLimit = parseInt(setting.time_limit);\r\n scenarioPerBreak = parseInt(setting.scenario_per_break);\r\n breakTime = parseInt(setting.break_time);\r\n restTime = parseInt(setting.rest_time);\r\n scenarioSource = setting.scenario_source;\r\n vs.FlighStroke = setting.flight_stroke;\r\n vs.ThickerStroke = setting.flight_stroke_selected;\r\n scenarioId = parseInt(setting.last_scenario_id) + 1; \r\n AfterGetSetting();\r\n }\r\n });\r\n}", "function loadsettings() {\r\n _('loadsettings');\r\n refreshuser();\r\n if (!status.settingsloaded) {\r\n var settings = storage.get(':TWEETFILTER:', {});\r\n if (!defined(settings[user.id])) {\r\n settings[user.id] = {};\r\n }\r\n settings = settings[user.id];\r\n queries = [];\r\n if (!defined(settings.queries)) {\r\n settings.queries = [];\r\n }\r\n for (var q=0,len=settings.queries.length;q<len;q++) {\r\n addquery(settings.queries[q].query, settings.queries[q].enabled);\r\n }\r\n options = $.extend({}, optiondefaults);\r\n if (!defined(settings.options)) {\r\n settings.options = {};\r\n }\r\n for (var option in settings.options) {\r\n if (defined(optiondefaults[option], 'boolean')) {\r\n options[option] = settings.options[option];\r\n }\r\n }\r\n if (defined(settings.relationships)) {\r\n relationships = settings.relationships;\r\n }\r\n savesettings();\r\n status.settingsloaded = true;\r\n }\r\n }", "function loadUserSettings(){\n\t\tvar user = wialon.core.Session.getInstance().getCurrUser();\n\t\tvar settings = user.getCustomProperty('__app__logbook_settings', '{}');\n\t\tsettings = JSON.parse(settings);\n\t\thome = office = {\n\t\t\t'name': '',\n\t\t\t'id': ''\n\t\t};\n\t\thoh = payment = false;\n\t\theader_tmpl = footer_tmpl = 1;\n\t\tpayment_less = payment_more = payment_mileage = 0;\n\n\t\tif (settings['geofences']) {\n\t\t\tif (settings['geofences']['home']) {\n\t\t\t\thome = settings['geofences']['home'];\n\t\t\t}\n\n\t\t\tif (settings['geofences']['office']) {\n\t\t\t\toffice = settings['geofences']['office'];\n\t\t\t}\n\t\t}\n\t\tif (settings['print']) {\n\t\t\tif (settings['print']['hoh']) {\n\t\t\t\thoh = settings['print']['hoh'];\n\t\t\t}\n\t\t\tif (settings['print']['payment']) {\n\t\t\t\tpayment = settings['print']['payment'];\n\t\t\t}\n\t\t\tif (settings['print']['header_tmpl']) {\n\t\t\t\theader_tmpl = settings['print']['header_tmpl'];\n\t\t\t}\n\t\t\tif (settings['print']['footer_tmpl']) {\n\t\t\t\tfooter_tmpl = settings['print']['footer_tmpl'];\n\t\t\t}\n\t\t\tif (settings['print']['payment_less']) {\n\t\t\t\tpayment_less = parseFloat(settings['print']['payment_less']);\n\t\t\t}\n\t\t\tif (settings['print']['payment_more']) {\n\t\t\t\tpayment_more = parseFloat(settings['print']['payment_more']);\n\t\t\t}\n\t\t\tif (settings['print']['payment_mileage']) {\n\t\t\t\tpayment_mileage = parseInt(settings['print']['payment_mileage']);\n\t\t\t}\n\t\t}\n\t\t// ui settings\n\t\tif (settings['ui_flags']) {\n\t\t\tui_flags = settings['ui_flags'];\n\t\t}\n\t\t// mileage\n\t\tif (settings['mileage_values']) {\n\t\t\tmileage_values = settings['mileage_values'];\n\t\t}\n\t}", "async hoist(client)\n\t{\n\t\t/*\n\t\t * Grab some of the client stuff and bind it to instance variables\n\t\t */\n\t\tthis.client = client;\n\t\tthis.user = client.user;\n\t\tlet settings = this.getJSONFromFile(__dirname+'/settings.json'),\n\t\t\tsettingsToHoist = this.getSettingsToSave();\n\t\tfor(let setting in settingsToHoist)\n\t\t{\n\t\t\tthis[setting] = settings[setting]?settings[setting]:{}\n\t\t}\n\t\tthis.listen();\n\t\t\n\t\treturn settings;\n\t}", "function getAccountSettings() {\n APIUtils.getAllUserAccountProperties()\n .then((settings) => {\n $scope.accountSettings = settings;\n })\n .catch((error) => {\n console.log(JSON.stringify(error));\n $scope.accountSettings = null;\n })\n }", "_loadSettings(settings) {\n const editorState = this.getContext().editorState;\n editorState.settings.load(settings);\n editorState._setDirty('settings');\n editorState.propagateUpdates();\n }", "function getUserPreferences() {\n let formData = new FormData(document.forms[0]);\n minimumSpeed = Number(formData.get(\"MinimumSpeedSlider\"));\n maximumSpeed = Number(formData.get(\"MaximumSpeedSlider\"));\n minimumPrecision = Number(formData.get(\"MinimumPrecisionSlider\"));\n maximumPrecision = Number(formData.get(\"MaximumPrecisionSlider\"));\n teamAColor = formData.get(\"TeamAColorPicker\");\n teamBColor = formData.get(\"TeamBColorPicker\");\n }", "function settingsSetup() {\n updateSettingsValues();\n }", "function set_basic_settings(){ \r\n var saved_settings=[\"USERNAME\", \"RACE\",\r\n \r\n \"SPECIAL_LOCATIONS\",\"VILLAGES\",\"USE_TIMELINE\",\"USE_ALLY_LINES\",\r\n \"USE_CUSTOM_SIDEBAR\",\"USE_MARKET_COLORS\",\"USE_ENHANCED_RESOURCE_INFO\",\r\n \"USE_EXTRA_VILLAGE\",\"USE_SERVER_TIME\",\"USE_DEBUG_MODE\", \r\n \"SHOW_TIMELINE_REPORT_INFO\", \"COLLAPSE_TIMELINE\",\r\n \r\n \"TIMELINE_SIZES_HISTORY\",\"TIMELINE_SIZES_FUTURE\", \"TIMELINE_DISTANCE_HISTORY\",\r\n \"TIMELINE_SIZES_HEIGHT\", \"TIMELINE_SIZES_WIDTH\", \"TIME_DIFFERENCE\",\r\n \"TIMELINE_COLLAPSED_WIDTH\", \"TIMELINE_COLOR\", \"KEEP_TIMELINE_UPDATED\",\r\n \"TIMELINE_SCALE_WARP\",\r\n\r\n \"BUILDING_COLOR\", \"ATTACK_COLOR\", \"REPORT_COLOR\",\r\n \"MARKET_COLOR\", \"RESEARCH_COLOR\", \"PARTY_COLOR\"\r\n ];\r\n\r\n for (i in saved_settings) {\r\n var v = saved_settings[i];\r\n x = GM_getValue(prefix(v)); \r\n if (x!==undefined && x!==\"\") {\r\n try {\r\n eval(v+\"=\"+x);\r\n } catch (e) {\r\n eval(v+\"=x\"); \r\n }\r\n }\r\n }\r\n TIMELINE_EVENT_COLORS = [BUILDING_COLOR, ATTACK_COLOR, REPORT_COLOR, MARKET_COLOR, RESEARCH_COLOR, PARTY_COLOR];\r\n }", "function getSettings(defaultSettings) {\n\t\tconst d = deferred();\n\t\t// Will be chrome.storage.sync in extension environment,\n\t\t// otherwise will fallback to localstorage\n\t\tdbSyncAlias.get(defaultSettings, result => {\n\t\t\td.resolve(result);\n\t\t});\n\t\treturn d.promise;\n\t}", "function fillInSettings() {\n chrome.storage.sync.get(['bigbluebutton_settings', 'settings_time'], result => {\n document.getElementById('gl-url').value = result.bigbluebutton_settings.gl_url;\n });\n }", "function getStoredSettings() {\n\t\t// Remove old ITG Appen settings\n\t\tif (localStorage.getItem(\"firstTime\")) localStorage.removeItem('firstTime');\n\t\tif (localStorage.getItem(\"myScheduleName\")) localStorage.removeItem(\"myScheduleName\");\n\t\tif (localStorage.getItem(\"myScheduleID\")) localStorage.removeItem(\"myScheduleID\")\n\t\tif (localStorage.getItem(\"myScheduleSource\")) localStorage.removeItem(\"myScheduleSource\");\n\t\tif (localStorage.getItem(\"otherScheduleName\")) localStorage.removeItem(\"otherScheduleName\");\n\t\tif (localStorage.getItem(\"otherScheduleID\")) localStorage.removeItem(\"otherScheduleID\");\n\t\tif (localStorage.getItem(\"otherScheduleSource\")) localStorage.removeItem(\"otherScheduleSource\");\n\t\tif (localStorage.getItem(\"doubleSchedules\")) localStorage.removeItem(\"doubleSchedules\");\n\t\tif (localStorage.getItem(\"calendarID\")) localStorage.removeItem(\"calendarID\");\n\t\tif (localStorage.getItem(\"calendarSource\")) localStorage.removeItem(\"calendarSource\");\n\n\t\tvar stored = (localStorage.getItem('itgappen_settings')) ? JSON.parse(localStorage.getItem('itgappen_settings')):{};\n\t\treturn stored;\n }", "constructor() {\n this.settings = {};\n this.scripts = [];\n }", "function getPrefs()\n{\n\t\t// default value is 1 (for true)\n\tif(PlayerPrefs.GetInt(\"useAcc\", 1) == 0)\n\t{\n\t\taccelerometer = false;\n\t}\n\telse\n\t{\n\t\taccelerometer = true;\n\t}\n\n\t\t// default value is 2.0\n\tsensitivity = PlayerPrefs.GetFloat(\"sensitivity\", 2.0);\n}", "function settingsInit() {\r\n\tvar settingsCookie = cookieRead('settings');\r\n\t\r\n\t// If the cookie exists, read it into settings, otherwise load the defaults\r\n\ttry {\r\n\t\tsettings = JSON.parse( decodeURIComponent(settingsCookie) );\r\n\t\t\r\n\t\tif ( settingsUpdate() )\r\n\t\t\tsettingsSave();\r\n\t\t\t\r\n\t} catch (err) {\r\n\t\talert('Your saved settings are corrupt, so the defaults have been loaded instead.\\nIf you have saved your settings, try to import them.\\nError: '+err);\r\n\t\tcookieDelete('settings');\r\n\t\tindexReload();\r\n\t}\r\n\t\r\n\tsettingsElements = {};\t\t\r\n}", "constructor(settings) {\n this.settings = settings;\n }", "getUserSettings () {\n let option = this,\n userSettings = option.userSettings || {};\n \n return userSettings[ Meteor.userId() ] || {}\n }", "function GetSamplePreferences()\n{\n var xmlstring = Radiology.GetPreference(SAMPLE_PREFS_NAME, SAMPLE_PREFS_TYPE);\n\n if (xmlstring != \"\")\n {\n var doc = xmldso.XMLDocument;\n doc.loadXML(xmlstring);\n\n var root = doc.documentElement;\n\n var nodeList = doc.getElementsByTagName(SAMPLE_ROOT);\n \n var elem = nodeList.item(0).getElementsByTagName(SAMPLE_ONE_TAG);\n m_Enable_Logging = elem.item(0).text;\n var elem = nodeList.item(0).getElementsByTagName(SAMPLE_TWO_TAG);\n m_Log_Directory = elem.item(0).text;\n var elem = nodeList.item(0).getElementsByTagName(SAMPLE_THREE_TAG);\n m_Log_Prefix = elem.item(0).text;\n var elem = nodeList.item(0).getElementsByTagName(SAMPLE_FOUR_TAG);\n m_Log_Options = elem.item(0).text;\n \n }\n}", "function settings(args) {\n let sets = Terminal.settingsSets\n if (args.length == 0) {\n var names = []\n for (let i = 0; i < sets.length; i++) {\n names[i] = sets[i]().name();\n }\n return names.join(\",\")\n } \n return sets.byName(args[0])[args[1]]()\n}", "function getLocalSettings() {\n var settings = Windows.Storage.ApplicationData.current.localSettings.values['serversEnabled'];\n if (settings != undefined && settings != null) {\n serversSettings = JSON.parse(settings);\n list.notifyReload();\n }\n }", "function Settings(_settings) {\r\n if (_settings === void 0) { _settings = new Map(); }\r\n this._settings = _settings;\r\n }", "function GetSettings(){\n socket.emit('client_data', Update);\n }", "function loadPreferencesOnStartup() {\n\t\tthis.language = this.setLanguage();\n\t\tthis.dictionary = window['lang_' + this.language];\n\t\tthis.routingLanguage = this.setRoutingLanguage();\n\t\tthis.distanceUnit = this.setDistanceUnit();\n\t\tthis.version = this.setVersion();\n\n\t\t//return GET variables that have to be applied to other objects\n\t\treturn readGetVars();\n\t}", "function getSetting() {\n /* eslint-disable dot-notation,@typescript-eslint/dot-notation */\n return (0, plink_1.config)()['@wfh/express-app'];\n}", "function additionalSettings(){\n\n\n}", "function loadFile() //loads settings on first load of app\n{\n\ttry {\n\t\tlet rawdata = fs.readFileSync(configFile);\n\t\tlet myJson = JSON.parse(rawdata);\n\n\t\tif (myJson.port_udp)\n\t\t{\n\t\t\tconfig.port_udp = myJson.port_udp;\n\t\t}\n\t\n\t\tif (myJson.port_serial)\n\t\t{\n\t\t\tconfig.port_serial = myJson.port_serial;\n\t\t}\n\n\t\tif (myJson.baudRate) {\n\t\t\tconfig.baudRate = myJson.baudRate;\n\t\t}\n\t}\n\tcatch(error) {\n\t\tconsole.log('Error parsing config file:');\n\t\tconsole.log(error);\n\t}\n}", "function loadSettings()\r\n{\r\n\t// prepare the object that will keep the panel statuses\r\n\tpanelsStatus = {};\r\n\t\r\n\t// find the cookie name\r\n\tvar start = document.cookie.indexOf(PANEL_COOKIE_NAME + \"=\");\r\n\tif (start == -1) return;\r\n\t\r\n\t// starting point of the value\r\n\tstart += PANEL_COOKIE_NAME.length+1;\r\n\t\r\n\t// find end point of the value\r\n\tvar end = document.cookie.indexOf(\";\", start);\r\n\tif (end == -1) end = document.cookie.length;\r\n\t\r\n\t// get the value, split into key:value pairs\r\n\tvar cookieValue = unescape(document.cookie.substring(start, end));\r\n\tvar panelsData = cookieValue.split(\"|\");\r\n\t\r\n\t// split each key:value pair and put in object\r\n\tfor (var i=0; i< panelsData.length; i++)\r\n\t{\r\n\t\tvar pair = panelsData[i].split(\":\");\r\n\t\tpanelsStatus[pair[0]] = pair[1];\r\n\t}\r\n}", "function Settings(){\n\tif(typeof Settings.initialized == \"undefined\") {\n\t\tSettings.prototype.loadLocal = function () {\n\t\t\t$('#flip-1').slider(); \n\t\t\t$('#flip-2').slider(); \n\t\t\t$('#selectmenu1').selectmenu(); \n\n\t\t\tif ($.jStorage.get('current_user').auto_share == true){\n\t\t\t\t$('#flip-1').val('on').slider('refresh');\n\t\t\t}\n\t\t\tif ($.jStorage.get('current_user').geoloc == true){\n\t\t\t\t$('#flip-2').val('on').slider('refresh');\n\t\t\t}\n\t\t\t// change select value from max_article_number\n\t\t\t$('#selectmenu1').val($.jStorage.get('current_user').max_article_number).selectmenu(\"refresh\");\n\t\t}\n\n\t\tSettings.prototype.setListeners = function () {\n\t\t\t$('#settingsForm').submit(function() {\n\n\t\t\t\tvar autoShare = $(\"#flip-1\").val();\n\t\t\t\tvar geoloc = $(\"#flip-2\").val();\n\t\t\t\tvar maxArticle = parseInt($(\"#selectmenu1\").val());\n\n\t\t\t\tvar data = JSON.stringify({\n\t\t\t\t\t\"autoShare\": autoShare,\n\t\t\t\t\t\"geoloc\": geoloc,\n\t\t\t\t\t\"maxArticle\": maxArticle,\n\t\t\t\t\t\"facebook\": $.jStorage.get('current_user').facebook,\n\t\t\t\t\t\"gplus\": $.jStorage.get('current_user').gplus,\n\t\t\t\t\t\"twitter\": $.jStorage.get('current_user').twitter,\n\t\t\t\t\t\"pays\": $.jStorage.get('current_user').country,\n\t\t\t\t\t\"ville\": $.jStorage.get('current_user').city,\n\t\t\t\t\t\"userId\": $.jStorage.get('current_user').id,\n\t\t\t\t});\n\n\t\t\t\t//@TODO : send preferences to server\n\t\t\t\t$.ajax({\n\t\t\t\t\turl: api_paths.settings,\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tcontentType: 'application/json',\n\t\t\t\t\tdata: data,\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: function(json) {\n\t\t\t\t\t\t$(\"#confirm\").popup( \"open\", {} );\n\t\t\t\t\t},\n\t\t\t\t\terror: function(ts) {\n\t\t\t\t\t\t$(\"#error\").popup( \"open\", {} );\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t};\n\n\t\tSettings.initialized = true;\n\t}\n\n\tvar current_user = $.jStorage.get('current_user');\n\tif(current_user != null){\n\t\tthis.loadLocal();\n\t\tthis.setListeners();\t\n\t}\n\n}", "function init() {\n\t\tif (!localStorage.getItem(SETTINGS_NAME)){\n\t\t\tlocalStorage.setItem(SETTINGS_NAME, JSON.stringify({}))\n\t\t}\n\n\t\t$('#importButton').click(() => {\n\t\t\tlet importSuccess = importSettingsHanlder($('textarea#importExportTextarea').val())\n\t\t\tif (importSuccess) {\n\t\t\t\tmarkProblem('textarea#importExportTextarea', false)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmarkProblem('textarea#importExportTextarea', true)\n\t\t\t}\n\t\t})\n\n\t\t$('#exportButton').click(() => {\n\t\t\t$('textarea#importExportTextarea').val(exportSettings())\n\t\t})\n\n\t\t$('#downloadSettingsLink').click(() => {\n\t\t\tlet link = document.getElementById('downloadSettingsLink');\n\t\t\tlink.href = makeTextFile(localStorage.getItem(SETTINGS_NAME))\n\t\t\t$('#downloadSettingsLink').attr('download', `rph-tools-settings.txt`)\n\t\t})\n\n\t\t$('#importFileInput').change(() => {\n\t\t\tlet file = $(\"#importFileInput\")[0].files[0];\n\t\t\t(async () => {\n\t\t\t\tfileContent = await file.text();\n\t\t\t\tlet successfulImport = importSettingsHanlder(fileContent)\n\n\t\t\t\tif (successfulImport === false) {\n\t\t\t\t\t$('#importSettingsStatus').first().text('There was a problem with the import')\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$('#importSettingsStatus').first().text('Import successful')\n\t\t\t\t}\n\t\t\t})();\n\t\t})\n\t\n\n\t\t$('#printSettingsButton').click(() => {\n\t\t\tprintSettings()\n\t\t})\n\n\t\t$('#deleteSettingsButton').click(() => {\n\t\t\tdeleteSettingsHanlder()\n\t\t})\n\t}", "function retrieveSettingsFromPersistantStorage() {\n\tconsole.log('Retrieving settings from persistent storage...');\n\n\n\treturn localforage.getItem(playgroundSettingsStoreKey).then((value) => {\n\t\tlet parsedObject = JSON.parse(value) || {};\n\t\tsettings = settings.mergeDeep(parsedObject);\n\t})\n\t.then(function() {\n\t\t// Look through the settings and fire off the actions since we just updated them from localforage\n\t\titerateOverObjectRecursively(settings, (path, value) => {\n\t\t\tif(Immutable.Map.isMap(value)) {\n\t\t\t\tlet actionCallback = value.get('action');\n\n\t\t\t\tif(actionCallback) {\n\t\t\t\t\tactionCallback(value.get('value'));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t})\n\t.catch(function(e) {\n\t\tconsole.log('Error retrieving', e);\n\n\t\tthrow e;\n\t});\n}", "async function initialize() {\n console.log(\"initializing\");\n try {\n let settings = await fs.readFile(SETTINGS_FILE, \"utf8\");\n settings = JSON.parse(settings);\n arduinoConstants = settings.arduinoConstants;\n bounds = settings.bounds;\n console.log(arduinoConstants);\n console.log(bounds);\n } catch (error) {\n console.error(error);\n }\n}", "function getSettings(def) {\n const settings = {};\n Object.keys(def)\n .filter(i => i === 'name')\n .filter(i => i === 'properties')\n .forEach((i) => {\n settings[i] = def[i];\n });\n return settings;\n}", "getConfig () {}", "function loadSettings() {\n settings = require('Storage').readJSON(\"qmsched.json\", true) || {};\n\n if (Array.isArray(settings)) {\n // migrate old file (plain array of schedules, qmOptions stored in global settings file)\n require(\"Storage\").erase(\"qmsched.json\"); // need to erase old file, or Things Break, somehow...\n let bOptions = require('Storage').readJSON('setting.json',true)||{};\n settings = {\n options: bOptions.qmOptions || {},\n scheds: settings,\n };\n // store new format\n save();\n // and clean up qmOptions from global settings file\n delete bOptions.qmOptions;\n require('Storage').writeJSON('setting.json',bOptions);\n }\n // apply defaults\n settings = Object.assign({\n options: {}, // Bangle options to override during quiet mode, default = none\n scheds: [\n // default schedule:\n {\"hr\": 8, \"mode\": 0},\n {\"hr\": 22, \"mode\": 1},\n ],\n }, settings);\n scheds = settings.scheds; options = settings.options;\n\n if (scheds.length && scheds.some(s => \"last\" in s)) {\n // cleanup: remove \"last\" values (used by older versions)\n set('scheds', scheds.map(s => {\n delete s.last;\n return s;\n }));\n }\n}", "getRemoteSettings() {\n const url = 'client-settings.json?v=' + new Date().getTime();\n\n $.ajax({\n method: \"GET\",\n url,\n dataType: \"json\",\n timeout: 10 * 1000\n }).done((myJson, textStatus, jqXHR) => {\n\n // test that return data is json\n if (jqXHR.getResponseHeader('content-type').indexOf('application/json') === -1) {\n console.log('getRemoteSettings() parse ERROR: got response but result data is not JSON. Skipping server settings.');\n \n this.getCookie();\n return;\n }\n\n // Got good server settings\n console.log('Found server default settings client-settings.json - Loading default settings:', myJson);\n\n // save settings to state\n this.updateStateFromSettings({\n ...myJson,\n isRemoteSettingsLoaded: true\n });\n\n this.getCookie();\n\n }).catch((err) => {\n console.log('getRemoteSettings() ajax ERROR:', err);\n console.log('Skipping server settings.');\n this.getCookie();\n });\n }" ]
[ "0.6978229", "0.68247634", "0.68226206", "0.6748168", "0.66652143", "0.65442395", "0.65340227", "0.65099037", "0.6440046", "0.643934", "0.6431932", "0.64244866", "0.64244866", "0.64244866", "0.6395378", "0.63864046", "0.6368854", "0.63415265", "0.63063", "0.6303605", "0.6294408", "0.62867117", "0.6254473", "0.6244787", "0.6239199", "0.62290365", "0.6226856", "0.622357", "0.6204471", "0.6165346", "0.613422", "0.6120126", "0.6077471", "0.6063728", "0.60528576", "0.59960854", "0.59746563", "0.5966538", "0.5954396", "0.59185624", "0.58877236", "0.5884988", "0.58798486", "0.5876399", "0.57863", "0.57750946", "0.5769718", "0.5764983", "0.5754684", "0.5721246", "0.5708308", "0.5704595", "0.56714225", "0.5626529", "0.56117165", "0.5594053", "0.55909467", "0.5585054", "0.5584302", "0.55810004", "0.55799073", "0.5574102", "0.5574038", "0.5566914", "0.5558038", "0.5551343", "0.5537206", "0.5527181", "0.55200255", "0.55109674", "0.55015606", "0.5500191", "0.5493771", "0.5492324", "0.54778695", "0.5475416", "0.5472699", "0.54583484", "0.5447396", "0.5444206", "0.5440637", "0.5436582", "0.5432469", "0.542466", "0.5421491", "0.5415341", "0.54094005", "0.5405384", "0.5401557", "0.5396781", "0.53726023", "0.5363953", "0.53560674", "0.53529835", "0.5337269", "0.53286827", "0.5320654", "0.53158206", "0.5311573", "0.5310166", "0.5307823" ]
0.0
-1
Makes sure every date between first and last has at least a 0 value
function fillEmptyDates(data) { if (data === null || data[0].values.length === 0) { return data; } if (Date.prototype.tomorrow == null) { Date.prototype.tomorrow=function(){ /* Returns a new date object*/ var newd = new Date(this); newd.setDate(newd.getDate()+1); return newd; }; } var newdata = []; var curDate = data[0].values[0].x; data[0].values.forEach(function(d){ while(curDate < d.x) { newdata.push({x:curDate, y:0}); curDate = curDate.tomorrow(); } newdata.push(d); curDate = curDate.tomorrow(); }); return [{key: 'Snaps Per Day', values: newdata}]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get hasValidDates() {\n let me = this,\n start = me.startDateMS,\n end = me.endDateMS;\n\n return !start || !end || end - start >= 0;\n }", "get hasValidDates() {\n const {\n startDateMS,\n endDateMS\n } = this;\n return !startDateMS || !endDateMS || endDateMS - startDateMS >= 0;\n }", "_rangeValidation(initialDate) {\n const that = this;\n\n if (initialDate.compare(that.min) === -1) {\n return that.min.clone();\n }\n else if (initialDate.compare(that.max) === 1) {\n return that.max.clone();\n }\n else {\n return initialDate;\n }\n }", "function validValues(arr) {\r\n var newArr = [];\r\n for (var i = 0; i < arr.length; i++) {\r\n if (arr[i] < 0 || arr[i] > 0) {\r\n newArr.push(arr[i]);\r\n }\r\n }\r\n return newArr;\r\n}", "function domainDefinitelyIncludeZero(scale) {\n if (scale.get('zero') !== false) {\n return true;\n }\n var domains = scale.domains;\n if (isArray(domains)) {\n return some(domains, function (d) { return isArray(d) && d.length === 2 && d[0] <= 0 && d[1] >= 0; });\n }\n return false;\n }", "get isValid() {\n let me = this,\n result = true; //super.isValid(),\n\n if (result) {\n let start = me.startDate,\n end = me.endDate;\n result = !start || !end || end - start >= 0;\n }\n\n return result;\n }", "check() {\n let now = Date.now();\n let limits = Object.keys(this.currentLimits);\n \n for(let i = 0; i < limits.length; i++) {\n if(this.limits[limits[i]].date - now <= 0) {\n this.setCount (limits[i], 0);\n }\n }\n }", "get isValid() {\n let result = true; //super.isValid(),\n\n if (result) {\n const {\n startDate,\n endDate\n } = this;\n result = !startDate || !endDate || endDate - startDate >= 0;\n }\n\n return result;\n }", "function checkDatesInvalid(startDate, endDate) {\n if (!startDate || !endDate || startDate > endDate) {\n newPeriodFormEl.reset();\n return true;\n }\n return false;\n}", "function fillDate(array) {\n var last = array.length - 1;\n var firstDate = array[0].datestamp;\n var lastDate = array[last].datestamp;\n\n var fullarray = betweenDate(firstDate, lastDate);\n\n return fullarray;\n }", "_isDisabled(month,minDate,maxDate){// First day of the month\nvar firstDate=new Date(0,0);firstDate.setFullYear(month.getFullYear());firstDate.setMonth(month.getMonth());firstDate.setDate(1);// Last day of the month\nvar lastDate=new Date(0,0);lastDate.setFullYear(month.getFullYear());lastDate.setMonth(month.getMonth()+1);lastDate.setDate(0);if(minDate&&maxDate&&minDate.getMonth()===maxDate.getMonth()&&minDate.getMonth()===month.getMonth()&&0<=maxDate.getDate()-minDate.getDate()){return!1}return!this._dateAllowed(firstDate,minDate,maxDate)&&!this._dateAllowed(lastDate,minDate,maxDate)}", "function ifAxisCrossZero(axis) {\n\t var dataExtent = axis.scale.getExtent();\n\t var min = dataExtent[0];\n\t var max = dataExtent[1];\n\t return !(min > 0 && max > 0 || min < 0 && max < 0);\n\t }", "function checkDates($from, $thru) {\n if ($from.val() && $thru.val() && anchor && nonAnchor) {\n if (anchor > nonAnchor) {\n $from.val(nonAnchor.toString('MM/dd/yyyy'));\n $thru.val(anchor.toString('MM/dd/yyyy'));\n } else {\n $from.val(anchor.toString('MM/dd/yyyy'));\n $thru.val(nonAnchor.toString('MM/dd/yyyy'));\n }\n }\n }", "dateShallowIncludesDate(date1, date2) {\n // First date is simple date\n if (date1.isDate) {\n if (date2.isDate) {\n return date1.dateTime === date2.dateTime;\n }\n\n if (!date2.startTime || !date2.endTime) {\n return false;\n }\n\n return date1.dateTime === date2.startTime && date1.dateTime === date2.endTime;\n } // Second date is simple date and first is date range\n\n\n if (date2.isDate) {\n if (date1.start && date2.date < date1.start) {\n return false;\n }\n\n if (date1.end && date2.date > date1.end) {\n return false;\n }\n\n return true;\n } // Both dates are date ranges\n\n\n if (date1.start && (!date2.start || date2.start < date1.start)) {\n return false;\n }\n\n if (date1.end && (!date2.end || date2.end > date1.end)) {\n return false;\n }\n\n return true;\n }", "dateShallowIncludesDate(date1, date2) {\n // First date is simple date\n if (date1.isDate) {\n if (date2.isDate) {\n return date1.dateTime === date2.dateTime;\n }\n\n if (!date2.startTime || !date2.endTime) {\n return false;\n }\n\n return date1.dateTime === date2.startTime && date1.dateTime === date2.endTime;\n } // Second date is simple date and first is date range\n\n\n if (date2.isDate) {\n if (date1.start && date2.date < date1.start) {\n return false;\n }\n\n if (date1.end && date2.date > date1.end) {\n return false;\n }\n\n return true;\n } // Both dates are date ranges\n\n\n if (date1.start && (!date2.start || date2.start < date1.start)) {\n return false;\n }\n\n if (date1.end && (!date2.end || date2.end > date1.end)) {\n return false;\n }\n\n return true;\n }", "function ifAxisCrossZero(axis) {\n var dataExtent = axis.scale.getExtent();\n var min = dataExtent[0];\n var max = dataExtent[1];\n return !(min > 0 && max > 0 || min < 0 && max < 0);\n}", "function ifAxisCrossZero(axis) {\n var dataExtent = axis.scale.getExtent();\n var min = dataExtent[0];\n var max = dataExtent[1];\n return !(min > 0 && max > 0 || min < 0 && max < 0);\n}", "function ifAxisCrossZero(axis) {\n var dataExtent = axis.scale.getExtent();\n var min = dataExtent[0];\n var max = dataExtent[1];\n return !(min > 0 && max > 0 || min < 0 && max < 0);\n}", "function ifAxisCrossZero(axis) {\n var dataExtent = axis.scale.getExtent();\n var min = dataExtent[0];\n var max = dataExtent[1];\n return !(min > 0 && max > 0 || min < 0 && max < 0);\n}", "function ifAxisCrossZero(axis) {\n var dataExtent = axis.scale.getExtent();\n var min = dataExtent[0];\n var max = dataExtent[1];\n return !(min > 0 && max > 0 || min < 0 && max < 0);\n}", "function ifAxisCrossZero(axis) {\n var dataExtent = axis.scale.getExtent();\n var min = dataExtent[0];\n var max = dataExtent[1];\n return !(min > 0 && max > 0 || min < 0 && max < 0);\n}", "function ifAxisCrossZero(axis) {\n var dataExtent = axis.scale.getExtent();\n var min = dataExtent[0];\n var max = dataExtent[1];\n return !(min > 0 && max > 0 || min < 0 && max < 0);\n}", "function ifAxisCrossZero(axis) {\n var dataExtent = axis.scale.getExtent();\n var min = dataExtent[0];\n var max = dataExtent[1];\n return !(min > 0 && max > 0 || min < 0 && max < 0);\n}", "function ifAxisCrossZero(axis) {\n var dataExtent = axis.scale.getExtent();\n var min = dataExtent[0];\n var max = dataExtent[1];\n return !(min > 0 && max > 0 || min < 0 && max < 0);\n}", "function setDates() {\n var endDate, dat_endDate;\n if ((document.forms[0].startDate) && (document.forms[0].endDate)) {\n startDate=document.forms[0].startDate.value;\n endDate=document.forms[0].endDate.value;\n if (startDate != '') {\n if (startDate > endDate) {\n document.forms[0].endDate_dummy.value=document.forms[0].startDate_dummy.value;\n document.forms[0].endDate.value=document.forms[0].startDate.value;\n }\n\t }\n }\n}", "validateRange(value) {\r\n let maxYear = new Date(value.max).getFullYear();\r\n let latestYear = new Date(this.latestDate).getFullYear();\r\n if (value.min > this.earliestDate &&\r\n maxYear <= latestYear) {\r\n this.setState({\r\n value: {\r\n min: value.min,\r\n max: value.max\r\n }\r\n })\r\n }\r\n }", "function getDaysArray (start, end) {\n for(var dt=new Date(start); dt<=end; dt.setDate(dt.getDate()+1)){\n groundTruthCopy.push({date: new Date(dt), y: -999});\n }\n }", "ensureLeftPoint(data) {\n const earliest = this.earliestAcceptable();\n let starter = _.findLast(data, d => {return d.t <= earliest;});\n if (!starter) {\n starter = Object.assign({}, _.first(data));\n data.unshift(starter);\n }\n starter.t = earliest;\n }", "function missingValue(arr){\n var min = arr[0]\n var max = arr[0]\n for ( var x = 0; x < arr.length; x++){\n if (arr[x] < min){\n min = arr[x]\n }\n if (arr[x] > max){\n max = arr[x]\n }\n }\n if( min <= 0){\n return false\n }\n for (var i = 0; i < arr.length; i++){\n for(var j = 0; j < arr.length; j++){\n if (arr[j] == min +1){\n min = arr[j]\n }\n }\n }\n if( min != max){\n return \"missing value is \" + (min + 1)\n }\n return true\n}", "get empty() {\n let ranges = this.ranges;\n for (let i = 0; i < ranges.length; i++)\n if (ranges[i].$from.pos != ranges[i].$to.pos)\n return false;\n return true;\n }", "function checkDates(date){\n if (dateInputInt === 0){\n return true;\n }\n else {\n if (dateCond === 'equalsdate'){\n return date === dateInputInt;\n }\n else if (dateCond === 'greaterthan'){\n return date > dateInputInt;\n }\n else if (dateCond === 'lessthan'){\n return date < dateInputInt;\n }\n }\n }", "function noNegs(x) {\n for (var i=0; i<x.length; i++) {\n if (x[i]<0) {\n x[i]=0;\n }\n }\n return x;\n}", "__validateSales() {\n let salescorrect = [];\n let salesIncorrect = [];\n\n this.sales.forEach((sale) => {\n if (\n sale.saleDate.isSameOrAfter(this.since) &&\n sale.saleDate.isSameOrBefore(this.until)\n ) {\n salescorrect.push(sale);\n } else {\n salesIncorrect.push(sale);\n }\n });\n\n this.sales = salescorrect.reverse();\n //TODO: Metodo que grantice un ordenamineto de fechas correcto siempre\n this.salesWithError = salesIncorrect;\n }", "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}", "isZero() {\n return this.high === 0 && this.low === 0;\n }", "setDates(){\n\t\tthis.dates=[];\n\t\tlet min=new Date(this.min);\n\t\twhile(min<=this.max){\n\t\t\tthis.dates.push(new Date(min));\n\t\t\tmin.setDate(min.getDate()+1);\n\t\t}\n\t\tthis.dates.push(new Date(min));\n\t}", "function checkDates ( data, targetDate, callback ) {\n\tlet dateOkay = true;\n\n\t// check start date\n\tif ( typeof data.startdate !== \"undefined\" ) {\n\t\tif (! ( moment( data.startdate, config.dates.format ).isSameOrAfter( targetDate ) ) ) {\n\t\t\tdateOkay = false;\n\t\t}\n\t}\n\t// check end date\n\tif ( typeof data.enddate !== \"undefined\" ) {\n\t\tif (! ( moment( data.enddate, config.dates.format ).isBefore( targetDate ) ) ) {\n\t\t\tdateOkay = false;\n\t\t\t// send unpublish request to Drupal API\n\t\t\t// still needs to be researched\n\t\t\t// create as a separate util\n\t\t}\n\t}\n\n\t// return to scrubData\n\treturn dateOkay;\n}", "function zeroSum(numbers) {\r\n\tvar check = numbers[0];\r\n\r\n\tfor (var i = 1; i < numbers.length; i++) {\r\n\t\tif (check + numbers[i] === 0) {\r\n\t\t\treturn true\r\n\t\t}\r\n\t}\r\n\tif (numbers.length === 0) {\r\n\t\treturn false;\r\n\t}\r\n\t\t\r\n\treturn zeroSum(numbers.slice(1))\r\n}", "setDateRange () {\n const dates = [];\n\n const startDate = this.state.from.clone();\n const endDate = this.state.to.clone();\n\n dates.push(startDate.clone());\n\n while (startDate.add(1, 'day').diff(endDate) < 0) {\n dates.push(startDate.clone());\n }\n\n this.setState({\n dates\n });\n }", "function wasThereSundayOnJanFirst() {\n // ar buvo sekmadienis pagal duota data\n // ar 2014 01 01 buvo sekmadienis?\n let d = new Date(\"2014-01-01\");\n d.setFullYear(2016);\n // console.log(\"d\", d.toDateString());\n // susigeneruoti metu masyva\n for (let metai = 2014; metai <= 2050; metai++) {\n d.setFullYear(metai);\n if (d.getDay() === 0) {\n console.log(\"sekmadienis\", d.toDateString());\n }\n }\n}", "function restrictPassedDate(){\n let date = new Date(),\n day = date.getDate(),\n month = date.getMonth()+1,\n year = date.getFullYear();\n if(day < 10){\n day = `0${day}`;\n }\n if(month < 10){\n month = `0${month}`;\n }\n dateStart.min = `${year}-${month}-${day}`;\n dateEnd.min = `${year}-${month}-${day}`;\n}", "function completeInterval(x, end) {\n var lastElement = x[x.length - 1];\n if (typeof lastElement[1] === 'undefined') {\n lastElement.push(moment(end).format('YYYY-MM-DD'));\n }\n if (lastElement[1] !== end) {\n var lastSet = [];\n lastSet.push(moment(lastElement[1]).add(1, 'day').format('YYYY-MM-DD'));\n lastSet.push(moment(end).format('YYYY-MM-DD'));\n x.push(lastSet);\n }\n}", "function validDates(startDate, endDate) {\n\t\t// Get today's date\n\t\tvar todaysDate = new Date();\n\n\t\treturn startDate <= endDate && startDate.setHours(0, 0, 0, 0) >= todaysDate.setHours(0, 0, 0, 0)\n\t\t\t\t\t\t\t\t\t&& startDate.setHours(0, 0, 0, 0) >= todaysDate.setHours(0, 0, 0, 0);\n\t}", "validateTwoDates(startDate, endDate){\n if( startDate < endDate) {\n return true;\n } else {\n return false\n }\n }", "function fillInNulls(data, startDate, endDate) {\n // Extract the dates that are already in the timeseries\n var alreadyThere = {};\n data.items.forEach(function (elem) {\n var date = moment(elem.timestamp, config.timestampFormat);\n alreadyThere[date] = elem;\n });\n data.items = [];\n // Reconstruct the timeseries adding nulls\n // for the dates that are not in the timeseries\n // FIXME: use this implementation for getDateHeadings()\n for (var date = moment(startDate); date.isBefore(endDate); date.add(1, 'd')) {\n if (alreadyThere[date]) {\n data.items.push(alreadyThere[date]);\n } else if (date !== endDate) {\n data.items.push({\n timestamp: date.format(config.timestampFormat),\n views: null\n });\n }\n }\n}", "function arrayContainsDates(value) {\n const n = Math.min(nChecks, value.length);\n if (!(n > 0)) return false;\n let hasDate = false; // ensure we encounter 1+ dates\n for (let i = 0; i < n; ++i) {\n const v = value[i];\n if (v == null) continue; // ignore null and undefined\n if (!(v instanceof Date)) return false;\n hasDate = true;\n }\n return hasDate;\n}", "function compareDatesValues(strDataInicial, strDataFinal)\n{\n if ((empty(strDataInicial)) || (empty(strDataFinal)))\n return false;\n if ((strDataInicial.length < 10) || (strDataFinal.length < 10))\n return false;\n if (convertDate(strDataInicial, 'YmdHis') > convertDate(strDataFinal, 'YmdHis')) {\n alertDialog('A data inicial deve ser sempre menor ou igual a data final.', 'Validação', 250, 150);\n return false;\n }\n return true;\n}", "function validateDates() {\n var endDate = $scope.enddate;\n var startDate = $scope.startdate; \n var stdate = Date.parse(startDate);\n var currentdate = new Date().getTime();\n if(currentdate>stdate){\n $scope.startBeforeCurrent = true;\n }else {\n $scope.startBeforeCurrent = false; \n } \n if(endDate < startDate) {\n $scope.endBeforeStart = true;\n }else {\n $scope.endBeforeStart = false;\n } \n}", "function compareDates(mixDataInicial, mixDataFinal)\n{\n var dataInicial = getObject(mixDataInicial);\n var dataFinal = getObject(mixDataFinal);\n if ((empty(dataInicial)) || (empty(dataFinal)))\n return false;\n return compareDatesValues(dataInicial.value, dataFinal.value);\n}", "function zeroNegVals(arr){\n for(var i = 0; i < arr.length; i++){\n if (arr[i] < 0){\n arr[i] = 0\n }\n }\n return arr\n}", "function zeroOutArrayNegativeVals(arr) {\n for (var idx = 0; idx < arr.length; idx++) {\n if (arr[idx] < 0) {\n arr[idx] = 0;\n }\n }\n return arr;\n}", "function checkDecreasing(numericDates) {\n var datesByYear = groupArrayByValueAtIndex$1(numericDates, 2);\n var results = datesByYear.map(function (dates) {\n var daysFirst = dates.slice(1).some(function (date, i) {\n var _dates$i = _slicedToArray(dates[i], 1),\n first1 = _dates$i[0];\n\n var _date = _slicedToArray(date, 1),\n first2 = _date[0];\n\n return isNegative$1(first2 - first1);\n });\n\n if (daysFirst) {\n return true;\n }\n\n var daysSecond = dates.slice(1).some(function (date, i) {\n var _dates$i2 = _slicedToArray(dates[i], 2),\n second1 = _dates$i2[1];\n\n var _date2 = _slicedToArray(date, 2),\n second2 = _date2[1];\n\n return isNegative$1(second2 - second1);\n });\n\n if (daysSecond) {\n return false;\n }\n\n return null;\n });\n var anyTrue = results.some(function (value) {\n return value === true;\n });\n\n if (anyTrue) {\n return true;\n }\n\n var anyFalse = results.some(function (value) {\n return value === false;\n });\n\n if (anyFalse) {\n return false;\n }\n\n return null;\n }", "function initialDatesSet() {\n date1 = moment().startOf(\"day\");\n date2 = moment(date1).add(2, \"day\");\n difference = date2.diff(date1, \"days\");\n }", "_validateSelectedDates(dates) {\n const that = this;\n let outOfRangeDates = [];\n\n if (!dates) {\n dates = that.selectedDates;\n }\n\n let selectedDates = dates.slice(0),\n filter = function (date) {\n if (date.getTime() >= that.min.getTime() && date.getTime() <= that.max.getTime() && !isRestrictedDate(date)) {\n return true;\n }\n\n outOfRangeDates.push(date);\n return;\n },\n isRestrictedDate = function (date) {\n for (let d = 0; d < that.restrictedDates.length; d++) {\n if (that.restrictedDates[d].getTime() === date.getTime()) {\n return true;\n }\n }\n }\n\n //Synchronize the attribute.\n that.selectedDates = selectedDates.filter(filter);\n\n //Unselects dates that are out of range.\n if (that._viewDates) {\n outOfRangeDates.map(date => that._selectDate(date));\n that._focusCell();\n }\n }", "function zeroSum (numbers) {\n\tvar checker = false;\n\tfor (var i = 0; i < numbers.length; i++){\n\t\tfor (var j = 1; j < numbers.length; j++){\n\t\t\tif (numbers[i] + numbers[j] === 0){\n\t\t\t\tchecker = true;\n\t\t\t}\n\t\t}\n\t}\n\treturn checker;\n}", "function setInvalid() {\n gregDate = moment.utc({'year': 0, 'month': 0, 'date': 0});\n badiYear = -1;\n badiMonth = -1;\n badiDay = -1;\n ayyamiHaLength = -1;\n nawRuz = moment.utc('0000-00-00');\n valid = false;\n }", "function blockNegativeDate(ndate){\n ndate.setDate(ndate.getDate() + 1);\n var nmonth = ndate.getMonth() + 1;\n var nday = ndate.getDate();\n var nyear = ndate.getFullYear();\n if(nmonth < 10)\n nmonth = '0' + nmonth.toString();\n if(nday < 10)\n nday = '0' + nday.toString();\n \n var nmaxDate = nyear + '-' + nmonth + '-' + nday;\n $('#negative_date').attr('min', nmaxDate);\n}", "function eligibleForScaleDown(array) {\n for (var i = array.length - 1; i >= 0; i--) {\n if (array[i] >= 0) {\n return false;\n }\n }\n return true;\n}", "function blockPastDates() {\n var dtToday = new Date();\n\n var month = dtToday.getMonth() + 1;\n var day = dtToday.getDate();\n var year = dtToday.getFullYear();\n if(month < 10)\n month = '0' + month.toString();\n if(day < 10)\n day = '0' + day.toString();\n\n var maxDate = year + '-' + month + '-' + day;\n $('#date').attr('min', maxDate);\n}", "function validValues() {\n return parseFloat(min.value) < parseFloat(max.value);\n }", "function zeroOutArrayNegativeVals(arr){\n for(var i = 0; i < arr.length; i++){\n if(arr[i] < 0){\n arr[i] = 0\n }\n }\n return arr\n}", "setNullSeriesToZeroValues(series) {\n let w = this.w\n for (let sl = 0; sl < series.length; sl++) {\n if (series[sl].length === 0) {\n for (let j = 0; j < series[w.globals.maxValsInArrayIndex].length; j++) {\n series[sl].push(0)\n }\n }\n }\n return series\n }", "function checkNotZero(figure) {\n if (figure !== 0){\n return true;\n }else {return false;}\n }", "function dateWithinRange(date) {\n \n var currentDate = new Date(date);\n \n var minDate = new Date(startDate);\n var maxDate = new Date(endDate);\n\n if (currentDate > minDate && currentDate < maxDate ){ // checks if dates are within range\n return true;\n }\n\n if(isNaN(minDate.valueOf() || maxDate.valueOf )){ //if no contraints are entered, return all dates\n return true;\n }\n else{\n return false;\n } \n }", "function checkPastOrFuture(date, month, year){\n const data = new Date(date + ' ' + month + ' ' + new Date().getFullYear()).setHours(0, 0, 0, 0);\n\n const now = new Date().setHours(0, 0, 0, 0);\n\n const lastDateInThisYear = new Date('31 December' + new Date().getFullYear());\n\n console.log(date + ' ' + month + ' ' + new Date().getFullYear())\n console.log(new Date(date + ' ' + month + ' ' + new Date().getFullYear()))\n\n if(data < now){\n console.log('past')\n birthday = `${date} ${month} ${oneYearFromNow.getFullYear()} 00:00:00`;\n subline.textContent = `From this day until ${date} ${month} ${oneYearFromNow.getFullYear()}`;\n\n \n }else if(data <= lastDateInThisYear){\n console.log('_______________________________')\n console.log('not until last date')\n birthday = `${date} ${month} ${new Date().getFullYear()} 00:00:00`;\n subline.textContent = `From this day until ${date} ${month} ${new Date().getFullYear()}`;\n }\n}", "function dateRestrict() {\n let today = new Date();\n const dd = String(today.getDate()).padStart(2, '0');\n const mm = String(today.getMonth() + 1).padStart(2, '0');\n const yyyy = today.getFullYear();\n const dateToday = yyyy+'-'+mm+'-'+dd;\n const dateFuture = addDays(today, 16);\n const ddFuture = String(dateFuture.getDate()).padStart(2, '0');\n const mmFuture = String(dateFuture.getMonth() + 1).padStart(2, '0');\n const yyyyFuture = dateFuture.getFullYear();\n const dateMax = yyyyFuture+'-'+mmFuture+'-'+ddFuture;\n document.getElementById('date').min = dateToday;\n document.getElementById('date').max = dateMax;\n}", "#checkEarlyDates() {\n let theYear1500 = new Date(\"1500-01-01\");\n let theYear1700 = new Date(\"1700-01-01\");\n let today = new Date();\n let year = today.getFullYear();\n let month = today.getMonth();\n let day = today.getDate();\n let earliestMemoryBeforeDeath = new Date(year - BioCheckPerson.TOO_OLD_TO_REMEMBER_DEATH, month, day);\n let earliestMemoryBeforeBirth = new Date(year - BioCheckPerson.TOO_OLD_TO_REMEMBER_BIRTH, month, day);\n\n if (this.#birthDate != null) {\n if (this.#birthDate < theYear1500) {\n this.#isPre1500 = true;\n }\n if (this.#birthDate < theYear1700) {\n this.#isPre1700 = true;\n }\n if (this.#birthDate < earliestMemoryBeforeBirth) {\n this.#tooOldToRemember = true;\n }\n }\n if (this.#deathDate != null) {\n if (this.#deathDate < theYear1500) {\n this.#isPre1500 = true;\n }\n if (this.#deathDate < theYear1700) {\n this.#isPre1700 = true;\n }\n if (this.#deathDate < earliestMemoryBeforeDeath) {\n this.#tooOldToRemember = true;\n }\n }\n if (this.#isPre1500) {\n this.#isPre1700 = true;\n this.#tooOldToRemember = true;\n }\n if (this.#isPre1700) {\n this.#tooOldToRemember = true;\n }\n /*\n * Since you already have today, pick up the date to use for\n * a source will be entered by xxxx tests\n */\n this.#oneYearAgo = new Date(year - 1, month, day);\n }", "defined(arr) {\n\n let arr2 = [];\n for (let i = 0; i < arr.length; i++) {\n if (!arr[i] && arr[i] !== 0) {\n //console.log(arr[i]);\n } else {\n arr2.push(arr[i]);\n }\n }\n return arr2;\n }", "function dateValid(dateArray, dateToCheck) {\n return dateArray.join() === [dateToCheck.getMonth()+1, dateToCheck.getDate(), dateToCheck.getFullYear()].join()\n}", "function zeroOut(arr) {\n var newArray2 = [];\n for (var i = 0; i <= arr.length - 1; i++) {\n if (arr[i] < 0) {\n arr[i] = 0;\n }\n newArray2.push(arr[i]);\n\n }\n return newArray2;\n\n}", "function fillCurrent() {\n for (let i = startDay; i < endDate + startDay; i++) {\n dateArray.push(i - startDay + 1)\n }\n }", "function isMonotonic(A)\n{\n var inc = 1, dec = 1;\n for(var i=1; i<A.length; i++){\n inc &= (A[i] - A[i-1] >= 0);\n dec &= (A[i] - A[i-1] <= 0);\n }\n return ((inc || dec) === 0? false: true);\n //return numbers.slice().sort().toString() == numbers.toString();\n\n}", "function E(a){// TODO: remove because mom.hasTime() from realCellToDate() is better\nreturn Na(\"allDaySlot\")&&!a.row}", "static dateOutOfRange(date, minDate, maxDate, config) {\n let result = false;\n if (minDate != null && date.isBefore(minDate, 'day')) {\n result = true;\n }\n if (maxDate != null && date.isAfter(maxDate, 'day')) {\n result = true;\n }\n if (config && config.calendarSettings) {\n const settings = config.calendarSettings;\n if (settings.disableDays &&\n settings.disableDays.some(disabledDate => this.checkDayForDisabled(disabledDate, date))) {\n result = true;\n }\n }\n return result;\n }", "function isAroundZero(val){return val > -EPSILON && val < EPSILON;}", "function testInputs(scores){\n\n for(var i=0; i<scores.length; i++){\n if(scores[i]<0|| isNaN(scores[i])){\n return false;\n }\n }\n return scores;\n\n}", "function sumZero(arr) {\n for (let i = 0; i < arr.length; i++) {\n const leftNum = Math.abs(arr[i]);\n const rightNum = Math.abs(arr[arr.length - 1 - i]);\n\n if (leftNum - rightNum === 0) {\n const arrPair = [leftNum, rightNum];\n return arrPair\n }\n }\n}", "isNonZero(): boolean {\n return this.value !== 0;\n }", "validateStartDate(start_time){\n let start_time_date = new Date(start_time);\n let tempDate = new Date();\n tempDate.setDate(tempDate.getDate());\n let date_difference = tempDate.getTime() - start_time_date.getTime();\n let dayToMillis = 86400000;\n date_difference = date_difference / dayToMillis;\n if(date_difference >= 0 && date_difference < 7){\n return true;\n }\n return false;\n }", "function func10(inputArray){\n for(var i=0; i<inputArray.length; i++){\n if(inputArray[i]<0){\n inputArray[i]=0;\n }\n }\n return inputArray;\n}", "_setFromDate(date) {\n let dates = get(this, '_dates');\n let [, dateTo] = dates;\n let vals;\n\n if (dateTo && date.valueOf() > dateTo.valueOf()) {\n vals = Ember.A([date, null]);\n } else {\n vals = Ember.A([date, dateTo || null]);\n }\n\n set(this, '_dates', vals);\n }", "function dateValidator(value) {\r\n if (this.arrivalDate < new Date())\r\n return false;\r\n if (this.arrivalDate > this.departureDate)\r\n return false;\r\n if (this.departureDate < new Date())\r\n return false;\r\n return true;\r\n}", "function noNegatives(arr) {\n for (var idx = 0; idx < arr.length; idx++) {\n if (arr[idx] < 0) {\n arr[idx] = 0;\n }\n }\n console.log(arr);\n}", "createDatesArray() {\n let timeAgoISO = moment().utc().subtract(180, 'days').format();\n let date1 = new Date();\n let date2 = new Date(timeAgoISO);\n let day;\n let datesBetween = [];\n\n while(date2 < date1) {\n let formattedDate = date1.toString().split('').slice(4, 15).join('');\n datesBetween.push({\n formattedDate: formattedDate,\n fitLine: 0,\n kilojoules: 0,\n });\n day = date1.getDate()\n date1 = new Date(date1.setDate(--day));\n }\n\n return datesBetween.reverse();\n }", "function sumZero(array) {\n let first = 0;\n let last = array.length - 1;\n\n while (last > first) {\n if (array[first] + array[last] === 0) {\n return [array[first], array[last]];\n } else if (array[first] + array[last] > 0) {\n last--;\n } else {\n first++;\n }\n }\n return undefined;\n}", "function getLessThanZero(bunchOfNumbers) {\n var onlyLow = [];\n // bunchOfNumbers.slice(0, bunchOfNumbers.length);\n for (var i = 0; i < bunchOfNumbers.length; i++) {\n if (bunchOfNumbers[i] <= 0) {\n onlyLow.push(bunchOfNumbers[i]);\n }\n }\n return onlyLow;\n}", "isZero() {\n return this.value == 0;\n }", "function isChangedDate(prev, next) {\n return !dateComparator(prev, next);\n}", "function zero (data) {\n return data === 0;\n }", "function createNullPoints (data) {\n var i = 0;\n while (i < data.length - 1) {\n //86400000 is the number of milliseconds in a day\n if (data[i + 1].x - data[i].x > 86400000) {\n var numNullPoints = (data[i + 1].x - data[i].x) / 86400000;\n var firstPart = data.splice(0, i + 1);\n var j = 1;\n while (j < numNullPoints) {\n var xVal = firstPart[i].x;\n var newPoint = {x: xVal + 86400000 * j};\n firstPart.push(newPoint);\n j += 1;\n }\n for (var k = 0; k < data.length; k++) {\n firstPart.push(data[k]);\n }\n data = firstPart;\n }\n i += 1;\n }\n return data;\n }", "sameDate(first, second) {\n if (first && second) {\n let firstValid = this.isValid(first);\n let secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !this.compareDate(first, second);\n }\n return firstValid == secondValid;\n }\n return first == second;\n }", "sameDate(first, second) {\n if (first && second) {\n let firstValid = this.isValid(first);\n let secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !this.compareDate(first, second);\n }\n return firstValid == secondValid;\n }\n return first == second;\n }", "sameDate(first, second) {\n if (first && second) {\n let firstValid = this.isValid(first);\n let secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !this.compareDate(first, second);\n }\n return firstValid == secondValid;\n }\n return first == second;\n }", "function checkDate(){\n //get timeStamp from dates\n let beginDate = Math.round(new Date(datetimeBegin).getTime()/1000);\n let endDate = Math.round(new Date(datetimeEnd).getTime()/1000);\n\n if(beginDate < endDate && eventTitle !== \"\" && eventDescription !== \"\" && beginDate !== \"\" && endDate !== \"\"){\n return true\n }else{\n return false\n }\n }", "findShallowIntersectingRange(date1, date2) {\n const thisRange = date1.toRange();\n const otherRange = date2.toRange(); // Start with infinite start and end dates\n\n let start = null;\n let end = null; // This start date exists\n\n if (thisRange.start) {\n // Use this definite start date if other start date is infinite\n if (!otherRange.start) {\n start = thisRange.start;\n } else {\n // Otherwise, use the earliest start date\n start = thisRange.start < otherRange.start ? thisRange.start : otherRange.start;\n } // Other start date exists\n\n } else if (otherRange.start) {\n // Use other definite start date as this one is infinite\n start = otherRange.start;\n } // Assign end date to this one if it is valid\n\n\n if (thisRange.end && (!start || thisRange.end >= start)) {\n end = thisRange.end;\n } // Assign end date to other one if it is valid and before this one\n\n\n if (otherRange.end && (!start || otherRange.end >= start)) {\n if (!end || otherRange.end < end) end = otherRange.end;\n } // Return calculated range\n\n\n return {\n start,\n end\n };\n }", "findShallowIntersectingRange(date1, date2) {\n const thisRange = date1.toRange();\n const otherRange = date2.toRange(); // Start with infinite start and end dates\n\n let start = null;\n let end = null; // This start date exists\n\n if (thisRange.start) {\n // Use this definite start date if other start date is infinite\n if (!otherRange.start) {\n start = thisRange.start;\n } else {\n // Otherwise, use the earliest start date\n start = thisRange.start < otherRange.start ? thisRange.start : otherRange.start;\n } // Other start date exists\n\n } else if (otherRange.start) {\n // Use other definite start date as this one is infinite\n start = otherRange.start;\n } // Assign end date to this one if it is valid\n\n\n if (thisRange.end && (!start || thisRange.end >= start)) {\n end = thisRange.end;\n } // Assign end date to other one if it is valid and before this one\n\n\n if (otherRange.end && (!start || otherRange.end >= start)) {\n if (!end || otherRange.end < end) end = otherRange.end;\n } // Return calculated range\n\n\n return {\n start,\n end\n };\n }", "function validateStartDate (date) {\n if (new Date(date) <= new Date()) {\n return false\n }\n}", "function dateValidation(startDate,endDate,date,date1,duramt,durunit)\n{\n console.log(startDate+\" \"+endDate+\" \"+date+\" \"+date1+\" \"+duramt+\" \"+durunit);\n if(startDate)\n var st=new Date(startDate.split(\" \")[0]);\n if(endDate)\n var ed=new Date(endDate.split(\" \")[0]);\n if(date)\n var d=new Date(date.split(\" \")[0]);\n if(date1)\n var d1=new Date(date1.split(\" \")[0]);\n if(startDate && endDate) //date-period mentioned\n {\n const no=difbetweenDates(st,ed)+1;\n if(no<0)\n {\n datavalid=false;\n return false;\n }\n if(duramt)\n {\n if(durunit==='day' && duramt===no)\n return true;\n if(durunit==='wk' && no===duramt*7)\n return true; \n if(durunit==='mo' && no===duramt*31)\n return true;\n if(durunit==='mo' && no!==duramt*30)\n return true;\n if(durunit==='yr' && no!==duramt*365)\n return true; \n datavalid=false;\n return false;\n }\n }\n if(date && date1) //2 dates specified\n {\n const no=difbetweenDates(d,d1)+1;\n //console.log(no);\n if(no<0)\n {\n datavalid=false;\n return false;\n }\n if(duramt)\n {\n if(durunit==='day' && duramt===no)\n return true;\n if(durunit==='wk' && no===duramt*7)\n return true; \n if(durunit==='mo' && no===duramt*31)\n return true;\n if(durunit==='mo' && no!==duramt*30)\n return true;\n if(durunit==='yr' && no!==duramt*365)\n return true; \n datavalid=false;\n return false; \n }\n }\n //only one date iven for duration intent\n if((date && duramt) && (date1===undefined && startDate===undefined && endDate===undefined) )\n {\n datavalid=false;\n return false; \n }\n else \n {\n datavalid=true;\n return true;\n }\n}", "function sameValueZeroOnly(a, b) {\n var result = sameValueZero(a, b);\n assertTrue(result && !sameValue(a, b));\n return result;\n}", "function isAroundZero(val) {\n\t return val > -EPSILON && val < EPSILON;\n\t}" ]
[ "0.6355291", "0.62490755", "0.5787765", "0.57518506", "0.5676495", "0.56567144", "0.5634439", "0.5620605", "0.56108123", "0.5556205", "0.55173725", "0.54704106", "0.54386556", "0.5386612", "0.5386612", "0.53747386", "0.53747386", "0.53747386", "0.53747386", "0.53747386", "0.53747386", "0.53747386", "0.53747386", "0.53747386", "0.5368698", "0.5368302", "0.53411734", "0.5332112", "0.53308594", "0.53283274", "0.531077", "0.5299525", "0.52932036", "0.5286749", "0.52851164", "0.52467674", "0.52195257", "0.52161366", "0.52122825", "0.5200885", "0.5183042", "0.5161529", "0.5158348", "0.5153121", "0.51469857", "0.5137153", "0.5136127", "0.51313335", "0.512813", "0.51184607", "0.50918293", "0.5087964", "0.5082549", "0.50675184", "0.50668746", "0.506265", "0.5053263", "0.5049532", "0.50399935", "0.5036554", "0.50330687", "0.50263107", "0.50224644", "0.5014692", "0.50145346", "0.50071234", "0.50048846", "0.49839747", "0.4981107", "0.497354", "0.4967625", "0.49650493", "0.4964199", "0.49635664", "0.49563125", "0.49459708", "0.49458006", "0.49446386", "0.49419713", "0.49378318", "0.493095", "0.49289083", "0.49274167", "0.4925557", "0.49137464", "0.49131575", "0.4912125", "0.4909378", "0.4907916", "0.49063677", "0.49050382", "0.49050382", "0.49050382", "0.48967054", "0.4892214", "0.4892214", "0.48865455", "0.4882065", "0.48792613", "0.48772326" ]
0.5671974
5
Handle a file load
function handleProgress() { message.text = "Loading " + (preloader.progress * 100 | 0) + "%"; stage.update(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleFileLoad(evt) {\n\t// If the file is an audio file, decode it\n\tif (evt.item.audio === true) {\n\t\tvar audioFile = audioFilenames[evt.item.number];\n\t\taudioFile.result = queue.getResult(audioFile.name);\n\t\tdecodeSound(audioFile);\n\t}\n}", "function handleFileLoad(event) {\n console.log(\"A file has loaded of type: \" + event.item.type);\n // create bitmaps of images\n if (event.item.id == \"background\") {\n background = new createjs.Bitmap(event.result);\n } else if (event.item.id.includes(\"treaty_\")) {\n var tempTreaty = new createjs.Bitmap(event.result);\n tempTreaty.id = event.item.id;\n treatyImages.push(tempTreaty);\n } else if (event.item.id == \"panel\") {\n panel = new createjs.Bitmap(event.result);\n }\n}", "function handleFile(e) {\n setLoadingState(\"Loading\")\n var file = e.target.files[0];\n let fileName = file.name.split(\" \").join(\"-\");\n console.log(fileName);\n var reader = new FileReader();\n reader.onload = function (event) { //on loading file.\n console.log(event.target.result);\n var unconverteFile = event.target.result;\n var convertedFile;\n switch (format) {\n case \"JSON\":\n convertedFile = jsonJSON(unconverteFile);\n fileName = fileName.substring(0, fileName.indexOf(\".json\"));\n break;\n case \"CSV\":\n convertedFile = csvJSON(unconverteFile);\n fileName = fileName.substring(0, fileName.indexOf(\".csv\"));\n break;\n case \"SSV\":\n convertedFile = ssvJSON(unconverteFile);\n fileName = fileName.substring(0, fileName.indexOf(\".csv\"));\n break\n default:\n convertedFile = jsonJSON(unconverteFile);\n }\n dispatchDeleteSel();\n dispatchLoad(convertedFile);\n setLoadingState(\"Loaded\");\n dispatchKeys(createKeys(convertedFile));\n dispatchLoadName(fileName);\n dispatchExtended(false);\n }\n reader.readAsText(file);\n }", "load() {}", "load() {}", "handleTheFile(event) {\n event.preventDefault();\n if (this.inputFile.current.files[0] === undefined) { return; }\n\n // Confirm file extension and read the data as text\n console.log('Reading the file...');\n let fileName = this.inputFile.current.files[0].name;\n if (!fileName.endsWith('.asc')) {\n console.error('Error opening the file: Invalid file extension, .asc expected.');\n return;\n }\n let file = this.inputFile.current.files[0];\n let reader = new FileReader();\n reader.onload = (event) => {\n console.log('Done.');\n this.ParseTheData(event.target.result);\n }\n reader.onerror = () => {\n console.error('Error opening the file: Cannot read file.');\n return;\n }\n reader.readAsText(file);\n }", "loadFileEvent(e) {\n Utilitary.showFullPageLoading();\n var file = e.detail;\n var position = Utilitary.currentScene.positionDblTapModule();\n this.loadFile(file, null, position.x, position.y);\n }", "function loadfile() {\n // pop up a file upload dialog\n // when file is received, send to server and populate db with it\n}", "function handleLoad() {\n if (xhr.status === 200) {\n callback();\n return;\n }\n\n let message;\n try {\n const response = JSON.parse(xhr.response);\n message = response.message;\n } catch (parseError) {\n message = xhr.response;\n }\n\n const error = new Error('[' + xhr.status + ' HTTP error] ' + message);\n error.statusCode = xhr.status;\n error.response = xhr.response;\n handleError(error);\n }", "loadFile() {\n this.csvReader.readFromFile(this.file).then((result) => this.process(result));\n }", "function handleFile(src, context) {\n\tcontext = context || {};\n\tcontext.src = src;\n\tcontext.srcDir = path.dirname(src);\n\t//console.log(\"handleFile in dir:\" + context.srcDir)\n\n\ttry {\n\t\tvar data = fs.readFileSync(src);\n\t} catch (e){\n\t\tconsole.log('Include failed. File \\\"' + src + '\\\" wasn’t found.')\n\t\treturn \"//HOMEMADE ERROR: Include failed. Can't find the file \\\"\" + src + \"\\\"\";\n\t}\n\n\treturn handle(data, context);\n\t//console.log(\"handle opened: \" + src)\n}", "function loadedFile() {\n\t\tif (self.currentFile) {\n\t\t\tvar e = new Event('loaded-file');\n\t\t\te.file = self;\n\t\t\tdocument.dispatchEvent(e);\n\t\t}\n\t\treturn;\n\t}", "async load(filepath) {\n\t\tawait this.#preprocessor.extractFileCommands(filepath);\n\t\tthis.#preprocessor.queueCommands();\n\t\tthis.#preprocessor.pageGen = this.#pageGen;\n\n\t\tawait this.#pageGen.extractFilePages(filepath);\n\n\t\t// File manager settings\n\t\tthis.#fileManager.sourceDir = this.#preprocessor.settings.source_dir;\n\t\tthis.#fileManager.buildDir = this.#preprocessor.settings.build_dir;\n\t\tthis.#fileManager.ignoreFile = this.#preprocessor.settings.ignore_rules;\n\n\t\tthis.#emitter.emit('load');\n\t}", "async load() {\n try {\n this.buf = await fsPromises.readFile(this.path);\n } catch (err) {\n let newErr = new Error('Failed to read the file: ' + err.message);\n if (err.code) newErr.code = err.code;\n throw newErr;\n }\n }", "async load (filePath) {\n console.log(`Deserializing from ${filePath}`)\n this.data = this.formatStrategy.deserialize(\n await fs.readFile(filePath, 'utf-8')\n )\n }", "async load () {}", "function handleFileSelect(evt) {\n // These are the files\n var files = evt.target.files;\n // Load each one and trigger a callback\n for (var i = 0; i < files.length; i++) {\n var f = files[i];\n _main.default.File._load(f, callback);\n }\n }", "loadFromFile(path, callback){\n\t\tfs.readFile(path, 'utf8', function(err, data){\n\t\t\tif(err){\n\t\t\t\tconsole.log(err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//data is the string returned by fs's readFile function.\n\t\t\tlet newData = JSON.parse(data);\n\n\t\t\tthis.idIterator = newData.idIterator;\n\t\t\tthis.currentFeature = newData.currentFeature;\n\t\t\tthis.geo = newData.geo;\n\t\t\tcallback();\n\t\t}.bind(this))\n\t}", "function loadFile(filename, cpu, onComplete) {\n const content = fs.readFileSync(filename, 'utf-8');\n processFile(content, cpu, onComplete);\n}", "function loadFile() {\n loadStrings('rainbow.txt', fileLoaded);\n}", "function loadFile() {\n loadStrings('rainbow.txt', fileLoaded);\n}", "handleFileSelect(evt) {\n let files = evt.target.files;\n if (!files.length) {\n alert('No file select');\n return;\n }\n let file = files[0];\n let that = this;\n let reader = new FileReader();\n\n //Se asigna la función que se realiza al cargar el archivo\n reader.onload = function (e) {\n that.cargaJson(e.target.result);\n };\n reader.readAsText(file);\n }", "async function load_callback(ev) {\n ev.preventDefault();\n\n var filename = $('#filename').val();\n await load_writing(filename);\n await load_history(filename);\n}", "function loadFile(file) {\r\n\tlet ext = file['name'].split('.').pop();\r\n\tlet reader = new FileReader();\r\n\r\n\tswitch (ext) {\r\n\t\tcase 'STL':\r\n\t\tcase 'stl':\r\n\t\t\tlet loaderSTL = new THREE.STLLoader();\r\n\t\t\treader.onload = () => {\r\n\t\t\t\tlet geometry = new THREE.STLLoader().parse(reader.result);\r\n\t\t\t\tgeometry.sourceType = 'stl';\r\n\t\t\t\tvar material = new THREE.MeshStandardMaterial();\r\n\t\t\t\tvar mesh = new THREE.Mesh(geometry, material);\r\n\t\t\t\taddObjToScene(mesh, file['name']);\r\n\t\t\t};\r\n\t\t\treader.readAsText(file);\r\n\t\t\tbreak;\r\n\t\tcase 'JSON':\r\n\t\tcase 'TJS':\r\n\t\tcase 'tjs':\r\n\t\tcase 'json':\r\n\t\t\treader.onload = () => {\r\n\t\t\t\tlet contents = reader.result;\r\n\t\t\t\tif (contents.indexOf('postMessage') !== -1) {\r\n\t\t\t\t\tvar blob = new Blob([contents], { type: 'text/javascript' });\r\n\t\t\t\t\tvar url = URL.createObjectURL(blob);\r\n\r\n\t\t\t\t\tvar worker = new Worker(url);\r\n\r\n\t\t\t\t\tworker.onmessage = function(event) {\r\n\t\t\t\t\t\tevent.data.metadata = { version: 2 };\r\n\t\t\t\t\t\thandleJSON(event.data, file['name']);\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tworker.postMessage(Date.now());\r\n\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar data;\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdata = JSON.parse(contents);\r\n\t\t\t\t} catch (error) {\r\n\t\t\t\t\talert(error);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\thandleJSON(data, file['name']);\r\n\t\t\t};\r\n\t\t\treader.readAsText(file);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\talert('format not supported');\r\n\t}\r\n}", "async loadFile(file) {\n let name = file.name;\n let ext = extname(name);\n\n if (ext === '.mdx' || ext === '.mdl' || ext === '.blp' || ext === '.dds' || ext === '.tga' || ext === '.w3x' || ext === '.w3m') {\n this.logger.info(`Reading ${name}`);\n\n let buffer = await readFile(file, ext === '.mdl');\n\n if (ext === '.w3m' || ext === '.w3x') {\n this.loadMap(name, buffer);\n } else {\n this.test(name, buffer, true);\n }\n } else {\n this.logger.info(`${name} is not a supported file, skipping it`);\n }\n }", "function file_load(file, callback) {\n\tif (!file) return; // No file found.\n\n\tlet reader = new FileReader();\n\n\treader.onload = event => callback(sched_parse(\n\t\tevent.target.result\n\t), file.path);\n\n\treader.readAsText(file);\n}", "function handleFile(file) {\n // Check for the various File API support.\n if (window.FileReader) {\n // FileReader are supported.\n var reader = new FileReader();\n reader.onload = loadHandler;\n reader.onerror = errorHandler;\n reader.readAsText(file)\n } else {\n alert('FileReader is not supported in this browser, so your uploaded user dataset cannot be read.');\n }\n }", "static LoadFromFile() {}", "function loadFile (filePath) {\n\tconsole.log(\"start!\");\n\tfileOpen.jsonFileOpen (filePath, function(parsedJSON, fd) {\n\t\t\n\t\tvar fileArray = parsedJSON;\n\t\tfileFD = fd;\t\n\t\t\n\t\tfs.close(fileFD, function doneWriting (err){\n if (err) {console.log (err);}\n console.log(\"initial file closed\");\n\t\t\t\n\t\t\t\n\t\t\ttraverseArray (fileArray); //go over each document/object in the array\n\t\t});\n\t});\n}", "function loadFile(file) {\n //explicitly loaded files should start at the beginning\n window.location.hash = '';\n //read file\n var reader = new FileReader();\n reader.onload = function(e) {\n //clear view\n resetData();\n generateMovie(e.target.result);\n }\n if(file) reader.readAsText(file);\n}", "function loadFile(fname)\n{\n\t$(\"#statind\").text(\"Loading: \" + fname);\n\t$.ajax({\n\turl : fname,\n\tcache : false,\n\tprocessData : false,\n\tmethod:\t\t'GET',\n\ttype : 'GET',\n\tsuccess : function(data, textStatus, jqXHR){\n\t\tsetEditText(fname, data);\n\t\t$(\"#statind\").text(fname + \" loaded.\");\n\t},\n\n\terror: function (data, textStatus, jqXHR) {\n\t\tconsole.log(\"Error: \" + textStatus);\n\t},\n\n\txhr: function() {\n\t\tvar xhr = new window.XMLHttpRequest();\n\t\txhr.responseType= 'text';\n\t\treturn xhr;\n\t},\n\n\t});\n}", "function loadHandler1(event) {\n var dat = event.target.result;\n processData1(dat);\n}", "function handleFile(e) {\n preventDefaults(e);\n const dataTransfer = e.dataTransfer;\n const files = e.target.files || dataTransfer.files;\n if (files.length === 1) {\n myContainer.removeChild(fileContainer);\n const ext = files[0].name.split('.').slice(-1)[0];\n const options = Object.assign({ file: files[0], ext }, userParams);\n load(myContainer, options);\n }\n }", "loadFile(path) {\r\n path = this.getAbsoluteDataPath(path);\r\n // Check if a file exists at this path\r\n if (FS_1.FS.existsSync(path)) {\r\n try {\r\n // If it exists, read the contents\r\n const contents = FS_1.FS.readFileSync(path, \"utf8\");\r\n // Return undefined if there are no contents\r\n if (contents.length == 0)\r\n return;\r\n // Parse it to json\r\n const data = JSON.parse(contents);\r\n // Return the data\r\n return data;\r\n }\r\n catch (e) {\r\n // If anything goes wrong, just log an error. TODO: Properly handle these errors\r\n console.error(`Something went wrong while retrieving ${path}:`, e);\r\n }\r\n }\r\n }", "fileLoaded(event)\n {\n // event.result is the final object that was created after loading \n //console.log(event.result); \n }", "function _onload(ev) {\n _emit('load', [ev]);\n }", "function load() {\n\n //Display the file currently being loaded\n console.log(`loading: ${g.loadingFile}`);\n\n //Display the percentage of files currently loaded\n console.log(`progress: ${g.loadingProgress}`);\n\n //Add an optional loading bar.\n g.loadingBar();\n\n //This built-in loading bar is fine for prototyping, but I\n //encourage to to create your own custom loading bar using Hexi's\n //`loadingFile` and `loadingProgress` values. See the `loadingBar`\n //and `makeProgressBar` methods in Hexi's `core.js` file for ideas\n}", "function loadHandler2(event) {\n var dat = event.target.result;\n processData2(dat);\n}", "function loadFile(e){\n if (!e) e = window.event;\n var target = (e.target || e.srcElement);\n \n $.get(\"text-file-management.php?request=loadFile&file=\"+target.firstChild.nodeValue, loadFileCallback);\n \n hideFilesDropdown();\n}", "function handleFile(file)\n\t{\n\t\tvar fileReader \t\t\t= new FileReader();\n\t\tfileReader.onloadend\t= fileUploaded;\n\t\tfileReader.readAsDataURL(file);\n\t}", "function loadTemplate(filepath, onLoad) {\n const filePath = path.join(__dirname, filepath);\n fs.readFile(filePath, {encoding: 'utf-8'}, function (err, data) {\n if (!err) {\n onLoad(data);\n } else {\n console.log(err);\n }\n });\n}", "function load() {\r\n\r\n //Display the file currently being loaded\r\n console.log(`loading: ${g.loadingFile}`);\r\n\r\n //Display the percentage of files currently loaded\r\n console.log(`progress: ${g.loadingProgress}`);\r\n\r\n //Add an optional loading bar.\r\n g.loadingBar();\r\n\r\n //This built-in loading bar is fine for prototyping, but I\r\n //encourage to to create your own custom loading bar using Hexi's\r\n //`loadingFile` and `loadingProgress` values. See the `loadingBar`\r\n //and `makeProgressBar` methods in Hexi's `core.js` file for ideas\r\n}", "function loadFile() {\n dialog.showOpenDialog({ filters: [\n { name: 'txt', extensions: ['txt'] },\n ]}, function(filenames) {\n if(filenames === undefined) return;\n var filename = filenames[0];\n readFromFile(editor, filename);\n loadedfs = filename;\n })\n}", "load() {\n\n }", "load(fileobject) {\n \n\t// Read returns a structure f\n\tbisgenericio.read(fileobject).then( (f) => {\n\t \n\t let obj = { };\n\t try { \n\t\tobj= JSON.parse(f.data);\n\t } catch(e) {\n\t\twebutil.createAlert(`Failed to parse input file ${f.filename}`,true);\n\t }\n \n\t let newvalues = {};\n\t newvalues.weight=obj.weight || 70.0;\n\t newvalues.height=obj.height || 1.70;\n\t newvalues.ismetric=obj.ismetric || false;\n\t this.setValues(newvalues);\n\n webutil.createAlert('Loaded from '+f.filename,false);\n \n\t}).catch( (e) => {\n webutil.createAlert(e,true);\n });\n \n }", "load() {\r\n\r\n }", "function loadFile(filename, numLines) {\n \tsendToDebugService('Debugger.scriptParsed', { \n url: filename,\n numLines: numLines\n });\n }", "function handleFileImport(evt) {\n var file = evt.target.files[0];\n var reader = new FileReader();\n reader.onload = function(e) {\n editor.setValue(e.target.result);\n };\n reader.onerror = function(e) {\n console.log(\"error\", e);\n };\n reader.readAsText(file);\n setStatusText(\"File imported.\");\n }", "load(file) {\n this._loading = file;\n\n // Read file and split into lines\n const map = {};\n\n const content = fs.readFileSync(file, 'ascii');\n const lines = content.split(/[\\r\\n]+/);\n\n lines.forEach(line => {\n // Clean up whitespace/comments, and split into fields\n const fields = line.replace(/\\s*#.*|^\\s*|\\s*$/g, '').split(/\\s+/);\n map[fields.shift()] = fields;\n });\n\n this.define(map);\n\n this._loading = null;\n }", "function fileLoaded(data) {\n var txt = data.join('\\n');\n\n input.html(txt);\n // Note the use of a function that will 'process' the text\n // This is b/c the text might come in a number of different ways\n // process(txt);\n}", "function load() {\n m_data.load(\"b4w/obj/moto.json\", load_cb);\n}", "load(cb){\r\n\r\n\t\tconsole.log('Loading assets (difficulty: 1)');\r\n\r\n\t\t// Chiama il metodo load della classe parent\r\n\t\tsuper.load(cb, 1);\r\n\t}", "function load() {\n // Get the file selected by user through file opening dialog\n let file = document.getElementById(\"fileLoader\").files[0];\n // Convert file to stream then put its content in \"editor\" div\n file.text().then(text => {\n editor.innerText = text;\n parse();\n }); \n}", "function _readFile(evt) {\n //Retrieve the uploaded File\n const file = evt.target.files[0],\n fileReader = new FileReader();\n\n //callback once file loaded, the loaded file is in text format\n fileReader.onload = function(content) {\n\n // Step 1: convert the textfile to obtain HTML DOM object to access the info section\n let toHTMLDOM = convertToHTMLDOM(content);\n\n // Step 2: create a map for the bio obtained via DOM acceess\n fetchVCardData(toHTMLDOM);\n\n // branch to reset the page, when a second file is uploaded\n if (properties.container.childNodes.length > 0) {\n resetPage();\n }\n\n //Step 3: create the network\n createNetwork();\n }\n fileReader.readAsText(file);\n }", "async loadFile(path) {\n const buf = await fs_extra_1.readFile(path);\n await this.client.raw(buf.toString());\n }", "function JSONLoader(path) {\n var self = this;\n\n fs.readFile(path, function (err, data) {\n var json;\n\n if (err) {\n return self.emit('error', err);\n }\n\n try {\n json = JSON.parse(data);\n } catch (e) {\n return self.emit('error', e);\n }\n\n self.emit('load', json);\n });\n}", "LoadAsset() {}", "loadFromFile(filename) {\n try {\n /* load using require as it can process both js and json */\n const data = requireUncached(filename);\n this.loadFromObject(data, filename);\n }\n catch (err) {\n if (err instanceof SchemaValidationError) {\n throw err;\n }\n throw new UserError(`Failed to load element metadata from \"${filename}\"`, err);\n }\n }", "loadStory(file) {\n // if we are already loading something\n // set the desired thing to load as the new thing\n // for use when load completes.\n if (this._pending) {\n this._pending= file;\n } else {\n const { path } = file;\n let story= this.store.getStory(path);\n if (story) {\n file.story= story;\n } else {\n this._pending= file;\n this._get(path, (storyData)=>{\n if (storyData) {\n story= this.store.storeStory(path, storyData);\n file.story= story;\n const reload= this._pending;\n this._pending= false;\n this.loadStory(reload);\n }\n });\n }\n }\n }", "function readFile() {\n\t\tlet reader = new FileReader();\n\t\treader.addEventListener('loadend', () => {\n\t\t\tparseFile(reader.result);\n\t\t});\n\t\treader.readAsText(this.files[0]);\n\t}", "processFile(file)\n {\n if (FileReader && file)\n {\n let ext = file.name.split('.').pop()\n\n if ([\"jpeg\", \"png\", \"jpg\"].indexOf(ext) == -1)\n {\n return;\n }\n\n var reader = new FileReader();\n reader.onload = () =>\n {\n this.props.onLoad(reader.result);\n }\n\n reader.readAsDataURL(file);\n }\n }", "function makeLoader(theFile) {\n // Making a p5.File object\n var p5file = new p5.File(theFile);\n return function(e) {\n p5file.data = e.target.result;\n callback(p5file);\n };\n }", "function makeLoader(theFile) {\n // Making a p5.File object\n var p5file = new p5.File(theFile);\n return function(e) {\n p5file.data = e.target.result;\n callback(p5file);\n };\n }", "async load( path ) {\n return false;\n }", "function handleLoadSync() {\n\t\t\t\t\tlogWithPhase( \"handleLoad - Sync\" );\n\t\t\t\t\t$scope.$eval( attributes.bnLoad );\n\t\t\t\t}", "function upload(evt) {\n\t file = evt.target.files[0];\n\t console.log(\"yikes!!!\", file);\n\t var reader = new FileReader();\n\t reader.readAsText(file);\n\t \treader.onload = loaded;\n\t}", "function reqListener() {\n console.log('File loaded: ' + sourceLocation);\n cm.setValue(this.responseText);\n engineStartup();\n }", "function handler(req, res) {\n\tvar filename = lookupFile(req);\n\tfs.readFile(filename, function (err, data) {\n\t\tif (err) {\n\t\t\tres.writeHead(500);\n\t\t\treturn res.end('Error loading file');\n\t\t} else {\n\t\t\tres.writeHead(200);\n\t\t\tres.end(data);\n\t\t}\n\t});\n}", "function handleFile(filePath) \n{\n\n\t$(document).ready(function () {\n\t\t$.ajax({\n\t\t\ttype: \"GET\",\n\t\t\turl: filePath,\n\t\t\tdataType: \"csv\",\n\t\t\tsuccess: function (data) { processData(data); }\n\t\t});\n\t});\n}", "function handleFiles(files) {\n var reader = new FileReader();\n reader.onload = function(event){\n var img = new Image();\n img.onload = function(){\n loadImage(img);\n }\n img.src = event.target.result;\n }\n reader.readAsDataURL(files[0]);\n}", "function load(req, res, next, id) {\n File.get(id)\n .then((file) => {\n req.file = file; // eslint-disable-line no-param-reassign\n return next();\n })\n .catch(e => next(e));\n}", "function loadFile(entry, done) {\n\n entry.file(function(file) {\n readFileAsText(entry, function(err, contents) {\n if (err) {\n return done(err);\n }\n\n chrome.fileSystem.getDisplayPath(entry, function(path) {\n return done(null, new DiagramFile(entry, contents, path));\n });\n });\n });\n}", "function loadFiles() {\n loadConfig();\n loadDictionary();\n loadBlacklist();\n loadBonusPhrases();\n\n console.log('All files loaded');\n}", "function onReaderLoad(event){\n try {\n fileObj = JSON.parse(event.target.result);\n validBuildingFile = true;\n } catch (e) {\n alert(\"Invalid JSON, cannot upload!\");\n }\n}", "function handleChange(e) {\n\t\tconst fileReader = new FileReader();\n\t\tfileReader.readAsText(e.target.files[0], \"UTF-8\");\n\t\tfileReader.onload = e => {\n\t\t\tconst JSONData = JSON.parse(e.target.result)\n\t\t\timportData(JSONData, () => {\n\t\t\t\tsetImportSpinnerState(false)\n\t\t\t\thistory.push('/')\n\t\t\t})\n\t\t};\n\t}", "function loadFile(filePath) {\r\n var result = null;\r\n var xmlhttp = new XMLHttpRequest();\r\n xmlhttp.open(\"GET\", filePath, false);\r\n xmlhttp.send();\r\n if (xmlhttp.status === 200) {\r\n result = xmlhttp.responseText;\r\n }\r\n return result;\r\n}", "function loadExternalData() {\n var loadFileParam = $location.search().loadfile;\n if (loadFileParam) {\n // block gui for long calls\n blockGui(true);\n Rest.callOther(\"loadableServerDataFiles\", \"loadFromFile\" + \"/\" + loadFileParam, initFromResponse);\n }\n }", "loadfile() {\n if (!this.file) return 0;\n if (!fs.existsSync(this.file)) return 0;\n\n try {\n var chardata = JSON.parse(fs.readFileSync(this.file));\n Object.assign(this, chardata);\n } catch (err) {\n console.log(\"ERROR - Reading character file:\", err);\n return 0;\n }\n return 1;\n }", "function handleFileSelect(evt) {\n evt.stopPropagation();\n evt.preventDefault();\n // Get the FileList object that contains the list of files that were dropped\n const files = evt.dataTransfer.files;\n // this UI is only built for a single file so just dump the first one\n file = files[0];\n const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(file);\n loadAndViewImage(imageId);\n }", "function handleFile(e) {\n var files;\n\n if (e.type === 'drop') {\n files = e.dataTransfer.files\n } else if (e.type === 'change') {\n files = e.target.files;\n }\n\n if (window.FileReader) {\n // FileReader is supported.\n readFile(files);\n } else {\n alertify.alert(\"<img src='/images/cancel.png' alt='Error'>Error!\", 'FileReader is not supported in this browser.');\n }\n }", "function dataFileLoad(e) {\n\tvar files = e.target.files[0]; // FileList object\n\n\tvar reader = new FileReader();\n\n\treader.onload = function(e) {\n\t\tvar contentsArr = CSVToArray(e.target.result,';');\n\t\tvar width = contentsArr[0].length;\n\t\tvar height = contentsArr.length;\n\t\tfor (var i = 2; i < width; i++) {\n\t\t\tlet name = contentsArr[0][i];\n\t\t\tParams[name] = {};\n\t\t\tfor (var j = 1; j < height; j++) {\n\t\t\t\tif (Params[name][contentsArr[j][0]] == null) {\n\t\t\t\t\tParams[name][contentsArr[j][0]] = {};\n\t\t\t\t}\n\t\t\t\tParams[name][contentsArr[j][0]][contentsArr[j][1]] = stringToFloat(contentsArr[j][i]);\n\t\t\t}\n\t\t}\n\t\tconsole.log(Params);\n\n\t\tdocument.getElementById(\"loadData\").style.display=\"none\";\n\t\tdocument.getElementById(\"loadDataSuc\").style.display=\"block\";\n\t\tdocument.getElementById(\"loadBSC\").style.display=\"block\";\n\n\t\t// funcAfterFilesLoad();\n\t};\n\n\treader.readAsText(files);\t\n}", "function handleFileSelect() {\n // Check for the various File API support.\n if (window.File && window.FileReader && window.FileList && window.Blob) {\n } else {\n alert('The File APIs are not fully supported in this browser.');\n }\n\n var f = event.target.files[0]; // FileList object\n var reader = new FileReader();\n\n reader.onload = function(event) {\n load_d3(event.target.result)\n };\n // Read in the file as a data URL.\n reader.readAsDataURL(f);\n}", "function loadFile(filePath) {\n var result = null;\n var xmlhttp = new XMLHttpRequest();\n xmlhttp.open(\"GET\", filePath, false);\n xmlhttp.send();\n if (xmlhttp.status==200) {\n result = xmlhttp.responseText;\n }\n return result;\n }", "function handleLoad() {\n updateRes();\n render();\n gameCanvas.addEventListener('mousedown', handleMouse, false);\n gameCanvas.addEventListener('mousemove', handleMouse, false);\n gameCanvas.addEventListener('mouseup', handleMouse, false);\n setupTouch();\n incButton.addEventListener('click', incIter);\n stopButton.addEventListener('click', stopIter);\n playButton.addEventListener('click', playIter);\n clearButton.addEventListener('click', doClear);\n\n {\n let mode = localStorage.getItem('fluids.rendermode');\n if (mode != null) {\n renderModeSelector.value = mode;\n updateRenderMode();\n }\n renderModeSelector.addEventListener(\"change\", updateRenderMode);\n }\n {\n let mode = localStorage.getItem('fluids.velocitymode');\n if (mode != null) {\n velocityModeSelector.value = mode;\n updateVelocityMode();\n }\n velocityModeSelector.addEventListener(\"change\", updateVelocityMode);\n }\n\n // Play by default\n playIter();\n}", "function fileReceived(e) {\n // if user clicks 'cancel' on file dialogue, the filelist might be zero\n if (typeof e === 'undefined' || e.target.files.length === 0) return null;\n const selectedFile = e.target.files[0];\n console.log(selectedFile)\n if (Constants.VALID_EXTENSIONS.indexOf(selectedFile.name.split('.').pop()) >= 0) {\n console.log(`Selected file: ${selectedFile.name}`)\n // when the file has been read in, it will trigger the on load reader event\n reader.readAsArrayBuffer(selectedFile);\n } else {\n alert(`The file extension ${selectedFile.name.split('.').pop()} is invalid, must be in ${Constants.VALID_EXTENSIONS}`);\n }\n }", "function loadAndParseFile(filename, settings) {\n\t$.ajax({\n url: filename,\n async: false,\n cache:\t\tsettings.cache,\n contentType:'text/plain;charset='+ settings.encoding,\n dataType: 'text',\n success: function(data, status) {\n \t\t\t\tparseData(data, settings.mode); \n\t\t\t\t\t}\n });\n}", "function loadAndParseFile(filename, settings) {\n\t$.ajax({\n url: filename,\n async: false,\n cache:\t\tsettings.cache,\n contentType:'text/plain;charset='+ settings.encoding,\n dataType: 'text',\n success: function(data, status) {\n \t\t\t\tparseData(data, settings.mode); \n\t\t\t\t\t}\n });\n}", "__readAndHandleFile(file) {\n this.__statusStr.innerHTML = \"\";\n\n if(!file.name.endsWith(\".csv\")){\n this.__statusStr.style.color = \"red\";\n this.__statusStr.innerHTML = \"Error: A non .csv file isn't valid ❌\";\n return;\n }\n\n let reader = new FileReader();\n\n reader.readAsText(file);\n\n //when file was loaded successfully.\n reader.onload = function () {\n //gets the deta in json\n let data = this.__csvDataToJson(reader.result);\n if (data == null) {\n this.__statusStr.style.color = \"red\";\n this.__statusStr.innerHTML = \"Error: the data (lines 2+) in the .csv file should not contain strings ❌\";\n return;\n }\n\n this.__statusStr.style.color = \"green\";\n this.__statusStr.innerHTML = \"file was loaded successfully ✔\";\n\n //notify all func and sends the json data.\n this.__notifyAll(data);\n }.bind(this);\n\n reader.onerror = function() {\n this.__statusStr.style.color = \"red\";\n this.__statusStr.innerHTML = \"Error: \" + reader.error + \" ❌\";\n };\n }", "function handleFile(e) {\n var files;\n\n if (e.type === 'drop') {\n files = e.dataTransfer.files\n } else if (e.type === 'change') {\n files = e.target.files;\n }\n\n if (window.FileReader) {\n // FileReader is supported.\n readFile(files);\n } else {\n alertHandler.error('FileReader is not supported in this browser.');\n }\n }", "function gotFile(file) {\n createDiv(\"<h1>\"+file.name+\"</h1>\").class(tabNumber).parent(\"left\");\n\n // Handle image and text differently\n if (file.type === 'image') {\n createImg(file.data);\n } \n else if (file.type === 'text') {\n tabs[file.name] = new Tab(file.name, tabNumber);\n switchTab(file.name, tabNumber);\n analyzeText(file, tabNumber);\n }\n}", "function loadFile(fn) {\n return new Promise ( (res, rej) => {\n fs.readFile(fn, (err, data) => {\n if (err) {\n rej(err);\n };\n res(data);\n })\n\n })\n}", "openFile(evt) {\n let status = []; // Status output\n const fileObj = evt.target.files[0];\n const reader = new FileReader();\n\n let fileloaded = (e) => {\n // e.target.result is the file's content as text\n const fileContents = e.target.result;\n status.push(\n `File name: \"${fileObj.name}\". Length: ${fileContents.length} bytes.`\n );\n // Show first 80 characters of the file\n const first80char = fileContents.substring(0, 80);\n status.push(`First 80 characters of the file:\\n${first80char}`);\n this.setState({ status: status.join(\"\\n\") });\n };\n\n // Mainline of the method\n fileloaded = fileloaded.bind(this);\n reader.onload = fileloaded;\n reader.readAsText(fileObj);\n }", "loadCSV(e) {\n var vm = this\n if (window.FileReader) {\n var reader = new FileReader();\n reader.readAsText(e.target.files[0]);\n // Handle errors load\n reader.onload = function(event) {\n var csv = event.target.result;\n vm.parse_csv = vm.csvJSON(csv)\n };\n }\n }", "loadFile(path, options) {\n\t\treturn this._parseData(path, options);\n\t}", "readin () {\n this.content = readFile(this.path);\n }", "function loadFile(filePath) {\n var result = null;\n var xmlhttp = new XMLHttpRequest();\n xmlhttp.open(\"GET\", filePath, false);\n xmlhttp.send();\n if (xmlhttp.status==200) {\n result = xmlhttp.responseText;\n }\n return result;\n}", "function handleFileSelect(evt) {\n \n evt.stopPropagation();\n evt.preventDefault();\n\n // Get the FileList object that contains the list of files that were dropped\n const files = evt.dataTransfer.files;\n\n // this UI is only built for a single file so just dump the first one\n file = files[0];\n const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(file);\n loadAndViewImage(imageId);\n }", "loadObjects (state, file) {\n const loader = new FileLoader(file)\n loader.loadSync()\n Vue.set(state, file, loader.objects)\n }", "openFile() {\n if (this.loadView.loadFileInput.files.length > 0) {\n var file = this.loadView.loadFileInput.files.item(0);\n var event = new CustomEvent(\"fileload\", { 'detail': file });\n document.dispatchEvent(event);\n }\n }", "function FileReader () {}", "function loadFile(path, callback) {\n fs.readFile(__dirname + \"/data/\" + path, \"utf-8\", (err, data) => {\n if (err) {\n print(\"error\");\n } else {\n callback(data);\n }\n });\n}" ]
[ "0.7436387", "0.70735985", "0.6849198", "0.65771407", "0.65771407", "0.6542549", "0.65182745", "0.64621526", "0.6421306", "0.6420583", "0.63777477", "0.6354598", "0.63100475", "0.6271615", "0.6270971", "0.62487805", "0.6215236", "0.6213226", "0.6211976", "0.6167493", "0.6167493", "0.6154737", "0.6137147", "0.6125625", "0.6086304", "0.6077617", "0.6074982", "0.60695696", "0.60511005", "0.60509133", "0.60023683", "0.59996593", "0.59686714", "0.59579027", "0.59344774", "0.59317416", "0.5924967", "0.5916355", "0.5879706", "0.58663833", "0.58661604", "0.5864659", "0.58585227", "0.5846217", "0.5837012", "0.5821369", "0.5821041", "0.5810817", "0.57923424", "0.579047", "0.578951", "0.5787479", "0.5775138", "0.57700485", "0.57670075", "0.57653207", "0.57579863", "0.575703", "0.5756532", "0.5750795", "0.5742523", "0.57065564", "0.57065564", "0.5704552", "0.570021", "0.5687727", "0.5685321", "0.5678606", "0.56753594", "0.56578326", "0.5654966", "0.56536394", "0.5646069", "0.56403095", "0.5630983", "0.5625287", "0.56228554", "0.5620933", "0.56183404", "0.5615096", "0.5613206", "0.560871", "0.5607244", "0.56053233", "0.5601396", "0.55917585", "0.55917585", "0.55896753", "0.5583807", "0.5577641", "0.55721134", "0.5569911", "0.5565237", "0.5562202", "0.5561632", "0.55584395", "0.5547256", "0.5541874", "0.55403954", "0.55353844", "0.55311155" ]
0.0
-1
run the blinkLED function every 250ms
function blinkLED() { //function to start blinking if (LED.readSync() === 0) { //check the pin state, if the state is 0 (or off) LED.writeSync(1); //set pin state to 1 (turn LED on) } else { LED.writeSync(0); //set pin state to 0 (turn LED off) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function blink_controller(){\n for (var i=0; i < game_items.length; i++) {\n game_items[i].update_blink();\n }\n setTimeout(blink_controller, interval * 35);\n}", "function periodicActivity()\r\n{\r\n myLed.write(ledState?1:0); //if ledState is true then write a '1' (high) otherwise write a '0' (low)\r\n ledState = !ledState; //invert the ledState\r\n setTimeout(periodicActivity,1000); //call the indicated function after 1 second (1000 milliseconds)\r\n}", "function blink(led, times) {\n if (times <= 0) {\n times = 1;\n }\n\n if (times > 5) {\n times = 5;\n }\n\n for (var i = 0; i < times; i++) {\n led.writeSync(1);\n sleep(150);\n led.writeSync(0);\n sleep(200);\n }\n}", "function blink() {\n state = !state;\n if(state) setTimeout(blink, 10); // Leave LED on for 10ms\n if(!state) setTimeout(blink, 990); // Leave LED off for 990ms\n b.digitalWrite(LED_RED, state ? b.HIGH : b.LOW);\n}", "function callback(data, error) {\n if (error) throw error;\n // wait 50ms, then call blink() again:\n interval = setTimeout(blink, 50);\n }", "function blinkLED() { //function to start blinking\n\t\t\t\t\t\t\t\t\t\tif (greenLED.readSync() === 0) { //check the pin state, if the state is 0 (or off)\n\t\t\t\t\t\t\t\t\t\t\tgreenLED.writeSync(1); //set pin state to 1 (turn LED on)\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tgreenLED.writeSync(0); //set pin state to 0 (turn LED off)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}", "function periodicActivity() {\n myLed.write(ledState ? 1 : 0);\n ledState = !ledState;\n}", "function blinkLED() { //function to start blinking\n\n if (LED5.readSync() === 0) { //check the pin state, if the state is 0 (or off)\n //here the movement is faster\n LED5.writeSync(1);\n LED12.write(0);\n\n } else {\n //Here the movement is slower\n LED5.writeSync(0); \n LED12.write(0.5);\n }\n\n}", "function led_blinker() {\n if(led_blinker.state === \"flashing\") {\n led_blinker.led = (led_blinker.led) ? false : true;\n } else if(led_blinker.state === \"on\") {\n led_blinker.led = true;\n } else if(led_blinker.state === \"off\") {\n led_blinker.led = false;\n } \n fs.writeFileSync(\"/sys/class/gpio/gpio61/value\", led_blinker.state? \"1\" : \"0\");\n}", "function blinkLED() { //function to start blinking\n if (LED.readSync() === 0) { //check the pin state, if the state is 0 (or off)\n LED.writeSync(1); //set pin state to 1 (turn LED on)\n } else {\n LED.writeSync(0); //set pin state to 0 (turn LED off)\n }\n}", "function blinkLED() { //function to start blinking\n if (LED.readSync() === 0) { //check the pin state, if the state is 0 (or off)\n LED.writeSync(1); //set pin state to 1 (turn LED on)\n } else {\n LED.writeSync(0); //set pin state to 0 (turn LED off)\n }\n}", "setBlinkDelay() {\n this.blinkDelay = Math.ceil(Math.random() * Trex.BLINK_TIMING);\n }", "function blink() {\n var blinkLeds;\n if (tessel) {\n tessel.led[1].on();\n tessel.led[2].on();\n tessel.led[3].on();\n blinkLeds = setInterval(function() {\n tessel.led[1].toggle();\n tessel.led[2].toggle();\n tessel.led[3].toggle();\n }, 100);\n setTimeout(function() {\n clearInterval(blinkLeds);\n tessel.led[1].off();\n tessel.led[2].off();\n tessel.led[3].off();\n }, 2500)\n }\n}", "function blinkAnimate(){\r\n\t\t\tif (gameState.currentState != states.gameover \r\n\t\t\t\t&& gameState.currentState != states.demo){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tel.style.opacity = Tween.easeInOutQuad(t,start,change,dur);\r\n\t\t\tt++;\r\n\t\t\t\r\n\t\t\tt = t % (dur*2);\r\n\t\t\t\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tblinkAnimate();\r\n\t\t\t},20)\r\n\t\t}", "function blink(t, d)\r\n{\r\n return ((t % d) < d/2);\r\n}", "function blink() {\n light.toggle();\n }", "methodTriggeredFromServer(rdvTime){\n // get rel time (sec) in which I must blink\n let timeRemaining = rdvTime - this.e.sync.getSyncTime();\n console.log('will blink in', timeRemaining, 'seconds');\n setTimeout( () => { this.e.renderer.blink([0, 160, 200], 0.4); }, timeRemaining * 1000 );\n }", "function timerBlinker() {\n $scope.redCountdown = !$scope.redCountdown;\n $scope.blinker = setTimeout(timerBlinker, 100 * $scope.time.seconds);\n }", "function blink(outputelemnt) {\n let x = true;\n setInterval(() => {\n if (x) {\n document.getElementById(outputelemnt).style.visibility = \"visible\";\n x = false;\n } else {\n document.getElementById(outputelemnt).style.visibility = \"hidden\";\n x = true;\n }\n }, 2000);\n}", "function blinkNotify(selector) {\n var element = $(selector);\n setInterval(function () {\n element.fadeIn(500, function () {\n element.fadeOut(500, function () {\n element.fadeIn(1000);\n });\n });\n }, 2000);\n}", "function tickBlack() {\n\tblackInt = setInterval(function(){\n\t\toneSecond();\n\t}, 1000)\t\n}", "function paddleBlink() {\n\tblinkCounter = 5;\n}", "function onBlink(request, response) {\n console.log('Received synchronous call to blink');\n var responsePayload = {\n status: 'Blinking LED every ' + request.payload + ' seconds'\n }\n response.send(200, responsePayload, (err) => {\n if (err) {\n console.error('Unable to send method response: ' + err.toString());\n } else {\n console.log('Blinking LED every ' + request.payload + ' seconds');\n }\n });\n }", "function blinkLED1() {\n //function to start blinking\n if (LED1.readSync() === 0) {\n //check the pin state, if the state is 0 (or off)\n LED1.writeSync(1); //set pin state to 1 (turn LED on)\n } else {\n LED1.writeSync(0); //set pin state to 0 (turn LED off)\n }\n}", "blink() {\n this.movingAllowed = false;\n const xDisappear = -303;\n const yDisappear = -303;\n this.x = xDisappear;\n this.y = yDisappear;\n setTimeout(function() {\n this.x = this.startX;\n this.y = this.startY;\n setTimeout(function() {\n this.x = xDisappear;\n this.y = yDisappear;\n }.bind(this), 500)\n setTimeout(function() {\n setTimeout(function() {\n this.x = this.startX;\n this.y = this.startY;\n this.movingAllowed = true;\n }.bind(this), 500)\n }.bind(this), 500)\n }.bind(this), 1000);\n }", "function blink() {\n characteristic.read(changeState);\n }", "function blink() {\n var body = document.getElementById('body');\n var colors = ['#F88', '#FF8', '#8F8', '#8FF', '#88F', '#F8F'];\n for (let i = 0; i <= 17; i++) {\n setTimeout(function() {body.style.backgroundColor = colors[i % colors.length];}, i*100);\n }\n setTimeout(function() {body.style.backgroundColor = 'white';}, 1800);\n}", "function blink(selector){\n $(selector).animate({opacity:0}, 50, \"linear\", function(){\n $(this).delay(700);\n $(this).animate({opacity:1}, 50, function(){\n blink(this);\n });\n $(this).delay(700);\n });\n}", "function TriggerLED(LEDindex)\r\n{\r\n //ledArray[LEDindex].write(1);\r\n //TempLED.write(1); //testing led indicator\r\n console.log(\"LED ON!\", LEDindex);\r\n setTimeout(LEDoff,burnTime,LEDindex);\r\n\r\n}", "function blink(selector){\n let count = 0;\n while(count<6) {\n $(selector).fadeOut('slow', function(){\n $(this).fadeIn('slow', function(){\n blink(this);\n });\n });\n count++;\n }\n}", "function uponFeedHoldTimer() {\n\tif (buttonLED.readSync() == 1)\n\t\tbuttonLED.writeSync(0);\n\telse\n\t\tbuttonLED.writeSync(1);\n}", "function periodicTrigger()\r\n{\r\n //print trigger pin status\r\n var GoButton = ProgramTrigger.read();\r\n console.log(\"Trigger Status \" + GoButton);\r\n setTimeout(periodicTrigger, 2000);\r\n}", "function handleBlink() {\n if (solutionSequence[roundBlinkCount] === 1) {\n handleButtonBlink(1);\n } else if (solutionSequence[roundBlinkCount] === 2) {\n handleButtonBlink(2);\n } else if (solutionSequence[roundBlinkCount] === 3) {\n handleButtonBlink(3);\n } else {\n handleButtonBlink(4);\n }\n}", "blink() {\n let xEyes = 20;\n let yEyes = 50;\n let sEyes = 1.0;\n\n if (this.sleep === true) {\n fill(255, 255, 255);\n\n rect(\n this.x + 125 * sEyes,\n this.y + 130 * sEyes,\n xEyes * sEyes,\n yEyes * sEyes\n );\n rect(\n this.x + 55 * sEyes,\n this.y + 130 * sEyes,\n xEyes * sEyes,\n yEyes * sEyes\n );\n }\n }", "function performBlink(tempArr) {\n for (var i = 0; i < tempArr.length; i++) {\n if (tempArr[i] == 10) {} else {\n var bowlingPin = document.getElementById('bowlingPin_' + tempArr[i].toString());\n bowlingPin.src = \"bowling_pin_transparent.png\";\n }\n }\n //uncomment below to get flashing back\n /*\n setTimeout(function() {\n for (var j = 0; j < tempArr.length; j++) {\n //document.getElementById(\"bowlingPin_\" + i.toString()).style.visibility = 'hidden';\n var bowlingPin = document.getElementById('bowlingPin_' + tempArr[j].toString());\n bowlingPin.src = \"bowling_pin_solid.png\";\n }\n }, 30);\n */\n}", "function blinkEffect(blinkData){\n\t//alert(\"Hello\");\n\t\n}", "function blink(color, reps) {\n for (var i = 0; i < reps+1; i++) {\n setTimeout(function(){\n document.getElementById(\"theBody\").style.backgroundColor = color;\n }, 200 * i - 100);\n setTimeout(function(){\n document.getElementById(\"theBody\").style.backgroundColor = \"#ffffff\";\n }, 200 * i);\n };\n}", "_fastFire(){\n this._servo.max();\n setTimeout(()=>\n this._servo.sweep({interval: servoInterval})\n , servoInterval/2)\n }", "function blink(blinkText) {\n\tTweenLite.to(blinkText, 0.3, {\n\t\tautoAlpha: 0,\n\t\tdelay: 1,\n\t\tonComplete: function() {\n\t\t\tTweenLite.to(blinkText, 0.3, {\n\t\t\t\tautoAlpha: 1,\n\t\t\t\tdelay: 0.3,\n\t\t\t\tonComplete: blink,\n\t\t\t\tonCompleteParams : [blinkText]\n\t\t\t\t\n\t\t\t});\n\t\t}\n\t});\n}", "function randomOn() {\n if (blinks < blink) {\n i = Math.floor(Math.random() * antall);\n on[i] = true;\n blinks++;\n startTime = new Date().getTime();\n updateView();\n timeID = setTimeout(off, 1500);\n updateView();\n } else { clearInterval(blinkID); }\n \n}", "function runStep() { //function to start blinking\n\n stepToggle = ((stepToggle == 0) ? 1 : 0);\n step.writeSync(stepToggle);\n\n steps++;\n if (steps > (maxSteps * 2)) {\n endStep();\n }\n}", "function FlashLEDs(t)\n{\n if (t == flashTime) return; // don't flash twice in the same second\n var flashNew = (flashNum + 1) % flashPin.length;\n var cmd = \"c.\"+flashPin[flashNum]+\" 1;c.\"+\n flashPin[flashNew]+\" 0\\n\";\n for (var i=0; i<2; ++i) {\n if (avrs[i]) avrs[i].SendCmd(cmd);\n }\n flashNum = flashNew;\n flashTime = t;\n}", "function blink(cell) {\n setTimeout(function() {\n cell.style.color = \"red\";\n }, 150);\n setTimeout(function() {\n cell.style.color = \"\";\n }, 650);\n setTimeout(function() {\n cell.style.color = \"red\";\n }, 1150);\n setTimeout(function() {\n cell.style.color = \"\";\n }, 1650);\n}", "function blink(cell) {\n setTimeout(function() {\n cell.style.color = \"red\";\n }, 150);\n setTimeout(function() {\n cell.style.color = \"\";\n }, 650);\n setTimeout(function() {\n cell.style.color = \"red\";\n }, 1150);\n setTimeout(function() {\n cell.style.color = \"\";\n }, 1650);\n}", "async deflakeDelay() {\n return 2000;\n }", "toggleBlink(domElem, val) {\n\n //if (val == true) { \n\n //var elem = document.getElementById(domElem);\n //setInterval(function () {\n // elem.style.display = (elem.style.display == 'none' ? '' : 'none');\n //}, 750);\n //}\n\n\n }", "function blinkChecker() {\n const blinkers = mt.querySelectorAll('.blink');\n for (let i = 0; i < blinkers.length; i++) {\n const cell = blinkers[i];\n const sample = data.getParentGroupForAbsolutePath(cell.id)\n .samples[cell.id.toLowerCase()];\n if (sample && SampleUtils.statusChangedRecently(sample,\n conf.blinkIfNewStatusThresholdMillis)) {\n cell.className = cell.className.replace(/blink blink-\\w+/, '');\n }\n }\n} // blinkChecker", "function current_turn_blink() {\n let current_turn_class = document.getElementsByClassName(\"game-detail-move\")[0];\n let current_opacity = 0\n setInterval(() => {\n current_opacity = Math.abs(current_opacity - 0.8)\n current_turn_class.style.opacity = current_opacity;\n }, 700);\n}", "function yeelight_sleep_thirty(){\n setTimeout(yeelight_sleep_off, 30000);\n}", "function timerBlick() {\r\n var blick = $('.timer-blick');\r\n\r\n setInterval(function() {\r\n $(blick).addClass('-blick-active');\r\n setTimeout(function() {\r\n $(blick).removeClass('-blick-active')\r\n }, 1050)\r\n }, 2000);\r\n }", "function LightBlink(){ //Switches a light on and off every 'waittime' seconds.\n\tif(this.transform.Find(\"Light\").GetComponent(Light).enabled == true){\n\t\tyield WaitForSeconds(waittime/2);\n\t\tthis.transform.Find(\"Light\").GetComponent(Light).enabled = false;\n\t}\n\tif(this.transform.Find(\"Light\").GetComponent(Light).enabled == false){\n\t\tyield WaitForSeconds(waittime/2);\n\t\tthis.transform.Find(\"Light\").GetComponent(Light).enabled = true;\n\t}\n}", "addRgbMoveToBlinkSeq(RGBcolor, msDelay) {\n this.liveFunc.addRgbMoveToBlinkSeq(RGBcolor, msDelay);\n return _yocto_api.YAPI_SUCCESS;\n }", "function runMeter() {\n\n if (beat.meterInc > beat.meter[0]-1) {\n beat.meterInc = 0\n }\n\n let beatHolder = beat.meterInc\n let bpm = 1000 / (beat.bpmCalc / 60)\n \n // beat meter blocks\n gui.meterBlocks[beatHolder].classList.add('flash')\n setTimeout(function() {\n gui.meterBlocks[beatHolder].classList.remove('flash')\n },150)\n\n}", "function tick() {\n secondsRemaining -= 1;\n updateDisplay(secondsRemaining);\n if (secondsRemaining <= 0) {\n playAlarm();\n flashIntervalId = setInterval(flashColor, 500);\n clearIntervalIfSet();\n }\n}", "function drawMain() {\n\n fillBlack();\n blinkInterval = setInterval(blinkText, 500);\n logoInterval = setInterval(logoLoop, 250);\n}", "function blinkOpen() {\n\n\t$(\"#title h1\").removeClass(\"blink\");\n\tsetTimeout('BlinkClose()',randomXToY(1000,4000));\t\n\n}", "sleep(){\n\n }", "function Timer() {\n setTimeout(tick, 5000);\n}", "blink(text) {\n if ((text.alpha === 1)) {\n if (this.tick === 45) {\n text.setAlpha(0);\n this.tick = 0;\n }\n }\n else {\n if (this.tick === 30) {\n text.setAlpha(1);\n this.tick = 0;\n }\n }\n }", "loop()\n {\n // everyone's clock tick besides blink\n this.clockTick = this.timer.tick();\n\n // Blink's clock tick\n this.blinksClockTick = this.blinkTimer.tick();\n\n // As loop is continuously called, drive the game for all\n this.update();\n this.draw();\n\n // Cleanup the canvas after spells\n if (this.noSpellsAreActive() && (this.ctx.globalAlpha < 9.8))\n {\n this.specialEffects.cleanupEffects();\n }\n }", "function blink(start, end, start1 = 0, end1 = 0, knockedDown, callback = function() {}) {\n createList(start, end, start1, end1, function(ints) {\n var originalInts = ints;\n ints.reverse();\n setBlinkInIntervalWithRep(ints, originalInts, knockedDown, callback);\n })\n}", "function swap_Color() {\r\n setInterval(next_Color, 5000);\r\n}", "async function rainbow(){\n await delayColorChange('red', 1000)\n await delayColorChange('orange', 1000)\n await delayColorChange('yellow', 1000)\n await delayColorChange('green', 1000)\n await delayColorChange('blue', 1000)\n await delayColorChange('indigo', 1000)\n await delayColorChange('violet', 1000)\n return \"ALL DONE!!!\";\n}", "function blink(selector){ \n\t$(selector).fadeOut('slow', function(){ \n\t\t$(this).fadeIn('slow', function(){ \n\t\t\tblink(this); \n\t\t}); \n\t}); \n}", "function blink(currentColour) {\n currentColour.fadeOut(100).fadeIn(100);\n}", "function blinkEyes() {\n eyes.forEach(function(eye) {\n eye.blink();\n });\n setTimeout(function() {\n eyes.forEach(function(eye) {\n eye.blink();\n });\n }, 75);\n}", "function ksfCanvas_blinkButton(btn)\n{\n\tvar resetBackColor = $(btn).css('background-color');\n\tvar resetColor = $(btn).css('color');\n\t$(btn).animate(\n\t\t{\n\t\t\t\"background-color\": \"#FF8500\",\n\t\t\t\"color\": \"#fff\"\n\t\t}, 200, function()\n\t\t{\n\t\t\t$(btn).animate(\n\t\t\t{\n\t\t\t \"background-color\": resetBackColor,\n\t\t\t \"color\": resetColor\n\t\t\t}, 800);\n\t\t} );\n}", "function autoclicker(){\n $stop = setInterval($bouton.onclick,500);\n setTimeout(function(){\n clearInterval($stop)\n },9000 + (amelio * nbMultiplicateurAmelioAutoclick));\n}", "sleep() {}", "function blinkMsg() {\n $('#blkTxt').fadeOut(1);\n setTimeout(function () {\n $('#blkTxt').fadeIn(1);\n }, 1000);\n setTimeout(blinkMsg, 2000);\n}", "directToClientMethod(value){\n this.e.renderer.blink([0, this.params.gain * value, 0], 0.4);\n console.log('blinking now!');\n }", "function wakeUp() {\n var interval = 250;\n var intervalIncrement = 250;\n\n $.each(simonColoursWakeUp, function(index, value) {\n interval += intervalIncrement;\n setTimeout(function() {\n playGame(value);\n playSound(value);\n }, interval);\n });\n}", "function changeStatus() {\n for (let i = 0; i <= 5; i++) {\n delay(i, timerValues.currentSecond);\n }\n // if (didMountRef.current) {\n // } else didMountRef.current = true;\n }", "function sleep(delay) {\r\n var start = new Date().getTime();\r\n while (new Date().getTime() < start + delay);\r\n}", "function changeSpd(dv) {\n forecast.delay = forecast.delay + dv;\n if (forecast.delay <= 50 ) {\n forecast.delay=50;\n }\n else if (forecast.delay>=950) {\n forecast.delay=950;\n }\n document.getElementById('displaySpeed').innerHTML = forecast.delay;\n // window.clearInterval(forecast.run)\n // forecast.run = setInterval(\"chgImg(1)\", forecast.delay);\n}", "function sleep(delay)\n{\n var start = new Date().getTime();\n while (new Date().getTime() < start + delay);\n}", "function sleep(delay_in_ms) {var start_time = new Date().getTime();\nfor (var sleep_count = 0; sleep_count < 1e7; sleep_count++)\n{if ((new Date().getTime() - start_time) > delay_in_ms) break;}}", "function YLed_set_blinking(newval)\n { var rest_val;\n rest_val = String(newval);\n return this._setAttr('blinking',rest_val);\n }", "function calcTimeToNextBlink() {\n return randomNormal(SKEW_BLINKS_EARLER) * TIME_BETWEEN_BLINKS_MAX;\n}", "function doBlink() {\n\t\t// Blink, Blink, Blink...\n\t\tvar blink = document.all.tags(\"BLINK\")\n\t\tfor (var i=0; i < blink.length; i++)\n\t\t\tblink[i].style.visibility = blink[i].style.visibility == \"\" ? \"hidden\" : \"\" \n\t}", "function intervalSayHello() {\n console.log(\"hello : every 3second\");\n}", "function resetBlinkingLed(){\n if (ledBlinking) {\n led.stop();\n ledBlinking = false;\n }\n }", "function ourConstantTimer(){\n let interval = setInterval(() => {\n let i = 1;\n if(finishChecker()){\n clearInterval(interval)\n }\n //console.log('machine', turrets['machineGun'].quantity)\n isNewBoss()\n attackAuto()\n updateAllVisibility()\n drawPage()\n if(i % 300 == 0){\n bossAttack(gameSettings.currentBoss)\n }\n },\n 300)\n}", "function defusal() {\n LED.classList.remove(\"LED-idle\", \"LED-incorrect\")\n LEDarmed.classList.remove(\"armed\");\n LED.classList.add(\"LED-correct\");\n //disables countdown and detonation\n timedFunctionClear();\n display.textContent = \"defused\";\n //make reset button flash\n document.querySelector(\"#reset div\").classList.add(\"alert\");\n //LCD display text\n id = setInterval(blinkingText, 1200);\n}", "function p1Cooldown() {setTimeout(function(){\n p1BlinkCooldown = 1;\n cultistBlinkNotReady.setVisible(false);\n cultistBlinkReady.setVisible(true);\n }, 3000)}", "function sleep(delay) {\n var start = new Date().getTime();\n while (new Date().getTime() < start + delay);\n }", "startBlinkSeq() {\n this.liveFunc.startBlinkSeq();\n return _yocto_api.YAPI_SUCCESS;\n }", "function turnBlackBgAndWhiteFo() {\n setInterval(changeBgAndFont, 0000);\n}", "function YLed_get_blinking_async(callback,context)\n {\n var loadcb; // func;\n loadcb = function(ctx,obj,res) {\n if (res != YAPI_SUCCESS) {\n callback(context, obj, Y_BLINKING_INVALID);\n } else {\n callback(context, obj, obj._blinking);\n }\n };\n if (this._cacheExpiration <= YAPI.GetTickCount()) {\n this.load_async(YAPI.defaultCacheValidity,loadcb,null);\n } else {\n loadcb(null, this, YAPI_SUCCESS);\n }\n }", "function change_status_delay(id, color, delay_ms){\n\tsetTimeout(function(){ change_status(id, color); }, delay_ms);\n}", "function fireBeat(websiteState) {\n // log the beat to console if you want to\n /*\n console.log(\n `\\nBEAT - ${Math.round(state.visualizer.activeBeat.start)}ms\\n`\n );\n */\n\n // grab a random color from the options that is different from the previous color\n var randColor;\n do {\n randColor = Math.floor(\n Math.random() * Math.floor(websiteState.visualizer.colors.length)\n );\n } while (randColor == websiteState.visualizer.lastColor);\n //set the new previous color\n websiteState.visualizer.lastColor = randColor;\n\n /*\n\n // set every LED on the strip to that color\n for (var i = 0; i < NUM_LEDS; i++) {\n pixelData[i] = websiteState.visualizer.colors[randColor];\n }\n\n //render the LED strip\n ws281x.render(pixelData);\n */\n // continue the beat loop by incrementing to the next beat\n setBackgroundColor(randColor);\n\n incrementBeat(websiteState);\n /*}*/\n}", "function sleep(delay)\n {\n var start = new Date().getTime();\n while (new Date().getTime() < start + delay);\n }", "function Blinker(bb8Svc, deviceId) {\n\n var _blinker = this;\n\n _blinker.color = 0;\n\n _blinker.intervalId = 0;\n\n _blinker.enabled = false;\n\n _blinker.period = 0;\n\n function blink(color) {\n\n bb8Svc.color(deviceId, color);\n\n setTimeout(function() {\n bb8Svc.color(deviceId, 0);\n }, 50);\n }\n\n function run() {\n\n clearInterval(_blinker.intervalId);\n\n if(_blinker.enabled) {\n\n if(_blinker.period > 0) {\n\n _blinker.intervalId = setInterval(\n function () {\n blink(_blinker.color);\n }, _blinker.period);\n }\n else {\n\n bb8Svc.color(\n deviceId,\n _blinker.color);\n }\n }\n else {\n\n bb8Svc.color(deviceId, 0);\n }\n }\n\n _blinker.enable = function(enabled){\n\n _blinker.enabled = enabled;\n\n run();\n }\n\n _blinker.setPeriod = function(t) {\n\n _blinker.period = t;\n\n run();\n }\n\n _blinker.setColor = function(color){\n\n _blinker.color = color;\n\n if(_blinker.period == 0 && _blinker.enabled) {\n\n bb8Svc.color(\n deviceId,\n _blinker.color);\n }\n }\n}", "turnOnForever () {\n this.status = BoostMotorState.ON_FOREVER;\n this._turnOn();\n }", "async function rainbow() {\n await delayedColorChange('red', 1000)\n await delayedColorChange('green', 1000)\n await delayedColorChange('blue', 1000)\n await delayedColorChange('yellow', 1000)\n await delayedColorChange('violet', 1000)\n await delayedColorChange('indigo', 1000)\n return \"All Done\"\n}", "function handleButtonBlink(buttonNum) {\n if (buttonNum === 1) {\n blueSimonButton.style.backgroundColor = \"rgb(76, 116, 247)\";\n sound.volume = 0.2;\n sound.play();\n setTimeout(function () {\n blueSimonButton.style.backgroundColor = \"rgb(6, 34, 126)\";\n }, blinkDuration);\n } else if (buttonNum === 2) {\n greenSimonButton.style.backgroundColor = \"rgb(77, 165, 96)\";\n sound.volume = 0.2;\n sound.play();\n setTimeout(function () {\n greenSimonButton.style.backgroundColor = \"rgb(24, 90, 38)\";\n }, blinkDuration);\n } else if (buttonNum === 3) {\n redSimonButton.style.backgroundColor = \"rgb(230, 97, 97)\";\n sound.volume = 0.2;\n sound.play();\n setTimeout(function () {\n redSimonButton.style.backgroundColor = \"rgb(163, 10, 10)\";\n }, blinkDuration);\n } else {\n yellowSimonButton.style.backgroundColor = \"rgb(243, 243, 106)\";\n sound.volume = 0.2;\n sound.play();\n setTimeout(function () {\n yellowSimonButton.style.backgroundColor = \"rgb(185, 185, 11)\";\n }, blinkDuration);\n }\n}", "async function rainbow(){\n await delayedColorChange('red', 1000)\n console.log(\"Hey Red!\");\n await delayedColorChange('orange',1000)\n console.log(\"Hey Orange!\");\n await delayedColorChange('yellow',1000)\n console.log(\"Hey Yellow!\");\n await delayedColorChange('green',1000)\n console.log(\"Hey Green!\");\n await delayedColorChange('blue',1000)\n console.log(\"Hey Blue!\");\n await delayedColorChange('indigo',1000)\n console.log(\"Hey Indigo!\");\n await delayedColorChange('violet',1000)\n console.log(\"Hey Violet!\");\n return \"ALL DONE!\";\n }", "function run() {\n\tintervalId = setInterval(display, 60000);\n}", "function blinkingText() {\r\n if ($(\"#start-game-btn\").hasClass(\"dark-green\")) {\r\n $(\"#start-game-btn\").removeClass(\"dark-green\").addClass(\"off-white\");\r\n }\r\n else {\r\n $(\"#start-game-btn\").removeClass(\"off-white\").addClass(\"dark-green\");\r\n }\r\n }", "function fadeUpDown() {\n\tserver=\"/arduino/light/9\";\n\tsendCommandtoServer(server); \n}" ]
[ "0.7519278", "0.7509107", "0.7280722", "0.7181604", "0.71539044", "0.7108851", "0.70685905", "0.7018417", "0.6983705", "0.6978372", "0.6978372", "0.69561875", "0.6898393", "0.68744993", "0.684661", "0.67198026", "0.67012614", "0.66999006", "0.6696355", "0.6596924", "0.65892327", "0.65841126", "0.6572566", "0.6538718", "0.6534422", "0.6500661", "0.6483722", "0.6477855", "0.6460679", "0.6432248", "0.63980585", "0.6352536", "0.6313159", "0.63087726", "0.6289766", "0.6273788", "0.62689525", "0.6263369", "0.62600076", "0.6255431", "0.62485224", "0.6242261", "0.62326837", "0.62326837", "0.6203097", "0.620223", "0.61951935", "0.6179746", "0.6179428", "0.6132293", "0.61120975", "0.6087367", "0.60873586", "0.60872424", "0.60767853", "0.6075868", "0.6071389", "0.6059406", "0.6040218", "0.6035943", "0.6033329", "0.6012566", "0.6008509", "0.60069185", "0.600587", "0.60016704", "0.5982727", "0.5979623", "0.59721965", "0.5951705", "0.5948624", "0.5942327", "0.59418935", "0.59384", "0.5936656", "0.5934029", "0.5923558", "0.5922826", "0.5917968", "0.5913629", "0.59050894", "0.5895887", "0.5891601", "0.58915454", "0.58859575", "0.5876839", "0.5868503", "0.58628744", "0.58553606", "0.58526397", "0.5849648", "0.58390576", "0.58321434", "0.58188945", "0.58182555", "0.5814667", "0.57993644", "0.57943326", "0.57873785", "0.5786471" ]
0.72018933
3
index.html (nodes, destinations, masters, obstacles, UIinterface) src/MarkerWithLabel.js src/Coordinates.js src/Node.js Google Maps wrapper
function Map() { // map variables var that = this, endCallback, lastFitTime = new Date(); var mapNodes = [], mapDestinations = [], mapObstacles = [], polyline, mapRefresh, running = false; var map = new google.maps.Map(document.getElementById('map'), { zoom: 3, tilt: 0, scaleControl: true, streetViewControl: false, center: new google.maps.LatLng(20, 0), //mapTypeId: google.maps.MapTypeId.HYBRID, panControlOptions: { position: google.maps.ControlPosition.TOP_RIGHT }, zoomControlOptions: { position: google.maps.ControlPosition.TOP_RIGHT }, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, position: google.maps.ControlPosition.RIGHT_BOTTOM } }); map.controls[google.maps.ControlPosition.RIGHT_TOP].push(document.getElementById('tilt')); map.controls[google.maps.ControlPosition.RIGHT_TOP].push(document.getElementById('fullscreen')); map.controls[google.maps.ControlPosition.TOP_LEFT].push(document.getElementById('controls')); this.init = function (end) { endCallback = end; // reset old setting for (var i in mapDestinations) for (var j in mapDestinations[i]) mapDestinations[i][j].setMap(null); for (var i in mapNodes) for (var j in mapNodes[i]) mapNodes[i][j].setMap(null); for (var i in mapObstacles) mapObstacles[i].setMap(null); mapDestinations = []; mapNodes = []; mapObstacles = []; // initialiaze new settings if (destinations.length + nodes.length <= 0) return; map.setMapTypeId(google.maps.MapTypeId.HYBRID); var bounds = new google.maps.LatLngBounds(); for (var i in destinations) bounds.extend(destinations[i].toGoogleMaps()); for (var i in nodes) bounds.extend(nodes[i].position().coordinates.toGoogleMaps()); map.setCenter(bounds.getCenter()); map.fitBounds(bounds); lastFitTime = new Date(); this.start(); } this.start = function () { running = true; for (var i in nodes) nodes[i].start(); mapRefresh = setInterval(function () { if (masters.length == 0) { that.stop(); if (endCallback) endCallback(); } else draw(); }, parseInt(document.getElementById('mapRefresh').value)); draw(); } this.stop = function () { running = false; clearInterval(mapRefresh); for (var i in nodes) nodes[i].stop(); } function getScale(latitude) { return Math.pow(2, map.getZoom()) / 156543.03392 / (!latitude ? 1 : Math.cos(latitude * Math.PI / 180)); } function svgArcedTriangle(r, h, overture) { var cosOverture = Math.cos(overture / 2); var sinOverture = Math.cos(overture / 2); var point1 = [ r * cosOverture, r * sinOverture ]; var point2 = [ r * cosOverture, - r * sinOverture ]; var point3 = [ r + h, 0 ]; return 'M' + point1.join(',') + ' A' + [ r, r ].join(',') + ' 0 0,0 ' + point2.join(',') + ' L' + point3.join(',') + ' L' + point1.join(','); } function draw() { // not intialized yet if (destinations.length + nodes.length <= 0) return; var scale, nodesGM = nodes.map(function (value) { return value.position().coordinates.toGoogleMaps(); }); // obstacles (simple black cylindres with infinite height) if (!mapObstacles[0]) for (var i = 0; i < obstacles.length; i++) mapObstacles[i] = new google.maps.Circle({ map: map, center: obstacles[i].toGoogleMaps(), radius: 2, fillColor: '#333', fillOpacity: 1, strokeColor: 'black', strokeWeight: 0.6, strokeOpacity: 1, clickable: false, zIndex: 1 }); // destinations for (var i = 0; i < destinations.length; i++) { var destination = destinations[i].toGoogleMaps(); scale = getScale(destination.lat()); if (!mapDestinations[i]) mapDestinations[i] = { text: new MarkerWithLabel({ map: map, position: destination, clickable: false, icon: { path: '', zIndex: 1 }, labelContent: i.toString(), labelClass: 'text destination', labelStyle: { 'font-size': 3 * scale + 'px' }, labelAnchor: new google.maps.Point(50, -1.3 * scale) }), circle: new google.maps.Circle({ map: map, center: destination, radius: 1, fillColor: 'red', fillOpacity: 0.9, strokeColor: '#900', strokeWeight: 1, strokeOpacity: 1, clickable: false, zIndex: 1 }), pin: new google.maps.Marker({ map: map, position: destination, clickable: false, icon: { url: document.getElementById('destination').src, anchor: new google.maps.Point(7, 28), zIndex: 1 } }) }; else { mapDestinations[i].text.labelStyle = { 'font-size': 3 * scale + 'px' }; mapDestinations[i].text.labelAnchor = new google.maps.Point(50, -1.3 * scale); } } // nodes for (var i = 0; i < nodes.length; i++) { var center = nodesGM[i]; var orientation = -Math.toDegrees(nodes[i].position().orientation); scale = getScale(center.lat()); if (!mapNodes[i]) mapNodes[i] = { text: new MarkerWithLabel({ map: map, position: center, clickable: false, icon: { path: '', zIndex: 3 }, labelContent: i.toString(), labelClass: 'text node', labelStyle: { 'font-size': 2 * scale + 'px' }, labelAnchor: new google.maps.Point(50, -scale) }), point: new google.maps.Circle({ map: map, center: center, radius: 0.5, fillColor: '#5bc0de', fillOpacity: 1, strokeColor: '#004F74', strokeWeight: 1, strokeOpacity: 1, clickable: false, zIndex: 3 }), coverage: new google.maps.Circle({ map: map, center: center, radius: parseInt(document.getElementById('coverage').value), fillColor: 'green', fillOpacity: 0.2, strokeColor: 'green', strokeWeight: 1, strokeOpacity: 0.5, clickable: false, zIndex: 0 }), orientation: new google.maps.Marker({ map: map, position: center, clickable: false, icon: { path: svgArcedTriangle(scale * 2 / 3, scale * 2 / 3, Math.PI / 2), rotation: orientation, fillColor: '#5bc0de', fillOpacity: 1, strokeColor: '#004F74', strokeWeight: 1, strokeOpacity: 1, zIndex: 3 } }) }; else { mapNodes[i].text.setPosition(center); mapNodes[i].text.labelStyle = { 'font-size': 3 * scale + 'px' }; mapNodes[i].text.labelAnchor = new google.maps.Point(50, 5 * scale); mapNodes[i].point.setCenter(center); mapNodes[i].coverage.setCenter(center); var icon = mapNodes[i].orientation.icon; icon.path = svgArcedTriangle(scale * 2 / 3, scale * 2 / 3, Math.PI / 2); icon.rotation = orientation; mapNodes[i].orientation.setIcon(icon); mapNodes[i].orientation.setPosition(center); } } // lines if (!polyline) polyline = new google.maps.Polyline({ map: map, path: nodesGM, geodesic: true, strokeColor: '#000', strokeOpacity: 1, strokeWeight: 1, clickable: false, zIndex: 2 }); else polyline.setPath(nodesGM); // fit bounds if (running && document.getElementById('follow').checked && new Date().getTime() - lastFitTime.getTime() > 100) { lastFitTime = new Date(); var bounds = new google.maps.LatLngBounds(); for (var i in destinations) bounds.extend(destinations[i].toGoogleMaps()); for (var i in nodes) bounds.extend(nodes[i].position().coordinates.toGoogleMaps()); map.fitBounds(bounds); } } // listeners google.maps.event.addListener(map, 'zoom_changed', draw); google.maps.event.addListener(map, 'idle', function () { document.getElementById('start').focus(); }); document.getElementById('tilt').addEventListener('click', function () { map.setTilt((map.getTilt() + 45) % 90); }); document.getElementById('fullscreen').addEventListener('click', function () { var mapDiv = document.getElementById('map'); var prefixes = [ '', 'moz', 'webkit', 'o', 'ms' ]; for (var i in prefixes) { var prefix = prefixes[i]; if (typeof mapDiv[prefix + 'RequestFullScreen'] != 'undefined') { mapDiv[prefix + (document[prefix + 'IsFullScreen'] ? 'Cancel' : 'Request') + 'FullScreen'](); break; } } }); document.getElementById('mapRefresh').addEventListener('change', function () { clearInterval(mapRefresh); if (running) that.start(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadDefaultInterface() {\n\tthis.options['marker_onclick'] = new Function('event','currentMaps[\\''+id+'\\'].marker_onclick(event)');\n\n\tthis.options['originNode'] = tag('input',{'type':'text','value':'Port Huron,MI'},[]);\n\tthis.options['destinationNode'] = tag('input',{'type':'text','value':'Ypsilanti,MI'},[]);\n\n\tvar inputNode = tag('div',{'class':'inputdiv'},[\n\t tag('div',{},[\n\t\ttag('h1',{'class':'maptitle'},[text('PlaceMap')]),\n\t\ttag('label',{},[text('Origin')]),\n\t\ttag('br',{},[]),\n\t\tthis.options['originNode'],\n\n\t\ttag('br',{},[]),\n\t\ttag('label',{},[text('Destination')]),\n\t\ttag('br',{},[]),\n\t\tthis.options['destinationNode'],\n\n\t\ttag('br',{},[]),\n\t\ttag('input',{'type':'button','onclick':'currentMaps[\\''+id+'\\'].inputSubmit(event)','value':'Go'},[])\n\t ])\n\t]);\n\tthis.options['inputNode'] = inputNode;\n\n\n\tvar placeListNode = tag('div',{'class':'placeListDiv'},[]);\n\tthis.options['placeListNode'] = placeListNode;\n\n\tvar mapNode = tag('div',{'class':'mapdiv'},[]);\n\tthis.options['mapNode'] = mapNode;\n\n\n\tvar directionNode = tag('div',{'class':'directiondiv'},[]);\n\tthis.options['directionNode'] = directionNode;\n\n\tvar n = tag('div',{'class':'contentdiv'},[\n\t inputNode,\n\t placeListNode,\n\t mapNode,\n\t directionNode\n\t]);\n\n\n\tinputNode.setAttribute('border','5');\n\n\tparentNode.appendChild(n);\n }", "function renderMap() {\n\t\n\tmypos = new google.maps.LatLng(mylat, mylng);\n\t\n\tmap.panTo(mypos);\n\t\n\tvar image = 'testmarker2.png';\n\t\n\tvar marker = new google.maps.Marker({\n\t position: mypos,\n\t title: \"You are here\",\n\t icon: image\n\t});\n\t\n\tmarker.setMap(map);\n\t\n\tvar infowindow = new google.maps.InfoWindow();\n\t\n\tgoogle.maps.event.addListener(marker, 'click', function() {\n\t infowindow.setContent(marker.title);\n\t infowindow.open(map,marker);\n\t});\n\tnearestStation = shortestdist(mylat, mylng, tMarkers);\n\tmarker.title += \"<br/>\" + \"The nearest Red Line station is \" + nearestStation[0].title + \n\t\"<br/>\" + \"and the distance is \" + nearestStation[0].distance + \" miles.\"; \n\t\n\ttParse();\n\tcwParse();\n\t\n}", "function initMap() {\n const brixton = { lat: 51.466, lng: -0.106 };\n const map = new google.maps.Map(document.getElementById(\"maps-frame\"), {\n zoom: 15,\n center: brixton,\n });\n const contentString =\n '<div id=\"content\">' +\n '<div id=\"siteNotice\">' +\n \"</div>\" +\n '<h1 id=\"firstHeading\" class=\"firstHeading\">Uluru</h1>' +\n '<div id=\"bodyContent\">' +\n \"<p><b>Uluru</b>, also referred to as <b>Ayers Rock</b>, is a large \" +\n \"sandstone rock formation in the southern part of the \" +\n \"Northern Territory, central Australia. It lies 335&#160;km (208&#160;mi) \" +\n \"south west of the nearest large town, Alice Springs; 450&#160;km \" +\n \"(280&#160;mi) by road. Kata Tjuta and Uluru are the two major \" +\n \"features of the Uluru - Kata Tjuta National Park. Uluru is \" +\n \"sacred to the Pitjantjatjara and Yankunytjatjara, the \" +\n \"Aboriginal people of the area. It has many springs, waterholes, \" +\n \"rock caves and ancient paintings. Uluru is listed as a World \" +\n \"Heritage Site.</p>\" +\n '<p>Attribution: Uluru, <a href=\"https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194\">' +\n \"https://en.wikipedia.org/w/index.php?title=Uluru</a> \" +\n \"(last visited June 22, 2009).</p>\" +\n \"</div>\" +\n \"</div>\";\n const infowindow = new google.maps.InfoWindow({\n content: contentString,\n });\n const marker = new google.maps.Marker({\n position: brixton,\n map,\n title: \"Brxton Rocks\",\n });\n marker.addListener(\"click\", () => {\n infowindow.open(map, marker);\n });\n\n var markerCluster = new MarkerClusterer(map, markers, {\n imagePath: \"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m\",\n });\n\n}", "function initialize() {\n var mapOptions = {\n center: new google.maps.LatLng(35.090349,-35.367574),\n zoom: 4,\n mapTypeId: google.maps.MapTypeId.HYBRID\n };\n \n/*\nroadmap displays the default road map view. This is the default map type.\nsatellite displays Google Earth satellite images\nhybrid displays a mixture of normal and satellite views\nterrain displays a physical map based on terrain information.\n*/ \n \n map = new google.maps.Map(document.getElementById(\"map_canvas\"),\n mapOptions);\n // creating a marker\n var marker = new google.maps.Marker({\n position: new google.maps.LatLng(35.090349,-35.367574),\n map: map,\n title:\"LA NOSTRA BARCA!\",\n icon: createMarker(25, 25, 4)\n });\n // creating a SECOND marker\n var marker2 = new google.maps.Marker({\n position: new google.maps.LatLng(34.090349,-34.367574),\n map: map,\n title:\"PALLONCINO!\",\n icon: createBaloon(25, 25, 4)\n });\n}", "function $googledotmap()\n{\n\tvar thisPtr=this;\n\n\tthis.allowFont=false; //don't allow font changes\n\tthis.allowBorder=false; //no custom border\t\n\tthis.ui={};\t\n\t\n\tvar api=null;\n\tvar map=null;\n\tvar mgr = null;\t\n\tvar gZoom=6;\n\t\n\tvar orgHeight=300;\n\tvar orgWidth=500;\n\tvar gMarkers = [];\n\t\n\tthis.inlet1=new this.inletClass(\"inlet1\",this,\"coordinates as hash \\\"{longitude,latitude}\\\". methods: \\\"addmarker\\\", \\\"center\\\", \\\"pan\\\", \\\"zoomIn\\\", \\\"zoomOut\\\"\");\n\tthis.inlet2=new this.inletClass(\"inlet2\",this,\"number 0-17 sets zoom level\");\n\t\n\tthis.outlet1 = new this.outletClass(\"outlet1\",this,\"outputs coordinates on click\");\n\tthis.outlet2 = new this.outletClass(\"outlet2\",this,\"bang on load\");\t\n\t\n\tthis.inlet2[\"num\"]=function(num) {\n\t\tgZoom=parseInt(num);\n\t\tmap.setZoom(gZoom);\t\n\t}\n\t\n\tthis.inlet1[\"obj\"]=function(obj) {\n\t\tsetCenter(obj);\t\t\n\t}\n\t\n\tthis.inlet1[\"anything\"]=function(str) {\n\t\tsetCenter({\"latitude\":str.split(\" \")[0],\"longitude\":str.split(\" \")[1]});\t\n\t}\t\n\t\n\tthis.inlet1[\"addmarker\"]=function(str) {\t\t\n\t\tsetMarker({\"latitude\":str.split(\" \")[0],\"longitude\":str.split(\" \")[1]});\n\t}\n\t\n\tthis.inlet1[\"clearmarkers\"]=function() {\t\t\n\t\tfor(var i=0;i<gMarkers.length;i++) {\n\t\t\tgMarkers[i].hide();\n\t\t}\n\t}\t\n\t\n\tthis.inlet1[\"center\"]=function(str) {\t\t\n\t\tsetCenter({\"latitude\":str.split(\" \")[0],\"longitude\":str.split(\" \")[1]});\n\t}\n\t\n\tthis.inlet1[\"pan\"]=function(str) {\n\t\tsetTimeout(function(){\n\t\t\tpanTo({\"latitude\":str.split(\" \")[0],\"longitude\":str.split(\" \")[1]});\n\t\t},10);\t\t\n\n\t}\n\t\n\tthis.inlet1[\"zoomIn\"]=function() {\n\t\tif(gZoom<17)\t {\n\t\t\tmap.zoomIn();\n\t\t\tgZoom++;\t\n\t\t}\n\t}\n\t\n\tthis.inlet1[\"zoomOut\"]=function() {\n\t\tif(gZoom>1)\t {\n\t\t\tmap.zoomOut();\n\t\t\tgZoom--;\t\n\t\t}\t\t\n\t}\n\t\n\tthis.inlet1[\"map\"]=function() {\n\t\tmap.setMapType(api.G_NORMAL_MAP);\n\t}\t\n\t\n\tthis.inlet1[\"satellite\"]=function() {\n\t\tmap.setMapType(api.G_SATELLITE_MAP);\n\t}\n\t\n\tfunction panTo(pos) {\n\t\tmap.panTo(new api.GLatLng(parseFloat(pos[\"latitude\"]),parseFloat(pos[\"longitude\"])));\n\t}\t\n\t\n\tfunction setMarker(pos) {\n\t\tmgr = new api.GMarkerManager(map);\t\n\t\tvar marker = new api.GMarker(new api.GLatLng(parseFloat(pos[\"latitude\"]),parseFloat(pos[\"longitude\"])));\n\t\tgMarkers.push(marker);\n\t\tmgr.addMarker(marker, 3);\t\t\n\t}\n\t\n\tfunction setCenter(pos) {\n\t\tmap.setCenter(new api.GLatLng(parseFloat(pos[\"latitude\"]),parseFloat(pos[\"longitude\"])),gZoom);\t\t\n\t}\t\t\n\t\n\tfunction loadMap() {\n\t\t\n\t\tif (typeof api.GBrowserIsCompatible == \"function\" && api.GBrowserIsCompatible()) {\n\t\t\t//create map\n\t\t\tmap = new api.GMap2(iframe.objFrame.contentDocument.getElementById(thisPtr.createElID(\"map\")));\n\t\t\tmap.enableContinuousZoom();\n\t\t\t//add click listener\n\t\t\tapi.GEvent.addListener(map, \"click\", function(marker, point) {\n\t\t\t\tif(point) {\n\t\t\t\t\tthisPtr.outlet1.doOutlet({longitude:point.lng(),latitude:point.lat()})\n\t\t\t\t}\n\t\t\t});\t\t\n\t\t}\n }\n\t\t\n\tfunction frameInit() {\n\t\tiframe.objFrame.contentDocument.getElementById(\"bodyElement\").innerHTML='<div id=\"'+thisPtr.createElID(\"map\")+'\" style=\"padding:0px;border:0px;margin:0px;width:'+orgWidth+'px;height:'+orgHeight+'px\"></div>';\n\t\tapi=(iframe.objFrame.contentWindow.GMap2)?iframe.objFrame.contentWindow:iframe.objFrame.contentWindow.wrappedJSObject;\n\t\tloadMap();\n\t\tthisPtr.outlet2.doOutlet(\"bang\");\t\t\t\n\t}\n\t\n\t//resize\n\tfunction deselectFunc() {\n\t\tif(thisPtr.height!=orgHeight||thisPtr.width!=orgWidth) {\n\t\t\torgHeight=thisPtr.height;\n\t\t\torgWidth=thisPtr.width;\n\t\t\tiframe.reload();\t\t\n\t\t}\n\t}\n\t\n\tvar iframe=new LilyComponents._iframe(this,\"file://\"+LilyApp.libPath+\"/googlemaps.html\",300,500,\"no\",frameInit);\n\t\n\tthis.controller.attachObserver(this.objID,\"deselect\",function(){deselectFunc();},\"edit\");\n\tthis.controller.patchController.attachPatchObserver(thisPtr.createElID(\"map\"),\"patchLoaded\",function(){deselectFunc();},\"all\");\t\n\n\treturn this;\n}", "function initializeMap() {\n var opts = {\n center: new google.maps.LatLng(54.902434, 23.940171),\n zoom: 13,\n streetViewControl: false,\n mapTypeId: 'roadmap'\n };\n\n map = new google.maps.Map(document.getElementById('map-canvas'), opts);\n // Vykdoma paspaudus and zemelapi\n google.maps.event.addListener(map, 'click', function(event) {\n\n // Prideda tiksla i zemelapi\n marker = new google.maps.Marker({ position: event.latLng, map: map });\n markers.push(marker);\n\n // Issisaugo lat ir lng\n nodes.push(event.latLng);\n // Padidina keliones tikslu kieki\n $('#destinations-count').html(nodes.length);\n });\n\n // Prideda mygtuka kuris i marsruta itraukia dabartine vartotojo vieta\n var myLocationDiv = document.createElement('div');\n new getMyLocation(myLocationDiv, map);\n map.controls[google.maps.ControlPosition.TOP_RIGHT].push(myLocationDiv);\n\n function getMyLocation(myLocationDiv, map) {\n var myLocationBtn = document.createElement('button');\n myLocationBtn.innerHTML = 'Mano buvimo vieta';\n myLocationBtn.className = 'large-btn';\n myLocationBtn.style.margin = '5px';\n myLocationBtn.style.opacity = '0.95';\n myLocationBtn.style.borderRadius = '3px';\n myLocationDiv.appendChild(myLocationBtn);\n\n google.maps.event.addDomListener(myLocationBtn, 'click', function () {\n navigator.geolocation.getCurrentPosition(function (success) {\n if (!myLocation) {\n var pos = {\n lat: success.coords.latitude,\n lng: success.coords.longitude\n };\n nodes.push(pos);\n $('#destinations-count').html(nodes.length);\n // Prideda tiksla i zemelapi\n marker = new google.maps.Marker({ position: pos, map: map });\n markers.push(marker);\n map.setCenter(new google.maps.LatLng(pos.lat, pos.lng));\n map.setZoom(13);\n myLocation = true;\n }\n else {\n window.alert(\"Buvimo vieta jau pažymėta!\");\n }\n });\n });\n }\n}", "function initialize() {\n let neighborhood = new google.maps.LatLng(47.608013,-122.335167);\n\n map = new google.maps.Map(document.getElementById('map-results'), {\n center: neighborhood,\n zoom: 10\n });\n}", "function initialize() {\n\n\tvar myLatlng = new google.maps.LatLng(53.350140, -6.266155);\n\tvar myOptions = {\n\t\tzoom: 12,\n\t\tcenter: myLatlng,\n\t\tmapTypeId: google.maps.MapTypeId.ROADMAP,\n\t\tdisableDefaultUI: true,\n\t\tclickableIcons: false\n\t\t}\n\t// Selected by 'onclick' by user\n\tvar source;\n\tvar destination;\n\n\t// For the loading icon when a user picks a source and destination\n infoWindow = new google.maps.InfoWindow({\n content: \"<h1>Loading...</h1><img src='static/ajax-loader.gif' style='display: block; margin: 0 auto;'>\"\n });\n\t\n\tvar map = new google.maps.Map(document.getElementById(\"googleMap\"), myOptions);\n\n // Listener for placing markers\n\tgoogle.maps.event.addListener(map, 'click', function(event) {\n\n\t\tif (markersArray.length == 0) {\n\t\t\tsource = event.latLng;\n\t\t\tplaceMarker(source, map);\n\t\t}\n\t\telse if (markersArray.length == 1) {\n\t\t\tdestination = event.latLng;\n\t\t\tplaceMarker(destination, map);\n\t\t\t\n\t\t\tinfoWindow.setPosition(markersArray[1].center);\n\t\t\tinfoWindow.open(map);\n\t\t\n\t\t\tsetTimeout(function(){\n\t\t\tgetJpidBestRoute(map, source.lat(), source.lng(), destination.lat(), destination.lng());}, 1000);\n\t\t} else {\n\t\t\tresetGlobals();\n\t\t}\n\t})\n}", "function initialize() {\n\n connect();\n\n // set different map types\n var mapTypeIds = [\"roadmap\", \"satellite\", \"OSM\"];\n var mapTypeLabels = [\"Map\", \"Satellite\", \"OpenStreetMap\"];\n var mapTypeImages = [\"../img/custom/roadmap.png\", \"../img/custom/satellite.png\", \"../img/custom/openStreetMap.png\"];\n\n // set map Options\n var mapOptions = {\n center: new google.maps.LatLng(tmp_lat, tmp_lon),\n zoom: 14,\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n mapTypeControlOptions: {\n mapTypeIds: mapTypeIds\n },\n disableDefaultUI: true,\n mapTypeControl: false\n };\n\n //set route menu position\n document.getElementById('routeMenuContainer').style.width = document.body.offsetWidth + \"px\";\n document.getElementById('routeMenuContainer').style.display = \"none\";\n document.getElementById('distanceToolContainer').style.width = document.body.offsetWidth + \"px\";\n document.getElementById('distanceToolContainer').style.display = \"none\";\n document.getElementById('navigationContainer').style.width = document.body.offsetWidth + \"px\";\n document.getElementById('navigationContainer').style.display = \"none\";\n document.getElementById('chat').style.display = \"none\";\n\n // initialize map\n map = new google.maps.Map(document.getElementById(\"map_canvas\"), mapOptions);\n \n // set client position\n currentPosition = new google.maps.LatLng(tmp_lat, tmp_lon)\n\n var currentMarkerOptions = {\n position: currentPosition,\n map: map,\n icon: currentPositionMarkerImage\n }\n\n // initialize marker for current position\n currentPositionMarker = new google.maps.Marker(currentMarkerOptions);\n\n // set map types\n map.mapTypes.set(\"OSM\", new google.maps.ImageMapType({\n getTileUrl: function (coord, zoom) {\n return \"http://tile.openstreetmap.org/\" + zoom + \"/\" + coord.x + \"/\" + coord.y + \".png\";\n },\n tileSize: new google.maps.Size(256, 256),\n name: \"OSM\",\n maxZoom: 18\n }));\n\n overlay.draw = function () { };\n overlay.setMap(map);\n\n //Optionpanel clicked event\n var options = document.getElementById('Optionpanel');\n var currentMapType = 0;\n options.addEventListener(\"click\", function (e) {\n \n if(e.target.id == 'Optionpanel') {\n if(options.style.left != '0px')\n options.style.left = '0px';\n else\n options.style.left = '-16em';\n }\n else if(e.target.id == 'arrowLeft') {\n if(currentMapType > 0)\n currentMapType -= 1;\n else\n currentMapType = 2;\n document.getElementById('lblMapType').innerHTML = mapTypeLabels[currentMapType];\n document.getElementById('map_type').src = mapTypeImages[currentMapType];\n }\n else if(e.target.id == 'arrowReight') {\n if(currentMapType < 2)\n currentMapType += 1;\n else\n currentMapType = 0;\n document.getElementById('lblMapType').innerHTML = mapTypeLabels[currentMapType];\n document.getElementById('map_type').src = mapTypeImages[currentMapType];\n }\n else if(e.target.id == 'map_type' || e.target.id == 'lblMapType') {\n map.setMapTypeId(mapTypeIds[currentMapType]);\n }\n else if(e.target.id == 'weatherClouds') {\n handleClouds();\n }\n });\n\n google.maps.event.addListener(currentPositionMarker, 'position_changed', function () {\n \n if (followCurrentPosition) {\n map.setCenter(currentPositionMarker.getPosition());\n }\n \n if (currentMode == MODE.NAVIGATION) {\n updateNavigation(currentPositionMarker.position, destinationMarker.position);\n }\n });\n\n // Overlay map array containing all used overlayer \n overlayMaps = [{\n getTileUrl: function (coord, zoom) {\n return \"http://www.openportguide.org/tiles/actual/air_temperature/5/\" + zoom + \"/\" + coord.x + \"/\" + coord.y + \".png\";\n },\n tileSize: new google.maps.Size(256, 256),\n name: \"OpenSeaMapTemperature\",\n maxZoom: 18\n }, {\n getTileUrl: function (coord, zoom) {\n return \"http://www.openportguide.org/tiles/actual/wind_vector/7/\" + zoom + \"/\" + coord.x + \"/\" + coord.y + \".png\";\n },\n tileSize: new google.maps.Size(256, 256),\n name: \"OpenSeaMapWeather\",\n maxZoom: 18\n }, {\n getTileUrl: function (coord, zoom) {\n return \"http://tiles.openseamap.org/seamark/\" + zoom + \"/\" + coord.x + \"/\" + coord.y + \".png\";\n },\n tileSize: new google.maps.Size(256, 256),\n name: \"OpenSeaMap\",\n maxZoom: 18\n }];\n\n // initialize empty array with static number of entries\n for (i = 0; i < overlayMaps.length; i++){\n map.overlayMapTypes.push(null);\n }\n\n // activate seapal standard overlayer\n var overlayMap = new google.maps.ImageMapType(overlayMaps[2]);\n map.overlayMapTypes.setAt(2, overlayMap);\n\n // drawing selected overlayers\n $('.layer').click(function(){\n var layerID = parseInt($(this).attr('id'));\n if(!isNaN(layerID)) {\n if ($(this).attr('checked')){\n var overlayMap = new google.maps.ImageMapType(overlayMaps[layerID]);\n map.overlayMapTypes.setAt(layerID, overlayMap);\n } else {\n if (map.overlayMapTypes.getLength() > 0){\n map.overlayMapTypes.setAt(layerID, null);\n }\n }\n }\n });\n\n // create cloud layer if activated\n google.maps.event.addListener(map, 'idle', handleClouds); \n\n // click on map\n google.maps.event.addListener(map, 'click', function (event) {\n\n // Handle optionpanel size\n var panel = document.getElementById('Optionpanel');\n if(panel.style.left == '0px')\n panel.style.left = '-16em'; \n\n // handler for default mode\n if (currentMode == MODE.DEFAULT) {\n setTemporaryMarker(event.latLng);\n } else if (currentMode == MODE.ROUTE || currentMode == MODE.DISTANCE) {\n addRouteMarker(event.latLng);\n }\n });\n\n google.maps.event.addListener(map, 'center_changed', function () {\n if (followCurrentPosition && !noToggleOfFollowCurrentPositionButton) {\n //toggleFollowCurrentPosition();\n } else {\n noToggleOfFollowCurrentPositionButton = false;\n }\n });\n}", "function getMap() {\n showJourneyMap();\n}", "function setMarkers(map) {\n\n // defines the clickable region of the icon\n // no real use yet\n // var shape = {\n // coords: [1, 1, 1, 20, 18, 20, 18, 1],\n // type: 'poly'\n // };\n\n for (var i=0; i<pins.length; i++) {\n // object (one pin)\n var pin = pins[i];\n\n var status = pin.fields.status;\n\n if (status === 'Barrier')\n var url = '/static/img/map-marker-barrier.png';\n else if (status === 'In Progress')\n var url = '/static/img/map-marker-in-progress.png';\n else if (status === 'Resolved')\n var url = '/static/img/map-marker-resolved.png';\n else if (status === 'Best Practice')\n var url = '/static/img/map-marker-best-practice.png';\n else\n var url = '/static/img/map-marker.png';\n\n var image = {\n url: url\n // size: new google.maps.Size(20, 32),\n // origin: new google.maps.Point(0, 0),\n // anchor: new google.maps.Point(0, 32)\n };\n\n if (pin.fields.address != null)\n var address = pin.fields.address;\n else\n var address = '';\n\n if (pin.fields.date_updated != null)\n var date = pin.fields.date_updated;\n else\n var date = '';\n\n // data of a detailed window\n var contentString = '<div id=\"content\" style=\"color: black\">'+\n '<div id=\"siteNotice\">'+\n '</div>'+\n '<h1 id=\"firstHeading\" class=\"firstHeading\">' + pin.fields.tag + '</h1>'+\n '<div id=\"bodyContent\">'+\n '<div><b>Status: </b>'+ status +'</div>'+\n '<div><b>Description: </b>'+ pin.fields.description +'</div>'+\n '<div><b>Address: </b>'+ address +'</div>'+\n '<div><b>Date created: </b>'+ pin.fields.date_created.slice(0,10) + \" \" + pin.fields.date_created.slice(11,19) +'</div>'+\n '<div><b>Date updated: </b>'+ date.slice(0,10) + \" \" + date.slice(11,19) +'</div>'+\n '<div><a href=\"/pins/' + (i+1) + '\">See more</a>' +\n '</div>'+\n '</div>';\n\n var infowindow = new google.maps.InfoWindow({\n content: contentString,\n maxWidth: 450\n });\n\n // creating the marker\n var marker = new google.maps.Marker({\n position: {\n lat: pin.fields.location_latitude, \n lng: pin.fields.location_longitude\n },\n map: map,\n icon: image,\n infowindow: infowindow,\n // shape: shape,\n // title: pin[0],\n zIndex: i // determines which pin is on top if they overlap\n });\n\n // listener for clicking on a pin\n marker.addListener('click', function() {\n this.infowindow.open(map, this);\n });\n\n\n }\n}", "function Main() {\n\n\n /*bio info*/\n bio = FillInformation('bio');\n AddDisplay('bio', bio);\n bio.display();\n\n /*work info*/\n work = FillInformation('work');\n AddDisplay('work', work);\n work.display();\n\n /*projects info*/\n projects = FillInformation('projects');\n AddDisplay('projects', projects);\n projects.display();\n\n /*Eductaion info*/\n education = FillInformation('education');\n AddDisplay('education', education);\n education.display();\n\n /*Map Addition*/\n //$('#mapDiv').append(internationalizeButton);\n $('#mapDiv').append(googleMap);\n\n}", "function startup() {\n const container = document.getElementsByClassName('main-interface')[0];\n\n const renderer = new Step3Renderer(container);\n const eventManager = new EventManager();\n\n const events = eventManager.getEvents()\n\n renderer.render(events);\n\n const mapView = document.getElementsByClassName('map-view')[0];\n const mapsInterface = new MapsInterface(mapView, { lat: 0, lng: 0 });\n\n setupMap(events, mapsInterface);\n}", "function view_contact_draw_map() {\n\n // Draw San Francisco Map\n\n var element = document.getElementById(\"contact-location-map-san-francisco\");\n var latitude = 37.7893041;\n var longitude = -122.4003783;\n var tooltip_content =\n \"<div id='content'>\"+\n \"<h5 class='flush-top short'>Mesosphere San Francisco Office</h5>\" +\n \"<p class='flush-bottom'>\" +\n \"88 Stevenson St</br>\" +\n \"San Francisco, CA 94107\" +\n \"</p>\" +\n \"</div>\";\n\n draw_map(element, latitude, longitude, tooltip_content);\n\n // Draw Hamburg Map\n\n element = document.getElementById(\"contact-location-map-germany\");\n latitude = 53.54386;\n longitude = 10.02979;\n tooltip_content =\n \"<div id='content'>\"+\n \"<h5 class='flush-top short'>Mesosphere Hamburg Office</h5>\" +\n \"<p class='flush-bottom'>\" +\n \"Friesenstraße 13, 20097</br>\" +\n \"Hamburg, Germany\" +\n \"</p>\" +\n \"</div>\";\n\n draw_map(element, latitude, longitude, tooltip_content);\n\n // Draw NY Map\n\n element = document.getElementById(\"contact-location-map-new-york\");\n latitude = 40.7483005;\n longitude = -73.990655;\n tooltip_content =\n \"<div id='content'>\"+\n \"<h5 class='flush-top short'>Mesosphere New York Office</h5>\" +\n \"<p class='flush-bottom'>\" +\n \"132 West 31st St</br>\" +\n \"New York, NY 10001\" +\n \"</p>\" +\n \"</div>\";\n\n draw_map(element, latitude, longitude, tooltip_content);\n\n }", "function initMap() {\n // Infobox.js relies on Google Maps API, dynamically load script.\n var infoBoxScript = document.createElement('script');\n infoBoxScript.type = 'text/javascript';\n infoBoxScript.src = 'js/infobox.js';\n $('body').append(infoBoxScript);\n\n dropMode = false;\n $(\"#map-loading\").fadeOut();\n $('body').removeClass('fade-out');\n\n googleMapObject = new google.maps.Map(document.getElementById('map'), {\n zoom: 17,\n mapTypeControl: false,\n streetViewControl: false,\n zoomControl: false,\n });\n\n // If geolocation services do not exist, this app should not do anything.\n if (navigator.geolocation) {\n initZoomImages();\n initUserMarker();\n initGeoPosition();\n\n initDropButton();\n initRefreshButton();\n initRecenterButton();\n initOptionsButton();\n initDeleteButton();\n initAutocomplete();\n initTypeFilters();\n\n initMapListeners();\n initModalListeners();\n initMarkers();\n\n $(\"#logoutButton\").hide();\n $(\"#username\").hide();\n\n var options = {\n styles: [{\n url: '/img/cow-cluster.png',\n height: 130,\n width: 100,\n textSize: 20\n }]\n };\n\n markerCluster = new MarkerClusterer(googleMapObject, [], options);\n }\n}", "function createWorldPage_HTML () {\n // Set global variable with type of map to be opened\n local = [];\n local.push(\"world\", \"none\");\n\n // Set url\n window.history.pushState(\"object or string\", \"Title\", \"index.html\");\n\n //Add script for map creation\n document.getElementById(\"mainSection\").innerHTML =\n \"<div id='mapdiv' class='map loading'>&nbsp;</div>\" +\n \"<div id='countryToVisitSelector'>\" +\n\t\t \"<div class='switchlink_l float_l'>Мої країни...</div>\" +\n \"<div class='switchlink float_l'><a title='Перейти до списку візитів' onclick='javascript:OpenListOfWorldVisits()' onmouseover='' style='cursor: pointer;'>Мої візити</a></div>\" +\n \"<br><br>\" +\n \"<div class='clear' />\" + createWorldPageFrontView() + \"</div>\";\n\n //Creation of world map\n drawMap();\n\n //Add copy marker and bottom line\n document.getElementById(\"copy_cert\").innerHTML = \"&copy; 2011-2023, Slavutskyy Oleksiy\";\n document.getElementById(\"hr_bottom\").innerHTML = \"<hr>\";\n}", "function main_entry(){\n\tinit_map();\n\tinit_fsmap();\n\t\n\tregister_ui_events_dom(); // old style\n\t//register_ui_events_jquery(); // new style\n}", "function initialize_map () {\n directionsDisplay = new google.maps.DirectionsRenderer();\n MAP = new google.maps.Map(document.getElementById(\"map\"), mapOptions);\n directionsDisplay.setMap(MAP);\n OMS = new OverlappingMarkerSpiderfier(MAP, oms_options);\n // set_location();\n }", "function heroMap(_latitude,_longitude, element, markerTarget, sidebarResultTarget, showMarkerLabels, mapDefaultZoom){\n if( document.getElementById(element) != null ){\n\n // Create google map first -------------------------------------------------------------------------------------\n\n if( !mapDefaultZoom ){\n mapDefaultZoom = 14;\n }\n\n if( !optimizedDatabaseLoading ){\n var optimizedDatabaseLoading = 0;\n }\n\n var mapZoomAttr = $('#map').attr('data-map-zoom');\n var mapScrollAttr = $('#map').attr('data-map-scroll');\n if (typeof mapZoomAttr !== typeof undefined && mapZoomAttr !== false) {\n var zoomLevel = parseInt(mapZoomAttr);\n } else {\n var zoomLevel = 5;\n }\n if (typeof mapScrollAttr !== typeof undefined && mapScrollAttr !== false) {\n var scrollEnabled = parseInt(mapScrollAttr);\n } else {\n var scrollEnabled = false;\n }\n\n map = new google.maps.Map(document.getElementById(element), {\n zoom: mapDefaultZoom,\n scrollwheel: scrollEnabled,\n center: new google.maps.LatLng(_latitude, _longitude),\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n zoomControl: false,\n mapTypeControl: false,\n scaleControl: false,\n panControl: false,\n navigationControl: false,\n streetViewControl: false,\n styles: [{\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [{\n \"color\": \"#747474\"\n }, {\n \"lightness\": \"23\"\n }]\n }, {\n \"featureType\": \"poi.attraction\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#f38eb0\"\n }]\n }, {\n \"featureType\": \"poi.government\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#ced7db\"\n }]\n }, {\n \"featureType\": \"poi.medical\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#ffa5a8\"\n }]\n }, {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#c7e5c8\"\n }]\n }, {\n \"featureType\": \"poi.place_of_worship\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#d6cbc7\"\n }]\n }, {\n \"featureType\": \"poi.school\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#c4c9e8\"\n }]\n }, {\n \"featureType\": \"poi.sports_complex\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#b1eaf1\"\n }]\n }, {\n \"featureType\": \"road\",\n \"elementType\": \"geometry\",\n \"stylers\": [{\n \"lightness\": \"100\"\n }]\n }, {\n \"featureType\": \"road\",\n \"elementType\": \"labels\",\n \"stylers\": [{\n \"visibility\": \"off\"\n }, {\n \"lightness\": \"100\"\n }]\n }, {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#ffd4a5\"\n }]\n }, {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#ffe9d2\"\n }]\n }, {\n \"featureType\": \"road.local\",\n \"elementType\": \"all\",\n \"stylers\": [{\n \"visibility\": \"simplified\"\n }]\n }, {\n \"featureType\": \"road.local\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"weight\": \"3.00\"\n }]\n }, {\n \"featureType\": \"road.local\",\n \"elementType\": \"geometry.stroke\",\n \"stylers\": [{\n \"weight\": \"0.30\"\n }]\n }, {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text\",\n \"stylers\": [{\n \"visibility\": \"on\"\n }]\n }, {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [{\n \"color\": \"#747474\"\n }, {\n \"lightness\": \"36\"\n }]\n }, {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [{\n \"color\": \"#e9e5dc\"\n }, {\n \"lightness\": \"30\"\n }]\n }, {\n \"featureType\": \"transit.line\",\n \"elementType\": \"geometry\",\n \"stylers\": [{\n \"visibility\": \"on\"\n }, {\n \"lightness\": \"100\"\n }]\n }, {\n \"featureType\": \"water\",\n \"elementType\": \"all\",\n \"stylers\": [{\n \"color\": \"#d2e7f7\"\n }]\n }]\n });\n\n // Load necessary data for markers using PHP (from database) after map is loaded and ready ---------------------\n\n var allMarkers;\n\n // Geo Location ------------------------------------------------------------------------------------------------\n function GetCurrentGpsLocation(callback){\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function(position){\n var _latitude = position.coords.latitude;\n var _longitude = position.coords.longitude;\n $('#latitude').val(_latitude);\n $('#longitude').val(_longitude);\n mapCenter = new google.maps.LatLng(_latitude, _longitude);\n map.panTo(mapCenter);\n getcityStateOnDrag(_latitude, _longitude);\n $('#map').removeClass('fade-map');\n callback(\"success\");\n });\n\n } else {\n alert(\"Geolocation is not supported by this browser.\");\n }\n }\n\n // Geo Location on button click --------------------------------------------------------------------------------\n $(\".geo-location i\").on(\"click\", function() {\n $('#map').addClass('fade-map');\n $(this).addClass('fa-circle-o-notch fa-spin');\n $(this).removeClass('fa-crosshairs');\n GetCurrentGpsLocation(function (status) {\n $('.geo-location > i').fadeOut('slow');\n });\n });\n\n // Automatic Geo Location\n if( automaticGeoLocation == true ){\n $('#map').addClass('fade-map');\n GetCurrentGpsLocation(function (status) {\n $('.geo-location > i').fadeOut('slow');\n });\n }\n\n // When optimization is enabled, map will load the data in Map Bounds every time when it's moved. Otherwise will load data at once\n\n if( optimizedDatabaseLoading == 1 ){\n google.maps.event.addListener(map, 'idle', function(){\n if( searchClicked != 1 ){\n var ajaxData = {\n optimized_loading: 1,\n north_east_lat: map.getBounds().getNorthEast().lat(),\n north_east_lng: map.getBounds().getNorthEast().lng(),\n south_west_lat: map.getBounds().getSouthWest().lat(),\n south_west_lng: map.getBounds().getSouthWest().lng()\n };\n if( markerCluster != undefined ){\n markerCluster.clearMarkers();\n }\n loadData(ajaxurl+\"?action=getlocHomemap\");\n }\n });\n }\n else {\n google.maps.event.addListenerOnce(map, 'idle', function(){\n loadData(ajaxurl+\"?action=getlocHomemap\");\n });\n }\n\n if( showMarkerLabels == true ){\n $(\".hero-section .map\").addClass(\"show-marker-labels\");\n }\n\n\n var zoomControlDiv = document.createElement('div');\n var zoomControl = new ZoomControl(zoomControlDiv, map);\n\n function ZoomControl(controlDiv, map) {\n zoomControlDiv.index = 1;\n map.controls[google.maps.ControlPosition.RIGHT_CENTER].push(zoomControlDiv);\n controlDiv.style.padding = '5px';\n controlDiv.className = \"zoomControlWrapper\";\n var controlWrapper = document.createElement('div');\n controlDiv.appendChild(controlWrapper);\n var zoomInButton = document.createElement('div');\n zoomInButton.className = \"custom-zoom-in\";\n controlWrapper.appendChild(zoomInButton);\n var zoomOutButton = document.createElement('div');\n zoomOutButton.className = \"custom-zoom-out\";\n controlWrapper.appendChild(zoomOutButton);\n google.maps.event.addDomListener(zoomInButton, 'click', function() {\n map.setZoom(map.getZoom() + 1);\n });\n google.maps.event.addDomListener(zoomOutButton, 'click', function() {\n map.setZoom(map.getZoom() - 1);\n });\n }\n var scrollEnabling = $('#scrollEnabling');\n $(scrollEnabling).click(function(e) {\n e.preventDefault();\n $(this).toggleClass(\"enabled\");\n if ($(this).is(\".enabled\")) {\n map.setOptions({\n 'scrollwheel': true\n });\n } else {\n map.setOptions({\n 'scrollwheel': false\n });\n }\n })\n\n\n // Create and place markers function ---------------------------------------------------------------------------\n\n var i;\n var a;\n var newMarkers = [];\n var resultsArray = [];\n var visibleMarkersId = [];\n var visibleMarkersOnMap = [];\n var markerCluster;\n\n function placeMarkers(markers){\n\n newMarkers = [];\n\n for (i = 0; i < markers.length; i++) {\n\n var marker;\n var markerContent = document.createElement('div');\n var thumbnailImage;\n\n if (markers[i][\"marker_image\"] != undefined) {\n thumbnailImage = markers[i][\"marker_image\"];\n }\n else {\n thumbnailImage = path+\"assets/img/default.png\";\n }\n\n if (markers[i][\"featured\"] == 1) {\n markerContent.innerHTML =\n '<div class=\"marker\" data-id=\"' + markers[i][\"id\"] + '\">' +\n '<div class=\"title\">' + markers[i][\"title\"] + '</div>' +\n '<div class=\"marker-wrapper\">' +\n '<div class=\"pin\">' +\n '<div class=\"image\" style=\"background-image: url(' + thumbnailImage + ');\"></div>' +\n '</div>' +\n '</div>';\n }\n else {\n markerContent.innerHTML =\n '<div class=\"marker\" data-id=\"' + markers[i][\"id\"] + '\">' +\n '<div class=\"title\">' + markers[i][\"title\"] + '</div>' +\n '<div class=\"marker-wrapper\">' +\n '<div class=\"pin\">' +\n '<div class=\"image iconPosition\"><i class=\"' +markers[i][\"cat_icon\"]+'\"></i></div>' +\n '</div>' +\n '</div>' +\n '</div>';\n }\n\n // Latitude, Longitude and Address\n\n if ( markers[i][\"latitude\"] && markers[i][\"longitude\"] && markers[i][\"address\"] ){\n renderRichMarker(i,\"latitudeLongitude\");\n }\n\n // Only Address\n\n else if ( markers[i][\"address\"] && !markers[i][\"latitude\"] && !markers[i][\"longitude\"] ){\n renderRichMarker(i,\"address\");\n }\n\n // Only Latitude and Longitude\n\n else if ( markers[i][\"latitude\"] && markers[i][\"longitude\"] && !markers[i][\"address\"] ) {\n renderRichMarker(i,\"latitudeLongitude\");\n }\n\n // No coordinates\n\n else {\n console.log( \"No location coordinates\");\n }\n }\n\n // Create marker using RichMarker plugin -------------------------------------------------------------------\n\n function renderRichMarker(i,method){\n if( method == \"latitudeLongitude\" ){\n marker = new RichMarker({\n position: new google.maps.LatLng( markers[i][\"latitude\"], markers[i][\"longitude\"] ),\n map: map,\n draggable: false,\n content: markerContent,\n flat: true\n });\n google.maps.event.addListener(marker, 'click', (function(marker, i) {\n return function() {\n if( markerTarget == \"sidebar\"){\n openSidebarDetail( $(this.content.firstChild).attr(\"data-id\") );\n }\n else if( markerTarget == \"gmapAdBox\" ){\n opengmapAdBox( $(this.content.firstChild).attr(\"data-id\"), this, i );\n }\n else if( markerTarget == \"modal\" ){\n openModal($(this.content.firstChild).attr(\"data-id\"), \"modal_item.php\");\n }\n }\n })(marker, i));\n newMarkers.push(marker);\n }\n else if ( method == \"address\" ){\n a = i;\n var geocoder = new google.maps.Geocoder();\n var geoOptions = {\n address: markers[i][\"address\"]\n };\n geocoder.geocode(geoOptions, geocodeCallback(markerContent));\n\n }\n\n if ( mapAutoZoom == 1 ){\n var bounds = new google.maps.LatLngBounds();\n for (var i = 0; i < newMarkers.length; i++ ) {\n bounds.extend(newMarkers[i].getPosition());\n }\n map.fitBounds(bounds);\n }\n\n }\n\n // Ajax loading of gmapAdBox -------------------------------------------------------------------------------------\n\n var lastgmapAdBox;\n\n function opengmapAdBox(id, _this, i){\n $.ajax({\n url: ajaxurl+\"?action=openlocatoionPopup\",\n dataType: \"html\",\n data: { id: id },\n method: \"POST\",\n success: function(results){\n gmapAdBoxOptions = {\n content: results,\n disableAutoPan: false,\n pixelOffset: new google.maps.Size(-135, -50),\n zIndex: null,\n alignBottom: true,\n boxClass: \"gmapAdBox-wrapper\",\n enableEventPropagation: true,\n closeBoxMargin: \"0px 0px -8px 0px\",\n closeBoxURL: path + \"/assets/img/close-btn.png\",\n gmapAdBoxClearance: new google.maps.Size(1, 1)\n };\n\n if( lastgmapAdBox != undefined ){\n lastgmapAdBox.close();\n }\n //console.log(gmapAdBoxOptions);\n newMarkers[i].gmapAdBox = new gmapAdBox(gmapAdBoxOptions);\n newMarkers[i].gmapAdBox.open(map, _this);\n lastgmapAdBox = newMarkers[i].gmapAdBox;\n\n setTimeout(function(){\n //$(\"div#\"+ id +\".item.gmapAdBox\").parent().addClass(\"show\");\n $(\".item.gmapAdBox[data-id=\"+ id +\"]\").parent().addClass(\"show\");\n }, 10);\n\n google.maps.event.addListener(newMarkers[i].gmapAdBox,'closeclick',function(){\n $(lastClickedMarker).removeClass(\"active\");\n });\n },\n error : function () {\n console.log(\"error\");\n }\n });\n }\n\n // Geocoder callback ---------------------------------------------------------------------------------------\n\n function geocodeCallback(markerContent) {\n return function(results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n marker = new RichMarker({\n position: results[0].geometry.location,\n map: map,\n draggable: false,\n content: markerContent,\n flat: true\n });\n newMarkers.push(marker);\n renderResults();\n if ( mapAutoZoom == 1 ){\n var bounds = new google.maps.LatLngBounds();\n for (var i = 0; i < newMarkers.length; i++ ) {\n bounds.extend(newMarkers[i].getPosition());\n }\n map.fitBounds(bounds);\n }\n google.maps.event.addListener(marker, 'click', (function(marker, i) {\n return function() {\n if( markerTarget == \"sidebar\"){\n openSidebarDetail( $(this.content.firstChild).attr(\"data-id\") );\n }\n else if( markerTarget == \"gmapAdBox\" ){\n opengmapAdBox( $(this.content.firstChild).attr(\"data-id\"), this, 0 );\n }\n else if( markerTarget == \"modal\" ){\n openModal($(this.content.firstChild).attr(\"data-id\"), \"modal_item.php\");\n }\n\n }\n })(marker, i));\n } else {\n console.log(\"Geocode failed \" + status);\n }\n }\n }\n\n function openSidebarDetail(id){\n $.ajax({\n url: ajaxurl+\"?action=sidebar_detail\",\n data: { id: id },\n method: \"POST\",\n success: function(results){\n $(\".sidebar-wrapper\").html(results);\n $(\".results-wrapper\").removeClass(\"loading\");\n initializeOwl();\n ratingPassive(\".sidebar-wrapper .sidebar-content\");\n initializeFitVids();\n socialShare();\n initializeReadMore();\n $(\".sidebar-wrapper .back\").on(\"click\", function(){\n $(\".results-wrapper\").removeClass(\"show-detail\");\n $(lastClickedMarker).removeClass(\"active\");\n });\n $(document).keyup(function(e) {\n switch(e.which) {\n case 27: // ESC\n $(\".sidebar-wrapper .back\").trigger('click');\n break;\n }\n });\n $(\".results-wrapper\").addClass(\"show-detail\");\n },\n error : function (e) {\n console.log(\"error \" + e);\n }\n });\n }\n\n // Highlight result in sidebar on marker hover -------------------------------------------------------------\n\n $(\".marker\").live(\"mouseenter\", function(){\n var id = $(this).attr(\"data-id\");\n $(\".results-wrapper .results-content .result-item[data-id=\"+ id +\"] a\" ).addClass(\"hover-state\");\n }).live(\"mouseleave\", function(){\n var id = $(this).attr(\"data-id\");\n $(\".results-wrapper .results-content .result-item[data-id=\"+ id +\"] a\" ).removeClass(\"hover-state\");\n });\n\n $(\".marker\").live(\"click\", function(){\n var id = $(this).attr(\"data-id\");\n $(lastClickedMarker).removeClass(\"active\");\n $(this).addClass(\"active\");\n lastClickedMarker = $(this);\n });\n\n // Marker clusters -----------------------------------------------------------------------------------------\n\n var clusterStyles = [\n {\n url: path+'assets/img/cluster.png',\n height: 36,\n width: 36\n }\n ];\n\n markerCluster = new MarkerClusterer(map, newMarkers, { styles: clusterStyles, maxZoom: 16, ignoreHidden: true });\n\n // Show results in sidebar after map is moved --------------------------------------------------------------\n\n google.maps.event.addListener(map, 'idle', function() {\n renderResults();\n });\n\n renderResults();\n\n // Results in the sidebar ----------------------------------------------------------------------------------\n\n function renderResults(){\n resultsArray = [];\n visibleMarkersId = [];\n visibleMarkersOnMap = [];\n\n for (var i = 0; i < newMarkers.length; i++) {\n if ( map.getBounds().contains(newMarkers[i].getPosition()) ){\n visibleMarkersOnMap.push(newMarkers[i]);\n visibleMarkersId.push( $(newMarkers[i].content.firstChild).attr(\"data-id\") );\n newMarkers[i].setVisible(true);\n }\n else {\n newMarkers[i].setVisible(false);\n }\n }\n markerCluster.repaint();\n }\n }\n\n\n\n $(\"[data-ajax-response='map']\").on(\"click\", function(e){\n e.preventDefault();\n var dataFile = ajaxurl+\"?action=getlocHomemap\";\n searchClicked = 1;\n if( $(this).attr(\"data-ajax-auto-zoom\") == 1 ){\n mapAutoZoom = 5;\n }\n var form = $(this).closest(\"form\");\n var ajaxData = form.serialize();\n if( markerCluster != undefined ){\n markerCluster.clearMarkers();\n }\n loadData(dataFile, ajaxData);\n });\n\n function loadData(url, ajaxData){\n\n if (typeof ajaxData === \"undefined\") {\n var form = $('#hero-home-map');\n var ajaxData = form.serialize();\n }\n $.ajax({\n url: url,\n dataType: \"json\",\n method: \"GET\",\n data: ajaxData,\n cache: false,\n success: function(results){\n if(results!=0){\n for( var i=0; i <newMarkers.length; i++ ){\n newMarkers[i].setMap(null);\n }\n allMarkers = results;\n placeMarkers(results);\n }\n },\n error : function (e) {\n console.log(e);\n }\n });\n }\n\n // Autocomplete\n\n autoComplete(map);\n\n }\n else {\n //console.log(\"No map element\");\n }\n\n}", "function main() {\n\n var gears = createElement('img')\n gears.src = './gears.svg'\n global.app.appendChild(gears)\n\n if (global.NAV.geolocation) {\n global.NAV.geolocation.getCurrentPosition(app.onSuccess, app.onError)\n }\n}", "function initialize() {\n\n if(!!navigator.geolocation) { \n\n directionsDisplay = new google.maps.DirectionsRenderer();\n\n // Set map to be road map\n var mapOptions = {\n zoom: 17,\n mapTypeId: google.maps.MapTypeId.SATELLITE\n };\n\n map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);\n\n directionsDisplay.setMap(map);\n\n navigator.geolocation.getCurrentPosition(function(position) {\n \n var geolocate = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\n homeLocation = geolocate\n\n map.setCenter(geolocate);\n \n var marker = new google.maps.Marker({\n position: homeLocation,\n map: map,\n title:\"Home\",\n icon: \"img/house_icon.png\"\n });\n\n var characterMarker = new google.maps.Marker({\n position: homeLocation,\n map: map,\n title: \"Character\",\n icon: \"img/character.gif\",\n optimized: false\n });\n\n google.maps.event.addListener(marker, 'click', function() {\n var content = '<img src=\"img/house.png\">' + \n '<h1>This is your starting location!</h1>' +\n '<h3>Choose an adventure from the sidebar, or create your own!</h3>' //+ \n\n showInfoWindow(homeLocation, content);\n });\n\n });\n \n } else {\n document.getElementById('map-canvas').innerHTML = 'No Geolocation Support.';\n }\n}", "function initMap() {\n const laMesa = { lat: 32.772404, lng: -117.029327 };\n const directionsRenderer = new google.maps.DirectionsRenderer();\n const directionsService = new google.maps.DirectionsService();\n const map = new google.maps.Map(document.getElementById(\"map\"), {\n center: { lat: 32.7157, lng: -117.1611 },\n zoom: 10,\n });\n\n directionsRenderer.setMap(map);\n directionsRenderer.setPanel(document.getElementById(\"right-panel\"));\n calculateAndDisplayRoute(directionsService, directionsRenderer);\n\n // For loop to create custom map markers and info windows for each stop in the tour. \n for (i = 0; i < breweryTourList.length; i++) {\n\n var imageMarkerIndex = breweryTourList[i];\n\n //Variable to hold icon information and image for custom marker.\n var imageMarker = {\n url: \"http://www.artwithlarisse.com/icon/pint.png\",\n origin: new google.maps.Point(0, 0),\n anchor: new google.maps.Point(45, 45),\n scaledSize: new google.maps.Size(27, 43)\n }\n\n var markerLat = parseFloat(breweryList[imageMarkerIndex].lat);\n var markerLng = parseFloat(breweryList[imageMarkerIndex].lng);\n var markerPosition = { lat: markerLat, lng: markerLng };\n\n var nameInfoWindow = breweryList[imageMarkerIndex].name;\n var streetInfoWindow = breweryList[imageMarkerIndex].street;\n var cityInfoWindow = breweryList[imageMarkerIndex].city;\n var stateInfoWindow = breweryList[imageMarkerIndex].state;\n var postalCodeInfoWindow = breweryList[imageMarkerIndex].zipCode;\n var phoneInfoWindow = breweryList[imageMarkerIndex].phone;\n var websiteInfoWindow = breweryList[imageMarkerIndex].website;\n var breweryInfoWindow = (streetInfoWindow + \"; \" + cityInfoWindow + \"; \" + stateInfoWindow + \"; \" + postalCodeInfoWindow);\n\n // Content (information) variable for the brewery info window. \n var infoWindowContent =\n \"</div>\" +\n \"<h1>\" + nameInfoWindow + \"</h1>\" +\n '<div id=\"infoWindowContent\">' +\n \"<p ><b>Address: </b>\" + breweryInfoWindow + \"</p>\" +\n \"<p><b>Phone Number: </b>\" + phoneInfoWindow + \"</p>\" +\n '<p><b>Website: </b> <a href=\"' + websiteInfoWindow + '\" target=\"_blank\">' + websiteInfoWindow + \"</a></p>\" +\n \"</div>\" +\n \"</div>\";\n\n // Create custom map markers and info windows for each brewery on the tour map.\n const infowindow = new google.maps.InfoWindow({\n content: infoWindowContent\n });\n const marker = new google.maps.Marker({\n position: markerPosition,\n map,\n title: nameInfoWindow,\n icon: imageMarker,\n animation: google.maps.Animation.DROP\n });\n marker.addListener(\"click\", () => {\n infowindow.open(map, marker);\n });\n }\n}", "function initialize() {\n\n directionsDisplay = new google.maps.DirectionsRenderer();\n\n // detect browser type\n var useragent = navigator.userAgent;\n var mapdiv = document.getElementById(\"map-canvas\");\n\n // set map size for mobile vs desktop\n if (useragent.indexOf('iPhone') != -1 || useragent.indexOf('Android') != -1 ) {\n mapdiv.style.width = '100%';\n mapdiv.style.height = '85%';\n } \n\n // create the map object\n var startLatLng = new google.maps.LatLng(37.7829292,-122.4324726);\n var mapOptions = {\n // start on San Francisco\n center: startLatLng,\n zoom: 13\n };\n // create the map object\n map = new google.maps.Map(document.getElementById(\"map-canvas\"), mapOptions);\n\n directionsDisplay.setOptions({suppressMarkers: true});\n directionsDisplay.setMap(map);\n directionsDisplay.setPanel(document.getElementById(\"directionsDiv\"));\n\n getMarkers(map);\n}", "function initialize() {\n var map;\n var bounds = new google.maps.LatLngBounds();\n var mapOptions = {\n mapTypeId: 'roadmap',\n\t\tscrollwheel: false\n };\n \n // Display a map on the page\n map = new google.maps.Map(document.getElementById(\"map_canvas\"), mapOptions);\n map.setTilt(45);\n \n // Multiple Markers\n var markers = [\n ['Los Angeles, USA', 33.9205022,-118.2472962], // Location 1 Text and co-ordinates\n ['London, UK', 51.5135917,-0.14125609999996414], // Location Text 2 co-ordinates\n\t\t['Moscow, Russia', 55.57452,42.00816199999997] // Location Text 3 co-ordinates\n ];\n \n // Info Window Content\n var infoWindowContent = [\n ['<div class=\"info_content\">' +\n '<h5>Striking<small>Los Angeles</small></h5>' +\n '<p>Call Us: <strong>123-456-7890</p>' + '</div>'],\n ['<div class=\"info_content\">' +\n '<h5>Striking<small>London</small></h5>' +\n '<p>Call Us: <strong>123-456-7890</p>' + '</div>'],\n ['<div class=\"info_content\">' +\n '<h5>Striking<small>Moscow</small></h5>' +\n '<p>Call Us: <strong>123-456-7890</p>' + '</div>']\n ];\n \n // Display multiple markers on a map\n var infoWindow = new google.maps.InfoWindow(), marker, i;\n \n // Loop through our array of markers & place each one on the map \n for( i = 0; i < markers.length; i++ ) {\n var position = new google.maps.LatLng(markers[i][1], markers[i][2]);\n bounds.extend(position);\n marker = new google.maps.Marker({\n position: position,\n map: map,\n title: markers[i][0]\n });\n \n // Allow each marker to have an info window \n google.maps.event.addListener(marker, 'click', (function(marker, i) {\n return function() {\n infoWindow.setContent(infoWindowContent[i][0]);\n infoWindow.open(map, marker);\n }\n })(marker, i));\n\n // Automatically center the map fitting all markers on the screen\n map.fitBounds(bounds);\n }\n\n // Override our map zoom level once our fitBounds function runs (Make sure it only runs once)\n var boundsListener = google.maps.event.addListener((map), 'bounds_changed', function(event) {\n\t\t\n this.setZoom(3); // Set your zoom level like 14 or 15 insted 3\n\t\t\n google.maps.event.removeListener(boundsListener);\n });\n \n}", "function main() {\n var query = getQueryParams();\n\n var sdk = new FloorViewerSDK({\n siteUrl: query.siteUrl,\n accessHeaders: getUserCredentials(query),\n floorId: query.floorId,\n container: 'fv-container',\n });\n\n sdk.onReady().then(function () {\n sdk.getVersion().then(function (version) {\n console.log('Using VERSION:', version);\n });\n sdk.addMarkers(markers).then(function (ids) {\n _.each(ids, function(id, index) {\n markers[index].id = id;\n });\n });\n });\n\n var markers = [\n {\n icon: 'home',\n markerColor: 'red',\n latlng: [-3.23046875, 4.28125]\n },\n {\n icon: 'pizza',\n markerColor: 'blue',\n latlng: [-4.8203125, 1.265625]\n }\n ];\n\n sdk.onRoomClick(function (event) {\n console.log('latlng: ', event.latlng);\n var room = event.room;\n var div = document.getElementById('map-info');\n if (!room) {\n div.innerHTML = 'No room was clicked ...';\n return;\n }\n var roomInfo = {\n id: room.id,\n name: room.name,\n users: room.users\n };\n var content = '<strong>Room Info</strong>';\n content += '<pre>' + JSON.stringify(roomInfo, null, 2) + '</pre>';\n div.innerHTML = content;\n });\n\n sdk.onFvError(function (event) {\n var div = document.getElementById('map-errors');\n var content = '<pre>' + JSON.stringify(event, null, 2) + '</pre>';\n div.innerHTML = content;\n });\n\n ping.roomById = function () {\n var roomId = document.getElementById('input-room-id').value;\n if (roomId) {\n sdk.pingByRoomId(roomId);\n }\n };\n\n ping.roomByName = function () {\n var roomName = document.getElementById('input-room-name').value;\n if (roomName) {\n sdk.pingByRoomName(roomName, {\n duration: 10,\n color: [255, 0, 0],\n });\n }\n };\n\n select.roomById = function () {\n var roomId = document.getElementById('select-room-id').value;\n if (roomId) {\n sdk.selectRoomById(roomId);\n } else {\n sdk.unselectRooms();\n }\n };\n\n select.roomByName = function () {\n var roomName = document.getElementById('select-room-name').value;\n if (roomName) {\n sdk.selectRoomByName(roomName);\n } else {\n sdk.unselectRooms();\n }\n };\n\n setMarkers.home = function () {\n var checkbox = document.getElementById('home-checkbox');\n if (checkbox.checked) {\n sdk.showMarkers([markers[0].id]);\n } else {\n sdk.hideMarkers([markers[0].id]);\n }\n };\n\n setMarkers.pizza = function () {\n var checkbox = document.getElementById('pizza-checkbox');\n if (checkbox.checked) {\n sdk.showMarkers([markers[1].id]);\n } else {\n sdk.hideMarkers([markers[1].id]);\n }\n };\n}", "function initMap() {\n var mapOptions = {\n zoom: 8,\n center: {\n lat: -34.397,\n lng: 150.644\n }\n };\n exports.map = new google.maps.Map(\n document.getElementById(\"map\"),\n mapOptions\n );\n var marker = new google.maps.Marker({\n // The below line is equivalent to writing:\n // position: new google.maps.LatLng(-34.397, 150.644)\n position: {\n lat: -34.397,\n lng: 150.644\n },\n map: exports.map\n }); // You can use a LatLng literal in place of a google.maps.LatLng object when\n // creating the Marker object. Once the Marker object is instantiated, its\n // position will be available as a google.maps.LatLng object. In this case,\n // we retrieve the marker's position using the\n // google.maps.LatLng.getPosition() method.\n\n var infowindow = new google.maps.InfoWindow({\n content: \"<p>Marker Location:\" + marker.getPosition() + \"</p>\"\n });\n google.maps.event.addListener(marker, \"click\", function() {\n infowindow.open(exports.map, marker);\n });\n }", "function initMap() {\n var image = {\n url: 'https://image.flaticon.com/icons/png/512/196/196145.png',\n scaledSize: new google.maps.Size(100,100)\n }\n var fredCtr = {lat: 42.451796, lng: -79.338035};\n\n var map = new google.maps.Map(document.getElementById('map'),{\n\t zoom: 17,\n\t center: fredCtr,\n disableDefaultUI: true\n });\n\n $.getJSON('/mason')\n\t .done(function(data){\n\t var mCoords = {lat: data.lat, lng: data.long};\n\t marker = new google.maps.Marker({\n\t\t position: mCoords,\n\t\t map: map,\n icon: image,\n //label: data.name,\n //animation: google.maps.Animation.DROP,\n\t });\n\t })\n\t .fail(function(data){\n\t console.log(\"Could not find Mason\");\n\t});\n\n $.getJSON('/william')\n\t .done(function(data){\n\t var wCoords = {lat: data.lat, lng: data.long};\n\t marker1 = new google.maps.Marker({\n\t\tposition: wCoords,\n\t\tmap: map,\n icon: image,\n //label: data.name,\n //animation: google.maps.Animation.DROP,\n\t });\n\t})\n\t.fail(function(data){\n\t console.log(\"Could not find William\");\n\t });\n\n $.getJSON('/fenton')\n\t .done(function(data){\n\t var fCoords = {lat: data.lat, lng: data.long};\n\t marker2 = new google.maps.Marker({\n\t\t position: fCoords,\n\t\t map: map,\n icon: image,\n //label: data.name,\n //animation: google.maps.Animation.DROP,\n\t });\n\t})\n\t.fail(function(data){\n\t console.log(\"Could not find Fenton\");\n\t});\n ////////////////////////////////////////////////////////////////////\n}", "function makeMap() {\n // Make containers\n\n const div = mapsContainer.append('div').attr('class', 'map-container');\n const svg = div.append('svg').html(DEFS);\n\n const pathContainer = svg.append('g').attr('class', 'features');\n const baselineContainer = svg.append('g').attr('class', 'baseline');\n const chart19Container = svg.append('g').attr('class', 'slopes-19');\n const chart20Container = svg.append('g').attr('class', 'slopes-20');\n const textContainer = svg\n .append('g')\n .attr('class', 'text')\n // Create separate groups for white background and black foreground\n .selectAll('g')\n .data([true, false])\n .enter()\n .append('g');\n\n const riverLabel = svg\n .append('text')\n .attr('class', 'river-label')\n .selectAll('tspan')\n .data(['Hudson', 'River'])\n .join('tspan')\n .text(d => d);\n const campusLabel = svg\n .append('g')\n .attr('class', 'campus-labels')\n // Create separate groups for white background and black foreground\n .selectAll('text')\n .data([true, false])\n .enter()\n .append('text')\n .classed('white-background', d => d)\n .selectAll('tspan')\n .data(['Main', 'Campus'])\n .join('tspan')\n .text(d => d);\n\n const labelContainer = svg.append('g');\n const neighborhoodLabelsBg = labelContainer\n .append('g')\n .attr('class', 'neighborhood-labels')\n .selectAll('text')\n .data(LABELS)\n .enter('text')\n .append('text')\n .attr('class', 'white-background')\n .selectAll('tspan')\n .data(d => d.label)\n .join('tspan')\n .text(d => d);\n const neighborhoodLabels = labelContainer\n .append('g')\n .attr('class', 'neighborhood-labels')\n .selectAll('text')\n .data(LABELS)\n .enter('text')\n .append('text')\n .selectAll('tspan')\n .data(d => d.label)\n .join('tspan')\n .text(d => d);\n\n // Extract census tract features (contains all tracts in Manhattan)\n\n const allTracts = feature(influxData, influxData.objects.tracts);\n\n // Create a separate GeoJSON object that holds only the tracts we want to fit\n // the projection around\n\n const tracts = {\n type: 'FeatureCollection',\n features: allTracts.features.filter(({ properties: { census_tract } }) =>\n [36061018900, 36061021900].includes(+census_tract),\n ),\n };\n\n // Extract census tract centroids\n\n const centroids = feature(influxData, influxData.objects.tracts_centroids);\n\n // Create the paths that will become census tracts.\n // The `d` attribute won't be set until the resize function is called.\n\n const paths = pathContainer\n .selectAll('path')\n .data(allTracts.features)\n .enter()\n .append('path')\n .classed(\n 'columbia-outline',\n d => d.properties.census_tract === '36061020300',\n );\n paths\n .filter(\n ({ properties: { aug20, oct20, aug19, oct19 } }) =>\n (oct20 - aug20) / aug20 > (oct19 - aug19) / aug19,\n )\n .style('fill', shadedColor);\n\n // Create the things that will become the slope chart (e.g. line, arrow, circles)\n\n const circles = chart20Container\n .selectAll('circle')\n .data(centroids.features)\n .enter()\n .append('circle')\n .attr('r', 3);\n\n const baseline = baselineContainer\n .selectAll('line')\n .data(centroids.features)\n .enter()\n .append('line');\n\n /* const text = textContainer\n .selectAll('text')\n .data(centroids.features)\n .enter()\n .append('text')\n .classed('white-background', function () {\n return this.parentNode.__data__;\n }); */\n\n const slopes2020 = chart20Container\n .selectAll('line')\n .data(centroids.features)\n .enter()\n .append('line')\n .attr('stroke', c20);\n\n const slopes2019 = chart19Container\n .selectAll('line')\n .data(centroids.features)\n .enter()\n .append('line')\n .attr('stroke', c19);\n\n // Make a handleResize method that handles the things that depend on\n // width (path generator, paths, and svg)\n\n function handleResize() {\n // Recompute width and height; resize the svg\n\n const width = Math.min(WIDTH, document.documentElement.clientWidth - 30);\n const isMobile = width < 460;\n const height = (width * (isMobile ? 36 : 28)) / 30;\n arrowSize = isMobile ? 32 : 45;\n svg.attr('width', width);\n svg.attr('height', height);\n\n // Create the projection\n\n const albersprojection = geoAlbers()\n .rotate([122, 0, 0])\n .fitSize([width, height], tracts);\n\n // Create the path generating function; set the `d` attribute to the path\n // generator, which is called on the data we attached to the paths earlier\n\n const pathGenerator = geoPath(albersprojection);\n paths.attr('d', pathGenerator);\n\n // Define some commonly used coordinate functions\n\n const x = d => albersprojection(d.geometry.coordinates)[0];\n const y = d => albersprojection(d.geometry.coordinates)[1];\n const endpointX = year => d => {\n const slope =\n (d.properties['oct' + year] - d.properties['aug' + year]) /\n d.properties['aug' + year];\n const x = arrowSize * Math.cos(Math.atan(slope * 2));\n return albersprojection(d.geometry.coordinates)[0] + x;\n };\n const endpointY = year => d => {\n const slope =\n (d.properties['oct' + year] - d.properties['aug' + year]) /\n d.properties['aug' + year];\n const y = arrowSize * Math.sin(Math.atan(slope) * 2);\n return albersprojection(d.geometry.coordinates)[1] - y;\n };\n\n // Modify the positions of the elements\n\n circles.attr('cx', x).attr('cy', y);\n slopes2020\n .attr('x1', x)\n .attr('y1', y)\n .attr('x2', endpointX(20))\n .attr('y2', endpointY(20));\n slopes2019\n .attr('x1', x)\n .attr('y1', y)\n .attr('x2', endpointX(19))\n .attr('y2', endpointY(19));\n\n /* text\n .attr('x', x)\n .attr('y', y)\n .text(d => {\n let difference =\n (100 * (d.properties.oct - d.properties.aug)) / d.properties.aug;\n difference =\n difference < 10 ? difference.toFixed(1) : Math.round(difference);\n if (difference > 0) return '+' + difference + '%';\n else return '–' + Math.abs(difference) + '%';\n }); */\n\n baseline\n .attr('x1', x)\n .attr('y1', y)\n .attr('x2', d => x(d) + arrowSize)\n .attr('y2', y);\n\n riverLabel\n .attr('x', isMobile ? 0 : width / 6)\n .attr('y', (_, i) => height / 2 + i * 22);\n\n campusLabel\n .attr('x', albersprojection(CAMPUS_LABEL_LOC)[0])\n .attr('y', (_, i) => albersprojection(CAMPUS_LABEL_LOC)[1] + i * 18);\n\n neighborhoodLabels\n .attr('x', function () {\n return albersprojection(this.parentNode.__data__.loc)[0];\n })\n .attr('y', function (_, i) {\n return albersprojection(this.parentNode.__data__.loc)[1] + i * 20;\n });\n\n neighborhoodLabelsBg\n .attr('x', function () {\n return albersprojection(this.parentNode.__data__.loc)[0];\n })\n .attr('y', function (_, i) {\n return albersprojection(this.parentNode.__data__.loc)[1] + i * 20;\n });\n }\n\n // Call the resize function once; attach it to a resize listener\n\n handleResize();\n window.addEventListener('resize', debounce(handleResize, 400));\n}", "function northMap(){\n var map = new google.maps.Map(document.getElementById(\"google-map-north\"), {\n zoom: 6.5,\n center: { lat: 54.4697, lng: -5.0689}\n });\n\n var labels = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n var locations = [ \n {lat: 55.6069, lng: -1.6944},\n {lat: 53.7875, lng: -3.0533},\n {lat: 53.5639, lng: -3.1003},\n {lat: 54.4903, lng: -3.6062},\n {lat: 53.3723, lng: -3.1902},\n {lat: 54.4911, lng: -0.6162},\n ];\n var markers = locations.map(function(location, i) {\n return new google.maps.Marker({\n position: location,\n label: labels[i % labels.length]\n });\n });\n\n var markerCluster = new MarkerClusterer(map, markers, { imagePath:'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});\n\n}", "function initViewRoutesMap() {\r\n\r\n // Map style settings\r\n // Turn off points of interest\r\n var myStyles = [\r\n {\r\n featureType: \"poi\",\r\n elementType: \"labels\",\r\n stylers: [\r\n { visibility: \"off\" }\r\n ]\r\n }\r\n ];\r\n\r\n // Set up map centered around Seattle\r\n // ======================================================\r\n\r\n routesMap = new google.maps.Map(document.getElementById(\"routesMap\"), {\r\n zoom: 15,\r\n center: { lat: 47.60453, lng: -122.33422 },\r\n styles: myStyles\r\n });\r\n\r\n // Set up Direction Tools\r\n // ======================================================\r\n\r\n directionsService3 = new google.maps.DirectionsService;\r\n directionsDisplay3 = new google.maps.DirectionsRenderer({\r\n suppressMarkers: true\r\n });\r\n\r\n directionsDisplay3.setMap(routesMap);\r\n}", "function Maplace(args) {\n this.VERSION = '@VERSION';\n this.loaded = false;\n this.markers = [];\n this.circles = [];\n this.oMap = false;\n this.view_all_key = 'all';\n\n this.infowindow = null;\n this.maxZIndex = 0;\n this.ln = 0;\n this.oMap = false;\n this.oBounds = null;\n this.map_div = null;\n this.canvas_map = null;\n this.controls_wrapper = null;\n this.current_control = null;\n this.current_index = null;\n this.Polyline = null;\n this.Polygon = null;\n this.Fusion = null;\n this.directionsService = null;\n this.directionsDisplay = null;\n\n //default options\n this.o = {\n debug: false,\n map_div: '#gmap',\n controls_div: '#controls',\n generate_controls: true,\n controls_type: 'dropdown',\n controls_cssclass: '',\n controls_title: '',\n controls_on_map: true,\n controls_applycss: true,\n controls_position: google.maps.ControlPosition.RIGHT_TOP,\n type: 'marker',\n view_all: true,\n view_all_text: 'View All',\n pan_on_click: true,\n start: 0,\n locations: [],\n shared: {},\n map_options: {\n mapTypeId: google.maps.MapTypeId.ROADMAP\n },\n stroke_options: {\n strokeColor: '#0000FF',\n strokeOpacity: 0.8,\n strokeWeight: 2,\n fillColor: '#0000FF',\n fillOpacity: 0.4\n },\n directions_options: {\n travelMode: google.maps.TravelMode.DRIVING,\n unitSystem: google.maps.UnitSystem.METRIC,\n optimizeWaypoints: false,\n provideRouteAlternatives: false,\n avoidHighways: false,\n avoidTolls: false\n },\n circle_options: {\n radius: 100,\n visible: true\n },\n styles: {},\n fusion_options: {},\n directions_panel: null,\n draggable: false,\n editable: false,\n show_infowindows: true,\n show_markers: true,\n infowindow_type: 'bubble',\n listeners: {},\n\n //events\n beforeViewAll: function() {},\n afterViewAll: function() {},\n beforeShow: function(index, location, marker) {},\n afterShow: function(index, location, marker) {},\n afterCreateMarker: function(index, location, marker) {},\n\n beforeCloseInfowindow: function(index, location) {},\n afterCloseInfowindow: function(index, location) {},\n beforeOpenInfowindow: function(index, location, marker) {},\n afterOpenInfowindow: function(index, location, marker) {},\n\n afterRoute: function(distance, status, result) {},\n onPolylineClick: function(obj) {},\n onPolygonClick: function(obj) {},\n\n circleRadiusChanged: function(index, circle, marker) {},\n circleCenterChanged: function(index, circle, marker) {},\n\n drag: function(index, location, marker) {},\n dragEnd: function(index, location, marker) {},\n dragStart: function(index, location, marker) {}\n };\n\n //default menu types\n this.AddControl('dropdown', html_dropdown);\n this.AddControl('list', html_ullist);\n\n if (args && args.type === 'directions') {\n !args.show_markers && (args.show_markers = false);\n !args.show_infowindows && (args.show_infowindows = false);\n }\n\n //init\n $.extend(true, this.o, args);\n }", "function GeomapsDisplayMap(mapCanvas,options) \n{\n // private members\n var data_ = {'infowindow':'','count':0,'icons':{},'payload':{}};\n var config_ = [];\n var icons_ = [];\n var gicons_ = [];\n var defaultIcon = null;\n var gdir_ = null; \n var map = null; \n var mapCanvas_ = mapCanvas;\n var mapTooltip_ = mapCanvas_+'Tooltip';\n var mapTypes_ = {'G_NORMAL_MAP':G_NORMAL_MAP,'G_HYBRID_MAP':G_HYBRID_MAP,'G_SATELLITE_MAP':G_SATELLITE_MAP,'G_PHYSICAL_MAP':G_PHYSICAL_MAP};\n var markers_ = [];\n var markerClusterer = null;\n var bounds = new GLatLngBounds();\n var clustering_ = false;\n var clusteringMinMarkers_ = 250; // number of markers to trigger clustering when clustering enabled\n var directions_ = false;\n var panoClient_ = null;\n var myPano_ = null;\n var streetViewStatus_ = false;\n var streetViewOverlay_ = false;\n var lastLatLng_ = null;\n var markerClickTracker_ = false;\n \n if (typeof options === \"object\" && options !== null) \n {\n if (typeof options.clustering === \"boolean\") {\n clustering_ = options.clustering;\n }\n if (typeof options.clusteringMinMarkers === \"number\" && options.clusteringMinMarkers > 0) {\n clusteringMinMarkers_ = options.clusteringMinMarkers;\n }\n if (typeof options.directions === \"boolean\") {\n directions_ = options.directions;\n } \n if (typeof options.streetview === \"boolean\") {\n streetViewStatus_ = options.streetview;\n } \n if (typeof options.streetview_overlay === \"boolean\") {\n streetViewOverlay_ = options.streetview_overlay;\n } \n }\n\n icons_['default'] = {\n 'type':'custom', \n 'url':'http://chart.apis.google.com/chart?chst=d_map_spin&chld=0.6|0|FE766A|12|_|',\n 'size':[20,34]\n };\n icons_['default_hover'] = {\n 'type':'custom', \n 'url':'http://chart.apis.google.com/chart?chst=d_map_spin&chld=0.6|0|FDFF0F|12|_|',\n 'size':[20,34]\n };\n icons_['default_featured'] = {\n 'type':'custom',\n 'url':'http://chart.apis.google.com/chart?chst=d_map_spin&chld=0.6|0|5F8AFF|12|_|',\n 'size':[20,34]\n };\n icons_['numbered'] = {\n 'type':'numbered', \n 'url':'http://chart.apis.google.com/chart?chst=d_map_spin&chld=0.6|0|FE766A|12|_|{index}',\n 'size':[20,34]\n };\n icons_['numbered_hover'] = {\n 'type':'numbered', \n 'url':'http://chart.apis.google.com/chart?chst=d_map_spin&chld=0.6|0|FDFF0F|12|_|{index}',\n 'size':[20,34]\n };\n icons_['numbered_featured'] = {\n 'type':'numbered',\n 'url':'http://chart.apis.google.com/chart?chst=d_map_spin&chld=0.6|0|5F8AFF|12|_|{index}',\n 'size':[20,34]\n }; \n icons_['numbered_featured_hover'] = {\n 'type':'numbered', \n 'url':'http://chart.apis.google.com/chart?chst=d_map_spin&chld=0.6|0|FDFF0F|12|_|{index}',\n 'size':[20,34]\n };\n\n this.init = function()\n { \n if(GBrowserIsCompatible()) \n { \n if(map == null)\n {\n map = new GMap2(document.getElementById(mapCanvas_));\n map.setUI(setUIOptions());\n map.setMapType(mapTypes_[data_.mapUI.maptypes.def]);\n\n // Close non-google infowindow\n GEvent.addListener(map, \"dragstart\", function() { \n closeTooltip();\n });\n GEvent.addListener(map, \"movestart\", function() { \n closeTooltip();\n });\n GEvent.addListener(map, \"moveend\", function() { \n closeTooltip();\n });\n \n // Make the copyright wrap instead of overflowing outside the map div \n GEvent.addListener(map, \"tilesloaded\", function() { \n jQuery('.gmnoprint').next('div').css({'white-space':'normal','font-size':'9px'}); \n }); \n \n // Load custom icons\n for (var i in data_.icons) {\n icons_[i] = data_.icons[i];\n } \n \n // Auto-disable clustering based on min clustering markers\n if(clustering_ == true && data_.count > clusteringMinMarkers_) \n { \n for (var i in data_.payload) { \n// if(i.match(/^id[0-9]+$/)!=null){\n var latlng = new GLatLng(data_.payload[i].lat, data_.payload[i].lon);\n bounds.extend(latlng); \n markers_.push(createMarker(latlng,data_.payload[i])); // Must use markers_.push or cluseting doesn't work otherwise\n// }\n }\n this.centerAndZoomOnBounds();\n refreshMap(markers_);\n } else if (data_.count > 0) { \n for (var i in data_.payload) {\n// if(i.match(/^id[0-9]+$/)!=null){\n var latlng = new GLatLng(data_.payload[i].lat, data_.payload[i].lon);\n bounds.extend(latlng); \n markers_[i] = createMarker(latlng,data_.payload[i]);\n map.addOverlay(markers_[i]);\n// }\n }\n this.centerAndZoomOnBounds();\n } \n else {\n this.centerAndZoomOnBounds();\n } \n \n // Initialize directions\n if(directions_ == true)\n { \n gdir_ = new GDirections(map, document.getElementById(mapCanvas_+'_results'));\n GEvent.addListener(gdir_, \"error\", handleDirectionErrors);\n }\n \n panoClient_ = new GStreetviewClient(); \n myPano_ = new GStreetviewPanorama(document.getElementById(mapCanvas+'_streetview'));\n GEvent.addListener(myPano_, \"error\", handleNoFlash); \n if(streetViewStatus_==true)\n {\n // Trigger streetview on current location \n panoClient_.getNearestPanorama(map.getCenter(), showPanoData);\n\n // Enables streetview changes on map clicks, not just marker clicks\n GEvent.addListener(map, \"click\", function(overlay,latlng) {\n if(markerClickTracker_ == false)\n {\n panoClient_.getNearestPanorama(latlng, showPanoData);\n } \n markerClickTracker_ = false;\n }); \n } \n if(streetViewOverlay_==true)\n {\n svOverlay = new GStreetviewOverlay();\n map.addOverlay(svOverlay); \n } \n\n } else {\n map.checkResize();\n this.centerAndZoomOnBounds(); \n }\n } \n } \n \n this.addMarker = function(marker) { data_.payload.push(marker); } \n\n this.setCount = function(count) { data_.count = count; }\n \n this.setData = function(data) \n { \n data_ = data; \n if(undefined==data_.infowindow) data_.infowindow = 'google';\n }\n\n this.getData = function() { return data_; }\n \n this.getCount = function() { return data_.count; }\n\n this.addIcon = function(icon) { icons_.push(icon); } \n \n this.getMap = function() { return map; }\n \n this.findCenter = function()\n {\n var center_lat = (bounds.getNorthEast().lat() + bounds.getSouthWest().lat()) / 2.0;\n var center_lng = (bounds.getNorthEast().lng() + bounds.getSouthWest().lng()) / 2.0;\n if(bounds.getNorthEast().lng() < bounds.getSouthWest().lng()){\n center_lng += 180;\n } \n return new GLatLng(center_lat,center_lng)\n } \n \n this.panToCenter = function()\n {\n map.panTo(this.findCenter()); \n }\n \n this.centerAndZoomOnBounds = function()\n { \n var zoom; \n if(data_.mapUI.zoom.start != '')\n { \n zoom = data_.mapUI.zoom.start;\n } else { \n zoom = map.getBoundsZoomLevel(bounds);\n }\n map.setCenter(this.findCenter(), zoom); \n }\n \n this.toggleSizeMap = function(object, width)\n {\n var streetView = jQuery('#'+mapCanvas_+'_streetview');\n if(jQuery('#'+mapCanvas).width() <= width)\n {\n jQuery('#gm_resizeL').hide('fast',function(){jQuery(this).css('display','none');});\n jQuery('#gm_resizeS').show('fast',function(){jQuery(this).css('display','');});\n\t\t\tjQuery('#gm_mapColumn').animate({width: 600},\"slow\");\n jQuery('#'+mapCanvas_+'_above').animate({width: 600},\"slow\");\n if(streetView.css('display')=='none'){\n streetView.css('width',600) \n } else if(streetView.css('display')!='') {\n streetView.animate({width: 600},\"slow\",function(){ if(lastLatLng_!=null) panoClient_.getNearestPanorama(lastLatLng_, showPanoData);}); \n } \n jQuery('#'+mapCanvas_).animate({width: 600, height: 500},\"slow\",function(){object.init();}); \n } else {\n jQuery('#gm_resizeS').hide('fast',function(){jQuery(this).css('display','none');});\n jQuery('#gm_resizeL').show('fast',function(){jQuery(this).css('display','');}); \n \tjQuery('#gm_mapColumn').animate({width: width},\"slow\");\n jQuery('#'+mapCanvas_+'_above').animate({width: width},\"slow\");\n if(streetView.css('display')=='none'){\n streetView.css('width',width) \n } else if(streetView.css('display')!='') {\n streetView.animate({width: width},\"slow\",function(){if(lastLatLng_!=null) panoClient_.getNearestPanorama(lastLatLng_, showPanoData);}); \n }\n jQuery('#'+mapCanvas_).animate({width: width, height: width},\"slow\",function(){object.init();}); \n } \n }\n \n function setUIOptions()\n {\n var customUI = map.getDefaultUI();\n customUI.maptypes.normal = data_.mapUI.maptypes.map;\n customUI.maptypes.hybrid = data_.mapUI.maptypes.hybrid;\n customUI.maptypes.satellite = data_.mapUI.maptypes.satellite;\n customUI.maptypes.physical = data_.mapUI.maptypes.terrain;\n customUI.zoom.scrollwheel = data_.mapUI.zoom.scrollwheel;\n customUI.zoom.doubleclick = data_.mapUI.zoom.doubleclick;\n customUI.controls.scalecontrol = data_.mapUI.controls.scalecontrol;\n customUI.controls.largemapcontrol3d = data_.mapUI.controls.largemapcontrol3d;\n customUI.controls.smallzoomcontrol3d = data_.mapUI.controls.smallzoomcontrol3d;\n customUI.controls.maptypecontrol = data_.mapUI.controls.maptypecontrol;\n customUI.controls.menumaptypecontrol = data_.mapUI.controls.menumaptypecontrol;\n return customUI; \n }\n \n function refreshMap() \n {\n if (markerClusterer != null) {\n markerClusterer.clearMarkers();\n }\n var zoom = 15;\n var size = 30; // Grid size of a cluster, the higher the quicker \n //var style = document.getElementById(\"style\").value;\n zoom = zoom == -1 ? null : zoom;\n size = size == -1 ? null : size;\n //style = style == \"-1\" ? null: parseInt(style, 10);\n //markerClusterer = new MarkerClusterer(map, markers, {maxZoom: zoom, gridSize: size, styles: styles[style]});\n markerClusterer = new MarkerClusterer(map, markers_, {maxZoom: zoom, gridSize: size});\n }\n \n function createMarker(latlng,markerData)\n { \n if(markerData.icon == '' || markerData.icon == undefined) markerData.icon = 'default';\n if(markerData.featured == 1 && undefined!=icons_[markerData.icon+'_featured'])\n { \n markerData.icon = markerData.icon+'_featured';\n }\n var icon = makeIcon(markerData.icon,markerData.index);\n var marker = new GMarker(latlng, {icon: icon, title: markerData.title});\n marker.icon_name = markerData.icon;\n marker.id = markerData.id;\n marker.data = markerData;\n marker.data.latlng = latlng;\n GEvent.addListener(marker, \"click\", function() { \n showTooltip(marker); \n if(streetViewStatus_ == true)\n { \n panoClient_.getNearestPanorama(latlng, showPanoData);\n lastLatLng_ = latlng;\n markerClickTracker_ = true;\n }\n });\n GEvent.addListener(marker, \"infowindowbeforeclose\", function() {\n markerClickTracker_ = true;\n });\n GEvent.addListener(marker, \"mouseover\", function() {\n switchMarkerImage(marker,'_hover');\n return false;\n });\n GEvent.addListener(marker, \"mouseout\", function() { \n switchMarkerImage(marker,'');\n });\n \n return marker; \n } \n \n function makeIcon(name,index)\n { \n if(gicons_.length && undefined!=gicons_[name] && name != 'numbered') {\n return gicons_[name];\n }\n if(undefined==icons_[name]) name = 'default';\n var icon;\n\n switch(icons_[name].type)\n {\n case 'custom': \n icon = makeCustomIcon(icons_[name]); \n break;\n case 'numbered': \n case 'numbered_featured': \n icon = makeNumberedIcon(icons_[name],index); \n break;\n case 'default': \n default: \n icon = makeDefaultIcon(icons_[name]); \n break;\n }\n gicons_[name] = icon;\n return icon;\n }\n \n function makeCustomIcon(iconData)\n {\n var customIcon = new GIcon();\n customIcon.image = iconData.url;\n customIcon.iconSize = new GSize(iconData.size[0],iconData.size[1]);\n customIcon.iconAnchor = new GPoint(9,34);\n customIcon.infoWindowAnchor = new GPoint(9,2);\n return customIcon; \n }\n \n function makeDefaultIcon(iconData)\n { \n var defaultIcon = new GIcon(G_DEFAULT_ICON);\n defaultIcon.shadow = \"http://www.google.com/mapfiles/shadow50.png\";\n defaultIcon.iconSize = new GSize(iconData.size[0], iconData.size[1]);\n defaultIcon.shadowSize = new GSize(37, 34);\n defaultIcon.iconAnchor = new GPoint(9, 34);\n defaultIcon.infoWindowAnchor = new GPoint(9, 2); \n return new GIcon(defaultIcon, iconData.url);\n }\n \n function makeNumberedIcon(iconData,index)\n { \n if(null == defaultIcon)\n {\n defaultIcon = new GIcon(G_DEFAULT_ICON);\n defaultIcon.shadow = \"http://www.google.com/mapfiles/shadow50.png\";\n defaultIcon.iconSize = new GSize(20, 34);\n defaultIcon.shadowSize = new GSize(37, 34);\n defaultIcon.iconAnchor = new GPoint(9, 34);\n defaultIcon.infoWindowAnchor = new GPoint(9, 2); \n } \n if(index!='')\n {\n return new GIcon(defaultIcon, iconData.url.replace('{index}',(0+index)));\n } else {\n return new GIcon(defaultIcon, iconData.url.replace('{index}',''));\n }\n } \n \n function switchMarkerImage(marker,status)\n { \n if(undefined!=marker && icons_[marker.icon_name+status])\n {\n marker.setImage(icons_[marker.icon_name+status].url.replace('{index}',marker.data.index)); \n }\n } \n \n this.switchMarkerImageById = function(id,status)\n {\n switchMarkerImage(markers_['id'+id],status); \n } \n\n function renderTooltip(data,useTabs)\n { \n // Standard fields\n var roundDecimals = 1;\n var infoWindowContainer = jQuery('#gm_infowindowContainer').clone();\n var infoWindow = infoWindowContainer.find('.gm_infowindow');\n if(data_.mapUI.title.trim == true && data_.mapUI.title.trimchars > 0)\n {\n data.title = truncate(data.title,data_.mapUI.title.trimchars);\n }\n infoWindow.find('.gm-title').html(data.title);\n infoWindow.find('.gm-title').attr('href',data.url);\n\t\tif(false!=data.image){\n\t\t\tinfoWindow.find('.gm_image').html('<img class=\"gm-image\" src=\"'+data.image+'\" />');\n\t\t}\n infoWindow.find('.gm-user-rating-star').css('width',(data.user_rating/data.rating_scale)*100+'%');\n infoWindow.find('.gm-user-rating-value').html(Math.round(0+(data.user_rating)*Math.pow(10,roundDecimals))/Math.pow(10,roundDecimals));\n infoWindow.find('.gm-user-rating-count').html(parseInt(0+data.user_rating_count));\n infoWindow.find('.gm-editor-rating-star').css('width',(data.editor_rating/data.rating_scale)*100+'%');\n infoWindow.find('.gm-editor-rating-value').html(Math.round(0+(data.editor_rating)*Math.pow(10,roundDecimals))/Math.pow(10,roundDecimals));\n\n for(var i in data.field)\n { \n infoWindow.find('.gm-'+i).html(data.field[i]);\n }\n if(useTabs==false)\n {\n return infoWindowContainer.html(); \n } else {\n var tabs = [];\n infoWindowContainer.find('div.gm_tab').each(function()\n { \n tabs.push(new GInfoWindowTab(jQuery(this).attr('title'),jQuery(this).html()));\n });\n return tabs;\n }\n }\n \n this.showTooltipById = function(id)\n { \n showTooltip(markers_['id'+id]); \n } \n \n this.closeTooltip = function()\n {\n closeTooltip(); \n } \n \n function showTooltip(marker)\n {\n if(undefined!=marker)\n { \n switch(data_.infowindow)\n {\n case 'google': \n marker.openInfoWindowHtml(renderTooltip(marker.data,false));\n break;\n case 'google_tabs': \n marker.openInfoWindowTabsHtml(renderTooltip(marker.data,true));\n break;\n default:\n if(jQuery('#'+mapTooltip_).length == 0)\n {\n jQuery(\"#\"+mapCanvas_).append('<div id=\"'+mapTooltip_+'\" class=\"gm_mapInfowindow\"></div>'); \n }\n var tooltip = jQuery('#'+mapTooltip_);\n tooltip.html('');\n tooltip.marker = marker;\n closeTooltip();\n tooltip.html(renderTooltip(marker.data,false));\n // Attach close onclick event\n jQuery('.gm_infowindow').find('.gm-close-tooltip').unbind().click(function(){closeTooltip();});\n positionTooltip(tooltip);\n break;\n }\n }\n } \n \n function positionTooltip(tooltip)\n {\n var mapBounds = map.getBounds();\n if ( !mapBounds.contains(tooltip.marker.getPoint()) ) {\n map.setCenter(tooltip.marker.getPoint());\n }\n // Get relative positioning for tooltip\n var pointDivPixel = map.fromLatLngToContainerPixel(tooltip.marker.getPoint());\n tooltip.css('left',parseInt(pointDivPixel.x-367+parseInt(data_.mapUI.anchor.x))+'px');\n tooltip.css('top',parseInt(pointDivPixel.y-102+parseInt(data_.mapUI.anchor.y))+'px'); \n tooltip.fadeIn('slow');\n }\n \n function closeTooltip(){\n jQuery('#'+mapTooltip_).css('display','none');\n return false;\n }\n \n function truncate(text,len)\n { \n if (text.length > len) \n {\n var copy;\n text = copy = text.substring(0, len);\n text = text.replace(/\\w+$/, '');\n if(text == '') text = copy;\n text += '...';\n }\n return text; \n }\n \n /******************************\n * Street view functions\n ******************************/\n this.setStreetView = function(status)\n { \n streetViewStatus_ = status;\n }\n \n this.getStreetViewById = function(id)\n {\n if(streetViewStatus_ == true)\n {\n var streetView = jQuery('#'+mapCanvas_+'_streetview');\n if(streetView.css('display')!='block') streetView.slideDown();\n panoClient_.getNearestPanorama(markers_['id'+id].data.latlng, showPanoData);\n lastLatLng_ = markers_['id'+id].data.latlng;\n } \n }\n\n function showPanoData(panoData) {\n if (panoData.code != 200) {\n jQuery('#'+mapCanvas_+'_streetview').html('<div id=\"gm_streetview_msg\" style=\"margin:10px;\">'+geomapsLanguage[\"no_streetview\"]+'</div>');\n return;\n } else {\n jQuery('#gm_streetview_msg').remove();\n }\n myPano_.setLocationAndPOV(panoData.location.latlng);\n }\n \n function handleNoFlash(errorCode) {\n if (errorCode == 603) {\n jQuery('#'+mapCanvas_+'_streetview').html('<div id=\"gm_streetview_msg\" style=\"margin:10px;\">Flash doesn\\'t appear to be supported by your browser.</div>');\n return;\n }\n } \n \n /******************************\n * Get direction functions\n ******************************/\n function handleDirectionErrors()\n {\n if (gdir_.getStatus().code == G_GEO_UNKNOWN_ADDRESS)\n showMessage(geomapsLanguage[\"directions_bad_address\"]);\n else if (gdir_.getStatus().code == G_GEO_SERVER_ERROR)\n showMessage(\"A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.\\n Error code: \" + gdir_.getStatus().code);\n else if (gdir_.getStatus().code == G_GEO_MISSING_QUERY)\n showMessage(\"The HTTP q parameter was either missing or had no value. This means that no query was specified in the input.\\n Error code: \" + gdir_.getStatus().code);\n else if (gdir_.getStatus().code == G_GEO_BAD_KEY)\n showMessage(\"The given key is either invalid or does not match the domain for which it was given. \\n Error code: \" + gdir_.getStatus().code);\n else if (gdir_.getStatus().code == G_GEO_BAD_REQUEST)\n showMessage(\"A directions request could not be successfully parsed.\\n Error code: \" + gdir_.getStatus().code);\n else showMessage(geomapsLanguage[\"directions_request_error\"]);\n }\n \n this.getDirections = function(fromAddress, toAddress, locale) \n {\n hideErrorMessage();\n var results = jQuery('#'+mapCanvas_+'_results');\n if(results.css('display') == 'none' && jQuery('#'+mapCanvas_).css('width') == '100%') // Change map width and bring direction results into view\n {\n var directionsWidth = results.width();\n var mapWidth = parseInt(jQuery('#'+mapCanvas_).width() - directionsWidth - 20);\n jQuery('#'+mapCanvas_).css('width',mapWidth+'px');\n } \n jQuery('#'+mapCanvas_+'_results').show();\n gdir_.load(\"from: \" + fromAddress + \" to: \" + toAddress, {\"locale\":locale, \"travelMode\": parseInt(jQuery('#gm_direction_travelmode').val())}); \n }\n\n this.swapInputs = function()\n {\n var tmp = jQuery('#from_point').val();\n jQuery('#from_point').val(jQuery('#to_point').val());\n jQuery('#to_point').val(tmp); \n } \n function showMessage(text)\n {\n jQuery('#'+mapCanvas_+'_results').html(text).fadeIn();\n }\n function hideErrorMessage()\n {\n jQuery('#'+mapCanvas_+'_results').html('');\n }\n this.setCenterAndZoom = function(lat,lon,zoom)\n { \n map.setCenter(new GLatLng(lat,lon),zoom);\n }\n}", "function Maplace(args) {\n this.VERSION = '0.2.7';\n this.loaded = false;\n this.markers = [];\n this.circles = [];\n this.oMap = false;\n this.view_all_key = 'all';\n\n this.infowindow = null;\n this.maxZIndex = 0;\n this.ln = 0;\n this.oMap = false;\n this.oBounds = null;\n this.map_div = null;\n this.canvas_map = null;\n this.controls_wrapper = null;\n this.current_control = null;\n this.current_index = null;\n this.Polyline = null;\n this.Polygon = null;\n this.Fusion = null;\n this.directionsService = null;\n this.directionsDisplay = null;\n\n //default options\n this.o = {\n debug: false,\n map_div: '#gmap',\n controls_div: '#controls',\n generate_controls: true,\n controls_type: 'dropdown',\n controls_cssclass: '',\n controls_title: '',\n controls_on_map: true,\n controls_applycss: true,\n controls_position: google.maps.ControlPosition.RIGHT_TOP,\n type: 'marker',\n view_all: true,\n view_all_text: 'View All',\n pan_on_click: true,\n start: 0,\n locations: [],\n shared: {},\n map_options: {\n mapTypeId: google.maps.MapTypeId.ROADMAP\n },\n stroke_options: {\n strokeColor: '#0000FF',\n strokeOpacity: 0.8,\n strokeWeight: 2,\n fillColor: '#0000FF',\n fillOpacity: 0.4\n },\n directions_options: {\n travelMode: google.maps.TravelMode.DRIVING,\n unitSystem: google.maps.UnitSystem.METRIC,\n optimizeWaypoints: false,\n provideRouteAlternatives: false,\n avoidHighways: false,\n avoidTolls: false\n },\n circle_options: {\n radius: 100,\n visible: true\n },\n styles: {},\n fusion_options: {},\n directions_panel: null,\n draggable: false,\n editable: false,\n show_infowindows: true,\n show_markers: true,\n infowindow_type: 'bubble',\n listeners: {},\n\n //events\n beforeViewAll: function() {},\n afterViewAll: function() {},\n beforeShow: function(index, location, marker) {},\n afterShow: function(index, location, marker) {},\n afterCreateMarker: function(index, location, marker) {},\n\n beforeCloseInfowindow: function(index, location) {},\n afterCloseInfowindow: function(index, location) {},\n beforeOpenInfowindow: function(index, location, marker) {},\n afterOpenInfowindow: function(index, location, marker) {},\n\n afterRoute: function(distance, status, result) {},\n onPolylineClick: function(obj) {},\n onPolygonClick: function(obj) {},\n\n circleRadiusChanged: function(index, circle, marker) {},\n circleCenterChanged: function(index, circle, marker) {},\n\n drag: function(index, location, marker) {},\n dragEnd: function(index, location, marker) {},\n dragStart: function(index, location, marker) {}\n };\n\n //default menu types\n this.AddControl('dropdown', html_dropdown);\n this.AddControl('list', html_ullist);\n\n if (args && args.type === 'directions') {\n !args.show_markers && (args.show_markers = false);\n !args.show_infowindows && (args.show_infowindows = false);\n }\n\n //init\n $.extend(true, this.o, args);\n }", "function initMap() {\n var myLatLng = {\n lat: 42.886386,\n lng: -78.878176\n };\n\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 10,\n center: myLatLng\n });\n\n var marker = new google.maps.Marker({\n position: {\n lat: 42.892424,\n lng: -78.871549\n },\n map: map,\n title: 'Town Ballroom',\n icon: 'favicon.ico'\n });\n var marker2 = new google.maps.Marker({\n position: {\n lat: 42.915547,\n lng: -78.889803\n },\n map: map,\n title: 'Pho Dollar',\n icon: 'favicon.ico'\n });\n var marker3 = new google.maps.Marker({\n position: {\n lat: 42.938835,\n lng: -78.882346\n },\n map: map,\n title: 'Wegmans',\n icon: 'favicon.ico'\n });\n var marker4 = new google.maps.Marker({\n position: {\n lat: 42.912071,\n lng: -78.876872\n },\n map: map,\n title: 'Thirsy Buffalo',\n icon: 'favicon.ico'\n });\n var marker5 = new google.maps.Marker({\n position: {\n lat: 42.894570,\n lng: -78.868439\n },\n map: map,\n title: 'Work',\n icon: 'favicon.ico'\n });\n var marker6 = new google.maps.Marker({\n position: {\n lat: 42.964949,\n lng: -78.772100\n },\n map: map,\n title: 'Parents',\n icon: 'favicon.ico'\n });\n var marker7 = new google.maps.Marker({\n position: {\n lat: 42.911461,\n lng: -78.877383\n },\n map: map,\n title: 'Milkies',\n icon: 'favicon.ico'\n });\n var marker8 = new google.maps.Marker({\n position: {\n lat: 40.761490,\n lng: -73.977632\n },\n map: map,\n title: 'MoMA',\n icon: 'favicon.ico'\n });\n var marker9 = new google.maps.Marker({\n position: {\n lat: 43.652580,\n lng: -79.398615\n },\n map: map,\n title: 'Chinatown Toronto',\n icon: 'favicon.ico'\n });\n var marker10 = new google.maps.Marker({\n position: {\n lat: 41.942873,\n lng: -87.677510\n },\n map: map,\n title: 'Chicago',\n icon: 'favicon.ico'\n });\n var marker11 = new google.maps.Marker({\n position: {\n lat: 40.437273,\n lng: -79.980915\n },\n map: map,\n title: 'Pittsburgh',\n icon: 'favicon.ico'\n });\n var marker12 = new google.maps.Marker({\n position: {\n lat: 33.466140,\n lng: -79.099388\n },\n map: map,\n title: 'Litchfield Beach',\n icon: 'favicon.ico'\n });\n var marker13 = new google.maps.Marker({\n position: {\n lat: 42.923203,\n lng: -78.876828\n },\n map: map,\n title: 'Cafe Aroma',\n icon: 'favicon.ico'\n });\n var marker14 = new google.maps.Marker({\n position: {\n lat: 42.276178,\n lng: -78.670873\n },\n map: map,\n title: 'Madigans',\n icon: 'favicon.ico'\n });\n var marker15 = new google.maps.Marker({\n position: {\n lat: 42.827938,\n lng: -78.696278\n },\n map: map,\n title: 'Columns',\n icon: 'favicon.ico'\n });\n var marker16 = new google.maps.Marker({\n position: {\n lat: 40.757283,\n lng: -73.965424\n },\n map: map,\n title: 'NYC Airbnb',\n icon: 'favicon.ico'\n });\n var marker17 = new google.maps.Marker({\n position: {\n lat: 42.894987,\n lng: -78.875933\n },\n map: map,\n title: 'Buffalo Club',\n icon: 'favicon.ico'\n });\n var marker17 = new google.maps.Marker({\n position: {\n lat: 42.903345,\n lng: -78.873207\n },\n map: map,\n title: 'CTG',\n icon: 'favicon.ico'\n });\n var marker17 = new google.maps.Marker({\n position: {\n lat: 43.021918,\n lng: -78.687792\n },\n map: map,\n title: 'Cousins',\n icon: 'favicon.ico'\n });\n}", "function startHere(){\n createStartMap();// step 1: Create a map on load with basemap and overlay map (with empty faultlinesLayer & EarhtquakesLayer ).\n addFaultlinesLayer();//step 2: Query data and add them to faultlinesLayer \n addEarthquakesLayer(); //step 3: Query data and add them to EarhtquakesLayer \n}", "function initMap() {\n// var data = \"<?php echo $name?>\";\n// console.log(data);\n console.log(\"WOOOOOO\");\n //setting coordinates to center the map around (--> currently Whitby, Ontario)\n var center = {\n lat: 41.4925,\n lng: -99.9018\n };\n\n //initializing map inside div with ID '#map', setting zoom level and centering location\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 4, //the higher the number, the more zoomed in you are\n center: center\n });\n\n\n// downloadUrl('http://localhost:8888/Arena-Review/php/results.php', function (data) {\n//\n// var xml = data.responseXML;\n// \n// var markers = xml.documentElement.getElementsByTagName('marker');\n//// Array.prototype.forEach.call(markers, function (markerElem) {\n//// //var id = markerElem.getAttribute('id');\n//// var name = markerElem.getAttribute('name');\n//// //var address = markerElem.getAttribute('address');\n//// //var type = markerElem.getAttribute('type');\n//// var point = new google.maps.LatLng(\n//// parseFloat(markerElem.getAttribute('lat')),\n//// parseFloat(markerElem.getAttribute('lng')));\n////\n//// var infowincontent = document.createElement('div');\n//// var strong = document.createElement('strong');\n//// strong.textContent = name\n//// infowincontent.appendChild(strong);\n//// infowincontent.appendChild(document.createElement('br'));\n////\n//// var text = document.createElement('text');\n//// text.textContent = address\n//// infowincontent.appendChild(text);\n//// var icon = customLabel[type] || {};\n//// var marker = new google.maps.Marker({\n//// map: map,\n//// position: point,\n//// label: icon.label\n//// });\n//// });\n// });\n// \n \n//http://localhost:8888/Arena-Review/php/results.xml\ndownloadUrl('http://localhost:8888/Arena-Review/php/results.xml', function (data) {\n var xml = data.responseXML;\n var markers = xml.documentElement.getElementsByTagName('marker');\n var count = 1;\n Array.prototype.forEach.call(markers, function (markerElem) {\n var id = markerElem.getAttribute('id');\n var name = markerElem.getAttribute('name');\n var address = markerElem.getAttribute('address');\n var phone = markerElem.getAttribute('phone');\n var point = new google.maps.LatLng(\n parseFloat(markerElem.getAttribute('lat')),\n parseFloat(markerElem.getAttribute('lon')));\n\n var infowincontent = document.createElement('div');\n var strong = document.createElement('strong');\n strong.textContent = name\n infowincontent.appendChild(strong);\n infowincontent.appendChild(document.createElement('br'));\n\n var text = document.createElement('text');\n text.textContent = address\n infowincontent.appendChild(text);\n \n var label_num = count.toString();\n \n var marker = new google.maps.Marker({\n map: map,\n position: point,\n label: label_num\n }); \n var markerInfoWindow = new google.maps.InfoWindow({\n content: infowincontent\n }); \n count+=1;\n marker.addListener('click', function () {\n markerInfoWindow.open(map, marker);\n });\n });\n});\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n// /* ===========================\n// --- Arena 1 (Iroquois)\n// =========================== */\n//\n// //setting coordinates for arena 1 (Iroquois Park Sports Centre)\n// var coords_iroquois = {\n// lat: 43.8620,\n// lng: -78.9428,\n// title: 'Iroquois'\n// };\n// //infobox for arena 1 -- contents filled\n// var infobox_iroquois = '<div class=\"infobox\">' +\n// '<div id=\"siteNotice\">' +\n// '</div>' +\n// '<h1 id=\"firstHeading\" class=\"firstHeading\">Iroquois Park Sports Centre</h1>' +\n// '<div id=\"bodyContent\">' + '500 Victoria St W<br>' + '<a href=\"tel:905-668-7765\">(905) 668-7765</a><br><br>' + '<a href=\"./individual_sample.html\">Link: Individual Page</a>' +\n// '</div>' +\n// '</div>';\n// //setting contents to an Google Maps infowindow container\n// var infowindow_iroquois = new google.maps.InfoWindow({\n// content: infobox_iroquois\n// });\n// //placing marker on map for arena 1 (Iroquois Park Sports Centre)\n// var marker_iroquois = new google.maps.Marker({\n// position: coords_iroquois,\n// map: map\n// });\n// //add listener for click function to pop infowindow up\n// marker_iroquois.addListener('click', function () {\n// infowindow_iroquois.open(map, marker_iroquois);\n// });\n\n\n// /* ===========================\n// --- Arena 2 (McKinney)\n// =========================== */\n// //setting coordinates for arena 2 (McKinney Centre)\n// var coords_mckinney = {\n// lat: 43.9208,\n// lng: -78.9553\n// };\n// //infobox for arena 2 -- contents filled\n// var infobox_mckinney = '<div class=\"infobox\">' +\n// '<div id=\"siteNotice\">' +\n// '</div>' +\n// '<h1 id=\"firstHeading\" class=\"firstHeading\">McKinney Centre</h1>' +\n// '<div id=\"bodyContent\">' + '222 McKinney Dr<br>' + '<a href=\"tel:905-655-2203\">(905) 655-2203</a><br><br>' + '<a href=\"./individual_sample.html\">Link: Individual Page</a>' +\n// '</div>' +\n// '</div>';\n// //setting contents to an Google Maps infowindow container\n// var infowindow_mckinney = new google.maps.InfoWindow({\n// content: infobox_mckinney\n// });\n// //placing marker on map for arena 2 (McKinney Centre)\n// var marker_mckinney = new google.maps.Marker({\n// position: coords_mckinney,\n// map: map\n// });\n// //add listener for click function to pop infowindow up\n// marker_mckinney.addListener('click', function () {\n// infowindow_mckinney.open(map, marker_mckinney);\n// });\n\n\n// /* ===========================\n// --- Arena 3 (Vipond)\n// =========================== */\n// //setting coordinates for arena 3 (Luther Vipond Memorial Arena)\n// var coords_vipond = {\n// lat: 43.9542,\n// lng: -78.9558\n// };\n// //infobox for arena 3 -- contents filled\n// var infobox_vipond = '<div class=\"infobox\">' +\n// '<div id=\"siteNotice\">' +\n// '</div>' +\n// '<h1 id=\"firstHeading\" class=\"firstHeading\">Luther Vipond Memorial Arena</h1>' +\n// '<div id=\"bodyContent\">' + '67 Winchester Rd<br>' + '<a href=\"tel:905-655-4571\">(905) 655-4571</a><br><br>' + '<a href=\"./individual_sample.html\">Link: Individual Page</a>' +\n// '</div>' +\n// '</div>';\n// //setting contents to an Google Maps infowindow container\n// var infowindow_vipond = new google.maps.InfoWindow({\n// content: infobox_vipond\n// });\n// //placing marker on map for arena 3 (Luther Vipond Memorial Arena)\n// var marker_vipond = new google.maps.Marker({\n// position: coords_vipond,\n// map: map\n// });\n// //add listener for click function to pop infowindow up\n// marker_vipond.addListener('click', function () {\n// infowindow_vipond.open(map, marker_vipond);\n// });\n}", "function initMap() {\n // The location of NAirobi\n const nairobi = { lat: -1.286389, lng: 36.817223 };\n // The map, centered at NAirobi\n const map = new google.maps.Map(document.getElementById(\"map\"), {\n zoom: 4,\n center: nairobi,\n });\n // The marker, positioned at NAirobi\n const marker = new google.maps.Marker({\n position: nairobi,\n map: map,\n });\n }", "function setupMap(e){\n \n var coords = {lat: 48.8957235, lng: 2.2494012};\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 14,\n center: coords,\n mapTypeId\t: google.maps.MapTypeId.ROADMAP\n });\n\n var marker = new google.maps.Marker({\n position: coords,\n map: map,\n title: \"Opticien Krys\",\n pixelOffset: new google.maps.Size(100,140)\n });\n}", "function initMap() {\n var map = new google.maps.Map(document.getElementById(\"map\"), {\n zoom: 10,\n center: {\n lat: 53.03760,\n lng: -9.07613\n }\n });\n\n var labels = \"ABCDE\";\n\n var locations = [{\n lat: 52.94537,\n lng: -9.06517\n }, {\n lat: 53.11988,\n lng: -9.15470\n }, {\n lat: 53.11598,\n lng: -9.14812\n }, {\n lat: 53.11906,\n lng: -9.15373\n }, {\n lat: 52.99014,\n lng: -9.21973\n }];\n\n var markers = locations.map(function (location, i) {\n return new google.maps.Marker({\n position: location,\n label: labels[i % labels.length]\n });\n });\n\n var markerCluster = new MarkerClusterer(map, markers, {\n imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'\n });\n}", "function initMap() {\r\n\r\n\t//initialize variables\r\n\tvar myPosition = {lat: 53.3601147, lng: -6.2763354};\r\n\tvar directionsDisplay = new google.maps.DirectionsRenderer;\r\n\tvar directionsService = new google.maps.DirectionsService;\r\n\tvar map = new google.maps.Map(document.getElementById('map'), {\r\n\t\tzoom: 15,\r\n\t\tcenter: myPosition\r\n\t});\r\n\r\n\t//set the marker icon\r\n\t//********************\r\n\tvar myMarkerImage = 'images/marker.png';\r\n\tvar marker = new google.maps.Marker({\r\n\t\tposition: myPosition,\r\n\t\tmap: map,\r\n\t\ticon: myMarkerImage\r\n\t});\r\n\r\n\t//display info and image when clicking on the marker icon\r\n\t//*******************************************************\r\n\tvar infoOnClick =\r\n\t'<div id = \"content\">' +\r\n\t\t'<div id = \"siteNotice\">' +\r\n\t\t'</div>' +\r\n\t\t'<h2> Ardeja Fitness Club </h2>' +\r\n\t\t'<div>' +\r\n\t\t\t'<p>' +\r\n\t\t\t\t'<img src = \"images/gym_2.jpg\" alt = \"Gym Logo\" width = \"200\" height = \"85\"' +\r\n\t\t\t'</p>' +\r\n\t\t\t'<p>' +\r\n\t\t\t\t'Ardeja is a Four Star fitness club situated in Dublin city centre.' +\r\n\t\t\t\t'We believe in helping you to the best of our abilities.' +\r\n\t\t\t\t'It is important for us to know your needs and goals.' +\r\n\t\t\t\t'Our team is fully professional, and it is dedicated to providing you ' +\r\n\t\t\t\t'with advice, support, fun, and experience.' +\r\n\t\t\t'</p>' +\r\n\t\t'</div>' +\r\n\t'</div>';\r\n\r\n\t//window with information\r\n\tvar infowindow = new google.maps.InfoWindow({\r\n\t\tcontent: infoOnClick\r\n\t});\r\n\r\n\t//add listener to open a window with info\r\n\tmarker.addListener('click', function() {\r\n\t\tinfowindow.open(map, marker);\r\n\t});\r\n\r\n\t//icon marker mouseover and mouseout\r\n\t//**********************************\r\n\tvar iconTitle =\r\n\t'<p> Ardeja Fitness Club </p>';\r\n\r\n\tvar titleInfo = new google.maps.InfoWindow({\r\n\t\tcontent: iconTitle\r\n\t});\r\n\r\n\t//add listener for mouseover (icon marker)\r\n\tgoogle.maps.event.addListener(marker, 'mouseover', function() {\r\n\t\ttitleInfo.open(map, marker);\r\n\t});\r\n\r\n\t//add listener for mouseout (icon marker)\r\n\tgoogle.maps.event.addListener(marker, 'mouseout', function() {\r\n\t\ttitleInfo.close();\r\n\t});\r\n\r\n\t//set the panel and map\r\n\t//*********************\r\n\tdirectionsDisplay.setMap(map);\r\n\tdirectionsDisplay.setPanel(document.getElementById('right-panel'));\r\n\r\n\tvar control = document.getElementById('floating-panel');\r\n\tcontrol.style.display = 'block';\r\n\tmap.controls[google.maps.ControlPosition.TOP_CENTER].push(control);\r\n\r\n\tvar onChangeHandler = function() {\r\n\t\tcalculateAndDisplayRoute(directionsService, directionsDisplay);\r\n\t};\r\n\r\n\tdocument.getElementById('start_point').addEventListener('change', onChangeHandler);\r\n}", "function beginMap() {\r\n appMod.is_error(false);\r\n win = new google.maps.InfoWindow();\r\n map = new google.maps.Map(document.getElementById('map'), {\r\n center: coordinates,\r\n zoom: 18\r\n });\r\n fetch_resorts();\r\n}", "function initMap() {\n directionsService = new google.maps.DirectionsService();\n directionsRenderer = new google.maps.DirectionsRenderer();\n \n map = new google.maps.Map(\n document.getElementById(\"map\"), {zoom: 11, center: {lat: -33.4688845, lng: -70.6654369},\n mapTypeId: 'styleMap',\n restriction: {\n latLngBounds: chileBounds,\n strictBounds: false,\n },\n disableDefaultUI: true,\n zoomControl: true,\n<<<<<<< HEAD\n=======\n mapTypeControl: true,\n>>>>>>> parent of cfd4b66... caca\n streetViewControl: true,\n });\n\n directionsRenderer.setMap(map);\n<<<<<<< HEAD\n\n map.mapTypes.set('styleMap', new google.maps.StyledMapType(styleMap, { name: 'Mapi Map' }));\n\n var centerControlDiv = document.createElement('div');\n var centerControl = new CenterControl(centerControlDiv, map);\n map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(centerControlDiv);\n\n var openEventsDiv = document.createElement('div');\n var opendiv = new openEventsControl(openEventsDiv, map);\n map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(openEventsDiv);\n\n var searchControlDiv = document.createElement('div');\n var mapdiv = new mapTypeControl(searchControlDiv, map);\n searchControlDiv.id = 'searchBarControl';\n searchControlDiv.className = 'col-sm-8';\n var srcControl = searchBarControl(searchControlDiv, map);\n map.controls[google.maps.ControlPosition.TOP_LEFT].push(searchControlDiv);\n\n addEvents()\n}", "function createMap() \n{ \n\tvar level = 0; \n\tif (g_res != null) { \n\t\tlevel = TGetLevelByResolution(g_res); \n\t} \n\telse { \n\t\tlevel = g_level; \n\t} \n \n\tvar uri = document.URL.split(\"#\")[1]; \n if( uri ) { \n\t var params = readUriParams(uri); \n\t var lat = params.coordinate[0]; \n var long = params.coordinate[1]; \n level = params.lvl; \n } \n \n\tvar main = document.getElementById(\"mainContent\"); \n\tvar width = main.scrollWidth - 240; \n\tvar height = main.scrollHeight; \n \n\tvar mapContainer = document.getElementById(\"centerMap\"); \n\tmapContainer.style.width = width + \"px\"; \n\tmapContainer.style.height = height + \"px\"; \n map0 = new tf.apps.GeoCloud.App({ fullURL: window.location.href, container: mapContainer}); \n\t//map0 = new TMap(mapContainer, lat || g_lat, long || g_lon, level, on_mapLoad, 0, true, g_engine, g_type); \n}", "function initialize() {\n\t\t\n\t\t// HTML5 GEOLOCATION to go here\n\t\t\n\n\t\tvar mapOptions = {\n\t\t\tcenter: centerLatLng,\n\t\t\tzoom: 2,\n\t\t\tmapTypeId: google.maps.MapTypeId.ROADMAP,\n\t\t\tpanControl: true,\n\t\t\tpanControlOptions: {\n\t\t\t\tposition: google.maps.ControlPosition.LEFT_BOTTOM\n\t\t},\n\t\tscrollwheel: false,\n\t\tzoomControl: true,\n\t\tzoomControlOptions: {\n\t\t position: google.maps.ControlPosition.LEFT_BOTTOM\n\t\t},\n\t\tscaleControl: true,\n\t\tstreetViewControl: false,\n\t\toverviewMapControl: false,\n\t\tmapTypeControl: false,\n\t\t};\n\n\t\tmap = new google.maps.Map(document.getElementById(\"jsMap\"),\n\t\t\t\t mapOptions);\n\n\t\t\n\n\t\t// Markers:\n\t\tfunction setMarkers(map, myLocations) {\n\t\t // Actual location:\n\t\t var hereIAm = new google.maps.Marker({\n\t\t\tposition: myActualLocation,\n\t\t\tmap: map,\n\t\t\tanimation: google.maps.Animation.BOUNCE,\n\t\t })\n\t\t locationsList = [];\n\t\t // Past locations:\n\t\t for (var i = 0; i < myLocations.length; i++) {\n\t\t\tvar location = myLocations[i];\n\t\t\tvar index = locationsList.indexOf(location[0]);\n\t\t\tif (index > -1) {\n\t\t\t // Checking for not repeating of the location\n\t\t\t locationsList.splice(index, 1);\n\t\t\t} // Markers, only showing once per visited location.\n\t\t\t // last location only has a bouncing marker (no fixed marker)\n\t\t\t else if (myLocations[i] != myLocations[0]) { \n\t\t\t\tvar locationLat = location[2];\n\t\t\t\tvar locationLng = location[3];\n\t\t\t}\n\t\t locationsList.push(location[0]);\n\n\t\t \tvar icon = { \n\t\t \t\turl:\"https://maps.gstatic.com/mapfiles/ms2/micons/red-dot.png\",\n\t\t \t\tscaledSize: new google.maps.Size(15, 15)\n\t\t \t}\n\n\t\t\tvar markerLatLng = new google.maps.LatLng(locationLat, locationLng);\n\t\t\tvar marker = new google.maps.Marker({\n\t\t\t\tposition: markerLatLng,\n\t\t\t\tmap: map,\n\t\t\t\ticon: icon,\n\t\t\t\tanimation: google.maps.Animation.DROP,\n\t\t\t\t// title: location[0],\n\t\t\t\t// zIndex: location[4]\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tsetMarkers(map, myLocations);\n\n\t }", "function initMap() {\n // The location of Uluru\n var bm = {lat: 41.086065, lng: 29.043930};\n var nh = {lat: 41.086613, lng: 29.045489};\n // The map, centered at Uluru\n var map = new google.maps.Map(\n document.getElementById('map'), {zoom: 14, center: bm});\n // The marker, positioned at Uluru\n var bm_marker = new google.maps.Marker({position: bm, map: map, label: 'BM', title: 'BM Buillding B (-2th) floor (for workshops)'});\n var nh_marker = new google.maps.Marker({position: nh, map: map, label: 'NH', title: 'New Hall 105'});\n }", "function initialise() {\n \n\n var mapOptions = {\n zoom: 10,\n center: { lat: -41.251906, lng: 174.792205}\n };\n\n //this map section is important!!! THis is going to\n //import the map and the directionsService and CalcRoute\n //allows us to get transport details by walking \n map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);\n \n directionsService = new google.maps.DirectionsService();\n directionsDisplay = new google.maps.DirectionsRenderer();\n directionsDisplay.setMap(map);\n\n //calcRoute();\n\n //this code above is important!!! THis is going to\n //import the map and the directionsService and CalcRoute\n //allows us to get transport details by walking \n\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (pos) {\n console.log(pos.coords);\n var myLocationAccuracy = new google.maps.Circle({\n 'center': new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude),\n 'radius': pos.coords.accuracy,\n\n })\n myLocation = new google.maps.Marker({\n 'position': new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude)\n });\n });\n }\n loadIslands(); // this is going to load the JSON file below \n // to load the locations of the bars.\n}", "function initResultMap() {\n // create the new map using the map element\n map = new google.maps.Map(document.getElementById('map'), {\n center: { lat: 43.2609, lng: -79.9192 }, // mcmaster university\n zoom: 15\n });\n\n // info window that opens when markers are clicked\n var infowindow = new google.maps.InfoWindow();\n\n // hardcoded marker, will not be hard coded in future\n var marker1 = new google.maps.Marker({\n position: { lat: 43.2609, lng: -79.9192 },\n map: map,\n title: '1280 Main St'\n });\n // hardcoded listener on previous marker, will not be hard coded in future\n marker1.addListener('click', function () {\n infowindow.setContent('<div><strong> 1280 Main St</strong><br>' +\n 'Distance: 1km<br>5$/h</div>' +\n '<form class=\"card-icon\" action=\"/parking.php\">');\n infowindow.open(map, marker1);\n });\n}", "show(){\n\t\tif (this.allRrequirementsLoaded()){\n\t\t\tthis.loadPlugin('maps',function(){\n\t\t\t\t//map types\n\t\t\t\tvar gtypes = { roadmap:'ROADMAP', satellite:'SATELLITE', hybrid:'HYBRID', terrain:'TERRAIN'},\n\t\t\t\t\tsettings = this.getSettings(),\n\t\t\t\t\tmap_icon = this.getMapIcon(),\n\t\t\t\t\tlatlong = this.getLatLong(),\n\t\t\t\t\tmarker = this.getMarker();\n\n\t\t\t\tsettings.mapTypeId = google.maps.MapTypeId[gtypes[this.getType()]];\n\t\t\t\tsettings.styles = this.getStyles();\n\t\t\t\tsettings.center = new google.maps.LatLng(latlong.lat,latlong.long); //set center\n\t\t\t\tvar Map = new google.maps.Map(this.getDom(this.getTarget()),settings);\n\t\t\t\tvar geocoder = new google.maps.Geocoder();\n\t\t\t\tgeocoder.geocode({ address:this.getAddress() },function(results,status){\n\t\t\t\t\tif (status==google.maps.GeocoderStatus.OK){\n\t\t\t\t\t\tvar loc = results[0].geometry.location;\n\n\t\t\t\t\t\tif (marker.is_special_marker)\n\t\t\t\t\t\t\tvar coords = new google.maps.LatLng(loc.lat()-0.00096,loc.lng()+0.0015); //lat - up/down, lng - left/right ... from the center\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tvar coords = new google.maps.LatLng(loc.lat(),loc.lng());\n\n\t\t\t\t\t\tMap.setCenter(coords);\n\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\tmap:Map,\n\t\t\t\t\t\t\t//position:map.getCenter(),\n\t\t\t\t\t\t\tposition:loc,\n\t\t\t\t\t\t\ttitle:this.getTitle(),\n\t\t\t\t\t\t\tdisableAutoPan:true\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t//check if there is a map icon\n\t\t\t\t\t\tif (map_icon)\n\t\t\t\t\t\t\tdata.icon = map_icon;\n\t\t\t\t\t\telse { //default map icon\n\t\t\t\t\t\t\tdata.icon = this.getMapIcon('default');\n\t\t\t\t\t\t\t//custom marker\n\t\t\t\t\t\t\t(marker.is_special_marker) && (data.position = new google.maps.LatLng(loc.lat()+0.000005,loc.lng()+0.00001));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar Marker = new google.maps.Marker(data);\n\t\t\t\t\t\tvar content = this.renderMarker();\n\t\t\t\t\t\tvar info_window = new google.maps.InfoWindow({\n\t\t\t\t\t\t\tcontent:content,\n\t\t\t\t\t\t\tmaxWidth:340\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif (!marker.is_special_marker)\n\t\t\t\t\t\t\tgoogle.maps.event.addListener(Marker,'click',function(event){\n\t\t\t\t\t\t\t\tinfo_window.open(Map,Marker);\n\t\t\t\t\t\t\t\tthis.fns('onMarkerShow');\n\t\t\t\t\t\t\t}.bind(this));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tMarker.setMap(Map);\n\n\t\t\t\t\t\tgoogle.maps.event.addListener(Marker,'click',function(event){ _log(event); });\n\t\t\t\t\t}\n\t\t\t\t}.bind(this));\n\n\t\t\t\tthis.fns('onShow');\n\t\t\t\tthis.values.is_shown = true;\n\t\t\t}.bind(this));\n\t\t}\n\t\treturn this;\n\t}", "function renderMap(LAT,LNG){\n \n // declaring the google map obl and geting the division where it should be loaded\n map = plugin.google.maps.Map.getMap(mapDiv);\n\n // creating a map obj that will be passed to map \n mapObj = {\n target: {lat: LAT, lng: LNG},\n zoom: 17,\n tilt: 60,\n bearing: 140,\n duration: 5000\n }\n \n // addint a marker to the map\n var marker = map.addMarker({\n position: {lat: LAT, lng: LNG},\n title: \"Your Task Location\",\n animation: plugin.google.maps.Animation.BOUNCE\n });\n\n //passig the map obg to initialize the map\n map.animateCamera(mapObj);\n marker.showInfoWindow();\n\n}", "function initMap() {\n // Instantiate a directions service.\n var directionsService = new google.maps.DirectionsService;\n // adding center location to UT Tower\n var utTower = { lat: 30.286235, lng: -97.739396 };\n map = new google.maps.Map(document.getElementById('gmap'), {\n zoom: 15,\n center: utTower\n });\n\n // Create a renderer for directions and bind it to the map.\n var directionsDisplay = new google.maps.DirectionsRenderer({ map: map });\n // Instantiate an info window to hold step text.\n var stepDisplay = new google.maps.InfoWindow;\n // Display the route between the initial start and end selections.\n calculateAndDisplayRoute(\n directionsDisplay, directionsService, markerArray, stepDisplay, map);\n var onChangeHandler = function() {\n calculateAndDisplayRoute(\n directionsDisplay, directionsService, markerArray, stepDisplay, map);\n };\n\n // This event listener calls addMarker() when the map is clicked.\n google.maps.event.addListener(map, 'click', function(event) {\n // creates a new marker each time the map is clicked\n var marker = new google.maps.Marker({\n position: {\n lat: event.latLng.lat(),\n lng: event.latLng.lng()\n },\n map: map\n })\n google.maps.event.addListener(marker, \"click\", function(event) {\n // content to display inside the infoWindow\n var contentString = '<div id=\"content\">' +\n '<div id=\"siteNotice\">' +\n '</div>' +\n '<form>' +\n '<form class=\"form-group\">' +\n '<h5 id=\"firstHeading\" class=\"firstHeading\">Choose Obstacle:</h5>' +\n '<div id=\"bodyContent\">' +\n '<fieldset class=\"form-group\">' +\n '<div class=\"form-check\">' +\n '<label class=\"form-check-label\">' +\n '<input type=\"radio\" class=\"form-check-input\" name=\"optionsRadios\" id=\"optionsRadios1\" value=\"Stairs\">' +\n '<p><b>Stairs</b>' +\n '</label>' +\n '</div>' +\n '<div class=\"form-check\">' +\n '<label class=\"form-check-label\">' +\n '<input type=\"radio\" class=\"form-check-input\" name=\"optionsRadios\" id=\"optionsRadios2\" value=\"Construction\">' +\n '<p><b>Construction</b>' +\n '</label>' +\n '</div>' +\n '<div class=\"form-check\">' +\n '<label class=\"form-check-label\">' +\n '<input type=\"radio\" class=\"form-check-input\" name=\"optionsRadios\" id=\"optionsRadios3\" value=\"roughRoad\">' +\n '<p><b>Rough Road</b>' +\n '</label>' +\n '</div>' +\n '<div class=\"form-check\">' +\n '<label class=\"form-check-label\">' +\n '<input type=\"radio\" class=\"form-check-input\" name=\"optionsRadios\" id=\"optionsRadios4\" value=\"Ramp\">' +\n '<p><b>Ramp</b>' +\n '</label>' +\n '</div>' +\n '<div class=\"form-check\">' +\n '<label class=\"form-check-label\">' +\n '<input type=\"radio\" class=\"form-check-input\" name=\"optionsRadios\" id=\"optionsRadios5\" value=\"Obstruction\">' +\n '<p><b>Obstruction</b>' +\n '</label>' +\n '</div>' +\n '<button type=\"submit\" id=\"userSubmit\" class=\"btn btn-primary\">Submit</button>' +\n '</form>' +\n '</div>' +\n '</div>';\n\n var infowindowSubmit = new google.maps.InfoWindow({\n content: contentString\n });\n\n // When a marker is added, Submit will push the information to Firebase\n infowindowSubmit.open(map, marker);\n // console.log(marker.position.lat());\n var position = {\n lat: marker.position.lat(),\n lng: marker.position.lng()\n };\n\n $(\"#userSubmit\").on('click', function() {\n var theirChoice = 'input:radio[name=optionsRadios]:checked';\n console.log(theirChoice);\n database.ref().push({\n lat: position.lat,\n lng: position.lng,\n userchoice: $(theirChoice).val()\n })\n })\n })\n });\n\n // appends navigation route to the map based on user input\n document.getElementById('start').addEventListener('change', onChangeHandler);\n document.getElementById('end').addEventListener('change', onChangeHandler);\n}", "function initialize() {\n var mapOptions = {\n center: new google.maps.LatLng(51.485672, -0.118554),\n zoom: 15,\n scrollwheel: false,\n disableDefaultUI: true\n };\n var map = new google.maps.Map(document.getElementById(\"map-canvas\"),\n mapOptions);\n\n var marker = new google.maps.Marker({\n position: new google.maps.LatLng(51.485672, -0.118554),\n map: map,\n title: \"Hello World!\"\n });\n }", "function initMap(){\n \t\tvar mapDiv = document.getElementById('map');\n \t\t map = new google.maps.Map(mapDiv, {\n \t\t\tcenter: {lat: 41.870800, lng: -87.650500},\n \t\t\tzoom: 12});\n \t\tvar mainmarker = new google.maps.Marker({ //Line 1\n \t\t\tposition: {lat: 41.870800, lng: -87.650500}, //Line2: Location to be highlighted\n \t\t\tmap: map,//Line 3: Reference to map object\n \t\t\ttitle: 'Chicago, Il', //Line 4: Title to be given\n icon : iconMainMarker\n \t\t})\n return map;\n \t}", "function initMaps($maps) {\n\n //var LEGEND_BG_LINK = '//images1.wikia.nocookie.net/__cb1/wowwiki/images/5/50/Map-legend-bg.jpg';\n var LEGEND_BG_LINK = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mN8tMnrPwAHOwLfJJG8pgAAAABJRU5ErkJggg=='; //#E2B24A\n var ABOUT_NOTE_LINK = '/Template:Map/Note';\n var EDIT_NOTE_ENABLE = true;\n var MAP_RATIO = null;\n\n var MAP_MIN_WIDTH = 50,\n MAP_MAX_WIDTH = 1002,\n MAP_MAX_HEIGHT = 880,\n COLUMN_WIDTH = 240,\n COLUMN_PADDING = 6,\n HEADER_HEIGHT = 15,\n HEADER_PADDING = 4,\n MARGIN_INNER = 10,\n MARGIN_VERTICAL = 15,\n MARGIN_HORIZONTAL = 25,\n LEGEND_PADDING = 10,\n MIN_SCALE = 25; // minimum percent of max scale before not open or auto close map\n\n var nId = 0; // counter for for non-conflicting node IDs\n\n function GetValue(value, defvalue) { return value || parseInt(value) == 0 ? value : defvalue; }\n var $settings = $('.map-settings').last();\n if ($settings.length) {\n LEGEND_BG_LINK = GetValue($settings.data(\"legend-bg-link\"), LEGEND_BG_LINK);\n ABOUT_NOTE_LINK = GetValue($settings.data(\"about-note-link\"), ABOUT_NOTE_LINK);\n EDIT_NOTE_ENABLE = GetValue($settings.data(\"edit-note-enable\"), EDIT_NOTE_ENABLE) != 0;\n MAP_RATIO = GetValue($settings.data(\"map-ratio\"), MAP_RATIO);\n MAP_MAX_WIDTH = GetValue($settings.data(\"map-max-width\"), MAP_MAX_WIDTH);\n MAP_MAX_HEIGHT = GetValue($settings.data(\"map-max-height\"), MAP_MAX_HEIGHT);\n }\n\n var callbacks = {\n close: $.Callbacks('unique'),\n enable: $.Callbacks('unique'),\n disable: $.Callbacks('unique'),\n refresh: $.Callbacks('unique'),\n resize: $.Callbacks('unique')\n };\n\n/* ********************* Preloader ********************* */\n\n var preloader = {\n\n imgDefers: {},\n imgDefer: function (src) {\n var imgDefer = this.imgDefers[src];\n if (!imgDefer) {\n var defer = $.Deferred(),\n img = new Image();\n\n img.src = src;\n img.onload = defer.resolve;\n this.imgDefers[src] = imgDefer = {\n defer: defer, img: img\n };\n }\n return imgDefer;\n },\n imgPromise: function (src) {\n var imgDefer = this.imgDefer(src);\n return imgDefer.defer.promise();\n },\n imgObj: function (src) {\n var imgDefer = this.imgDefer(src);\n var promise = imgDefer.defer.promise();\n if (promise.state() === 'pending')\n return null;\n\n return imgDefer.img;\n },\n\n marker: function (marker) { // preload markers\n var $marker = $(marker);\n var bg = $marker.css(\"background-image\");\n if (bg === \"none\") {\n bg = $marker.find(\"img\").attr(\"src\");\n } else {\n bg = bg.replace(/^url\\(['\"]?(.+?)['\"]?\\)/,'$1');\n }\n return (typeof bg == \"string\") ? this.imgPromise(bg) : $.when();\n },\n\n cancel: function (src) {\n delete preloader.imgDefers[src];\n },\n };\n\n/* ********************* Sort ********************* */\n\n function SortedObject(obj) {\n this.keys = [];\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n this.keys.push(i);\n }\n }\n this.keys.sort(this.compare);\n this.obj = obj;\n this.walker = -1;\n }\n\n var STOP_WORD_REGEX = /^\\s*(?:a|the)\\s+(.*)/i;\n\n $.extend(SortedObject.prototype, {\n\n compare: function (a, b) {\n /*jshint camelcase:false*/\n var m_a = a.match(STOP_WORD_REGEX),\n m_b = b.match(STOP_WORD_REGEX);\n a = m_a ? m_a[1] : a;\n b = m_b ? m_b[1] : b;\n return a > b ? 1 : (a < b ? -1 : 0);\n },\n\n reset: function () {\n this.walker = -1;\n },\n\n next: function () {\n return ++this.walker < this.keys.length;\n },\n\n key: function () {\n return this.keys[this.walker];\n },\n\n val: function () {\n return this.obj[this.keys[this.walker]];\n }\n });\n\n/* ********************* Tool Tips ********************* */\n\n // portions of this tipsie section derrived from mediawiki tipsy 12/1/17:\n // tipsy, facebook style tooltips for jquery, version 1.0.0a*\n // (c) 2008-2010 jason frame [[email protected]]\n // released under the MIT license\n // - shorter non-global version, w/ some mobile support\n // - note: CB means DOM callback verison that expects a DOM 'this'\n\n var tipsie = {\n get: function (elem) {\n return $.data(elem, 'tipsie');\n },\n\n enterCB: function () {\n var that = tipsie.get(this);\n if (!that) return;\n var options = that.options;\n that.hoverState = 'in';\n if (options.delayIn == 0) {\n that.show();\n } else {\n that.fixTitle();\n setTimeout(function() { if (that.hoverState == 'in') that.show(); }, options.delayIn);\n }\n },\n\n leaveCB: function() {\n var that = tipsie.get(this);\n if (!that) return;\n var options = that.options;\n that.hoverState = 'out';\n if (options.delayOut == 0) {\n that.hide();\n } else {\n setTimeout(function() { if (that.hoverState == 'out') that.hide(); }, options.delayOut);\n }\n },\n\n set: function ($elems, options) {\n if (!this.Tipsie) this.initTipsie();\n\n options = $.extend({}, this.defaults, options);\n\n $elems.each(function() {\n if (!tipsie.get(this)) $.data(this, 'tipsie', new tipsie.Tipsie(this, options));\n });\n\n if (options.trigger != 'manual')\n $elems.on(options.trigger == 'hover' ? 'mouseenter focus' : 'focus', this.enterCB)\n .on(options.trigger == 'hover' ? 'mouseleave blur' : 'blur', this.leaveCB);\n\n return this;\n },\n\n initTipsie: function () {\n this.defaults = {\n tipClass: null,\n delayIn: 0,\n delayOut: 0,\n fade: true,\n fallback: '',\n gravity: 'n',\n center: true,\n html: false,\n live: false,\n offset: 0,\n opacity: 1.0,\n title: 'title',\n trigger: 'hover'\n };\n\n this.Tipsie = function (element, options) {\n this.$element = $(element);\n this.options = $.metadata ? $.extend({}, options, this.$element.metadata()) : options;\n this.enabled = true;\n this.keyHandler = $.proxy( this.closeOnEsc, this );\n this.$template = null,\n this.fixTitle();\n };\n\n this.Tipsie.prototype = {\n/******** start Tipsie prototype ********/\n\nshow: function() {\n var title = null;\n if (!this.enabled || !(title = this.getTitle())) return;\n var element = this.$element[0], options = this.options;\n\n // measurethat - http://tinyurl.com/ycfdnf5k jsperf - http://tinyurl.com/y9fuegc7\n if (!this.$template)\n this.$template = $('<div class=\"tipsie\" role=\"tooltip\" aria-hidden=\"false\">' +\n '<div class=\"tipsie-arrow\"></div><div class=\"tipsie-inner\"></div></div>');\n var $this = this.$template.clone();\n\n var gravity = options.gravity, tipClass = options.tipClass;\n if (typeof gravity == 'function') gravity = gravity.call(element);\n if (typeof tipClass == 'function') tipClass = tipClass.call(element);\n $this.addClass('tipsie-' + gravity + ' ' + tipClass);\n\n $this.find('.tipsie-inner')[options.html ? 'html' : 'text'](title);\n\n var offset = this.$element.offset(), left = offset.left, top = offset.top,\n width = element.offsetWidth, height = element.offsetHeight;\n\n if (this.$tooltip) this.$tooltip.remove();\n this.$tooltip = $this;\n $this.appendTo(document.body); // force layout\n\n var tipWidth = $this[0].offsetWidth, tipHeight = $this[0].offsetHeight;\n\n switch (gravity.charAt(0)) {\n case 'n': top = top + height + options.offset; left = left + width / 2 - tipWidth / 2; break;\n case 's': top = top - tipHeight - options.offset; left = left + width / 2 - tipWidth / 2; break;\n case 'e': top = top + height / 2 - tipHeight / 2; left = left - tipWidth - options.offset; break;\n case 'w': top = top + height / 2 - actualHeight / 2; left = left + width + options.offset; break;\n }\n switch (gravity.charAt(1)) {\n case 'e': left = options.center ? (offset.left + width / 2 - tipWidth + 15) : (offset.left + width); break;\n case 'w': left = options.center ? (offset.left + width / 2 - 15) : offset.left; break;\n }\n\n $( document ).on( 'keydown', this.keyHandler );\n if (options.fade)\n $this.stop().css({ top: top, left: left }).animate({ opacity: options.opacity }, 100);\n else\n $this.css({ top: top, left: left, opacity: options.opacity});\n},\n\nhide: function() {\n $( document ).off( 'keydown', this.keyHandler );\n if (this.$tooltip) {\n if (this.options.fade)\n this.$tooltip.stop().fadeOut(100, function() { $(this).remove(); });\n else\n this.$tooltip.remove();\n }\n},\n\nfixTitle: function() {\n var $element = this.$element;\n if ($element.attr('title') || typeof($element.attr('original-title')) != 'string') {\n $element.attr('original-title', $element.attr('title') || '').removeAttr('title');\n }\n},\n\ngetTitle: function() {\n var title, $element = this.$element, o = this.options;\n this.fixTitle();\n if (typeof o.title == 'string') {\n title = $element.attr(o.title == 'title' ? 'original-title' : o.title);\n } else if (typeof o.title == 'function') {\n title = o.title.call($element[0]);\n }\n title = ('' + title).replace(/(^\\s*|\\s*$)/, \"\");\n return title || o.fallback;\n},\n\nvalidate: function() {\n if (!this.$element[0].parentNode) {\n this.hide();\n this.$element = null;\n this.options = null;\n }\n},\n\ncloseOnEsc: function ( e ) {\n if ( e.keyCode === 27 ) {\n this.hide();\n }\n},\n\nenable: function() { this.enabled = true; },\ndisable: function() { this.enabled = false; },\n\n/******** end Tipsie prototype ********/\n };\n }\n }\n\n /* map ToolTip interface */\n var tips = {\n // adds a text ToolTip\n addTextTip: function ($elems, trigger, autoShow) {\n var that = tipsie.set($elems, {\n tipClass: 'map-tip-text',\n delayIn: 20, //50\n opacity: 1,\n trigger: trigger,\n fade: true,\n gravity: tips.gravityCB\n });\n\n if (autoShow && $elems.length) {\n this.show($elems);\n this.closeElems.push($elems);\n callbacks.close.add(tips.close);\n }\n },\n\n close: function () {\n var a = tips.closeElems;\n tips.closeElems = [];\n for (var i= 0, len = a.length; i < len; i++)\n tips.hide(a[i]);\n },\n closeElems: [],\n\n show: function ($elems) {\n $elems.each(function () { var that = tipsie.get(this); if (that) that.show(); })\n },\n\n hide: function ($elems) {\n $elems.each(function () { var that = tipsie.get(this); if (that) that.hide(); })\n },\n\n gravityCB: function () {\n var $elem = $(this),\n w = $elem.parent().width(),\n offset = w / 100 * $elem.data('x');\n return offset > 200 ? (offset < w - 200 ? 's' : 'se') : 'sw';\n }\n };\n\n/* ********************* Lightbox ********************* */\n\n var blackOut = {\n\n $blackOut: null,\n\n create: function () {\n var defer = $.Deferred();\n\n this.$blackOut = $('<div></div>')\n .addClass('map-blackout')\n .css({\n width: $(document).width() + 'px',\n height: $(document).height() + 'px',\n display: 'none'\n })\n .appendTo(document.body)\n .fadeIn(200, function () {\n $('html').css('overflow', 'hidden');\n blackOut.refresh();\n\n blackOut.$blackOut.click(callbacks.close.fire);\n\n callbacks.refresh.add(blackOut.refresh);\n callbacks.close.add(blackOut.close);\n\n defer.resolve();\n });\n\n return defer.promise();\n },\n\n refresh: function () {\n var $blackOut = blackOut.$blackOut;\n if (!$blackOut || !$blackOut.length) return;\n\n var $document = $(document);\n $blackOut\n .css({\n width: $document.width() + 'px',\n height: $document.height() + 'px'\n });\n },\n\n close: function () {\n var $blackOut = blackOut.$blackOut;\n if (!$blackOut || !$blackOut.length) return;\n\n $('html').css('overflow', 'auto');\n\n callbacks.refresh.remove(blackOut.refresh);\n callbacks.close.remove(blackOut.close);\n\n $blackOut\n .off('click')\n .stop().fadeOut(100, function () {\n $blackOut.remove();\n $blackOut = null;\n });\n }\n };\n\n/* ********************* Map Base ********************* */\n\n function Map() { }\n\n $.extend(Map.prototype, {\n $map: null, // map dom object\n src: null, // smallSrc href string\n extents: null, // map coordinates meta\n\n mapLightbox: null, // lightbox class object\n\n initMap: function ($map, editLink, $markers, autoShow) {\n var projectionType = $map.data('projection'),\n dataFile = $map.data('file'),\n largeSrc = $map.data('large'),\n smallSrc = $map.data('small');\n\n var projectionType = projectionType ? process : \"flat\";\n var file = 'File:' + dataFile;\n var href = mw.config.get('wgArticlePath').replace(/\\$1/, file);\n\n // constrain wire size of large map, if larger than any max\n var maxW = MAP_MAX_WIDTH, maxH = MAP_MAX_HEIGHT;\n largeSrc = largeSrc.replace(/\\/latest/, '/latest/scale-to-'\n + (maxW < maxH ? ('width-down/' + maxW) : ('height-down/' + maxH)));\n\n var left = Number($map.data('left')), top = Number($map.data('top')),\n right = Number($map.data('right')), bottom = Number($map.data('bottom')),\n centerx = Number($map.data('centerx')), centery = Number($map.data('centery'));\n var extents = { // coordinate extents for this map image\n left: left ? left : 0.0,\n top: top ? top : 0.0,\n right: right ? right : 100.0,\n bottom: bottom ? bottom : 100.0,\n centerx: centerx ? centerx : null,\n centery: centery ? centery : null\n };\n\n this.$map = $map;\n this.src = smallSrc\n this.extents = extents;\n\n this.mapLightbox = new MapLightbox({\n projectionType: projectionType,\n src: largeSrc, // full href to largeSrc\n zone: $map.data('zone'),\n extents: extents,\n editLink: editLink, // edit notes link\n file: file, // wiki file name\n href: href, // full href to wiki file\n $markers: $markers,\n autoShow: autoShow\n });\n\n this.callbacks = {\n enable: $.proxy(this.enable, this),\n disable: $.proxy(this.disable, this)\n };\n\n callbacks.enable.add(this.callbacks.enable);\n callbacks.disable.add(this.callbacks.disable);\n },\n\n openMapInLightboxCB: function () {\n var $this = $(this);\n var that = $this.data('map');\n\n // start the preload now\n var largeSrc = that.mapLightbox.largeSrc;\n\n var legendPromise = preloader.imgPromise(LEGEND_BG_LINK),\n largeSrcPromise = preloader.imgPromise(largeSrc);\n\n blackOut.create()\n .done(function () {\n $.when(\n legendPromise,\n largeSrcPromise,\n that.mapLightbox.create()\n )\n .done(function () {\n that.mapLightbox.initLightbox();\n });\n });\n },\n\n enable: function () {\n this.$map\n .removeClass('map-disabled')\n .off('click')\n .attr('title', 'click to enlarge')\n .click(this.openMapInLightboxCB);\n\n callbacks.enable.remove(this.callbacks.enable);\n callbacks.disable.add(this.callbacks.disable);\n },\n\n disable: function () {\n this.$map\n .addClass('map-disabled')\n .attr('title', '(window too small to display map)')\n .off('click');\n\n callbacks.disable.remove(this.callbacks.disable);\n callbacks.enable.add(this.callbacks.enable);\n },\n\n getMapPopupWH: function () { // temp popup html, for small map popup\n var mapRatio = layout.getMapRatio(this.src);\n var w = this.$map.data('width'),\n h = mapRatio ? Math.round(w / mapRatio) : null;\n\n var w2 = !h ? Math.round(w / 2) : null;\n\n return { w:w, h:h, w2:w2 };\n },\n\n createMapPopupHtml: function () { // real popup html, for small map popup\n var dim = this.getMapPopupWH();\n var w = dim.w, h = dim.h;\n\n var content = '<div style=\"position: relative;\">' +\n '<img src=\"' + this.src + '\" width=\"' + w +\n (h ? ('px\" height=\"' + h) : '') + 'px\">';\n\n var $markers = this.$map.find('.map-marker');\n $markers.each(function () { // add markers verbatim from embedded markers\n content += $(this).prop('outerHTML');\n });\n\n return content += '</div>';\n },\n\n createMapPopupDefer: function () { // temp popup html, for small map popup\n var dim = this.getMapPopupWH();\n var w = dim.w, h = dim.h;\n if (!dim.h) { w = dim.w2; h = w; }\n\n return '<div style=\"position: relative; width: ' +\n w + 'px; height: ' + h + 'px;' + '\" class=\"map map-zone map-preload\"></div>'\n },\n\n createMapPopupCB: function () { // only used small map popup\n var $this = $(this);\n var that = $this.data('map');\n\n var promise = preloader.imgPromise(that.src);\n var pending = promise.state() === 'pending';\n\n if (pending) {\n var $markers = $this.find('.map-marker');\n $markers.each(function () { // make sure markers preload also\n if (pending) promise = $.when(preloader.marker(this), promise);\n });\n\n promise.done(function () { // reload and re-layout the popup\n that.mapPopupTooltipShow();\n });\n return that.createMapPopupDefer();\n }\n return that.createMapPopupHtml();\n },\n\n gravityCB: function () {\n var $this = $(this);\n var that = $this.data('map');\n\n // need the restricted height via the restricted width and current ratio\n var dim = that.getMapPopupWH();\n var height = dim.h ? dim.h : dim.w2;\n var top = $this.offset().top;\n\n return (top - height - 20) < $(window).scrollTop() ? 'nw' : 'sw';\n },\n\n mapPopupTooltipShowCB: function () {\n var $this = $(this);\n tips.show($this);\n },\n\n mapPopupTooltipHideCB: function () {\n var $this = $(this);\n tips.hide($this);\n },\n\n mapPopupTooltipShow: function () {\n tips.show(this.$map);\n },\n\n mapPopupTooltipHide: function () {\n tips.hide(this.$map);\n },\n\n createMapPopupTooltip: function () { // only used small map popup\n tipsie.set(this.$map, {\n tipClass: 'map-tip-popup',\n delayIn: 50,\n opacity: '1.0',\n html: true,\n fade: true,\n trigger: 'manual',\n gravity: this.gravityCB,\n title: this.createMapPopupCB\n });\n this.$map\n .on('mouseover mouseenter', this.mapPopupTooltipShowCB)\n .on('mouseleave click', this.mapPopupTooltipHideCB);\n },\n\n });\n\n/* ********************* Map Coords with Hover Popup ********************* */\n\n function Coords($map) {\n var that = this;\n\n this.x = $map.data('x');\n this.y = $map.data('y');\n this.iconTitle = '[' + this.x + ',' + this.y + ']';\n\n var $a = $map.find('a');\n if ($a.length) {\n $map.find('sup').unwrap();\n }\n\n var $markers = $map.find('.map-marker');\n\n this.initMap($map, false, $markers, true);\n\n that.createMapPopupTooltip();\n }\n\n Coords.prototype = new Map();\n\n/* ********************* Map Link with Hover Popup ********************* */\n\n function Link($map) {\n var that = this;\n\n var $a = $map.find('a');\n if ($a.length) {\n $map.text($a.text());\n }\n\n this.initMap($map, false, false, false);\n\n that.createMapPopupTooltip();\n }\n\n Link.prototype = new Map();\n\n/* ********************* Embeded Map ********************* */\n\n function Embedded($map) { // Template:Map\n\n var smallSrc = $map.data('small');\n\n var $markers = $map.find('.map-marker');\n\n this.initMap($map, this.findEditLink($map), $markers.length ? $markers : false, false);\n\n $map.find('> a > img')\n .unwrap();\n\n if ($markers.length) {\n $map\n .addClass('map-preload');\n\n var defer = $.when(\n preloader.imgPromise(smallSrc)\n )\n\n $markers.each(function () {\n defer = $.when(preloader.marker(this), defer); // first display, make sure markers preload also\n });\n\n defer.done(function () {\n $map\n .removeClass('map-preload');\n tips.addTextTip($markers, 'hover');\n });\n } else {\n $map\n .removeClass('map-preload');\n }\n }\n\n Embedded.prototype = new Map();\n\n $.extend(Embedded.prototype, {\n\n findEditLink: function ($map) {\n var $walker = $map,\n $prev, $h = false,\n $top = $('#mw-content-text');\n\n while (!$walker.is($top)) {\n if (/^h\\d$/i.test($walker[0].nodeName)) {\n $h = $walker;\n break;\n }\n $prev = $walker.prev();\n $walker = $prev.length ? $prev : $walker.parent();\n }\n\n if (!mw.config.get('wgUserName')) {\n return '/Special:SignUp?returnto=' +\n mw.util.wikiUrlencode(\n mw.config.get('wgPageName') +\n ($h ? '#' + $h\n .find('.mw-headline')\n .attr('id') : '')\n ) +\n '&type=login';\n }\n\n return $h ? $h\n .find('.editsection > a')\n .attr('href') : '?action=edit';\n }\n });\n\n/* ********************* Legend ********************* */\n\n function Legend($markers) {\n this.parsed = {};\n this.forceIndex = [];\n\n $markers.each(\n $.proxy(this.readNote, this)\n );\n delete this.forceIndex;\n }\n\n $.extend(Legend.prototype, {\n\n isEmpty: function () {\n if (this.empty === undefined) {\n this.empty = true;\n for (var i in this.parsed) {\n if (this.parsed.hasOwnProperty(i)) {\n this.empty = false;\n break;\n }\n }\n }\n return this.empty;\n },\n\n isCoord: function (coord) {\n return (/^[-+]?\\d{1,16}(?:\\.\\d{1,6})?$/).test(coord);\n },\n\n parseNote: function (node) {\n var $note = $(node),\n x, y, title, icon, id, legend;\n\n if (!$note.attr('title')) return false;\n\n x = $note.data('x');\n if (!this.isCoord(x)) return false;\n y = $note.data('y');\n if (!this.isCoord(y)) return false;\n\n title = $note.data('title') || '';\n\n icon = $note.data('icon');\n if (!icon || !icon.length) return false;\n\n legend = $note.data('legend');\n if (!legend || !legend.length) return false;\n\n id = 'mn' + nId++;\n $note.attr('data-note', id);\n\n return { id: id, legend: legend };\n },\n\n readNote: function (key, node) {\n var i, g, legend, hash, colon,\n note = this.parseNote(node);\n if (!note) return;\n\n legend = note.legend.split(/\\s*;;\\s*/);\n for (i = 0; i < legend.length; i++) {\n hash = legend[i].split(/\\s*##\\s*/);\n if (hash.length === 2) {\n this.parsed[hash[0]] = this.parsed[hash[0]] || {\n indexed: {}, named: {}\n };\n g = this.parsed[hash[0]];\n g.indexed[hash[1]] = g.indexed[hash[1]] || [];\n g.indexed[hash[1]].push(note.id);\n } else {\n colon = legend[i].split(/\\s*::\\s*/);\n if (colon.length === 2) {\n this.parsed[colon[0]] = this.parsed[colon[0]] || {\n indexed: {}, named: {}\n };\n g = this.parsed[colon[0]];\n if (this.forceIndex.indexOf(colon[1]) !== -1) {\n g.indexed[colon[1]].push(note.id);\n } else if (g.named[colon[1]]) {\n this.forceIndex.push(colon[1]);\n g.indexed[colon[1]] = g.indexed[colon[1]] || [];\n g.indexed[colon[1]].push(g.named[colon[1]]);\n g.indexed[colon[1]].push(note.id);\n delete g.named[colon[1]];\n } else {\n g.named[colon[1]] = note.id;\n }\n }\n }\n }\n },\n\n renderIndexed: function (key, notes) {\n var i, node, span;\n\n span = document.createElement('span');\n span.setAttribute('class', 'map-subGroup-name');\n span.appendChild(\n document.createTextNode(key)\n );\n\n node = document.createElement('div');\n node.setAttribute('class', 'map-subGroup');\n node.appendChild(span);\n\n for (i = 0; i < notes.length; i++) {\n span = document.createElement('span');\n span.setAttribute('class', 'map-subGroup-note pseudo-link');\n span.setAttribute('data-note', notes[i]);\n span.appendChild(\n document.createTextNode(i + 1)\n );\n node.appendChild(span);\n }\n\n return node;\n },\n\n renderNamed: function (key, value) {\n var node = document.createElement('div');\n node.setAttribute('data-note', value);\n node.setAttribute('class', 'map-group-note pseudo-link');\n node.appendChild(\n document.createTextNode(key)\n );\n return node;\n },\n\n renderGroup: function (key, list) {\n var sorted, nodes = [], div;\n\n div = document.createElement('div');\n div.setAttribute('class', 'map-group-name')\n div.appendChild(\n document.createTextNode(key)\n );\n nodes.push(div);\n\n div = document.createElement('div');\n div.setAttribute('class', 'map-group')\n nodes.push(div);\n\n sorted = new SortedObject(list.indexed);\n while (sorted.next()) {\n div.appendChild(\n this.renderIndexed(sorted.key(), sorted.val())\n );\n }\n\n sorted = new SortedObject(list.named);\n while (sorted.next()) {\n div.appendChild(\n this.renderNamed(sorted.key(), sorted.val())\n );\n }\n\n return nodes;\n },\n\n render: function () {\n var sorted = new SortedObject(this.parsed),\n nodes = [];\n\n while (sorted.next()) {\n nodes = nodes.concat(this.renderGroup(sorted.key(), sorted.val()));\n }\n\n this.$wrapper = $(document.createElement('div'))\n .addClass('map-legend-wrapper')\n .append(nodes);\n\n return $(document.createElement('div'))\n .addClass('map-legend')\n .css('background-image', \"url('\" + LEGEND_BG_LINK +\"')\")\n .append(this.$wrapper);\n },\n\n addScrollbar: function () {\n this.$wrapper.removeAttr('style');\n if (this.$wrapper.height() > layout.legend.h) {\n this.$wrapper\n .css({\n width: '255px',\n paddingRight: '15px',\n maxHeight: (layout.legend.h - 2 * LEGEND_PADDING) + 'px'\n });\n }\n }\n });\n\n/* ********************* Map in Lightbox ********************* */\n\n function MapLightbox(data) {\n this.projectionType = data.projectionType;\n this.largeSrc = data.src;\n this.zoneName = data.zone;\n this.extents = data.extents;\n this.editLink = data.editLink;\n this.file = data.file;\n this.href = data.href;\n this.autoShow = data.autoShow;\n\n var $markers = data.$markers\n\n if ($markers && $markers.length) {\n this.$markersOriginal = $markers;\n this.legend = new Legend($markers);\n }\n\n this.empty = !this.legend || this.legend.isEmpty();\n }\n\n $.extend(MapLightbox.prototype, {\n\n create: function () {\n var defer = $.Deferred();\n\n layout.setImage(this.largeSrc)\n\n this.createHeader();\n this.createLargeMap();\n if (!this.empty) {\n this.createLegend();\n }\n\n layout.setLegend(this.empty);\n\n return defer.resolve().promise();\n },\n\n initLightbox: function () {\n var that = this;\n\n layout.doLayout(); // need re-layout after image pre-load completes\n this.resize(); // which suplies data to these resizes and inits\n\n this.initHeader();\n this.initLargeMap();\n if (!this.empty) {\n this.initLegend();\n }\n\n this.callbacks = {\n close: function () { that.close(); },\n resize: function () { that.resize(); },\n refresh: function () { that.refresh(); }\n };\n\n callbacks.refresh.add(this.callbacks.refresh);\n callbacks.resize.add(this.callbacks.resize);\n callbacks.close.add(this.callbacks.close);\n },\n\n createHeader: function () {\n this.$scale = $('<span class=\"map-scale\" style=\"display:none;\"></span>');\n this.$coordinates = $('<span class=\"map-coordinates\" style=\"display:none;\"></span>');\n this.$close = $('<a href=\"#\" class=\"map-close pseudo-link\" title=\"Close\">Close</a>');\n\n this.$info = $('<span class=\"map-info\"></span>')\n .append( $('<span class=\"map-title\"></span>')\n .text(this.zoneName))\n .append(this.$scale)\n .append(this.$coordinates);\n\n this.$buttons = $('<span class=\"map-buttons\"></span>');\n\n this.$buttons\n .append($('<a class=\"map-href\"></a>')\n .prop('href', mw.html.escape(this.href))\n .prop('title', mw.html.escape(this.file))\n .text(this.file));\n\n if (EDIT_NOTE_ENABLE && this.editLink) {\n this.$buttons\n .append($('<a class=\"map-href\" title=\"Edit Map Notes\">Edit Map Notes</a>')\n .prop('href', this.editLink))\n .append($('<a class=\"map-href\" title=\"About Map Notes\">About Map Notes</a>')\n .prop('href', ABOUT_NOTE_LINK));\n }\n\n this.$buttons\n .append(this.$close);\n\n this.$header = $('<div class=\"map-header\" style=\"display:none;\"></div>')\n .css('background-image', \"url('\" + LEGEND_BG_LINK +\"')\")\n .append(this.$info)\n .append(this.$buttons)\n .appendTo(document.body);\n },\n\n closeButtonClick: function () {\n callbacks.close.fire();\n return false;\n },\n\n initHeader: function () {\n this.$close\n .click( this.closeButtonClick );\n },\n\n showNotice: function () {\n if (this.$notice) return;\n\n this.$notice = $('<div class=\"map-title\">press SPACE to fade map</div>')\n .css({\n position: 'fixed',\n left: layout.map.x + layout.map.w / 20 + 'px',\n top: layout.map.y + layout.map.h / 10 * 9 + 'px'\n });\n\n this.$largeMap\n .append(this.$notice);\n\n this.clearNotice = $.proxy(this.removeNotice, this);\n callbacks.close.add(this.clearNotice);\n callbacks.refresh.add(this.clearNotice);\n callbacks.resize.add(this.clearNotice);\n\n window.setTimeout($.proxy(this.fadeNotice, this), 3000);\n },\n\n fadeNotice: function () {\n if (!this.$notice) return;\n this.$notice\n .fadeOut(200,\n $.proxy(this.removeNotice, this)\n );\n },\n\n removeNotice: function () {\n if (!this.$notice) return;\n this.$notice.remove();\n callbacks.close.remove(this.clearNotice);\n callbacks.refresh.remove(this.clearNotice);\n callbacks.resize.remove(this.clearNotice);\n delete this.$notice;\n delete this.clearNotice;\n },\n\n createLargeMap: function () {\n if (this.$markersOriginal) {\n this.$markers = this.$markersOriginal\n .clone()\n .each(function () {\n var $this = $(this);\n $this\n .attr({\n id: $this.attr('data-note'),\n title: $this.attr('original-title')\n })\n .removeAttr('orginal-title');\n });\n }\n\n this.$image = $('<img>', {\n src: this.largeSrc\n });\n\n this.$largeMap = $('<div class=\"map-large\" style=\"display:none;\"></div>')\n .append(this.$image);\n\n if (this.$markers) {\n this.$largeMap\n .append(this.$markers);\n }\n\n this.$largeMap\n .appendTo(document.body);\n },\n\n initLargeMap: function () {\n var that = this;\n\n if (this.$markers) {\n tips.addTextTip(this.$markers, 'hover', this.autoShow);\n //tips.addTextTip(this.$markers, 'manual', this.autoShow);\n }\n\n this.$largeMap\n .on('mouseenter mousemove', $.proxy(this.updateCoords, this))\n .mouseleave($.proxy(this.hideCoords, this));\n\n if (this.$markers) {\n this.showNotice();\n\n $(document.body)\n .on('keydown.mapLightbox', function (e) {\n if (e.which === 32) that.fadeMap();\n })\n .on('keyup.mapLightbox', function (e) {\n if (e.which === 32) that.showMap();\n })\n .on('keypress.mapLightbox', function (e) {\n e.stopImmediatePropagation();\n e.preventDefault();\n });\n }\n },\n\n createLegend: function () {\n this.$legend = this.legend.render()\n .css('display', 'none')\n .appendTo(document.body);\n },\n\n initLegend: function () {\n var that = this;\n this.$legend\n .find('.pseudo-link')\n .mouseenter(function () {\n tips.show($( document.getElementById($(this).data('note')) ));\n })\n .mouseleave(function () {\n tips.hide($( document.getElementById($(this).data('note')) ));\n });\n\n this.$legend\n .find('.map-group-name')\n .data('opened', true)\n .css('cursor', 'pointer')\n .click(function () {\n var $this = $(this),\n move = $this.data('opened') ? 'slideUp' : 'slideDown',\n $group = $this.next('.map-group');\n\n $this.data('opened', !$this.data('opened'));\n\n $group[move](100, function () {\n that.legend.addScrollbar();\n });\n });\n },\n\n hideCoords: function () {\n this.$coordinates.css('display', 'none');\n this.showMap();\n this.showHideButtons();\n },\n\n fadeMap: function () {\n if (!this.isInCorner) {\n this.$image.stop().animate({ opacity: 0.25 }, 200);\n this.isInCorner = true;\n }\n },\n\n showMap: function () {\n if (this.isInCorner) {\n this.$image.stop().animate({ opacity: 1 }, 200);\n this.isInCorner = false;\n }\n },\n\n updateCoords: function (e) { // display current mouse hover map coordinates\n var projection = projectionLinear;\n //var projection = projectionEPSG3857;\n\n var displayString = projection.clientPointToCoordsDisplay(e, layout.map, this.extents)\n\n this.$coordinates\n .css('display', 'inline')\n .text(displayString);\n\n this.showHideButtons();\n },\n\n/*\n formatCoord: function (coord, min, max) { // format and clip coordinates to extents\n var c = Math.round(coord * 10.0) / 10.0;\n if (min > max) { var m = min; min = max; max = m; } // dont assume the coord systems handedness\n c = Math.min(max - 0.1, Math.max(min + 0.1, c));\n return Math.round(c) === c ? c + '.0' : c;\n },\n\n updateCoords: function (e) { // display current mouse hover map coordinates\n var map = layout.map, extents = this.extents;\n var left = extents.left, top = extents.top,\n right = extents.right, bottom = extents.bottom,\n centerx = extents.centerx, centery = extents.centery;\n\n var x100 = (e.clientX - map.x) / map.w * 100.0,\n y100 = (e.clientY - map.y) / map.h * 100.0;\n\n var x, y;\n if (centerx)\n if (x100 < 50.0)\n x = ((x100 * 2) / 100.0) * (centerx - left) + left;\n else\n x = (((x100 - 50.0) * 2) / 100.0) * (right - centerx) + centerx;\n else\n x = (x100 / 100.0) * (right - left) + left;\n\n if (centery)\n if (y100 < 50.0)\n y = ((y100 * 2) / 100.0) * (centery - top) + top;\n else\n y = (((y100 - 50.0) * 2) / 100.0) * (bottom - centery) + centery;\n else\n y = (y100 / 100.0) * (bottom - top) + top;\n\n this.$coordinates\n .css('display', 'inline')\n .text(\n this.formatCoord(x, left, right) + ',' +\n this.formatCoord(y, top, bottom) + (\n left == 0 && top == 0 && right == 100 && bottom == 100 ? '' :\n ' (' + this.formatCoord(x100, 0, 100) + ',' +\n this.formatCoord(y100, 0, 100) + ')'\n )\n );\n\n this.showHideButtons();\n },\n*/\n refresh: function () {\n this.$header\n .add(this.$largeMap)\n .add(this.$legend)\n .css('display', 'none');\n },\n\n resize: function () {\n var map = layout.map;\n\n this.resizePart(this.$header, layout.header);\n this.resizePart(this.$largeMap, map);\n if (!this.empty) {\n this.resizePart(this.$legend, layout.legend);\n }\n\n this.$image.attr({\n width: map.w + 'px',\n height: map.h + 'px'\n });\n\n if (map.scale !== 100) {\n this.$scale\n .css('display', 'inline')\n .text('scale: ' + map.scale + '%');\n } else {\n this.$scale\n .css('display', 'none');\n }\n\n if (this.$legend) {\n this.legend.addScrollbar();\n }\n\n this.showHideButtons();\n },\n\n showHideButtons: function () {\n var infoWidth = this.$info.width(),\n buttonWidth = this.$buttons.removeClass('map-minimal').width();\n\n if (infoWidth + buttonWidth + 20 >= layout.map.w) {\n this.$buttons.addClass('map-minimal');\n }\n },\n\n resizePart: function (part, values) {\n part\n .css({\n width: values.w + 'px', height: values.h + 'px',\n left: values.x + 'px', top: values.y + 'px',\n display: 'block'\n });\n },\n\n close: function () {\n this.$header.remove();\n this.$largeMap.remove();\n if (!this.empty) {\n this.$legend.remove();\n }\n\n delete this.$info;\n delete this.$buttons;\n delete this.$scale;\n delete this.$coordinates;\n delete this.$close;\n delete this.$header;\n delete this.$image;\n delete this.$markers;\n delete this.$largeMap;\n if (!this.empty) {\n delete this.$legend;\n delete this.legend.$wrapper;\n }\n\n callbacks.refresh.remove(this.callbacks.refresh);\n callbacks.resize.remove(this.callbacks.resize);\n callbacks.close.remove(this.callbacks.close);\n delete this.callbacks;\n }\n }); // end of Map in Lightbox, MapLightbox\n\n\n/* ********************* MapProjection ********************* */\n\n var projectionLinear = {\n\n formatCoord: function (coord, min, max) { // format and clip coordinates to extents\n var c = Math.round(coord * 10.0) / 10.0;\n if (min > max) { var m = min; min = max; max = m; } // dont assume the coord systems handedness\n c = Math.min(max - 0.1, Math.max(min + 0.1, c));\n return Math.round(c) === c ? c + '.0' : c;\n },\n\n // display current mouse hover map coordinates\n clientPointToCoordsDisplay: function (e, map, extents) {\n // find client point and percentage\n var left = extents.left, top = extents.top,\n right = extents.right, bottom = extents.bottom,\n centerx = extents.centerx, centery = extents.centery;\n\n var x100 = (e.clientX - map.x) / map.w * 100.0,\n y100 = (e.clientY - map.y) / map.h * 100.0;\n\n var x, y;\n if (centerx)\n if (x100 < 50.0)\n x = ((x100 * 2) / 100.0) * (centerx - left) + left;\n else\n x = (((x100 - 50.0) * 2) / 100.0) * (right - centerx) + centerx;\n else\n x = (x100 / 100.0) * (right - left) + left;\n\n if (centery)\n if (y100 < 50.0)\n y = ((y100 * 2) / 100.0) * (centery - top) + top;\n else\n y = (((y100 - 50.0) * 2) / 100.0) * (bottom - centery) + centery;\n else\n y = (y100 / 100.0) * (bottom - top) + top;\n\n // update display\n return this.formatCoord(x, left, right) + ',' +\n this.formatCoord(y, top, bottom) + (\n left == 0 && top == 0 && right == 100 && bottom == 100 ? '' :\n ' (' + this.formatCoord(x100, 0, 100) + ',' +\n this.formatCoord(y100, 0, 100) + ')');\n }\n };\n\n var projectionEPSG3857 = {\n\n R: 6378137,\n MAX_LATITUDE: 85.0511287798,\n\n _a: null, _b: null, _c: null, _d: null,\n setTransform: function (a,b,c,d) {\n this._a = a; this._b = b; this._c = c; this._d = d;\n },\n\n formatCoord: function (coord, min, max) { // format and clip coordinates to extents\n var c = Math.round(coord * 10.0) / 10.0;\n if (min > max) { var m = min; min = max; max = m; } // dont assume the coord systems handedness\n c = Math.min(max - 0.1, Math.max(min + 0.1, c));\n return Math.round(c) === c ? c + '.0' : c;\n },\n\n // display current mouse hover map coordintes\n clientPointToCoordsDisplay: function (e, map, extents) {\n // set environment for EPSG:3857\n var scale = 0.5 / (Math.PI * this.R);\n this.setTransform(scale, 0.5, -scale, 0.5)\n\n // find client point and percentage\n var left = extents.left, top = extents.top,\n right = extents.right, bottom = extents.bottom,\n centerx = extents.centerx, centery = extents.centery;\n\n var xP = e.clientX - map.x,\n yP = e.clientY - map.y;\n var x100 = xP / map.w * 100.0,\n y100 = yP / map.h * 100.0;\n var xPE = this.R * (x100 / 100.0),\n yPE = this.R * (y100 / 100.0);\n\n // transform the point to EPSG:3857\n scale = null;\n var scale = scale || 1;\n //var xPS = (xPE / scale - this._b) / this._a,\n // yPS = (yPE / scale - this._d) / this._c;\n var xPS = xPE,\n yPS = yPE;\n\n var d = 180 / Math.PI;\n var y2 = (2 * Math.atan(Math.exp(yPS / this.R)) - (Math.PI / 2)) * d,\n x2 = xPS * d / this.R;\n if (isNaN(y2) || isNaN(x2))\n { y2 = 0; x2 = 0; }\n\n // transform as linear sections\n var x, y;\n if (centerx)\n if (x100 < 50.0)\n x = ((x100 * 2) / 100.0) * (centerx - left) + left;\n else\n x = (((x100 - 50.0) * 2) / 100.0) * (right - centerx) + centerx;\n else\n x = (x100 / 100.0) * (right - left) + left;\n\n if (centery)\n if (y100 < 50.0)\n y = ((y100 * 2) / 100.0) * (centery - top) + top;\n else\n y = (((y100 - 50.0) * 2) / 100.0) * (bottom - centery) + centery;\n else\n y = (y100 / 100.0) * (bottom - top) + top;\n\n // update display\n return this.formatCoord(x, left, right) + ',' +\n this.formatCoord(y, top, bottom) +\n (left == 0 && top == 0 && right == 100 && bottom == 100 ? '' :\n ' (' + this.formatCoord(x100, 0, 100) + ',' +\n this.formatCoord(y100, 0, 100) + ')') +\n (' (' + this.formatCoord(x2, -999999999999, 999999999999) + ',' +\n this.formatCoord(y2, -999999999999, 999999999999) + ')');\n //(' (' + x2 + ',' +\n // y2 + ')');\n }\n };\n /*\n R: 6378137,\n MAX_LATITUDE: 85.0511287798,\n\n export function Transformation(a, b, c, d) {\n if (Util.isArray(a)) {\n // use array properties\n this._a = a[0];\n this._b = a[1];\n this._c = a[2];\n this._d = a[3];\n return;\n }\n this._a = a;\n this._b = b;\n this._c = c;\n this._d = d;\n }\n\n export function toTransformation(a, b, c, d) {\n return new Transformation(a, b, c, d);\n }\n\n transformation: (function () {\n var scale = 0.5 / (Math.PI * SphericalMercator.R);\n return toTransformation(scale, 0.5, -scale, 0.5);\n }())\n\n scale: function (zoom) {\n return 256 * Math.pow(2, zoom);\n },\n zoom: function (scale) {\n return Math.log(scale / 256) / Math.LN2;\n },\n\n pointToLatLng: function (point, zoom) {\n var scale = this.scale(zoom),\n untransformedPoint = this.transformation.untransform(point, scale);\n\n return this.projection.unproject(untransformedPoint);\n },\n\n untransform: function (point, scale) {\n scale = scale || 1;\n return new Point(\n (point.x / scale - this._b) / this._a,\n (point.y / scale - this._d) / this._c);\n }\n\n unproject: function (point) {\n var d = 180 / Math.PI;\n return new LatLng(\n (2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d,\n point.x * d / this.R);\n },\n\n export function LatLng(lat, lng, alt) {\n if (isNaN(lat) || isNaN(lng)) {\n throw new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')');\n }\n\n // @property lat: Number\n // Latitude in degrees\n this.lat = +lat;\n\n // @property lng: Number\n // Longitude in degrees\n this.lng = +lng;\n\n // @property alt: Number\n // Altitude in meters (optional)\n if (alt !== undefined) {\n this.alt = +alt;\n }\n }\n */\n\n /*\n transformation: (function () {\n var scale = 0.5 / (Math.PI * SphericalMercator.R);\n return toTransformation(scale, 0.5, -scale, 0.5);\n }())\n\n scale: function (zoom) {\n return 256 * Math.pow(2, zoom);\n },\n\n zoom: function (scale) {\n return Math.log(scale / 256) / Math.LN2;\n },\n\n pointToLatLng: function (point, zoom) {\n var scale = null; //1; //256 * Math.pow(2, zoom ? zoom : 1);\n\n scale = scale || 1;\n var x = (point.x / scale - this._b) / this._a;\n var y = (point.y / scale - this._d) / this._c;\n\n return this.projection.unproject(untransformedPoint);\n },\n\n untransform: function (point, scale) {\n scale = scale || 1;\n return new Point(\n (point.x / scale - this._b) / this._a,\n (point.y / scale - this._d) / this._c);\n }\n\n unproject: function (point) {\n var d = 180 / Math.PI;\n return new LatLng(\n (2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d,\n point.x * d / this.R);\n },\n */\n/*\n formatCoord: function (coord, min, max) { // format and clip coordinates to extents\n var c = Math.round(coord * 10.0) / 10.0;\n if (min > max) { var m = min; min = max; max = m; } // dont assume the coord systems handedness\n c = Math.min(max - 0.1, Math.max(min + 0.1, c));\n return Math.round(c) === c ? c + '.0' : c;\n },\n\n clientPointToCoordsDisplay: function (e, map, extents) { // display current mouse hover map coordinates\n var left = extents.left, top = extents.top,\n right = extents.right, bottom = extents.bottom,\n centerx = extents.centerx, centery = extents.centery;\n\n var x100 = (e.clientX - map.x) / map.w * 100.0,\n y100 = (e.clientY - map.y) / map.h * 100.0;\n\n var d = 180 / Math.PI;\n var y2 = (2 * Math.atan(Math.exp(y100 / this.R)) - (Math.PI / 2)) * d;\n var x2 = x100 * d / this.R;\n\n var x, y;\n if (centerx)\n if (x100 < 50.0)\n x = ((x100 * 2) / 100.0) * (centerx - left) + left;\n else\n x = (((x100 - 50.0) * 2) / 100.0) * (right - centerx) + centerx;\n else\n x = (x100 / 100.0) * (right - left) + left;\n\n if (centery)\n if (y100 < 50.0)\n y = ((y100 * 2) / 100.0) * (centery - top) + top;\n else\n y = (((y100 - 50.0) * 2) / 100.0) * (bottom - centery) + centery;\n else\n y = (y100 / 100.0) * (bottom - top) + top;\n\n return this.formatCoord(x, left, right) + ',' +\n this.formatCoord(y, top, bottom) +\n (left == 0 && top == 0 && right == 100 && bottom == 100 ? '' :\n ' (' + this.formatCoord(x100, 0, 100) + ',' +\n this.formatCoord(y100, 0, 100) + ')') +\n (' (' + this.formatCoord(x2, left, right) + ',' +\n this.formatCoord(y2, top, bottom) + ')');\n },\n*/\n\n/* ********************* Map in Lightbox Layout ********************* */\n\n var layout = ({\n\n header: {\n h: HEADER_HEIGHT + HEADER_PADDING * 2\n },\n\n margin: {\n vertical: MARGIN_VERTICAL * 2,\n horizontal: MARGIN_HORIZONTAL * 2\n },\n\n between: {\n headerMap: MARGIN_INNER\n },\n\n // current layout, in pixels\n image: { // natural image\n src: null\n },\n win: { // html client window\n w: null,\n h: null\n },\n map: { // image display layout\n w: null,\n h: null,\n scale: null // percent scale of max display size\n },\n\n setImage: function (imageSrc) {\n this.image.src = imageSrc;\n preloader.imgObj(imageSrc); // start the preload right away\n },\n\n getMapRatio: function (imageSrc) {\n var mapRatio = MAP_RATIO; // predfined image ratio from settings\n\n if (!mapRatio) { // get natural ratio if not predefined, if image is loaded\n var imgObj = preloader.imgObj(imageSrc);\n\n if (imgObj) {\n var w = imgObj.naturalWidth,\n h = imgObj.naturalHeight;\n\n if (w && h) {\n mapRatio = w / h;\n }\n }\n }\n return mapRatio;\n },\n\n resetLegend: function () {\n this.legend = {\n w: COLUMN_WIDTH + COLUMN_PADDING * 2\n };\n this.between.mapLegend = MARGIN_INNER;\n },\n\n setLegend: function (empty) {\n if (empty) {\n this.legend = { w: 0, h: 0, x: 0, y: 0 };\n this.between.mapLegend = 0;\n } else {\n this.resetLegend();\n }\n\n this.doLayout();\n },\n\n // sets layout of interface elements based on current client area and maximum possible image\n doLayout: function () {\n\n var win = this.win, $window = $(window);\n win.w = $window.width();\n win.h = $window.height();\n\n // total remaining area left-over available for image, inside current client area\n var header = this.header, legend = this.legend;\n var maxImageW = win.w - (legend.w + this.between.mapLegend + this.margin.horizontal);\n var maxImageH = win.h - (header.h + this.between.headerMap + this.margin.vertical);\n\n // clip max available height and width\n maxImageW = Math.min(MAP_MAX_WIDTH, maxImageW);\n maxImageH = Math.min(MAP_MAX_HEIGHT, maxImageH);\n\n // get image aspect ratio from predfined settings or image\n var mapRatio = this.getMapRatio(this.image.src);\n\n // scale max available height and width to ratio\n if (mapRatio) {\n var newHeight = Math.round(maxImageW / mapRatio); // 3 wide / 2 high -> height = width / 1.5\n\n if (newHeight > maxImageH) // rescale width if scale height needs clipping\n maxImageW = Math.round(maxImageH * mapRatio); // like 2 high * 1.5 = 3 wide\n else\n maxImageH = newHeight; // set new available height\n }\n\n // set straw-man image width and height\n var map = this.map;\n map.w = maxImageW;\n map.h = maxImageH;\n\n map.scale = Math.min(Math.max(Math.round(map.w / MAP_MAX_WIDTH * 100),\n Math.round(map.h / MAP_MAX_HEIGHT * 100)), 100);\n\n if (map.scale < MIN_SCALE) { // image hole is less than 50% of the max hole then bail, not sure why\n callbacks.disable.fire();\n callbacks.close.fire();\n\n } else {\n header.y = Math.round((win.h - map.h - header.h - this.between.headerMap) / 2);\n header.x = Math.round((win.w - map.w - legend.w - this.between.mapLegend) / 2);\n header.w = map.w;\n\n map.x = header.x;\n map.y = header.y + header.h + this.between.headerMap;\n\n if (legend.w) {\n legend.h = map.h + header.h + this.between.headerMap;\n legend.x = map.x + header.w + this.between.mapLegend;\n legend.y = Math.round((win.h - legend.h) / 2);\n }\n\n callbacks.enable.fire();\n }\n },\n\n init: function () {\n this.resetLegend();\n callbacks.refresh.add($.proxy(this.doLayout, this));\n callbacks.close.add($.proxy(this.resetLegend, this));\n return this;\n }\n\n }).init();\n\n function isWikiaImage(src) {\n return src && src.length &&\n /^(?:https?:)?\\/\\/(images|static|img|vignette)(\\d*)\\.wikia\\.(?:nocookie\\.net|com)\\//.test(src);\n }\n\n function isWithinBounds(data, min, max) {\n return data !== undefined && data !== null && data >= min && data <= max;\n }\n\n // now that the infrastructure is in place, process each command on the page\n $maps.each(function () {\n var $map = $(this);\n\n if (!$map.data('map') &&\n isWikiaImage($map.data('small')) &&\n isWikiaImage($map.data('large')) &&\n isWithinBounds($map.data('width'), MAP_MIN_WIDTH, MAP_MAX_WIDTH)\n ) {\n if ($map.hasClass('map-coords') // Template:Map/Coords\n ) {\n $map.data('map', new Coords($map));\n } else if ($map.hasClass('map-textlink')) { // Template:Map/Link\n $map.data('map', new Link($map));\n } else if ($map.hasClass('map-embed')) { // Template:Map\n $map.data('map', new Embedded($map));\n }\n }\n });\n\n layout.doLayout(); // will also set Map to enabled\n $(window)\n .resize(callbacks.refresh.fire)\n .resize($.debounce(100, callbacks.resize.fire));\n\n } // end of initMaps()", "function locationMarkers(location) {\n\n for(i=0; i<location.length; i++) {\n location[i].holdMarker = new google.maps.Marker({\n position: new google.maps.LatLng(location[i].lat, location[i].lng),\n map: map,\n title: location[i].title,\n icon: {\n url: 'img/marker.png',\n size: new google.maps.Size(25, 40),\n origin: new google.maps.Point(0, 0),\n anchor: new google.maps.Point(12.5, 40)\n }\n });\n\nbounds.extend(location[i].holdMarker.position);\n\n\n//Binds infoWindow content to each marker\n\nlocation[i].contentString =location[i].title +\n location[i].title + '</strong><br><p>' +\n location[i].streetAddress + '<br>' +\n location[i].cityAddress + '<br></p><a class=\"web-links\" href=\"http://' + location[i].url +\n '\" target=\"_blank\">' + location[i].url + '</a>';\n\n//triggers infowindow upon click\n\n\nviewModel.showInfo = function(location){\n google.maps.event.trigger(location.holdMarker,'click');\n}\n\n\n//opens infowindow when link or marker is clicked\n location[i].holdMarker.addListener ( 'click', (function(marker, i) {\n return function() {\n infowindow.setContent(location[i].contentString);\n marker.setAnimation(google.maps.Animation.BOUNCE);\n infowindow.open(map,marker);\n map.setZoom(16);\n map.setCenter(location[i]);\n setTimeout(function () {\n infowindow.close();\n marker.setAnimation(google.maps.Animation.DROP);\n }, 1400);\n //***GET WIKIPEDIA INFO***\n getWikiInfo(marker.title);\n };\n })(location[i].holdMarker, i));\n\n }\n\n}", "function update()\n{\n var xhr,\n url;\n \n // clear any existing markers\n map.clearOverlays();\n\n // get map's bounds\n var bounds = map.getBounds();\n \n // query for the five cities in the view\n // instantiate XMLHttpRequest object\n try {\n xhr = new XMLHttpRequest();\n } catch (e) {\n xhr = new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n // handle old browsers\n if (xhr === null) {\n alert(\"Ajax not supported by your browser!\");\n return;\n }\n \n url = \"proxy.php?sw=\" +\n bounds.getSouthWest().lat() + \",\" + bounds.getSouthWest().lng() +\n \"&ne=\" +\n bounds.getNorthEast().lat() + \",\" + bounds.getNorthEast().lng();\n\n xhr.onreadystatechange = function() {\n var infos,\n xhtml,\n i,\n articles,\n j;\n \n if (xhr.readyState === 4) {\n document.getElementById(\"progress\").style.display = \"none\";\n if (xhr.status === 200) {\n infos = eval(\"(\" + xhr.responseText + \")\");\n for (i = 0; i < infos.length; i++) {\n articles = \"\";\n for (j = 0; j < infos[i].articles.length; j++) {\n articles += (\"<li>\" + \n \"<a href='\" + infos[i].articles[j].link + \"'>\" +\n infos[i].articles[j].title +\n \"</a>\" +\n \"</li>\");\n }\n addMarker(\n new GLatLng(infos[i].Latitude, infos[i].Longitude),\n \"<b>\" + infos[i].City + \", \" + infos[i].State + \"</b>\" +\n \"<br />\" +\n \"<ul>\" +\n articles +\n \"</ul>\"\n );\n }\n } else {\n alert(\"Error with Ajax call!\");\n }\n }\n };\n xhr.open(\"GET\", url, true);\n xhr.send(null);\n document.getElementById(\"progress\").style.display = \"block\";\n\n // mark home if within bounds\n if (bounds.containsLatLng(home))\n {\n // prepare XHTML\n var xhtml = \"<b>Home Sweet Home</b>\";\n\n // add marker to map\n addMarker(home, xhtml);\n }\n\n // TODO: contact proxy, add markers\n}", "function loadMaps() {\n\tjQuery.getCachedScript('/js/egeoxml.js');\n\tjQuery.getCachedScript('/js/labeledmarker.js').done(function() {\n\t\tloadFindABranchModal();\n\t});\n}", "function initIndexMap() {\n const MAP_LAT_CENTER = 12.672496;\n const MAP_LNG_CENTER = -9.492188;\n var mapcenter = {lat: MAP_LAT_CENTER, lng: MAP_LNG_CENTER};\n var indexMap = $(\"#indexMap\");\n var latitudes = {lat: indexMap.data('latitude')};\n var longitudes = {lng: indexMap.data('longitude')};\n var titles = indexMap.data('title');\n var ids = indexMap.data('ids');\n var address = indexMap.data('address');\n var owner = indexMap.data('owner');\n var loggedin = indexMap.data('loggedin');\n var map = new google.maps.Map(document.getElementById('indexMap'), {\n zoom: 2,\n center: mapcenter\n });\n\n // Adds Event Location Pins to Map\n for (var i = 0; i < latitudes['lat'].length; i++) {\n var pin = {\n url: 'assets/orangepinfull.png',\n scaledSize: new google.maps.Size(24, 38)\n }\n var geolocation = {lat: latitudes['lat'][i], lng: longitudes['lng'][i]};\n if (loggedin == true) {\n if (owner[i] == true) {\n var pin = {\n url: 'assets/greenpinfull.png',\n scaledSize: new google.maps.Size(24, 38)\n }\n }\n }\n var marker = new google.maps.Marker({\n position: geolocation,\n map: map,\n icon: pin\n });\n\n if (loggedin == true) {\n showEventData(marker, \"<a class=\\\"infowindowtitle\\\" href='events/\" + ids[i] + \"'/>\" + titles[i] + \"</a>\" + '<br>' + address[i]);\n }\n }\n\n // User's location\n var userLatLng = $('#userLatLng');\n var usergeolocation = {lat: userLatLng.data('userlatitude'), lng: userLatLng.data('userlongitude')};\n var userpin = {\n url: 'assets/userpin.png',\n scaledSize: new google.maps.Size(35, 35)\n }\n\n var marker = new google.maps.Marker({\n position: usergeolocation,\n map: map,\n icon: userpin\n });\n\n var infowindow = new google.maps.InfoWindow({\n content: 'You are Here'\n });\n\n marker.addListener('click', function() {\n infowindow.open(map, marker);\n });\n\n // Centers the Map for smaller viewports\n google.maps.event.addDomListener(window, 'resize', function() {\n var center = map.getCenter()\n google.maps.event.trigger(map, \"resize\")\n map.setCenter(usergeolocation)\n })\n}", "function initMap() {\n // initialize map\n map = new google.maps.Map(document.getElementById('map'), {\n center: {lat: boatPos[0], lng: boatPos[1]},\n zoom: 15\n });\n console.log(\"map initialized\");\n map.data.loadGeoJson('data/geojson.json'); // load map markers from geojson file\n\n // add boat marker\n var icon = {\n url: \"assets/icons/boat-marker.svg\",\n scaledSize: new google.maps.Size(50, 50)\n };\n var boatMarker = new google.maps.Marker({\n position: {lat: boatPos[0], lng: boatPos[1]},\n map: map,\n icon: icon\n });\n\n // activate algorithm\n routeData();\n\n // Move the boat marker\n // var newLat = boatPos[0];\n // var newLon = boatPos[1];\n\n // function loop() {\n // console.log(\"boat lat: \"+newLat+\" lon: \"+newLon)\n\n // newLat += 0.00001;\n // newLon += 0.00001;\n // var newLatLon = new google.maps.LatLon(newLat, newLon);\n // map.setCenter(newLatLon);\n // boatMarker.setPosition(newLatLon);\n\n // window.requestAnimationFrame(loop);\n // }\n // window.requestAnimationFrame(loop);\n}", "function initialize() {\n\t\n\tinfoWindow = new google.maps.InfoWindow();\n\tgoogle.maps.event.addListener(infoWindow, 'closeclick', function(){\n\t\t// clear path when window is closed\n\t\tclearPath();\n\t\t// clear victim messages\n\t\t$('#message-cards').empty();\n\t\t$('#message-cards').append(document.createTextNode('Click on a victim to show sent messages'));\n\t\t$('#lblTabMessages').html('Messages');\n\t\tinfoWindow.close();\n\t});\n\t\n\tbounds = new google.maps.LatLngBounds ();\n\tvar opts = {\n\t\tzoom : 8,\n\t\tcenter : new google.maps.LatLng(38.71284,-9.135475), // Lisboa, however the map will center on incident location\n\t\tmapTypeId : google.maps.MapTypeId.ROADMAP,\n\t\tnoClear : true, // allow elements over the map\n\t\tpanControl: false, // remove superior left corner navigation\n\t\tzoomControl: true,\n\t\tmapTypeControl: true, // allow toggle between Road and Sattelite views\n\t\tscaleControl: true, // scale visible on map canvas\n\t\tstreetViewControl: false,\n\t\toverviewMapControl: false,\n\t\tzoomControlOptions: {\n\t\t\tposition: google.maps.ControlPosition.LEFT_TOP // put zoom controls always at left top\n\t\t}\n\t};\n\tmap = new google.maps.Map(document.getElementById('map'), opts);\n\t/*clusterer = new MarkerClusterer(map);*/\n\n\t/*oms = new OverlappingMarkerSpiderfier(map);\n\toms.addListener('click', function(marker, event) {\n\t\tif( ! isOutsiteTimeline(marker)) {\n\t\t\t// show path\n\t\t\tmarkerPath = marker\n\t\t\tshowPath(markerPath);\n\t\t\tshowMarkerMessages(marker);\n\t\t\tinfoWindow.setContent(createDialog(marker));\n\t\t\tinfoWindow.open(map, marker);\n\t\t}\n\t});\n\t\n\toms.addListener('spiderfy', function(markers) {\n\t\tinfoWindow.close();\n\t});*/\n\t\n\t\tgetStartPoints(); // async\n\t\n\t\tpopulateSimulationFilter();\n\t\n}", "function embeddedInMaps() { }", "function initialize(id) {\n\t\"use strict\";\n\tvar image = 'images/icon-map.png';\n\n\tvar overlayTitle = 'Agencies';\n\n\tvar locations = [\n\t/* point number 1 */\n\t['Madison Square Garden', '4 Pennsylvania Plaza, New York, NY'],\n\n\t/* point number 2 */\n\t['Best town ever', 'Santa Cruz', 36.986021, -122.02216399999998],\n\n\t/* point number 3 */\n\t['Midwest Agency', 'Kansas'],\n\n\t/* point number 4 */\n\t['I\\'ll definitly be there one day', 'Chicago', 41.8781136, -87.62979819999998] \n\t];\n\n\t/*** DON'T CHANGE ANYTHING PASSED THIS LINE ***/\n\tid = (id === undefined) ? 'map-wrapper' : id;\n\n\tvar map = new google.maps.Map(document.getElementById(id), {\n\t\tscrollwheel: false,\n\t\tzoomControl: true,\n\t\tzoomControlOptions: {\n\t\t\tstyle: google.maps.ZoomControlStyle.LARGE,\n\t\t\tposition: google.maps.ControlPosition.LEFT_CENTER\n\t\t},\n\t\tstreetViewControl:true,\n\t\tscaleControl:false,\n\t\tzoom: 14\n\t});\n\n\tif($mapType == 'SATELLITE'){\n\t\tmap.setMapTypeId(google.maps.MapTypeId.SATELLITE);\n\t}else if($mapType == 'HYBRID'){\n\t\tmap.setMapTypeId(google.maps.MapTypeId.HYBRID);\n\t}else if($mapType == 'TERRAIN'){\n\t\tmap.setMapTypeId(google.maps.MapTypeId.TERRAIN);\n\t}else{\n\t\tmap.setMapTypeId(google.maps.MapTypeId.ROADMAP);\n\t}\n\n\tif($mapStyle == 'light' && $mapType == 'ROADMAP'){\n\t\tvar $flatMap = [{\"elementType\":\"labels.text\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"landscape.natural\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#f5f5f2\"},{\"visibility\":\"on\"}]},{\"featureType\":\"administrative\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"transit\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"poi.attraction\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"landscape.man_made\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#ffffff\"},{\"visibility\":\"on\"}]},{\"featureType\":\"poi.business\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"poi.medical\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"poi.place_of_worship\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"poi.school\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"poi.sports_complex\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#ffffff\"},{\"visibility\":\"simplified\"}]},{\"featureType\":\"road.arterial\",\"stylers\":[{\"visibility\":\"simplified\"},{\"color\":\"#ffffff\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"labels.icon\",\"stylers\":[{\"color\":\"#ffffff\"},{\"visibility\":\"on\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"road.arterial\",\"stylers\":[{\"color\":\"#ffffff\"}]},{\"featureType\":\"road.local\",\"stylers\":[{\"color\":\"#ffffff\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"poi\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"water\",\"stylers\":[{\"color\":\"#71c8d4\"}]},{\"featureType\":\"landscape\",\"stylers\":[{\"color\":\"#e5e8e7\"}]},{\"featureType\":\"poi.park\",\"stylers\":[{\"color\":\"#8ba129\"}]},{\"featureType\":\"road\",\"stylers\":[{\"color\":\"#ffffff\"}]},{\"featureType\":\"poi.sports_complex\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#c7c7c7\"},{\"visibility\":\"on\"}]},{\"featureType\":\"water\",\"stylers\":[{\"color\":\"#a0d3d3\"}]},{\"featureType\":\"poi.park\",\"stylers\":[{\"color\":\"#91b65d\"}]},{\"featureType\":\"poi.park\",\"stylers\":[{\"gamma\":1.51}]},{\"featureType\":\"road.local\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"road.local\",\"elementType\":\"geometry\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"poi.government\",\"elementType\":\"geometry\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"landscape\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"road\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"road.arterial\",\"elementType\":\"geometry\",\"stylers\":[{\"visibility\":\"simplified\"}]},{\"featureType\":\"road.local\",\"stylers\":[{\"visibility\":\"simplified\"}]},{\"featureType\":\"road\"},{\"featureType\":\"road\"},{},{\"featureType\":\"road.highway\"}];\n\t\tvar styledMap = new google.maps.StyledMapType($flatMap, {name: \"light\"});\n\t}else if($mapStyle == 'dark' && $mapType == 'ROADMAP'){\n\t\tvar $darkMap = [{\"stylers\":[{\"visibility\":\"on\"},{\"saturation\":-100},{\"gamma\":0.54}]},{\"featureType\":\"road\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"water\",\"stylers\":[{\"color\":\"#4d4946\"}]},{\"featureType\":\"poi\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"poi\",\"elementType\":\"labels.text\",\"stylers\":[{\"visibility\":\"simplified\"}]},{\"featureType\":\"road\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#ffffff\"}]},{\"featureType\":\"road.local\",\"elementType\":\"labels.text\",\"stylers\":[{\"visibility\":\"simplified\"}]},{\"featureType\":\"water\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#ffffff\"}]},{\"featureType\":\"transit.line\",\"elementType\":\"geometry\",\"stylers\":[{\"gamma\":0.48}]},{\"featureType\":\"transit.station\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"road\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"gamma\":7.18}]}];\n\t\tvar styledMap = new google.maps.StyledMapType($darkMap, {name: \"dark\"});\n\t}else if($mapStyle == 'gray' && $mapType == 'ROADMAP'){\n\t\tvar $grayMap = [{\"featureType\":\"landscape\",\"stylers\":[{\"saturation\":-100},{\"lightness\":65},{\"visibility\":\"on\"}]},{\"featureType\":\"poi\",\"stylers\":[{\"saturation\":-100},{\"lightness\":51},{\"visibility\":\"simplified\"}]},{\"featureType\":\"road.highway\",\"stylers\":[{\"saturation\":-100},{\"visibility\":\"on\"}]},{\"featureType\":\"road.arterial\",\"stylers\":[{\"saturation\":-100},{\"lightness\":30},{\"visibility\":\"on\"}]},{\"featureType\":\"road.local\",\"stylers\":[{\"saturation\":-100},{\"lightness\":40},{\"visibility\":\"on\"}]},{\"featureType\":\"transit\",\"stylers\":[{\"saturation\":-100},{\"visibility\":\"simplified\"}]},{\"featureType\":\"administrative.province\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"water\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"on\"},{\"lightness\":-25},{\"saturation\":-100}]},{\"featureType\":\"water\",\"elementType\":\"geometry\",\"stylers\":[{\"hue\":\"#ffff00\"},{\"lightness\":-25},{\"saturation\":-97}]}];\n\t\tvar styledMap = new google.maps.StyledMapType($grayMap, {name: \"grey\"});\n\t}\n\n\tif( $mapStyle != 'DEFAULT' && $mapType == 'ROADMAP'){\n\t\tmap.mapTypes.set('map_style', styledMap);\n\t\tmap.setMapTypeId('map_style');\n\t}\n\n\tvar myLatlng;\n\tvar marker, i;\n\tvar bounds = new google.maps.LatLngBounds();\n\tvar infowindow = new google.maps.InfoWindow({ content: \"loading...\" });\n\n\tfor (i = 0; i < locations.length; i++) { \n\n\n\t\tif(locations[i][2] !== undefined && locations[i][3] !== undefined){\n\t\t\tvar content = '<div class=\"infoWindow\"><h3>'+locations[i][0]+'</h3><p>'+locations[i][1]+'</p></div>';\n\t\t\t(function(content) {\n\t\t\t\tmyLatlng = new google.maps.LatLng(locations[i][2], locations[i][3]);\n\n\t\t\t\tmarker = new google.maps.Marker({\n\t\t\t\t\tposition: myLatlng,\n\t\t\t\t\ticon:image, \n\t\t\t\t\ttitle: overlayTitle,\n\t\t\t\t\tmap: map\n\t\t\t\t});\n\n\t\t\t\tgoogle.maps.event.addListener(marker, 'click', (function() {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tinfowindow.setContent(content);\n\t\t\t\t\t\tinfowindow.open(map, this);\n\t\t\t\t\t};\n\n\t\t\t\t})(this, i));\n\n\t\t\t\tif(locations.length > 1){\n\t\t\t\t\tbounds.extend(myLatlng);\n\t\t\t\t\tmap.fitBounds(bounds);\n\t\t\t\t}else{\n\t\t\t\t\tmap.setCenter(myLatlng);\n\t\t\t\t}\n\n\t\t\t})(content);\n\t\t}else{\n\n\t\t\tvar geocoder = new google.maps.Geocoder();\n\t\t\tvar info = locations[i][0];\n\t\t\tvar addr = locations[i][1];\n\t\t\tvar latLng = locations[i][1];\n\n\t\t\t(function(info, addr) {\n\n\t\t\t\tgeocoder.geocode( {\n\n\t\t\t\t\t'address': latLng\n\n\t\t\t\t}, function(results) {\n\n\t\t\t\t\tmyLatlng = results[0].geometry.location;\n\n\t\t\t\t\tmarker = new google.maps.Marker({\n\t\t\t\t\t\tposition: myLatlng,\n\t\t\t\t\t\ticon:image, \n\t\t\t\t\t\ttitle: overlayTitle,\n\t\t\t\t\t\tmap: map\n\t\t\t\t\t});\n\t\t\t\t\tvar $content = '<div class=\"infoWindow\"><h3>'+info+'</h3><p>'+addr+'</p></div>';\n\t\t\t\t\tgoogle.maps.event.addListener(marker, 'click', (function() {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tinfowindow.setContent($content);\n\t\t\t\t\t\t\tinfowindow.open(map, this);\n\t\t\t\t\t\t};\n\t\t\t\t\t})(this, i));\n\n\t\t\t\t\tif(locations.length > 1){\n\t\t\t\t\t\tbounds.extend(myLatlng);\n\t\t\t\t\t\tmap.fitBounds(bounds);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmap.setCenter(myLatlng);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t})(info, addr);\n\n\t\t}\n\t}\n}", "function irelMap(){\n\n var map = new google.maps.Map(document.getElementById(\"google-map-irel\"), {\n zoom: 6.5,\n center: { lat: 54.5562, lng: -5.9407}\n });\n\n var labels = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n var locations = [ \n {lat: 55.1679, lng: -6.7862},\n {lat: 54.8988, lng: -5.8583},\n {lat: 53.9798, lng: -6.1528},\n {lat: 55.1678, lng: -6.8180},\n {lat: 55.1703, lng: -6.7374},\n {lat: 54.2413, lng: -5.8315},\n ];\n\n var markers = locations.map(function(location, i) {\n return new google.maps.Marker({\n position: location,\n label: labels[i % labels.length]\n });\n });\n\n var markerCluster = new MarkerClusterer(map, markers, { imagePath:'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});\n\n}", "function initMap() {\n map = new google.maps.Map(document.getElementById('map'), {\n center: {lat: 1.352083, lng:103.819836},\n zoom: 12\n });\n infowindow = new google.maps.InfoWindow({maxWidth: 250});\n mapFunction.makeMarkers();\n mapFunction.displayMarkers(indexSelectedMarker);\n}", "function initMap() {\n\n console.log(\"Map: google maps starts with initMap!\")\n console.log(\"Map: initmap locations check \" + locations)\n var map = new google.maps.Map(document.getElementById('map'), {\n // Inital zoom level, can change\n zoom: 7,\n // Inital maps location, can change\n center: { lat: 44.0000, lng: -93.000 }\n\n });\n // Defines bounds for markers\n var bounds = new google.maps.LatLngBounds()\n // Custom marker for markers, other options available, easy change\n var moustacheMarker = {\n url: \"https://png.icons8.com/metro/1600/english-mustache.png\",\n // url: \"https://media.giphy.com/media/CfBql1PxBv8ic/giphy.gif\",\n // url: \"http://freevector.co/wp-content/uploads/2014/06/71321-moustache-and-glasses.png\",\n // url: \"https://image.flaticon.com/icons/svg/189/189634.svg\",\n size: new google.maps.Size(70, 60),\n scaledSize: new google.maps.Size(70, 60),\n origin: new google.maps.Point(0, 0),\n\n }\n\n // Labels for markers, not visible on most cutom markers\n var labels = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n // Loop that starts marker adding on Maps\n for (var i = 0; i < locations.length; i++) {\n console.log(\"Map: set marker loop runs...\")\n // console.log(url)\n var latLng = locations[i]\n var marker = new google.maps.Marker({\n position: { lat: latLng[0], lng: latLng[1] },\n map: map,\n label: labels[i],\n icon: moustacheMarker,\n animation: google.maps.Animation.DROP,\n url: url[i]\n });\n\n // Moves maps boundaries to new marker locations\n var loc = new google.maps.LatLng(marker.position.lat(), marker.position.lng());\n bounds.extend(loc);\n\n // market listener listens for clicks on the markers\n marker.addListener('click', function () {\n // contentString contains the HTML for the popup on marker click\n var contentString = '<div id=infoWindow><img src=\"' + this.url + '\"></div>'; // WORKS!!!! \n var infowindow = new google.maps.InfoWindow({\n content: contentString\n });\n\n console.log(\"Map: marker click event!\");\n // alert(\"hello!\"); // works\n // window.location.href = this.url // WORKS for just a url on each marker\n // window.open(this.url); //WORKS for opening URL in new tab\n infowindow.open(map, this);\n\n\n });\n }\n // This tells you your lat and long when you click on the map, currently it just dumps it to console.\n google.maps.event.addListener(map, \"click\", function (event) {\n var clickLat = event.latLng.lat();\n var clickLon = event.latLng.lng();\n\n // Show lat and lng in console and alert window, variables of clickLat and clickLon are ready for use in HTML\n console.log(\"Maps Click lat \" + clickLat)\n console.log(\"Maps Click lng \" + clickLon)\n // alert(\"Your Lat: \" + clickLat + \" Your Lng: \" + clickLon)\n\n });\n // auto centers and pans to new marker location with a new set zoom level\n\n map.fitBounds(bounds);\n map.panToBounds(bounds);\n map.setZoom(11);\n console.log(bounds)\n}", "function southMap(){\n var map = new google.maps.Map(document.getElementById(\"google-map-south\"), {\n zoom: 6.5,\n center: { lat: 51.4600, lng: -2.5859}\n });\n\n var labels = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n var locations = [ \n {lat: 50.8190, lng: -0.1346},\n {lat: 50.9332, lng: 0.7960},\n {lat: 50.7842, lng: -1.3547},\n {lat: 50.6877, lng: -1.9380},\n {lat: 50.0799, lng: -5.6962},\n {lat: 51.5323, lng: 0.8038},\n ];\n var markers = locations.map(function(location, i) {\n return new google.maps.Marker({\n position: location,\n label: labels[i % labels.length]\n });\n });\n\n var markerCluster = new MarkerClusterer(map, markers, { imagePath:'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});\n\n}", "function init() {\n mapOptions = {\n zoom: 14,\n center: new google.maps.LatLng(43.8535072 , 18.40),\n styles: set_map_style()\n };\n\n map = new google.maps.Map(document.getElementById('map'), mapOptions);\n marker = new google.maps.Marker({\n // position: new google.maps.LatLng(43.8635072 , 18.42),\n // map: map,\n // title: 'You are here !'\n });\n}", "function initMap() {\n var map = new google.maps.Map(document.getElementById(\"map-one\"), {\n zoom: 6,\n center: {\n lat: 64.963942,\n lng: -19.021169\n }\n });\n var locations = [\n [{\n lat: 65.8146648,\n lng: -16.4020855\n }, \"Dettifoss\"],\n [{\n lat: 63.4549985,\n lng: -18.7953536\n }, \"Mýrdalssandur beach\"],\n [{\n lat: 65.031768,\n lng: -14.218712\n }, \"Reyðarfjörður\"],\n [{\n lat: 63.5320123,\n lng: -19.513565\n }, \"Skógafoss\"],\n [{\n lat: 65.6086097,\n lng: -16.8891762\n }, \"Hverfjall mountain\"],\n ];\n // following code from Google Maps API Marker Accessibility doc\n var infoWindow = new google.maps.InfoWindow();\n locations.forEach(([position, title]) => {\n const marker = new google.maps.Marker({\n position,\n map,\n title: `${title}`,\n optimized: false,\n });\n marker.addListener(\"click\", () => {\n infoWindow.close();\n infoWindow.setContent(marker.getTitle());\n infoWindow.open(marker.getMap(), marker);\n\n });\n });\n}", "function initialize() {\n\tif (GBrowserIsCompatible()) {\n\t\tvar url = window.top.location.search;\n\t\tmap = new GMap2(document.getElementById(\"map_canvas\"));\n\t\tmap.setMapType(G_SATELLITE_MAP);\n\t\tvar latlng = new GLatLng(document.getElementById(\"latitude\").value, document.getElementById(\"longitude\").value);\n\t\tmap.setCenter(latlng, 2);\n\t\tmap.addControl(new GSmallMapControl());\n\t\tgeocoder = new GClientGeocoder();\n\t\t\tGDownloadUrl('xml/routes.jsp'+url, function(data) {\n\t var xml = GXml.parse(data);\n\t var markers = xml.documentElement.getElementsByTagName(\"marker\");\n\t for (var i = 0; i < markers.length; i++) {\n\t \tvar latlng = new GLatLng(parseFloat(markers[i].getAttribute(\"lat\")),\n \t\tparseFloat(markers[i].getAttribute(\"lng\")));\n\t \tvar encodedPoint = markers[i].getAttribute(\"pt\");\n\t \tvar encodedLevel = markers[i].getAttribute(\"lvl\");\n\t var imageURL = markers[i].getAttribute(\"img\");\n\t var marker = createMarker(latlng,imageURL);\n\t\t\t\tvar polyline = createPolyline(encodedPoint,encodedLevel)\n\t }//for\n\t });//GDownload\n\t }\n\t}", "function AddInitialMarkers() {\n\n headToPoint = new google.maps.Marker({\n position: {\n lat: 0,\n lng: 0\n },\n map: map,\n })\n\n//Posições dos pontos de coletas para rota\n //Ecoponto Santa Cruz\n locs[0] = ['', '-23.5996933', '-46.6231753']\n //Ecoponto Vicente Rao\n locs[1] = ['', '-23.628375', '-46.685577']\n //Ecoponto Brás\n locs[2] = ['', '-23.554468', '-46.610806']\n //Ecoponto Viaduto Antártica\n locs[3] = ['', '-23.524417', '-46.670641']\n //Ecoponto Alvarenga\n locs[4] = ['', '-23.695453', '-46.651554']\n //Ecoponto Vila Madalena\n locs[5] = ['', '-23.558397', '-46.687488']\n //Ecoponto Vila Mariana\n locs[6] = ['', '-23.593116', '-46.635120']\n //Ecoponto Vila Berrini\n locs[7] = ['', '-23.597401', '-46.691452']\n //Ecoponto Tereza Cristina\n locs[8] = ['', '-23.569094', '-46.608511']\n //Ecoponto Bresser\n locs[9] = ['', '-23.543457', '-46.606410']\n //Ecoponto Tatuapé\n locs[10] = ['', '-23.529909', '-46.583025']\n //Ecoponto Vila das Mercês\n locs[11] = ['', '-23.623759', '-46.605431']\n //Ecoponto Imigrantes\n locs[12] = ['', '-23.632373', '-46.630577']\n //Ecoponto Saioá\n locs[13] = ['', '-23.594423', '-46.622648']\n //Ecoponto Mirandópolis\n locs[14] = ['', '-23.611692', '-46.644651']\n //Ecoponto Vila Nova\n locs[15] = ['', '-23.472241', '-46.669897']\n //Ecoponto Cônego José Salomon\n locs[16] = ['', '-23.492242', '-46.721936']\n //Ecoponto Cupecê\n locs[17] = ['', '-23.665439', '-46.654224']\n //Ecoponto Liberdade\n locs[18] = ['', '-23.556584', '-46.637028']\n //Ecoponto Tiquatira\n locs[19] = ['', '-23.513541', '-46.543706']\n //Ecoponto Tucuruvi\n locs[20] = ['', '-23.467260', '-46.609947']\n //Ecoponto Jardim Maria do Carmo\n locs[21] = ['', '-23.595602', '-46.746835']\n //Ecoponto Jabaquara\n locs[22] = ['', '-23.653258', '-46.649455']\n //Ecoponto Moóca\n locs[23] = ['', '-23.547460', '-46.602705']\n //Ecoponto Olinda\n locs[24] = ['', '-23.634093', '-46.758048']\n //Ecoponto Vila Guilherme\n locs[25] = ['', '-23.517127', '46.600380']\n\n locs[26] = ['', '-23.662031', '-46.722554']\n\n locs[27] = ['', '-23.550065', '-46.525032']\n\n locs[28] = ['', '-23.575918', '-46.765089']\n\n locs[29] = ['', '-23.509897', '-46.432791']\n\n locs[30] = ['', '-23.543282', '-46.593916']\n\n locs[31] = ['', '-23.485615', '-46.565275']\n\n locs[32] = ['', '-23.520789', '-46.463578']\n\n locs[33] = ['', '-23.505748', '-46.704552']\n\n locs[34] = ['', '-23.638090', '-46.741615']\n\n locs[35] = ['', '-23.605491', '-46.496939']\n\n locs[36] = ['', '-23.599187', '-46.534555']\n\n locs[37] = ['', '-23.662829', '-46.594838']\n\n locs[38] = ['', '-23.503931', '-46.527497']\n\n locs[39] = ['', '-23.519577', '-46.580863']\n\n locs[40] = ['', '-23.453053', '-46.749656']\n\n locs[41] = ['', '-23.587385', '-46.509063']\n\n locs[42] = ['', '-23.539237', '-46.505162']\n\n locs[43] = ['', '-23.549149', '-46.483279']\n\n locs[44] = ['', '-23.549149', '-46.483279']\n\n locs[45] = ['', '-23.589181', '-46.755096']\n\n locs[46] = ['', '-23.550811', '-46.494909']\n\n locs[47] = ['', '-23.663999', '-46.776785']\n\n locs[48] = ['', '-23.710667', '-46.586437']\n\n locs[49] = ['', '-23.579237', '-46.495361']\n\n locs[50] = ['', '-23.469882', '-46.674867']\n //Ecoponto Jardim São Nicolau\n locs[51] = ['', '-23.522995', '-46.482757']\n //Ecoponto Imperador\n locs[52] = ['', '-23.513981', '-46.456650']\n //Ecoponto Penha\n locs[53] = ['', '-23.531294', '-46.525451']\n //Ecoponto Vila Cardoso Franco\n locs[54] = ['', '-23.623292', '-46.509081']\n //Ecoponto Barra Funda\n locs[55] = ['', '-23.527089', '-46.648613']\n //Ecoponto Vila Luisa\n locs[56] = ['', '-23.531202', '-46.552460']\n //Ecoponto Corinthians\n locs[57] = ['', '-23.547408', '-46.436838']\n //Ecoponto Cidade Líder\n locs[58] = ['', '-23.522995', '-46.482757']\n //Ecoponto Inácio Monteiro\n locs[59] = ['', '-23.573347', '-46.401498']\n //Ecoponto Piraporinha\n locs[60] = ['', '-23.669831', '-46.736531']\n //Ecoponto Giovanni Gronchi\n locs[61] = ['', '-23.610030', '-46.726838']\n //Ecoponto Cipoaba\n locs[62] = ['', '-23.629368', '-46.462159']\n //Ecoponto Boa Esperança\n locs[63] = ['', '-23.606197', '-46.451714']\n //Ecoponto Pedro Nunes\n locs[64] = ['', '-23.503518', '-46.465800']\n //Ecoponto Jardim Feital\n locs[65] = ['', '-23.661198', '-46.429387']\n //Ecoponto Nações\n locs[65] = ['', '-23.674701', '-46.606551']\n\n let loc;\n for (i = 0; i < locs.length; i++) {\n loc = new google.maps.Marker({\n position: new google.maps.LatLng(locs[i][1], locs[i][2]),\n icon: \"\" \n });\n\n google.maps.event.addListener(loc, (function(loc, i) {\n })(loc, i));\n markers.push(loc)\n }\n}", "function drawMap(baseUrl, labelsOn){\n\n\t d3.json(baseUrl + \"/maps/counties.topojson\", function(error, uk) {\n\t\tif (error)\n\t\t\talert(\"may day, may day\"); //return console.error(error);\n\t \t\n\t\tmap_tag = uk; //assign to a global variable\n\t \t\n\t\td3.json(baseUrl + \"/maps/uk.topojson\", function(errorr, ukir){\n\t\t\tif(errorr)\n\t\t\t\talert(\"may day n ireland\");\n\t\t\t\t\n\t\t \tvar subunits_ireland = topojson.feature(ukir, ukir.objects.subunits);\n\t\t \tvar subunits = topojson.feature(uk, uk.objects.uk);\n\t\t \t\n\t\t \tprojection = d3.geo.albers()\n\t\t\t .center([0, 54.2])\n\t\t\t .rotate([4.4, 0]) //in radians?\n\t\t\t .parallels([50, 60])\n\t\t\t .scale(4000)\n\t\t\t .translate([width / 2, height / 2]);\n\t\t \n\t\t \t// attach the projecton to the path\n\t\t \tpath = d3.geo.path()\n\t\t \t .projection(projection);\n\t\t \t \t\n\t\t \t// attach the path for Ireland\n\t\t\tsvg.append(\"path\")\n\t\t\t\t.datum(subunits_ireland)\n\t\t\t\t.attr(\"d\", path);\n\t\n\t\t\t//attach the path for UK (this layer should be above Ireland)\n\t \t svg.append(\"path\")\n\t\t\t\t.datum(subunits)\n\t\t\t\t.attr(\"d\", path);\n\t\t\t\n\t \t //Provide a feature to Ireland else it will be black in colour\n\t\t\tsvg.selectAll(\".subunit_ireland\")\n\t\t \t.data(topojson.feature(ukir, ukir.objects.subunits).features)\n\t\t\t.enter().append(\"path\")\n\t\t \t.attr(\"class\", function(d) { //console.log(\"subunit_ireland_\" + d.id); \n\t\t\t \treturn \"subunit_ireland_\" + d.id; })\n\t\t \t.attr(\"d\", path);\n\t\n\t\t\t//Provider features to UK map - one colour to one country\n\t\t\tsvg.selectAll(\".subunit\")\n\t\t \t.data(topojson.feature(uk, uk.objects.uk).features)\n\t\t\t.enter().append(\"path\")\n\t\t \t.attr(\"class\", function(d) { //console.log(\"subunit_\" + d.properties.ID_1); \n\t\t\t \treturn \"subunit_\" + d.properties.ID_1; })\n\t\t \t.attr(\"d\", path);\n\t\t\t\n\t// \tsvg.append(\"path\")\n\t// \t\t .datum(topojson.mesh(uk, uk.objects.uk, function(a, b) { return a !== b && a.id !== \"IRL\"; }))\n\t// \t\t .attr(\"d\", path)\n\t// \t\t .attr(\"class\", \"subunit-boundary\");\n\t\t \n\t// \tsvg.append(\"path\")\n\t// \t\t .datum(topojson.mesh(ukir, ukir.objects.subunits, function(a, b) { return a !== b && a.id !== \"IRL\"; }))\n\t// \t\t .attr(\"d\", path)\n\t// \t\t .attr(\"class\", \"subunit-boundary\");\n\t\t\t \n\t// \tsvg.append(\"path\")\n\t// \t .datum(topojson.mesh(uk, uk.objects.uk, function(a, b) { return a === b && a.id === \"IRL\"; }))\n\t// \t .attr(\"d\", path)\n\t// \t .attr(\"class\", \"subunit-boundary IRL\");\n\t\n\t// \tsvg.append(\"path\")\n\t// \t .datum(topojson.feature(uk, uk.objects.places))\n\t// \t .attr(\"d\", path)\n\t// \t .attr(\"class\", \"place\");\n\t\n\t// \tsvg.selectAll(\".place-label\")\n\t// \t\t\t.data(topojson.feature(uk, uk.objects.places).features)\n\t// \t\t.enter().append(\"text\")\n\t// \t\t\t.attr(\"class\", \"place-label\")\n\t// \t\t\t.attr(\"transform\", function(d) { return \"translate(\" + projection(d.geometry.coordinates) + \")\"; })\n\t// \t\t\t.attr(\"dy\", \".35em\")\n\t// \t\t\t.text(function(d) { return d.properties.name; });\n\t\n\t// \tsvg.selectAll(\".place-label\")\n\t// \t .attr(\"x\", function(d) { return d.geometry.coordinates[0] > -1 ? 6 : -6; })\n\t// \t .style(\"text-anchor\", function(d) { return d.geometry.coordinates[0] > -1 ? \"start\" : \"end\"; });\n\t\n\t\t//If user wants labels then add labels as a feature - only UK part.\n\t\tif(labelsOn){\n\t\t\tsvg.selectAll(\".subunit-label\")\n\t\t\t\t\t.data(topojson.feature(uk, uk.objects.uk).features)\n//\t\t\t\t.enter().append(\"text\")\n//\t\t\t\t .attr(\"class\", function(d) { return \"subunit-label \" + d.properties.ID_1; })\n//\t\t\t\t .attr(\"transform\", function(d) { return \"translate(\" + path.centroid(d) + \")\"; })\n//\t\t\t\t .attr(\"dy\", \".35em\")\n\t\t\t\t .append(\"svg:title\")\n\t\t\t\t\t.text(function(d) { console.log(d.properties.NAME_2); return d.properties.NAME_2; })\n\t\t\t\t\t\t.attr(\"dy\", \".35em\");\n\t\t}\n\t});\n\t\n\t});\n} //end of function drawMap", "function initialize() {\n\t\n\t\tvar mapOptions = {\n\t\t\tcenter: new google.maps.LatLng(-6.9148644, 107.6082421),\n\t\t\tzoom: 15\n\t\t};\n\t\tvar map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);\n\t\t\n\t\t$.get(\"http://localhost/ngidesehat/index.php/facility/locations\", function(loc) {\n\t\t\t\n\t\t\t// generate map markers from facilities\n\t\t\tvar markers = [];\n\t\t\tfor (var i = 0; i < loc.length; i++)\n\t\t\t{\n\t\t\t\tvar marker = new google.maps.Marker({\n\t\t\t\t\tid: loc[i].id,\n\t\t\t\t\tname: loc[i].name,\n\t\t\t\t\tposition: new google.maps.LatLng(loc[i].lat, loc[i].lng),\n\t\t\t\t\tmap: map\n\t\t\t\t});\n\t\t\t\tmarkers.push(marker);\n\t\t\t\t\n\t\t\t\t// add click event to created marker\n\t\t\t\t// TODO change DOM on click\n\t\t\t\tgoogle.maps.event.addListener(marker, 'click', function() {\n\t\t\t\t\twindow.location.assign(\"http://localhost/ngidesehat/index.php/info/faskes/\" + this.id)\n\t\t\t\t\t$.get(\"http://localhost/ngidesehat/index.php/facility/get/\" + this.id, function(data) {\n\t\t\t\t\t\t$(\"#info_name\").text(data.name);\n\t\t\t\t\t\t$(\"#info_type\").text(getType(data.type));\n\t\t\t\t\t\t$(\"#info_address\").text(data.address);\n\t\t\t\t\t\t$(\"#info_tel\").text(data.tel);\n\t\t\t\t\t\t$(\"#info_class\").text(data['class']);\n\t\t\t\t\t\t$(\"#info_kec\").text(data.kec);\n\t\t\t\t\t});\n\t\t\t\t\tvar request = {\n\t\t\t\t\t\torigin: map.getCenter(),\n\t\t\t\t\t\tdestination: marker.position,\n\t\t\t\t\t\ttravelMode: google.maps.TravelMode.DRIVING\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t}", "function initMap() {\n\n // marker: Malcolm 48 Albert St\n var myLatlng = {lat: -37.803182, lng: 144.897727 };\n\n // BG horse (-37.798514, 144.889510)\n var myLatlng2 = {lat: -37.798514, lng: 144.889510 };\n\n // BG VU (-37.792655, 144.899132)\n var myLatlng3 = {lat: -37.792655, lng: 144.899132 };\n\n // Pirate cat (-37.798474, 144.889435)\n var myLatlng4 = {lat: -37.798474, lng: 144.889435 };\n\n // Elmz street (approx)\n var myLatlng5 = {lat: -37.801947, lng: 144.899882 };\n\n // stay strong women's day\n var myLatlng6 = {lat: -37.799132, lng: 144.897426 };\n\n // Heesco dragon cnr Paisley St\n var myLatlng7 = {lat: -37.800073, lng: 144.892855 };\n\n // franco cozzo hopkins st\n var myLatlng8 = {lat: -37.800105, lng: 144.904036 };\n \n // center long/lat is Footscray\n var map = new google.maps.Map(document.getElementById('map'), {\n center: {lat: -37.799132, lng: 144.897426},\n zoom: 15\n } );\n\n\n // marker 1 Malcolm Fraser\n var infowindow = new google.maps.InfoWindow({\n content: 'Heesco' \n });\n\n var marker = new google.maps.Marker({\n position: myLatlng,\n map: map,\n title: 'Malcolm Fraser'\n })\n\n marker.addListener('click', function(){\n infowindow.open(map, marker);\n });\n\n\n // BG horse marker 2\n var infowindow2 = new google.maps.InfoWindow({\n content: 'Baby Guerrilla' \n });\n\n var marker2 = new google.maps.Marker({\n position: myLatlng2,\n map: map,\n title: 'In memoriam'\n })\n\n marker2.addListener('click', function(){\n infowindow2.open(map, marker2);\n });\n\n\n // BG VU marker 3\n var infowindow3 = new google.maps.InfoWindow({\n content: 'Baby Guerrilla' \n });\n\n var marker3 = new google.maps.Marker({\n position: myLatlng3,\n map: map,\n title: 'Big floating woman'\n })\n\n marker3.addListener('click', function(){\n infowindow3.open(map, marker3);\n });\n\n\n // Pirate cat marker 4\n var infowindow4 = new google.maps.InfoWindow({\n content: 'Unknown artist' \n });\n\n var marker4 = new google.maps.Marker({\n position: myLatlng4,\n map: map,\n title: 'Pirate Cat'\n })\n\n marker4.addListener('click', function(){\n infowindow4.open(map, marker4);\n });\n\n\n // Elmz street marker 5 \n var infowindow5 = new google.maps.InfoWindow({\n content: 'Elmz Street' \n });\n\n var marker5 = new google.maps.Marker({\n position: myLatlng5,\n map: map,\n title: 'Face mural'\n })\n\n marker5.addListener('click', function(){\n infowindow5.open(map, marker5);\n });\n\n\n // stay strong 6\n var infowindow6 = new google.maps.InfoWindow({\n content: 'Trashort Art' \n });\n\n var marker6 = new google.maps.Marker({\n position: myLatlng6,\n map: map,\n title: 'Stay Strong mural'\n })\n\n marker6.addListener('click', function(){\n infowindow6.open(map, marker6);\n });\n\n\n // dragon 7 \n var infowindow7 = new google.maps.InfoWindow({\n content: 'Heesco' \n });\n\n var marker7 = new google.maps.Marker({\n position: myLatlng7,\n map: map,\n title: 'Chinese Dragon'\n })\n\n marker7.addListener('click', function(){\n infowindow7.open(map, marker7);\n });\n\n\n // franco cozzo 8 \n var infowindow8 = new google.maps.InfoWindow({\n content: 'Heesco' \n });\n\n var marker8 = new google.maps.Marker({\n position: myLatlng8,\n map: map,\n title: 'Franco Cozzo mural'\n })\n\n marker8.addListener('click', function(){\n infowindow8.open(map, marker8);\n });\n\n\n// to change marker colour of selected artsite at click on artist name\n// and scroll to map\n\nvar changeRed = function() {\n marker.setIcon('http://maps.google.com/mapfiles/ms/icons/red-dot.png');\n marker2.setIcon('http://maps.google.com/mapfiles/ms/icons/red-dot.png');\n marker5.setIcon('http://maps.google.com/mapfiles/ms/icons/red-dot.png');\n marker4.setIcon('http://maps.google.com/mapfiles/ms/icons/red-dot.png');\n marker3.setIcon('http://maps.google.com/mapfiles/ms/icons/red-dot.png');\n marker7.setIcon('http://maps.google.com/mapfiles/ms/icons/red-dot.png');\n marker6.setIcon('http://maps.google.com/mapfiles/ms/icons/red-dot.png');\n marker8.setIcon('http://maps.google.com/mapfiles/ms/icons/red-dot.png');\n};\n\n\n $(\".art-7\").click(function() {\n changeRed();\n marker.setIcon('http://maps.google.com/mapfiles/ms/icons/green-dot.png');\n $('html, body').animate({\n scrollTop: $(\"#map\").offset().top\n }, 1000);\n });\n\n $(\".art-6\").click(function() {\n changeRed();\n marker2.setIcon('http://maps.google.com/mapfiles/ms/icons/green-dot.png');\n $('html, body').animate({\n scrollTop: $(\"#map\").offset().top\n }, 1000);\n });\n\n $(\".art-8\").click(function() {\n changeRed();\n marker5.setIcon('http://maps.google.com/mapfiles/ms/icons/green-dot.png');\n $('html, body').animate({\n scrollTop: $(\"#map\").offset().top\n }, 1000);\n });\n\n $(\".art-9\").click(function() {\n changeRed();\n marker4.setIcon('http://maps.google.com/mapfiles/ms/icons/green-dot.png');\n $('html, body').animate({\n scrollTop: $(\"#map\").offset().top\n }, 1000);\n });\n\n $(\".art-5\").click(function() {\n changeRed();\n marker3.setIcon('http://maps.google.com/mapfiles/ms/icons/green-dot.png');\n $('html, body').animate({\n scrollTop: $(\"#map\").offset().top\n }, 1000);\n });\n\n $(\".art-10\").click(function() {\n changeRed();\n marker7.setIcon('http://maps.google.com/mapfiles/ms/icons/green-dot.png');\n $('html, body').animate({\n scrollTop: $(\"#map\").offset().top\n }, 1000);\n });\n\n $(\".art-11\").click(function() {\n changeRed();\n marker6.setIcon('http://maps.google.com/mapfiles/ms/icons/green-dot.png');\n $('html, body').animate({\n scrollTop: $(\"#map\").offset().top\n }, 1000);\n });\n\n $(\".art-12\").click(function() {\n changeRed();\n marker8.setIcon('http://maps.google.com/mapfiles/ms/icons/green-dot.png');\n $('html, body').animate({\n scrollTop: $(\"#map\").offset().top\n }, 1000);\n });\n\n}", "function initMap() {\n // Create a styles array to use with the map.\n var styles = [{\n featureType: 'water',\n stylers: [{\n color: '#19a0d8'\n }]\n }, {\n featureType: 'administrative',\n elementType: 'labels.text.stroke',\n stylers: [{\n color: '#ffffff'\n },\n {\n weight: 6\n }\n ]\n }, {\n featureType: 'administrative',\n elementType: 'labels.text.fill',\n stylers: [{\n color: '#e85113'\n }]\n }, {\n featureType: 'road.highway',\n elementType: 'geometry.stroke',\n stylers: [{\n color: '#efe9e4'\n },\n {\n lightness: -40\n }\n ]\n }, {\n featureType: 'transit.station',\n stylers: [{\n weight: 9\n },\n {\n hue: '#e85113'\n }\n ]\n }, {\n featureType: 'road.highway',\n elementType: 'labels.icon',\n stylers: [{\n visibility: 'off'\n }]\n }, {\n featureType: 'water',\n elementType: 'labels.text.stroke',\n stylers: [{\n lightness: 100\n }]\n }, {\n featureType: 'water',\n elementType: 'labels.text.fill',\n stylers: [{\n lightness: -100\n }]\n }, {\n featureType: 'poi',\n elementType: 'geometry',\n stylers: [{\n visibility: 'on'\n },\n {\n color: '#f0e4d3'\n }\n ]\n }, {\n featureType: 'road.highway',\n elementType: 'geometry.fill',\n stylers: [{\n color: '#efe9e4'\n },\n {\n lightness: -25\n }\n ]\n }];\n\n // Constructor creates a new map - only center and zoom are required.\n\n map = new google.maps.Map(document.getElementById('map'), {\n center: {\n lat: 46.249981,\n lng: 20.147891\n },\n zoom: 11,\n styles: styles,\n mapTypeControl: false\n });\n\n // Style the markers a bit. This will be our listing marker icon.\n defaultIcon = makeMarkerIcon('0091ff');\n\n // Create a \"highlighted location\" marker color for when the user\n // mouses over the marker.\n highlightedIcon = makeMarkerIcon('FFFF24');\n\n // Create locations\n textSearchPlaces();\n\n}", "function initialize(mapdata, elementid) {\n var map;\n var bounds = new google.maps.LatLngBounds();\n var mapOptions = {\n mapTypeId: 'roadmap'\n };\n\n // Display a map on the page 1 bedroom\n map = new google.maps.Map(document.getElementById(elementid), mapOptions);\n map.setTilt(45);\n\n var mapdata = mapdata;\n\n // Display multiple markers on a map\n var infoWindow = new google.maps.InfoWindow(), marker, i;\n var image = 'images/icons/map-marker.png';\n var markers = [];\n for (var maploop = 0; maploop<mapdata.length; maploop++) {\n var position = new google.maps.LatLng(mapdata[maploop].lat, mapdata[maploop].lng);\n bounds.extend(position);\n marker = new google.maps.Marker({\n position: position,\n map: map,\n icon: image,\n title: mapdata[maploop].label\n });\n markers.push(marker);\n\n // Allow each marker to have an info window\n google.maps.event.addListener(marker, 'click', (function(marker, maploop) {\n return function() {\n infoWindow.setContent(tplInfoWindow(mapdata[maploop]));\n infoWindow.open(map, marker);\n\n };\n })(marker, maploop));\n\n // Automatically center the map fitting all markers on the screen\n map.fitBounds(bounds);\n google.maps.event.addListener(infoWindow, 'domready', function() {\n // Reference to the DIV that wraps the bottom of infowindow\n var iwOuter = $('.gm-style-iw');\n if ($('.gm-style-iw .map_info_window').length){\n iwOuter.parent().addClass('gm-style-iw2');\n $('.gm-style-iw').prev().hide();\n }else {\n iwOuter.parent().removeClass('gm-style-iw2');\n $('.gm-style-iw').prev().hide();\n }\n\n });\n }\n\n\n // Override our map zoom level once our fitBounds function runs (Make sure it only runs once)\n var boundsListener = google.maps.event.addListener((map), 'bounds_changed', function(event) {\n this.setZoom(14);\n google.maps.event.removeListener(boundsListener);\n });\n var markerCluster = new MarkerClusterer(map, markers);\n}", "function example() {\n var map = new MapSpec(61, 61, {height: 0, material: 'road'});\n map.set(45, 45, {height: 20, material: 'building'});\n map.log();\n}", "loadMap() {\n const _self = this;\n const google = window.google;\n const MarkerClusterer = window.MarkerClusterer;\n _self.map = new google.maps.Map(_self.mapElement, {\n center: {\n lat: _self.props.lat,\n lng: _self.props.lng\n },\n zoom: _self.props.zoom,\n });\n // get a list of all the drones\n droneApi.getAll().then((drones) => {\n _self.markers = drones.items.map((single) => {\n const marker = new google.maps.Marker(_self.getMarkerConfig(single));\n // set the marker id, to identify a drone uniquely\n marker.set('id', single.id);\n return marker;\n });\n _self.markerCluster = new MarkerClusterer(_self.map, _self.markers, { imagePath: 'i/m' });\n });\n }", "initMap(lat, lng, url, name) {\n const provider = {\n lat: Number(lat),\n lng: Number(lng),\n };\n\n const user = {\n lat: Number(this.des_site_five.cur_lat),\n lng: Number(this.des_site_five.cur_lng),\n };\n\n const center = {\n lat: (provider.lat + user.lat) / 2,\n lng: (provider.lng + user.lng) / 2,\n };\n\n // console.log(lat, lng);\n const mapDiv = document.getElementById(\"google-map\");\n console.log(mapDiv);\n const map = new google.maps.Map(mapDiv, {\n // const map = new google.maps.Map(document.querySelector(\"#google-map\"), {\n zoom: 13,\n center: center,\n });\n console.log(map);\n\n const infowindow = new google.maps.InfoWindow({\n // content: contentString,\n content: name,\n });\n\n const infowindow2 = new google.maps.InfoWindow({\n // content: contentString,\n content: \"Your Location\",\n });\n\n const marker = new google.maps.Marker({\n position: provider,\n map,\n title: name,\n // label: name,\n });\n\n const marker2 = new google.maps.Marker({\n position: user,\n map,\n title: \"Your location\",\n // label: \"You\",\n });\n\n infowindow.open(map, marker);\n infowindow2.open(map, marker2);\n marker.addListener(\"click\", () => {\n // infowindow.open(map, marker);\n window.open(url, \"_blank\");\n });\n console.log(provider);\n // this.initAutocomplete();\n\n const directionsRenderer = new google.maps.DirectionsRenderer();\n const directionsService = new google.maps.DirectionsService();\n directionsRenderer.setMap(map);\n this.calculateAndDisplayRoute(\n directionsService,\n directionsRenderer,\n provider.lat,\n provider.lng\n );\n }", "function init(){\n\tdisplayCoords = document.getElementById(\"msg\");\n\tmyAddress = document.getElementById(\"address\");\n\tgeocoder = new google.maps.Geocoder();\n\t//to show something even before a user clicked on the button\n\n\tvar latlng = new google.maps.LatLng(34.0144, -6.83);\n\n\tvar mapOptions = {\n\t\tzoom: 8,\n\t\tcenter: latlng,\n\t\tmapTypeId: 'roadmap'\n\t}\n\tmap = new google.maps.Map(document.getElementById('map_canvas'),mapOptions);\n}", "function initialize() {\n\n progressMessage = new myWonderApp.ProgressMessageForUser('warnings_panel');\n progressMessage.setProgressMessage(\"initialize the directions service\");\n\n// console.log(\"initialize: \")\n // Instantiate a directions service.\n directionsService = new google.maps.DirectionsService();\n\n // Create a map and center it on Manhattan.\n var manhattan = new google.maps.LatLng(40.7711329, -73.9741874);\n var mapOptions = {\n zoom: 13,\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n center: manhattan,\n mapTypeControlOptions: {\n style: google.maps.MapTypeControlStyle.DROPDOWN_MENU\n }\n };\n map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);\n\n addDropDown(map);\n// addProgressMessage(map);\n\n progressMessage.setProgressMessage(\"get the map div\");\n// console.log(\"directions: \" + map);\n // Create a renderer for directions and bind it to the map.\n var rendererOptions = {\n map: map\n }\n progressMessage.setProgressMessage(\"initialize the directions renderer\");\n directionsDisplay = new google.maps.DirectionsRenderer(rendererOptions)\n\n // Instantiate an info window to hold step text.\n progressMessage.setProgressMessage(\"initialize the info window\");\n stepDisplay = new google.maps.InfoWindow();\n\n progressMessage.setProgressMessage(\"initialize the routeboxer\");\n routeBoxer = new RouteBoxer();\n //initDatabase();\n initGoogle()\n placeWrapper = new myWonderApp.PlaceWrapper(map, database);\n emptyFields = new myWonderApp.EmptyFields();\n}", "function initialize() {\n\n directionsDisplay = new google.maps.DirectionsRenderer();\n var latlng = new google.maps.LatLng(-23.5535238, -46.6539797);\n\n var options = {\n zoom: 15,\n center: latlng,\n mapTypeId: google.maps.MapTypeId.ROADMAP\n };\n\n map = new google.maps.Map(document.getElementById(\"gerarMapa\"), options);\n directionsDisplay.setMap(map);\n\n // variável que define as opções do marcador\n var marker = new google.maps.Marker({\n position: latlng, // variável com as coordenadas Lat e Lng\n map: map,\n title:\"The Office Frei Caneca Nubra\"\n });\n}", "function MakeMap() {\n // map = new google.maps.Map(document.getElementById('map'), {\n // center: {lat: parseInt(globalLat), lng: parseInt(globalLng)}, //lat: 41.4931, lng: -81.6790\n // zoom: 11,\n // scrollwheel: false\n // });\n console.log(mapURL);\n mapURLloc = mapURL + mapAddress;\n mapURLloc = mapURLloc.replace(/ /g, \"+\");\n console.log(\"mapURLloc: \" + mapURLloc);\n $.ajax({\n url: mapURLloc,\n method: \"GET\"\n }).done(function(response) {\n console.log(response);\n var responseLoc = response.results[0].geometry.location;\n animLocLat = responseLoc.lat;\n animnLocLong = responseLoc.lng;\n\n console.log(\"FB \" + animLocLat);\n console.log(\"FB \" + animnLocLong);\n\n var test = JSON.stringify(animLocLat);\n console.log(\"Test: \" + test);\n\n // console.log(\"lat&long: \" + reanimLocLat + \", \" + animnLocLong);\n console.log(\"AnNIMLOCATION!!!!!!: \" + animLocLat + animnLocLong);\n MarkerMaker(animLocLat, animnLocLong);\n // console.log('to marker maker data: ' + globalLat + globalLng);\n MarkerMaker(globalLat, globalLng);\n \n });\n \n map = new google.maps.Map(document.getElementById('map'), {\n center: {lat: 41.4931, lng: -81.6790}, //lat: 41.4931, lng: -81.6790\n zoom: 11,\n scrollwheel: false\n });\n infoWindow = new google.maps.InfoWindow;\n }", "showMap(mapCenter) {\n // The location of Uluru\n var uluru = { lat: -25.344, lng: 131.036 };\n // The map, centered at Uluru\n var map = new window.google.maps.Map(\n document.getElementById('map'), { zoom: 15, center: mapCenter });\n this.directionsRenderer.setMap(map);\n // The marker, positioned at Uluru\n var marker = new window.google.maps.Marker({ position: mapCenter, map: map });\n\n }", "function kmap(map) {\n//\tthis.mapMode = '0';\n //Overlays \n this.addOverlay = function (obj) {\n this.overlays.push(obj);\n if (typeof(obj.init) == \"function\") {\n obj.init(this);\n }\n this.renderOverlays();\n }\n this.renderOverlays = function () {\n this.overlayDiv.style.display = \"\";\n //if(!this.internetExplorer){\n this.svg.style.display = \"\";\n //}\n var that = this;\n\n for (obj in this.overlays) {\n this.overlays[obj].render(that);\n }\n\n }\n\n this.hideOverlays = function () {\n this.overlayDiv.style.display = \"none\";\n if (this.svgSupport) {\n this.svg.style.display = \"none\";\n }\n /*\n for(obj in this.overlays){\n this.overlays[obj].hide();\n }\n */\n }\n this.removeOverlays = function () {\n while (this.overlays.length > 0) {\n var overlay = this.overlays.pop();\n overlay.destroy();\n }\n }\n this.removeOverlay = function (ov) {\n for (var i = 0; i < this.overlays.length; i++) {\n var overlay = this.overlays[i];\n if (ov == overlay) {\n overlay.destroy();\n }\n }\n }\n\n //\n // every change (lat,lng,zoom) will call a user defined function\n //\n\n this.callbackFunctions = new Array();\n this.addCallbackFunction = function (func) {\n if (typeof(func) == \"function\") {\n this.callbackFunctions.push(func);\n }\n }\n this.executeCallbackFunctions = function () {\n for (var i = 0; i < this.callbackFunctions.length; i++) {\n this.callbackFunctions[i].call();\n }\n }\n\n //\n // A simple distance measuring\n //\n this.startDistance = function () {\n this.distanceMeasuring = \"yes\";\n }\n\n this.endDistance = function () {\n this.distanceMeasuring = \"no\";\n }\n\n /*==================================================\n\t//\n\t// Touchscreen and Mouse EVENTS\n\t//\n\t===================================================*/\n\n //\n // Touchscreen\n // Here also the multitouch zoom is done\n //\n\n this.oldMoveX=0;\n this.oldMoveY=0;\n\n this.start = function (evt) {\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n evt.returnValue = false; // The IE way\n }\n this.moveAnimationBlocked = true;\n this.hideOverlays();\n if (evt.touches.length == 1) {\n this.startMoveX = this.moveX - evt.touches[0].pageX / this.faktor / this.sc;\n this.startMoveY = this.moveY - evt.touches[0].pageY / this.faktor / this.sc;\n if (this.mousedownTime != null) {\n var now = (new Date()).getTime();\n if (now - this.mousedownTime < this.doubleclickTime) {\n var zoomD = Math.ceil(0.01 + this.getZoom() - this.intZoom);\n this.autoZoomIn(evt.touches[0].pageX, evt.touches[0].pageY, zoomD);\n }\n }\n this.mousedownTime = (new Date()).getTime();\n var that = this;\n clearTimeout(this.zoomOutInterval);\n var tempFunction = function () {\n that.autoZoomOut()\n };\n this.zoomOutInterval = window.setInterval(tempFunction, 20);\n }\n\n if (evt.touches.length == 2) {\n window.clearInterval(this.zoomOutInterval);\n this.moveok = false;\n var X1 = evt.touches[0].pageX;\n var Y1 = evt.touches[0].pageY;\n var X2 = evt.touches[1].pageX;\n var Y2 = evt.touches[1].pageY;\n this.startDistance = Math.sqrt(Math.pow((X2 - X1), 2) + Math.pow((Y2 - Y1), 2));\n this.startZZ = this.zoom;\n var x = (X1 + X2) / 2 / this.faktor / this.sc;\n var y = (Y1 + Y2) / 2 / this.faktor / this.sc;\n this.startMoveX = this.moveX - x;\n this.startMoveY = this.moveY - y;\n }\n\tthis.oldMoveX=this.moveX;\n\tthis.oldMoveY=this.moveY;\n }\n\n\tthis.moveok=true;\n this.move = function (evt) {\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n evt.returnValue = false; // The IE way\n }\n\n //\tthis.mousedownTime=null;\n if (evt.touches.length == 1) {\n if (this.moveok) {\n this.lastMoveX = this.moveX;\n this.lastMoveY = this.moveY;\n this.moveX = evt.touches[0].pageX / this.faktor / this.sc + this.startMoveX;\n this.moveY = evt.touches[0].pageY / this.faktor / this.sc + this.startMoveY;\n if (!this.zoomOutStarted) {\n if ((Math.abs(this.moveX - this.oldMoveX) > 5) || (Math.abs(this.moveY - this.oldMoveY) > 5)) {\n\t\t\t//alert(this.moveX+\":\"+this.moveY);\n window.clearInterval(this.zoomOutInterval);\n this.zoomOutSpeed = 0.01;\n this.mousedownTime = null;\n }\n var center = new kPoint(this.lat, this.lng);\n this.setCenter2(center, this.zoom);\n this.moveAnimationBlocked = false;\n }\n if ((Math.abs(this.moveX - this.oldMoveX) > 5) || (Math.abs(this.moveY - this.oldMoveY) >5)) {\n\t\t//\talert(this.moveX+\":\"+this.moveX);\n\t\t\t//alert(99);\n this.mousedownTime = null; //prevents doubleclick if map is moved already\n }\n } else {\n //alert(\"no move\");\n }\n }\n\n if (evt.touches.length == 2) {\n this.mousedownTime = null;\n var X1 = evt.touches[0].pageX;\n var Y1 = evt.touches[0].pageY;\n var X2 = evt.touches[1].pageX;\n var Y2 = evt.touches[1].pageY;\n var Distance = Math.sqrt(Math.pow((X2 - X1), 2) + Math.pow((Y2 - Y1), 2));\n var zoomDelta = (Distance / this.startDistance);\n var zz = this.startZZ + zoomDelta - 1;\n if (zz < 1) {\n zz = 1;\n }\n if (zz > 18) {\n zz = 18;\n zoomDelta = 1;\n }\n var x = (X1 + X2) / 2;\n var y = (Y1 + Y2) / 2;\n\n faktor = Math.pow(2, zz);\n var zoomCenterDeltaX = x / faktor - this.width / 2;\n var zoomCenterDeltaY = y / faktor - this.height / 2;\n var f = Math.pow(2, zoomDelta - 1);\n var dx = zoomCenterDeltaX - zoomCenterDeltaX * f;\n var dy = zoomCenterDeltaY - zoomCenterDeltaY * f;\n\n this.moveX = (x + dx) / faktor + this.startMoveX;\n this.moveY = (y + dy) / faktor + this.startMoveY;\n\n var center = new kPoint(this.lat, this.lng);\n this.setCenter2(center, zz);\n }\n }\n\n this.end = function (evt) {\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n evt.returnValue = false; // The IE way\n }\n window.clearInterval(this.zoomOutInterval);\n this.zoomOutStarted = false;\n\tthis.zoomOutSpeed = 0.01;\n\n if (evt.touches.length == 0) {\n this.moveok = true;\n if (this.moveAnimationMobile) {\n if (this.moveAnimationBlocked == false) {\n var speedX = this.lastMoveX - this.moveX;\n var speedY = this.lastMoveY - this.moveY;\n clearTimeout(this.animateMoveTimeout);\n this.animateMove(speedX, speedY);\n }\n }\n /*\n\t\t\t var that=this;\n\t\t\t var tempFunction=function () {that.moveAnimationBlocked=false};\n\t\t\t setTimeout(tempFunction,this.doubleclickTime);\n\t\t\t */\n }\n this.renderOverlays();\n }\n\n //\n // mouse events\n //\n //ie sucks\n this.pageX = function (evt) {\n try {\n if (evt.pageX === undefined) {\n var px = evt.clientX + document.body.scrollLeft;\n } else {\n var px = evt.pageX;\n }\n return px - this.mapLeft;\n } catch (e) {\n return this.lastMouseX;\n //return this.width/2 + this.mapLeft;\n }\n }\n this.pageY = function (evt) {\n try {\n if (evt.pageY === undefined) {\n var py = evt.clientY + document.body.scrollTop;\n } else {\n var py = evt.pageY;\n }\n return py - this.mapTop;\n } catch (e) {\n return this.lastMouseY;\n //return this.height/2 +this.mapTop;\n }\n }\n\n this.doubleclick = function (evt) {\n var zoom = this.getZoom();\n var zoomD = Math.ceil(0.0001 + this.getZoom()) - zoom;\n this.autoZoomIn(this.pageX(evt), this.pageY(evt), zoomD);\n }\n\n this.mousedown = function (evt) {\n this.mapParent.focus();\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n window.event.returnValue = false; // The IE way\n }\n\n this.lastMouseX = this.pageX(evt);\n this.lastMouseY = this.pageY(evt);\n this.moveAnimationBlocked = true;\n if (this.mousedownTime2 != null) {\n var now = (new Date()).getTime();\n if (now - this.mousedownTime2 < this.doubleclickTime2) {\n this.doubleclick(evt);\n }\n }\n this.mousedownTime2 = (new Date()).getTime();\n\n if (this.distanceMeasuring == \"yes\") {\n //this.normalize();\n this.distanceStartpoint = this.XYTolatlng(this.moveX + this.pageX(evt), this.moveY + this.height - this.pageY(evt));\n var img = document.createElement(\"img\");\n img.setAttribute(\"src\", \"images/dot_green.png\");\n img.style.position = \"absolute\";\n img.style.top = \"-3px\"; //<--- flag\n img.style.left = \"-4px\"; //<--- flag\n img.style.width = \"8px\"; //<--- flag\n img.style.height = \"8px\";\n\n var marker = new kMarker(this.distanceStartpoint, img);\n this.addOverlay(marker);\n var img2 = img.cloneNode(img);\n this.moveMarker = new kMarker(this.distanceStartpoint, img2);\n\n var points = new Array();\n var style = new kStyle();\n style.addStyle(\"stroke-width\", 1);\n style.addStyle(\"stroke\", \"green\");\n style.addStyle(\"stroked\", \"green\");\n this.measureLine = new kPolyline(points, style);\n this.addOverlay(this.measureLine);\n\n return;\n }\n\n\n if (evt.shiftKey) {\n this.selectRectLeft = this.pageX(evt);\n this.selectRectTop = this.pageY(evt);\n\n //\t\tthis.distanceStartpoint=this.XYTolatlng( this.pageX(evt),this.height - this.pageY(evt));\n this.selectRect = document.createElement(\"div\");\n this.selectRect.style.left = this.selectRectLeft + \"px\";\n this.selectRect.style.top = this.selectRectTop + \"px\";\n this.selectRect.style.border = \"1px solid gray\";\n if (!this.internetExplorer) {\n this.selectRect.style.opacity = 0.5;\n this.selectRect.style.backgroundColor = \"white\";\n }\n this.selectRect.style.position = \"absolute\";\n this.map.parentNode.appendChild(this.selectRect);\n } else {\n this.hideOverlays();\n this.startMoveX = this.moveX - (this.pageX(evt)) / this.faktor / this.sc;\n this.startMoveY = this.moveY - (this.pageY(evt)) / this.faktor / this.sc;\n this.movestarted = true;\n }\n return false;\n }\n\n this.mousemove = function (evt) {\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n window.event.returnValue = false; // The IE way\n }\n //this.mousedownTime2=0; //if it's moved it's not a doubleclick\n this.lastMouseX = this.pageX(evt);\n this.lastMouseY = this.pageY(evt);\n if (this.distanceMeasuring) {\n if (this.moveMarker) {\n //this.normalize();\n var movePoint = this.XYTolatlng(this.pageX(evt), this.height - this.pageY(evt));\n this.moveMarker.moveTo(movePoint);\n this.addOverlay(this.moveMarker);\n //add line\n var points = new Array();\n if (this.distanceStartpoint.getLng() < movePoint.getLng()) {\n points.push(this.distanceStartpoint);\n points.push(movePoint);\n } else {\n points.push(movePoint);\n points.push(this.distanceStartpoint);\n }\n\n this.measureLine.setPoints(points);\n var mbr = new kBounds(movePoint, this.distanceStartpoint);\n var d = mbr.getDistanceText();\n\n var style2 = new kStyle();\n style2.addStyle(\"fill\", \"black\");\n style2.addStyle(\"stroke\", \"white\");\n style2.addStyle(\"stroke-width\", 0.5);\n style2.addStyle(\"font-size\", \"18px\");\n if (navigator.userAgent.indexOf(\"Opera\") != -1) {\n style2.addStyle(\"font-size\", \"15px\");\n } else {\n style2.addStyle(\"font-weight\", \"bold\");\n }\n style2.addStyle(\"text-anchor\", \"middle\");\n style2.addStyle(\"dy\", \"-2\");\n this.measureLine.setText(d, style2);\n var that = this;\n this.measureLine.render(that);\n return;\n }\n }\n if (evt.shiftKey) {\n if (this.selectRect) {\n this.selectRect.style.width = Math.abs(this.pageX(evt) - this.selectRectLeft) + \"px\";\n this.selectRect.style.height = Math.abs(this.pageY(evt) - this.selectRectTop) + \"px\";\n if (this.pageX(evt) < this.selectRectLeft) {\n this.selectRect.style.left = this.pageX(evt);\n }\n if (this.pageY(evt) < this.selectRectTop) {\n this.selectRect.style.top = this.pageY(evt);\n }\n }\n } else {\n if (this.movestarted) {\n this.lastMoveX = this.moveX;\n this.lastMoveY = this.moveY;\n this.lastMoveTime = new Date();\n this.moveX = (this.pageX(evt)) / this.faktor / this.sc + this.startMoveX;\n this.moveY = (this.pageY(evt)) / this.faktor / this.sc + this.startMoveY;\n\n var center = new kPoint(this.lat, this.lng);\n //alert(evt.pageX);\n this.setCenter2(center, this.zoom);\n this.moveAnimationBlocked = false;\n }\n }\n return false;\n }\n this.mouseup = function (evt) {\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n evt.returnValue = false; // The IE way\n }\n this.lastMouseX = this.pageX(evt);\n this.lastMouseY = this.pageY(evt);\n if (this.moveMarker) {\n this.moveMarker = null;\n }\n if (this.selectRect) {\n //this.normalize();\n var p1 = this.XYTolatlng(this.selectRect.offsetLeft, this.height - this.selectRect.offsetTop - this.selectRect.offsetHeight);\n var p2 = this.XYTolatlng(this.selectRect.offsetLeft + this.selectRect.offsetWidth, this.height - this.selectRect.offsetTop);\n\n var bounds = new kBounds(p1, p2);\n this.setBounds(bounds);\n this.selectRect.parentNode.removeChild(this.selectRect);\n this.selectRect = null;\n }\n\n //using this normalize some things are working better, others not so goot. \n //delelte it will solve some problems but bring other problems\n //this.normalize();\n if (this.wheelSpeedConfig[\"moveAnimateDesktop\"]) {\n if (this.movestarted) {\n if (this.moveAnimationBlocked == false) {\n\t var now=new Date();\t\n var timeDelta=now - this.lastMoveTime;\t\t\t\t\t\t\n var speedX = (this.lastMoveX - this.moveX) / timeDelta *30;\n var speedY = (this.lastMoveY - this.moveY) / timeDelta *30;\n\t\t\t\n\t\t\tif(Math.abs(speedX) > this.wheelSpeedConfig[\"animateMinSpeed\"] || Math.abs(speedY) > this.wheelSpeedConfig[\"animateMinSpeed\"]){\n\t\t\t this.animateMove(speedX, speedY);\n\t\t\t}\n }\n }\n } else {\n this.renderOverlays();\n }\n this.movestarted = false;\n }\n\n //\n // this function should draw the map and remove any moveX,moveY\n // Maybe buggy\n //\n/*\n\tthis.normalize=function(){\n\t\t//normalize after move speed trick\n\t\tif(!isNaN(this.movedLat)){\n\t\tif(!isNaN(this.movedLng)){\n\t\tvar lat=this.movedLat;\n\t\tvar lng=this.movedLng;\n\t\tvar center=new kPoint(lat,lng);\n\t\tvar zoom=this.getZoom();\n\t\t//this.moveX=0;\n\t\t//this.moveY=0;\n\t\t//this.setCenterNoLog(center,zoom);\n\t\t//end normalize (maybe this.stop needs the same)\n\t\t}\n\t\t}\n\t}\n\t*/\n\n //\n // mouse wheel zoom\n // the mousewheel speed depends on browser and os\n // to optimize this could improve the map a lot.\n // todo: wheelspeed\n //\n\n this.zoomAccelerate = 0;\n this.mousewheel = function (evt) {\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n evt.returnValue = false; // The IE way\n }\n this.mapParent.focus();\n\n this.wheelEventCounter++;\n var that = this;\n var tempFunction = function () {\n that.wheelEventCounter--\n };\n window.setTimeout(tempFunction, 1000);\n\n delta = null;\n if (!evt) /* For IE. */\n evt = window.event;\n if (evt.wheelDelta) { /* IE/Opera/Chrom. */\n delta = evt.wheelDelta / 60;\n if (window.opera) {\n delta = delta / 5;\n }\n } else if (evt.detail) { /** Mozilla case. */\n delta = -evt.detail / 3;\n }\n if (navigator.userAgent.indexOf(\"Chrome\") != -1) {\n if (navigator.userAgent.indexOf(\"Linux\") != -1) {\n delta = evt.wheelDelta / 120;\n }\n }\n\n var dzoom = delta * this.wheelSpeedConfig[\"acceleration\"] * 0.03;\n\n if (dzoom > 0 && this.zoomAccelerate < 0) this.zoomAccelerate = 0;\n if (dzoom < 0 && this.zoomAccelerate > 0) this.zoomAccelerate = 0;\n\n if (!isNaN(dzoom)) {\n this.zoomAccelerate = this.zoomAccelerate + dzoom;\n } else {\n alert(\"hopala\");\n this.zoomAccelerate = 0;\n }\n\n var that = this;\n\n var tempFunction = function () {\n that.zooming(that.pageX(evt), that.pageY(evt))\n };\n if (this.wheelZoomTimeout) {\n window.clearTimeout(this.wheelZoomTimeout);\n }\n window.setTimeout(tempFunction, 20);\n }\n\n this.wheelZoomTimeout = null;\n this.zooming = function (pageX, pageY) {\n var ttt = this.zoomAccelerate;\n\n if (this.wheelZoomTimeout) {\n clearTimeout(this.wheelZoomTimeout);\n }\n if (Math.abs(this.zoomAccelerate) > this.wheelSpeedConfig[\"zoomAnimationSlowdown\"] * 2) {\n if (this.wheelSpeedConfig[\"animate\"]) {\n var that = this;\n var tempFunction = function () {\n that.zooming(pageX, pageY)\n };\n var time = 1 / this.wheelSpeedConfig[\"animationFPS\"] * 1000;\n this.wheelZoomTimeout = window.setTimeout(tempFunction, time);\n } else {\n //alert(\"gut\");\n }\n }\n\n if (this.zoomAccelerate > this.wheelSpeedConfig[\"maxSpeed\"] / 10) this.zoomAccelerate = this.wheelSpeedConfig[\"maxSpeed\"] / 10;\n if (this.zoomAccelerate < -this.wheelSpeedConfig[\"maxSpeed\"] / 10) this.zoomAccelerate = -this.wheelSpeedConfig[\"maxSpeed\"] / 10;\n var oldzoom = this.zoom;\n this.zoom = this.zoom + this.zoomAccelerate; // * this.wheelSpeedConfig[\"speed\"]; \n if (this.zoom <= 1) {\n this.zoom = 1;\n }\n if (this.zoom >= 18) {\n this.zoom = 18;\n }\n\n faktor = Math.pow(2, this.zoom);\n var zoomCenterDeltaX = (pageX) - this.width / 2;\n var zoomCenterDeltaY = (pageY) - this.height / 2;\n\n var dzoom = this.zoom - oldzoom;\n var f = Math.pow(2, dzoom);\n\n var dx = zoomCenterDeltaX - zoomCenterDeltaX * f;\n var dy = zoomCenterDeltaY - zoomCenterDeltaY * f;\n\n this.moveX = this.moveX + dx / faktor;\n this.moveY = this.moveY + dy / faktor;\n\n if (this.zoomAccelerate > 0) {\n this.zoomAccelerate = this.zoomAccelerate - this.wheelSpeedConfig[\"zoomAnimationSlowdown\"];\n }\n if (this.zoomAccelerate < 0) {\n this.zoomAccelerate = this.zoomAccelerate + this.wheelSpeedConfig[\"zoomAnimationSlowdown\"];\n }\n\n this.setCenter2(this.center, this.zoom);\n this.renderOverlays();\n\n if (Math.abs(this.zoomAccelerate) < this.wheelSpeedConfig[\"zoomAnimationSlowdown\"] * 2) {\n this.zoomAccelerate = 0;\n }\n }\n\n //\n // Map continues moving after mouse up\n //\n\n this.animateMove = function (speedX, speedY) {\n clearTimeout(this.animateMoveTimeout);\n if (Math.abs(speedX) <= 0.00001 && Math.abs(speedY) <= 0.00001) {\n this.renderOverlays();\n return;\n }\n this.moveX = -speedX + this.moveX;\n this.moveY = -speedY + this.moveY;\n\n var that = this;\n var tempFunction = function () {\n that.animateMove(speedX * that.wheelSpeedConfig[\"moveAnimationSlowdown\"], speedY * that.wheelSpeedConfig[\"moveAnimationSlowdown\"]);\n }\n this.animateMoveTimeout = window.setTimeout(tempFunction, 20);\n this.setCenter2(this.center, this.zoom);\n }\n\n //\n // zoom in animation\n //\n\n this.autoZoomInTimeout = null;\n this.autoZoomIn = function (x, y, z) {\n //console.log(z);\n if (this.autoZoomInTimeout) {\n window.clearTimeout(this.autoZoomInTimeout);\n }\n var stepwidth = 0.1;\n if (z < 0) {\n //alert(this.getZoom());\n this.renderOverlays();\n return;\n }\n zoomGap = false;\n if (z <= stepwidth) {\n zoomGap = true;\n }\n this.hideOverlays();\n var dzoom = stepwidth;\n var zoom = this.zoom + dzoom;\n if (zoomGap) {\n zoom = Math.round(zoom);\n dzoom = z;\n //console.log(\"gap: \"+dzoom+\" : \"+zoom);\n }\n\n faktor = Math.pow(2, zoom);\n var zoomCenterDeltaX = x - this.width / 2;\n var zoomCenterDeltaY = y - this.height / 2;\n var f = Math.pow(2, dzoom);\n\n var dx = zoomCenterDeltaX - zoomCenterDeltaX * f;\n var dy = zoomCenterDeltaY - zoomCenterDeltaY * f;\n\n this.moveX = this.moveX + dx / faktor;\n this.moveY = this.moveY + dy / faktor;\n\n\n var center = new kPoint(this.lat, this.lng);\n if (zoom > 18) zoom = 18;\n zoom = Math.round(zoom * 1000) / 1000;\n this.setCenter2(center, zoom);\n var newz = z - dzoom;\n var that = this;\n if (!zoomGap) {\n var tempFunction = function () {\n that.autoZoomIn(x, y, newz)\n };\n this.autoZoomInTimeout = window.setTimeout(tempFunction, 50);\n } else {\n this.renderOverlays();\n }\n\n }\n\n //\n // zoom out animation\n //\n this.autoZoomOut = function () {\n if (this.mousedownTime != null) {\n var now = (new Date()).getTime();\n if (now - this.mousedownTime > this.zoomOutTime) {\n this.zoomOutStarted = true;\n //var center=new kPoint(this.lat,this.lng);\n var center = this.getCenter();\n var zoom = this.zoom - this.zoomOutSpeed;\n if (zoom < 1) zoom = 1;\n this.setCenter(center, zoom);\n this.zoomOutSpeed = this.zoomOutSpeed * 1.01;\n }\n }\n }\n\tthis.setMapType = function (mapType) {\n\t\tthis.mapMode = mapType;\n\t}\n\n\n //\n // Set the map coordinates and zoom\n //\n\n this.setCenter = function (center, zoom) {\n this.moveX = 0;\n this.moveY = 0;\n this.record();\n this.setCenterNoLog(center, zoom);\n }\n this.setCenter3 = function (center, zoom) {\n this.moveX = 0;\n this.moveY = 0;\n this.setCenterNoLog(center, zoom);\n }\n\n // same as setCenter but moveX,moveY are not reset (for internal use)\n this.setCenter2 = function (center, zoom) {\n this.record();\n this.setCenterNoLog(center, zoom);\n }\n\n\n //\n // same as setCenter but no history item is generated (for undo, redo)\n //\n\n this.setCenterNoLog = function (center, zoom) {\n this.center = center;\n this.lat = center.getLat();\n this.lng = center.getLng();\n\n var zoom = parseFloat(zoom);\n this.center = center;\n this.zoom = zoom;\n\n this.layer(this.map, this.lat, this.lng, this.moveX, this.moveY, zoom);\n this.executeCallbackFunctions();\n }\n\n //\n // For good speed many frames are dropped. If the frames must not be dropped, this medthod can be used\n //\t\n\n this.forceSetCenter = function (center, zoom) {\n var zoom = parseFloat(zoom);\n this.center = center;\n this.zoom = zoom;\n this.lat = center.getLat();\n this.lng = center.getLng();\n this.moveX = 0;\n this.moveY = 0;\n\n this.layer(this.map, this.lat, this.lng, this.moveX, this.moveY, zoom);\n }\n\n\n\n //\n // read the map center (no zoom value)\n //\n\n this.getCenter = function () {\n if (this.moveX != 0 || this.moveY != 0) {\n var center = new kPoint(this.movedLat, this.movedLng);\n } else {\n if (!this.center) {\n/*\n\t\t\t\tthis.setCenterNoLog(new kPoint(0,0),2);\n\t\t\t\tvar center=this.center;\n\t\t\t\t*/\n } else {\n var center = this.center;\n }\n }\n return center;\n }\n\n\n //\n // read bounds. The Coordinates at corners of the map div sw, ne would be better (change it!)\n //\n\n this.getBounds = function () {\n var sw = this.XYTolatlng(0, this.height);\n var ne = this.XYTolatlng(this.width, 0);\n var bounds = new kBounds(sw, ne);\n //\talert(p1.getLat()+\":\"+p1.getLng()+\":\"+p2.getLat()+\":\"+p2.getLng());\n return bounds;\n }\n\n //\n // like setCenter but with two gps points\n //\n\n this.setBounds = function (b) {\n //this.normalize();\n //the setbounds should be a mathematical formula and not guessing around.\n //if you know this formula pease add it here.\n //this.getSize();\n var p1 = b.getSW();\n var p2 = b.getNE();\n\n var minlat = p1.getLat();\n var maxlat = p2.getLat();\n var minlng = p1.getLng();\n var maxlng = p2.getLng();\n\n var minlat360 = lat2y(minlat);\n var maxlat360 = lat2y(maxlat);\n var centerLng = (minlng + maxlng) / 2;\n var centerLat360 = (minlat360 + maxlat360) / 2;\n var centerLat = y2lat(centerLat360);\n var center = new kPoint(centerLat, centerLng);\n var extendY = Math.abs(maxlat360 - minlat360);\n var extendX = Math.abs(maxlng - minlng);\n if (extendX / this.width > extendY / this.height) {\n var extend = extendX;\n var screensize = this.width;\n } else {\n var extend = extendY;\n var screensize = this.height;\n }\n //zoomlevel 1: 512 pixel\n //zoomlevel 2: 1024 pixel\n //...\n //extend = 360 > zoomlevel 1 , at 512px screen\n //extend = 360 > zoomlevel 2 , at 1024px screen\n //extend at zoomlevel1: extend/360 * 512px\t\n var scalarZoom = 360 / extend;\n var screenfaktor = 512 / screensize;\n var zoom = (Math.log(scalarZoom / screenfaktor)) / (Math.log(2)) + 1;\n\n if (zoom > 18) {\n zoom = 18;\n }\n if (zoom < 1) {\n zoom = 1;\n }\n if (this.center) {\n if (this.wheelSpeedConfig[\"rectShiftAnimate\"]) {\n this.animatedGoto(center, zoom, this.wheelSpeedConfig[\"rectShiftAnimationTime\"]);\n } else {\n this.setCenter(center, zoom);\n }\n } else {\n this.setCenter(center, zoom);\n }\n\n }\n\n this.animatedGotoStep = null;\n this.animatedGoto = function (newCenter, newZoom, time) {\n this.hideOverlays();\n var zoomSteps = time / 10;\n var oldCenter = this.getCenter();\n var newLat = newCenter.getLat();\n var newLng = newCenter.getLng();\n var oldLat = oldCenter.getLat();\n var oldLng = oldCenter.getLng();\n var oldZoom = this.getZoom();\n var dLat = (newLat - oldLat) / zoomSteps;\n var dLng = (newLng - oldLng) / zoomSteps;\n var dZoom = (newZoom - oldZoom) / zoomSteps;\n var dMoveX = this.moveX / zoomSteps;\n var dMoveY = this.moveY / zoomSteps;\n var oldMoveX = this.moveX;\n var oldMoveY = this.moveY;\n this.animatedGotoStep = 0;\n var that = this;\n for (var i = 0; i < zoomSteps; i++) {\n var lat = oldLat + dLat * i;\n var lng = oldLng + dLng * i;\n var zoom = oldZoom + dZoom * i;\n\n var tempFunction = function () {\n that.animatedGotoExec(oldLat, oldLng, oldZoom, dLat, dLng, dZoom, oldMoveX, oldMoveY, dMoveX, dMoveY)\n }\n window.setTimeout(tempFunction, 10 * i);\n }\n/*\n\t\tvar tempFunction=function(){ that.setCenter2(new kPoint(newLat,newLng),newZoom);that.renderOverlays()}\n\t\twindow.setTimeout(tempFunction,time+200);\n\t\t*/\n\n }\n this.animatedGotoExec = function (oldLat, oldLng, oldZoom, dLat, dLng, dZoom, oldMoveX, oldMoveY, dMoveX, dMoveY) {\n this.moveX = -dMoveX;\n this.moveY = -dMoveY;\n var lat = oldLat + dLat * this.animatedGotoStep;\n var lng = oldLng + dLng * this.animatedGotoStep;\n var zoom = oldZoom + dZoom * this.animatedGotoStep;\n this.animatedGotoStep++;\n\n this.setCenter(new kPoint(lat, lng), zoom);\n\n }\n\n this.getZoom = function () {\n return this.zoom;\n }\n\n //\n // WGS84 to x,y at the layer calculation\n // This method is uses when 3D CSS is used.\n // For Vector graphics also the 3D CSS is used.\n //\n\n this.latlngToXYlayer = function (point) {\n //if you use this function be warned that it only works for the SVG Layer an css3d\n var zoom = this.map.intZoom;\n var lat = point.getLat();\n var lng = point.getLng();\n\n var tileTest = getTileNumber(lat, lng, zoom);\n var worldCenter = this.getCenter();\n var tileCenter = getTileNumber(worldCenter.getLat(), worldCenter.getLng(), zoom);\n\n var faktor = Math.pow(2, this.intZoom);\n var x = (tileCenter[0] - tileTest[0]) * this.tileW * faktor;\n var y = (tileCenter[1] - tileTest[1]) * this.tileW * faktor;\n\n if (x > 1000000) {\n alert(\"grosser wert\");\n }\n\n var dx = this.layers[this.intZoom][\"dx\"];\n var dy = this.layers[this.intZoom][\"dy\"];\n var point = new Array();\n/*\n point[\"x\"]=-x +this.svgWidth/2 ;\n point[\"y\"]=-y +this.svgHeight/2 ;\n var rand=Math.random();\n if(rand > 1.2){\n point[\"x\"]=0;\n point[\"y\"]=0;\n }\n\t\t*/\n\n point[\"x\"] = -x + this.width / 2;\n point[\"y\"] = -y + this.height / 2;\n return (point);\n\n }\n\n //\n // WGS84 to x,y at the div calculation\n //\n this.latlngToXY = function (point) {\n var lat = point.getLat();\n var lng = point.getLng();\n var intZoom = Math.floor(this.getZoom());\n tileTest = getTileNumber(lat, lng, intZoom);\n var worldCenter = this.getCenter();\n\n var tileCenter = getTileNumber(worldCenter.getLat(), worldCenter.getLng(), intZoom);\n var x = (tileCenter[0] - tileTest[0]) * this.tileW * this.sc - this.width / 2;\n var y = (tileCenter[1] - tileTest[1]) * this.tileW * this.sc - this.height / 2;\n\n var point = new Array();\n point[\"x\"] = -x;\n point[\"y\"] = -y;\n return (point);\n\n }\n\n\n //\n // screen (map div) coordinates to lat,lng \n //\n this.XYTolatlng = function (x, y) {\n var center = this.getCenter();\n if (!center) {\n return\n };\n var faktor = Math.pow(2, this.intZoom)\n var centerLat = center.getLat();\n var centerLng = center.getLng();\n\n var xypoint = getTileNumber(centerLat, centerLng, this.intZoom);\n var dx = x - this.width / 2;\n var dy = -y + this.height / 2; //das style\n var lng = (xypoint[0] + dx / this.tileW / this.sc) / faktor * 360 - 180;\n var lat360 = (xypoint[1] + dy / this.tileH / this.sc) / faktor * 360 - 180;\n\n var lat = -y2lat(lat360) + 0;\n var p = new kPoint(lat, lng);\n return p;\n }\n\n\n //\n // for iPhone to make page fullscreen (maybe not working)\n //\n this.reSize = function () {\n var that = this;\n //setTimeout(\"window.scrollTo(0,1)\",500);\n var tempFunction = function () {\n that.getSize(that)\n };\n window.setTimeout(tempFunction, 1050);\n\n }\n\n //\n // read the size of the DIV that will contain the map\n // this method is buggy - no good\n //\n\n this.getSize = function () {\n this.width = this.map.parentNode.offsetWidth;\n this.height = this.map.parentNode.offsetHeight;\n var obj = this.map\n var left = 0;\n var top = 0;\n do {\n left += obj.offsetLeft;\n top += obj.offsetTop;\n obj = obj.offsetParent;\n } while (obj.offsetParent);\n/*\n\t\tthis.map.style.left=this.width/2+\"px\"; //not very good programming style\n\t\tthis.map.style.top=this.height/2+\"px\"; //not very good programming style\n\t\t*/\n this.mapTop = top;\n this.mapLeft = left;\n\n }\n\n\n //for undo,redo\n this.recordArray = new Array();\n this.record = function () {\n var center = this.getCenter();\n if (center) {\n var lat = center.getLat();\n var lng = center.getLng();\n var zoom = this.getZoom();\n var item = new Array(lat, lng, zoom);\n this.recordArray.push(item);\n }\n }\n this.play = function (i) {\n if (i < 1) return;\n if (i > (this.recordArray.length - 1)) return;\n var item = this.recordArray[i];\n var center = new kPoint(item[0], item[1]);\n //undo,redo must not generate history items\n this.moveX = 0;\n this.moveY = 0;\n this.setCenter3(center, item[2]);\n }\n\n\n\n/*================== layer (which layer is visible) =====================\n\tDescription: This method desides with layer is visible at the moment. \n\tIt has the same parameters as the \"draw\" method, but no \"intZoom\"\n\t========================================================================= */\n\n\n this.layerDrawLastFrame = null;\n this.layer = function (map, lat, lng, moveX, moveY, zoom) {\n if (!this.css3d) {\n if (this.layerDrawLastFrame) {\n window.clearTimeout(this.layerDrawLastFrame);\n this.layerDrawLastFrame = null;\n }\n if (this.blocked) {\n\n //the last frames must be drawn to have good result\n var that = this;\n var tempFunction = function () {\n that.layer(map, lat, lng, moveX, moveY, zoom)\n };\n this.layerDrawLastFrame = window.setTimeout(tempFunction, 100);\n\n return;\n }\n this.blocked = true;\n }\n var intZoom = Math.round(zoom );\n if (intZoom > this.maxIntZoom) {\n intZoom = 18;\n }\n this.intZoom = intZoom;\n if (!this.visibleZoom) {\n this.visibleZoom = intZoom;\n this.oldIntZoom = intZoom;\n }\n this.faktor = Math.pow(2, intZoom); //????????\n var zoomDelta = zoom - intZoom;\n this.sc = Math.pow(2, zoomDelta);\n\n //draw the layer with current zoomlevel\n this.draw(this.map, lat, lng, moveX, moveY, intZoom, zoom, this.mapMode);\n\n //if the current zoomlevel is not loaded completly, there must be a second layer displayed\n if (intZoom != this.visibleZoom) {\n this.draw(this.map, lat, lng, moveX, moveY, this.visibleZoom, zoom, this.mapMode);\n }\n\n\n if (this.layers[intZoom][\"loadComplete\"]) {\n if (this.visibleLayer != intZoom) {\n this.hideLayer(this.visibleZoom);\n this.visibleZoom = intZoom;\n this.layers[this.visibleZoom][\"layerDiv\"].style.visibility = \"\";\n }\n }\n if (this.oldIntZoom != this.intZoom) {\n if (this.oldIntZoom != this.visibleZoom) {\n this.hideLayer(this.oldIntZoom);\n }\n }\n this.oldIntZoom = intZoom;\n\n //firefox cheats a little bit and needs a time penalty\n if (!this.css3d) {\n var that = this;\n var func = function () {\n that.blocked = false;\n };\n window.setTimeout(func, 20);\n }\n }\n\n/* ==================== DRAW (speed optimized!!!)===============================\n\t\n\tThis function draws one layer. It is highly opimized for iPhone. \n\tPlease DO NOT CHANGE things except you want to increase speed!\n\tFor opimization you need a benchmark test.\n\n\tHow it works:\n\tThe position of the images is fixed.\n\tThe layer (not the images) is moved because of better performance\n\tEven zooming does not change position of the images, if 3D CSS is active (webkit).\n\n\tthis method uses \"this.layers\" , \"this.oldIntZoom\", \"this.width\", \"this.height\";\n\t\n\t===================================================================================*/\n\n this.draw = function (map, lat, lng, moveX, moveY, intZoom, zoom, mapMode) {\n this.framesCounter++;\n var that = this;\n var tempFunction = function () {\n that.framesCounter--\n };\n window.setTimeout(tempFunction, 1000);\n\n //console.log(\"draw\");\n var faktor = Math.pow(2, intZoom);\n\n //create new layer\n if (!this.layers[intZoom]) {\n var tile = getTileNumber(lat, lng, intZoom);\n this.layers[intZoom] = new Array();\n this.layers[intZoom][\"startTileX\"] = tile[0];\n this.layers[intZoom][\"startTileY\"] = tile[1];\n this.layers[intZoom][\"startLat\"] = lat2y(lat);\n this.layers[intZoom][\"startLng\"] = lng;\n this.layers[intZoom][\"images\"] = new Object();\n var layerDiv = document.createElement(\"div\");\n layerDiv.setAttribute(\"zoomlevel\", intZoom);\n layerDiv.style.position = \"absolute\";\n\n //svg layer for scalable things\n if (this.css3dvector) {\n var svg = document.createElement(\"div\");\n svg.style.top = -this.svgHeight / 2;\n svg.style.left = -this.svgWidth / 2;\n svg.style.zIndex = 1;\n svg.style.position = \"absolute\";\n this.layers[intZoom][\"svg\"] = svg;\n layerDiv.appendChild(svg);\n }\n\n\n\n //higher zoomlevels are places in front of lower zoomleves.\n //no z-index in use. z-index could give unwanted side effects to you application if you use this lib.\n var layers = map.childNodes;\n var appended = false;\n for (var i = layers.length - 1; i >= 0; i--) {\n var l = layers.item(i);\n if (l.getAttribute(\"zoomlevel\") < intZoom) {\n this.map.insertBefore(layerDiv, l);\n appended = true;\n break;\n }\n }\n if (!appended) {\n //the new layer has the highest zoomlevel\n this.map.appendChild(layerDiv);\n }\n\n //for faster access, a referenz to this div is in an array\t\n this.layers[intZoom][\"layerDiv\"] = layerDiv;\n var latDelta = 0;\n var lngDelta = 0;\n } else {\n //The layer with this zoomlevel already exists. If there are new lat,lng value, the lat,lng Delta is calculated\n var layerDiv = this.layers[intZoom][\"layerDiv\"];\n var latDelta = lat2y(lat) - this.layers[intZoom][\"startLat\"];\n var lngDelta = lng - this.layers[intZoom][\"startLng\"];\n }\n layerDiv.style.visibility = \"hidden\";\n\n //if the map is moved with drag/drop, the moveX,moveY gives the movement in Pixel (not degree as lat/lng)\n //here the real values of lat, lng are caculated\n this.movedLng = (this.layers[intZoom][\"startTileX\"] / faktor - moveX / this.tileW) * 360 - 180 + lngDelta;\n var movedLat360 = (this.layers[intZoom][\"startTileY\"] / faktor - moveY / this.tileH) * 360 - 180 - latDelta;\n this.movedLat = -y2lat(movedLat360); // -latDelta; //the bug\n //calculate real x,y\n var tile = getTileNumber(this.movedLat, this.movedLng, intZoom);\n var x = tile[0];\n var y = tile[1];\n\n\n var intX = Math.floor(x);\n var intY = Math.floor(y);\n\n\n var startX = this.layers[intZoom][\"startTileX\"];\n var startY = this.layers[intZoom][\"startTileY\"];\n\n var startIntX = Math.floor(startX);\n var startIntY = Math.floor(startY);\n\n var startDeltaX = -startX + startIntX;\n var startDeltaY = -startY + startIntY;\n\n var dx = x - startX;\n var dy = y - startY;\n\n var dxInt = Math.floor(dx - startDeltaX);\n var dyInt = Math.floor(dy - startDeltaY);\n var dxDelta = dx - startDeltaX;\n var dyDelta = dy - startDeltaY;\n\n //work in progress\n if (this.css3dvector) {\n if (!this.layers[intZoom][\"dx\"]) {\n this.layers[intZoom][\"dx\"] = +dxDelta * this.tileW - this.svgWidth / 2;\n this.layers[intZoom][\"svg\"].style.left = this.layers[intZoom][\"dx\"] + \"px\";\n\n }\n if (!this.layers[intZoom][\"dy\"]) {\n this.layers[intZoom][\"dy\"] = +dyDelta * this.tileH - this.svgHeight / 2;\n this.layers[intZoom][\"svg\"].style.top = this.layers[intZoom][\"dy\"] + \"px\";\n }\n }\n\n //set all images to hidden (only in Array) - the values are used later in this function\n for (var vimg in this.layers[intZoom][\"images\"]) {\n this.layers[intZoom][\"images\"][vimg][\"visibility\"] = false;\n }\n\n //for debug only\n var width = this.width;\n var height = this.height;\n\n var zoomDelta = zoom - intZoom;\n sc = Math.pow(2, zoomDelta);\n\n// if (sc < 1) sc = 1;\n if (sc < 0.5) sc = 0.5;\n //here the bounds of the map are calculated.\n //there is NO preload of images. Preload makes everything slow\n minX = Math.floor((-width / 2 / sc) / this.tileW + dxDelta);\n maxX = Math.ceil((width / 2 / sc) / this.tileW + dxDelta);\n minY = Math.floor((-height / 2 / sc) / this.tileH + dyDelta);\n maxY = Math.ceil((height / 2 / sc) / this.tileH + dyDelta);\n\n //now the images are placed on to the layer\n for (var i = minX; i < maxX; i++) {\n for (var j = minY; j < maxY; j++) {\n var xxx = Math.floor(startX + i);\n var yyy = Math.floor(startY + j);\n\n //The world is recursive. West of America is Asia.\n var xx = xxx % faktor;\n //var yy=yyy % faktor;\n var yy = yyy;\n if (xx < 0) xx = xx + faktor; //modulo function gives negative value for negative numbers\n if (yy < 0) continue;\n if (yy >= faktor) continue;\n\n var src = this.getTileSrc(xx, yy, intZoom, mapMode);\n var id = src + \":\" + xxx + \":\" + yyy;\n\n/*\n\t\t\t//Calculate the tile server. Use of a,b,c should increase speed but should not influence cache.\n\t\t\tvar hashval=(xx + yy) %3;\n\t\t\tswitch(hashval){\n\t\t\t\tcase 0:var server=\"a\";break;\n\t\t\t\tcase 1:var server=\"b\";break;\n\t\t\t\tcase 2:var server=\"c\";break;\n\t\t\t\tdefault: var server=\"f\";\n\t\t\t}\n\t\t\t\t\n var src=\"http://\"+server+\".tile.openstreetmap.org/\"+intZoom+\"/\"+xx+\"/\"+yy+\".png\";\n// var src=\"/iphonemapproxy/imgproxy.php?url=http://\"+server+\".tile.openstreetmap.org/\"+intZoom+\"/\"+xx+\"/\"+yy+\".png\";\n\t\t\t//see imageproxy.php for offline map usage\n\n\t\t\t//bing tiles\n\t\t\t//var n=mkbin(intZoom,xxx,yyy);\n\t\t\t//var src=\"http://ecn.t0.tiles.virtualearth.net/tiles/a\"+n+\".jpeg?g=367&mkt=de-de\";\n\t\t\t//var src=\"http://maps3.yimg.com/ae/ximg?v=1.9&t=a&s=256&.intl=de&x=\"+xx+\"&y=\"+(yy)+\"&z=\"+intZoom+\"&r=1\";\n\t\t\t//end bing tiles\n\n\t\t\t//\n var id=\"http://\"+server+\".tile.openstreetmap.org/\"+intZoom+\"/\"+xxx+\"/\"+yyy+\".png\";\n\t\t\t*/\n\n //draw images only if they don't exist on the layer\t\n if (this.layers[intZoom][\"images\"][id] == null) {\n\n var img = document.createElement(\"img\");\n img.style.visibility = \"hidden\";\n img.style.position = \"absolute\";\n img.setAttribute(\"src\", src);\n img.style.left = i * this.tileW + \"px\";\n img.style.top = j * this.tileH + \"px\";\n img.style.width = this.tileW + \"px\";\n img.style.height = this.tileH + \"px\";\n\n //if the images are loaded, they will get visible in the imgLoad function\n Event.attach(img, \"load\", this.imgLoaded, this, false);\n Event.attach(img, \"error\", this.imgError, this, false);\n\n //add img before SVG, SVG will be visible \n if (layerDiv.childNodes.length > 0) {\n layerDiv.insertBefore(img, layerDiv.childNodes.item(0));\n } else {\n layerDiv.appendChild(img);\n }\n\n //To increase performance all references are in an array\n this.layers[intZoom][\"images\"][id] = new Object();\n this.layers[intZoom][\"images\"][id][\"img\"] = img;\n this.layers[intZoom][\"loadComplete\"] = false;\n //}\t\n } else {\n }\n\n if (!this.css3d) {\n var sc = Math.pow(2, zoomDelta);\n var ddX = (tile[0] - intX) + Math.floor(dxDelta);\n var ddY = (tile[1] - intY) + Math.floor(dyDelta);\n\n var tileW = Math.round(this.tileW * sc);\n var tileH = Math.round(this.tileH * sc);\n\n var left = Math.floor((-ddX) * tileW + i * tileW);\n var top = Math.floor(-ddY * tileH + j * tileH);\n var right = Math.floor((-ddX) * tileW + (i + 1) * tileW);\n var bottom = Math.floor(-ddY * tileH + (j + 1) * tileH);\n var img = this.layers[intZoom][\"images\"][id][\"img\"];\n img.style.left = left + \"px\";\n img.style.top = top + \"px\";\n img.style.height = (right - left) + \"px\";\n img.style.width = (bottom - top) + \"px\";\n }\n\n //set all images that should be visible at the current view to visible (only in the layer);\n this.layers[intZoom][\"images\"][id][\"visibility\"] = true;\n\n }\n }\n\n //remove all images that are not loaded and are not visible in current view.\n //if the images is out of the current view, there is no reason to load it. \n //Think about fast moving maps. Moving is faster than loading. \n //If you started in London and are already in Peking, you don't care\n //about images that show vienna for example\n //this code is useless for webkit browsers (march 2010) because of bug:\n //https://bugs.webkit.org/show_bug.cgi?id=6656\n for (var vimg in this.layers[intZoom][\"images\"]) {\n if (this.layers[intZoom][\"images\"][vimg][\"visibility\"]) {\n if (this.layers[intZoom][\"images\"][vimg][\"img\"].getAttribute(\"loaded\") == \"yes\") {\n this.layers[intZoom][\"images\"][vimg][\"img\"].style.visibility = \"\";\n }\n } else {\n this.layers[intZoom][\"images\"][vimg][\"img\"].style.visibility = \"hidden\";\n //delete img if not loaded and not needed at the moment\n if (this.layers[intZoom][\"images\"][vimg][\"img\"].getAttribute(\"loaded\") != \"yes\") {\n/*\t\n\t\t\t\t\tvar src=this.layers[zoomlevel][\"images\"][vimg][\"img\"].getAttribute(\"src\");\t\n\t\t\t\t\tvar z=this.intZoom;\n\t\t\t\t\tsrc=src+\"&nix=first&zoom=\"+z;\n\t\t\t\t\tthis.layers[zoomlevel][\"images\"][vimg][\"img\"].setAttribute(\"src\",src);\n\t\t\t\t\t*/\n layerDiv.removeChild(this.layers[intZoom][\"images\"][vimg][\"img\"]);\n delete this.layers[intZoom][\"images\"][vimg][\"img\"];\n delete this.layers[intZoom][\"images\"][vimg];\n }\n }\n }\n\n //move and zoom the layer\n //The 3D CSS is used to increase speed. 3D CSS is using hardware accelerated methods to zoom and move the layer.\n //every layer is moved independently - maybe not the best approach, but maybe the only working solution\n var zoomDelta = zoom - intZoom;\n var sc = Math.pow(2, zoomDelta);\n var left = -dxDelta * this.tileW;\n var top = -dyDelta * this.tileH;\n\n if (this.css3d) {\n //document.getElementById(\"debug\").textContent=zoomDelta+\": \"+sc+\": \"+left+\": \"+top;\n var scale = \" scale3d(\" + sc + \",\" + sc + \",1) \";\n/*\t\n\t\t\tvar zx=this.zoomCenterDeltaX;\t\n\t\t\tvar zy=this.zoomCenterDeltaY;\t\n\t\t\tleft=left-zx*sc;\n\t\t\ttop=top-zx*sc;\n\t\t\t*/\n\n layerDiv.style['-webkit-transform-origin'] = (-1 * left) + \"px \" + (-1 * top) + \"px\";\n var transform = 'translate3d(' + left + 'px,' + top + 'px,0px) ' + scale;\n layerDiv.style.webkitTransform = transform;\n } else {\n //layerDiv.style.left=left+\"px\";\n //layerDiv.style.top+\"px\";\n }\n\n //set the visibleZoom to visible\n layerDiv.style.visibility = \"\";\n }\n // ====== END OF DRAW ======\t\n this.getTileSrc = function (x, y, z, mapMode) {\n //Calculate the tile server. Use of a,b,c should increase speed but should not influence cache.\n var hashval = (x + y) % 3;\n switch (hashval) {\n case 0:\n var server = \"a\";\n break;\n case 1:\n var server = \"b\";\n break;\n case 2:\n var server = \"c\";\n break;\n default:\n var server = \"f\";\n }\n\t//\talert(mapMode);\n\t\tswitch(mapMode) {\n\t\t\tcase '0':\n\t\t\t\tvar src = \"http://\" + server + \".tile.openstreetmap.org/\" + z + \"/\" + x + \"/\" + y + \".png\";\n\t\t\t\tbreak;\n\t\t\tcase '1':\n\t\t\t\tvar src = \"http://\" + server + \".andy.sandbox.cloudmade.com/tiles/cycle/\" + z + \"/\" + x + \"/\" + y + \".png\";\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\tvar src = \"http://tile.map2go.org/mn/\" + z + \"/\" + x + \"/\" + y + \".png\";\n\t\t\t\tbreak;\t \n\t\t\tdefault:\n\t\t\t\tvar src = \"http://\" + server + \".tile.openstreetmap.org/\" + z + \"/\" + x + \"/\" + y + \".png\";\n\t\t\t\n\t\t}\n //var src = \"http://\" + server + \".tile.openstreetmap.org/\" + z + \"/\" + x + \"/\" + y + \".png\";\n // var src=\"http://khm1.google.com/kh/v=58&x=\"+x+\"&s=&y=\"+y+\"&z=\"+z+\"&s=Gal\";\n return src;\n }\n\n //\n // this function was for BING tiles. It's not in use but I don't want to dump it.\n //\n\n function mkbin(z, x, y) {\n var nn = parseInt(x.toString(2)) + parseInt(y.toString(2)) * 2;\n n = \"\";\n for (var i = 0; i < 30; i++) {\n var restX = parseInt(x / 2);\n var restY = parseInt(y / 2);\n var xx = (x / 2 - restX) * 2;\n var yy = (y / 2 - restY) * 2;\n x = restX;\n y = restY;\n s = Math.round(xx + yy * 2);\n n = s + n;\n if (x == 0 && y == 0) break;\n }\n return n;\n }\n\n //\n //this function trys to remove images if they are not needed at the moment.\n //For webkit it's a bit useless because of bug\n //https://bugs.webkit.org/show_bug.cgi?id=6656\n //For Firefox it really brings speed\n //\t\n this.hideLayer = function (zoomlevel) {\n if (this.intZoom != zoomlevel) {\n if (this.layers[zoomlevel]) {\n this.layers[zoomlevel][\"layerDiv\"].style.visibility = \"hidden\";\n }\n }\n\n //delete img if not loaded and not needed at the moment\n //for(var layer in this.layers){\n //var zoomlevel=layer;\n //for(var vimg in this.layers[zoomlevel][\"images\"]){\n for (var vimg in this.layers[zoomlevel][\"images\"]) {\n if (this.layers[zoomlevel][\"images\"][vimg]) {\n if (this.layers[zoomlevel][\"images\"][vimg][\"img\"]) {\n if (this.layers[zoomlevel][\"images\"][vimg][\"img\"].getAttribute(\"loaded\") != \"yes\") {\n if (zoomlevel != this.intZoom) {\n /*\n\t\t\t\t\t var src=this.layers[zoomlevel][\"images\"][vimg][\"img\"].getAttribute(\"src\");\t\n\t\t\t\t\t var z=this.intZoom;\n\t\t\t\t\t src=src+\"&nix=load&zoom=\"+z;\n\t\t\t\t\t this.layers[zoomlevel][\"images\"][vimg][\"img\"].setAttribute(\"src\",src);\n\t\t\t\t\t */\n this.layers[zoomlevel][\"images\"][vimg][\"img\"].setAttribute(\"src\", \"#\");\n this.layers[zoomlevel][\"layerDiv\"].removeChild(this.layers[zoomlevel][\"images\"][vimg][\"img\"]);\n delete this.layers[zoomlevel][\"images\"][vimg][\"img\"];\n delete this.layers[zoomlevel][\"images\"][vimg];\n }\n } else {\n\n }\n }\n }\n }\n\n }\n\n //\n // method is called if an image has finished loading (onload event)\n //\n this.imgLoaded = function (evt) {\n if (evt.target) {\n var img = evt.target;\n } else {\n var img = evt.srcElement;\n }\n var loadComplete = true;\n img.style.visibility = \"\";\n img.setAttribute(\"loaded\", \"yes\");\n if (!img.parentNode) return;\n var zoomlevel = img.parentNode.getAttribute(\"zoomlevel\");\n for (var i = 0; i < img.parentNode.getElementsByTagName(\"img\").length; i++) {\n if (img.parentNode.getElementsByTagName(\"img\").item(i).getAttribute(\"loaded\") != \"yes\") {\n loadComplete = false;\n }\n }\n\n this.layers[zoomlevel][\"loadComplete\"] = loadComplete;\n if (loadComplete) {\n if (this.intZoom == zoomlevel) {\n //if(Math.abs(this.intZoom - zoomlevel) < Math.abs(this.intZoom - this.visibleZoom)){\n //this.layers[this.visibleZoom][\"layerDiv\"].style.visibility=\"hidden\";\n this.hideLayer(this.visibleZoom);\n this.visibleZoom = zoomlevel;\n this.layers[this.visibleZoom][\"layerDiv\"].style.visibility = \"\";\n }\n }\n }\n //\n // Image load error\n //\n this.imgError = function (evt) {\n if (evt.target) {\n var img = evt.target;\n } else {\n var img = evt.srcElement;\n }\n if (!img.parentNode) return;\n img.parentNode.removeChild(img);\n //evt.target.style.backgroundColor=\"lightgrey\";\n this.imgLoaded(evt);\n }\n\n //next function is from wiki.openstreetmap.org\n var getTileNumber = function (lat, lon, zoom) {\n var xtile = ((lon + 180) / 360 * (1 << zoom));\n var ytile = ((1 - Math.log(Math.tan(lat * Math.PI / 180) + 1 / Math.cos(lat * Math.PI / 180)) / Math.PI) / 2 * (1 << zoom));\n var returnArray = new Array(xtile, ytile);\n return returnArray;\n }\n\n //map is positioned absolute and is an a clone of the original map div.\n //on window resize it must be positioned again\n this.setMapPosition = function () {\n //this.getSize();\n var obj = this.mapParent;\n\n this.width = obj.offsetWidth;\n this.height = obj.offsetHeight;\n var d = document.getElementById(\"debug\");\n //\t\tthis.clone.style.width=obj.offsetWidth+\"px\";\n //\t\tthis.clone.style.height=obj.offsetHeight+\"px\";\n var relativeleft = 0;\n var relativetop = 0;\n do {\n\t if(obj.style.position==\"absolute\"){\n\t\tbreak;\n }\n relativeleft += obj.offsetLeft;\n relativetop += obj.offsetTop;\n obj = obj.offsetParent;\n } while (obj.offsetParent);\n\n var left = 0;\n var top = 0;\n obj = this.mapParent;\n\n do {\n left += obj.offsetLeft;\n top += obj.offsetTop;\n obj = obj.offsetParent;\n } while (obj.offsetParent);\n\n\n\n\n // this.width=obj.offsetWidth;\n // this.height=obj.offsetHeight;\n this.mapTop = top;\n this.mapLeft = left;\n if (this.mapParent.style.position == \"absolute\") {\n top = 0;\n left = 0;\n }\n this.clone.style.top = relativetop + \"px\";\n this.clone.style.left = relativeleft + \"px\";\n this.clone.style.width = this.width + \"px\";\n this.clone.style.height = this.height + \"px\";\n\n this.clone.style.position = \"absolute\";\n this.clone.style.overflow = \"hidden\";\n\n this.map.style.left = this.width / 2 + \"px\";\n this.map.style.top = this.height / 2 + \"px\";\n //this.mapParent.appendChild(this.clone);\n var center = this.getCenter();\n var zoom = this.getZoom();\n if (zoom) {\n this.setCenter2(this.getCenter(), this.getZoom());\n }\n }\n\n //functions from wiki gps2xy \n var lat2y = function (a) {\n return 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + a * (Math.PI / 180) / 2));\n }\n var y2lat = function (a) {\n return 180 / Math.PI * (2 * Math.atan(Math.exp(a * Math.PI / 180)) - Math.PI / 2);\n }\n\n\n //\n //\n // INIT kmap\n //\n //\n\n this.internetExplorer = false;\n this.svgSupport = true;\n if (navigator.userAgent.indexOf(\"MSIE\") != -1) {\n this.internetExplorer = true;\n this.svgSupport = false;\n //alert(\"Sorry, Internet Explorer does not support this map, please use a good Browser like chrome, safari, opera.\");\n }\n if (navigator.userAgent.indexOf(\"Android\") != -1) {\n //this.internetExplorer=true;\n this.svgSupport = false;\n //wordaround for Android - Android is not a good browser, remembers me to IE 5.5\n var that=this;\n var tempFunction=function () {that.blocked=false};\n setInterval(tempFunction,300);\n\n }\n this.maxIntZoom = 18;\n\n this.wheelSpeedConfig = new Array();\n this.wheelSpeedConfig[\"acceleration\"] = 2;\n this.wheelSpeedConfig[\"maxSpeed\"] = 2;\n //\talert(navigator.userAgent);\n this.wheelSpeedConfig[\"animate\"] = false;\n if (navigator.userAgent.indexOf(\"AppleWebKit\") != -1) {\n this.wheelSpeedConfig[\"animate\"] = true;\n }\n if (navigator.userAgent.indexOf(\"Opera\") != -1) {\n this.wheelSpeedConfig[\"animate\"] = false;\n }\n this.wheelSpeedConfig[\"zoomAnimationSlowdown\"] = 0.02;\n this.wheelSpeedConfig[\"animationFPS\"] = 50;\n this.wheelSpeedConfig[\"moveAnimateDesktop\"] = true;\n this.wheelSpeedConfig[\"moveAnimationSlowdown\"] = 0.7;\n this.wheelSpeedConfig[\"rectShiftAnimate\"] = true;\n this.wheelSpeedConfig[\"rectShiftAnimationTime\"] = 1500;\n this.wheelSpeedConfig[\"animateMinSpeed\"]=1;\n\n //variables for performance check\n this.wheelEventCounter = 0;\n this.framesCounter = 0;\n\n this.mapParent = map;\n //\tmapInit=map;\n this.clone = map.cloneNode(true); //clone is the same as the map div, but absolute positioned\n this.clone.removeAttribute(\"id\");\n this.clone.style.overflow = \"hidden\";\n if (map.firstChild) {\n map.insertBefore(this.clone, map.firstChild);\n } else {\n map.appendChild(this.clone);\n }\n\n //this.setMapPosition();\n this.map = document.createElement(\"div\"); //this is the div that holds the layers, but no marker and svg overlayes\n this.map.style.position = \"absolute\";\n this.clone.appendChild(this.map);\n //this.getSize();\n this.clone.style.overflow = \"hidden\";\n this.setMapPosition();\n\n if (this.svgSupport) {\n this.svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n } else {\n this.svg = document.createElement(\"div\");\n }\n //container for Vector graphics (SVG, VML, and maybe Canvas for Android)\n this.svg.style.width = \"100%\";\n this.svg.style.height = \"100%\";\n this.svg.style.position = \"absolute\";\n this.clone.appendChild(this.svg);\n\n\n //div for markers\n this.overlayDiv = document.createElement(\"div\");\n this.overlayDiv.style.width = \"100%\";\n this.overlayDiv.style.height = \"100%\";\n this.overlayDiv.style.position = \"absolute\";\n this.overlayDiv.style.overflow = \"hidden\";\n this.clone.appendChild(this.overlayDiv);\n\n //should be bigger than screen\n this.svgWidth = 100000;\n this.svgHeight = 100000;\n\n //distance tool\n this.distanceMeasuring = \"no\";\n this.moveMarker = null;\n this.measureLine = null;\n this.moveAnimationMobile = true;\n this.moveAnimationDesktop = false;\n this.moveAnimationBlocked = false;\n\n this.lastMouseX = this.width / 2;\n this.lastMouseY = this.height / 2;\n\n this.layers = new Array();\n this.overlays = new Array();\n this.visibleZoom = null;\n this.oldVisibleZoom = null;\n this.intZoom = null;\n\n this.moveX = 0;\n this.moveY = 0;\n\n this.lastMoveX = 0;\n this.lastMoveY = 0;\n this.lastMoveTime = 0;\n\n this.startMoveX = 0;\n this.startMoveY = 0;\n this.sc = 1;\n this.blocked = false;\n\n this.tileW = 256;\n this.tileH = 256;\n this.zoom = 1;\n this.movestarted = false;\n\n //touchscreen\n this.mousedownTime = null;\n this.doubleclickTime = 400;\n //mouse\n this.mousedownTime2 = null;\n this.doubleclickTime2 = 500;\n\n this.zoomOutTime = 1000;\n this.zoomOutSpeed = 0.01;\n this.zoomOutInterval = null;\n this.zoomOutStarted = false;\n\n this.zoomSpeedTimer = null;\n this.zoomAcceleration = 1;\n\n this.css3d = false;\n this.css3dvector = false;\n if (navigator.userAgent.indexOf(\"iPhone OS\") != -1) {\n this.css3d = true;\n }\n if (navigator.userAgent.indexOf(\"iPad\") != -1) {\n this.css3d = true;\n }\n if (navigator.userAgent.indexOf(\"Safari\") != -1) {\n this.css3d = true;\n }\n if (navigator.userAgent.indexOf(\"Android\") != -1) {\n this.css3d = false;\n }\n\n if (this.internetExplorer) {\n var w = map;\n } else {\n var w = window;\n // how to do that in ie?\n Event.attach(window, \"resize\", this.setMapPosition, this, false);\n }\n if (navigator.userAgent.indexOf(\"Konqueror\") != -1) {\n var w = map;\n }\n Event.attach(map, \"touchstart\", this.start, this, false);\n Event.attach(map, \"touchmove\", this.move, this, false);\n Event.attach(map, \"touchend\", this.end, this, false);\n Event.attach(w, \"mousemove\", this.mousemove, this, false);\n Event.attach(map, \"mousedown\", this.mousedown, this, false);\n Event.attach(w, \"mouseup\", this.mouseup, this, false);\n Event.attach(w, \"orientationchange\", this.reSize, this, false);\n Event.attach(map, \"DOMMouseScroll\", this.mousewheel, this, false);\n Event.attach(map, \"dblclick\", this.doubleclick, this, false);\n}", "function mapper_initialize(\n map_markers_raw,\n mapper_countrycode,\n mapper_south,\n mapper_west,\n mapper_north,\n mapper_east,\n mapper_cover_all_points\n )\n{\n if(map_div) return;\n map_div = document.getElementById(\"map\");\n if(!map_div) return;\n\n if (!GBrowserIsCompatible()) return;\n\n if(map) return;\n map = new GMap2(document.getElementById(\"map\"));\n // map = new google.maps.Map2(document.getElementById(\"map\"));\n\n var mapControl = new GMapTypeControl();\n map.addControl(mapControl);\n map.addControl(new GSmallMapControl());\n // map.removeMapType(G_HYBRID_MAP);\n\n // setup custom icon support\n mapper_icons();\n\n // try to respect supplied map boundaries for the very first refresh before user does any actions\n map_countrycode = mapper_countrycode;\n map.south = mapper_south;\n map.west = mapper_west;\n map.north = mapper_north;\n map.east = mapper_east;\n\n // recenter now\n var map_please_recenter = true;\n if(map.north < 0.0 || map.north > 0.0 || map.south < 0.0 || map.south > 0.0) {\n map_please_recenter = false;\n var bounds = new GLatLngBounds( new GLatLng(map.south,map.west,false), new GLatLng(map.north,map.east,false) );\n var center = bounds.getCenter();\n var zoom = map.getBoundsZoomLevel(bounds);\n if(zoom < 2 ) zoom = 2;\n map.setCenter(center,zoom);\n }\n\n // capture map location whenever the map is moved and go ahead and ask for a view of that areas markers from our own server\n if(map_location_callback) {\n GEvent.addListener(map, \"moveend\", function() {\n mapper_save_location();\n // when the map is moved go ahead and fetch new markers [ but do not center on them ]\n mapper_page_paint_request(false);\n });\n // also capture map location once at least\n mapper_save_location();\n }\n\n // add features from a statically cached list if any [ this can help make first page display a bit faster ]\n mapper_inject(map_markers_raw);\n\n // center on any data we have already if any [ slight tension here with dynamic updates so can be disabled ]\n if( map_please_recenter && mapper_cover_all_points ) {\n \tmapper_center();\n }\n\n // ask to add features from a remote connection dynamically [ and will center on them ]\n mapper_page_paint_request(map_please_recenter);\n\n // call a user callback as a last step\n //if(self[mapper_usercallback] && typeof mapper_usercallback = 'function') {\n // mapper_usercallback();\n //}\n}", "function initMap() {\r\n var ele = $(\".map\")[0];\r\n var markers = [];\r\n\r\n // The lat and lon of Capgemini Utrecht\r\n var maps = new google.maps.Map(ele, {\r\n center: {lat: 52.099840, lng: 5.064970},\r\n zoom: 4\r\n });\r\n\r\n URLUtil.get(\"/api/airport/\").then(function(arr) {\r\n $.each(arr, function(i, obj) {\r\n var pos = {lat: obj.latitude, lng: obj.longitude};\r\n createMarker(pos, obj, maps);\r\n });\r\n });\r\n\r\n // Shifts the array and toggles the markers to the correct colors\r\n function shiftMarkers(markers) {\r\n var og = markers.shift();\r\n\r\n og.setIcon(DEFAULT_ICON);\r\n\r\n return markers;\r\n }\r\n\r\n // Create a new marker at the given position and add it to the markers array\r\n function createMarker(pos, obj, map) {\r\n var marker = new google.maps.Marker({\r\n position: pos,\r\n map: map,\r\n icon: DEFAULT_ICON,\r\n data: obj\r\n });\r\n\r\n // When the user clicks a marker, check if this is the first marker\r\n // if that's the case make this the starting point.\r\n // If it's the second marker, make it the ending point.\r\n // If it's above the second marker, shift everything\r\n marker.addListener(\"click\", function(e) {\r\n markers.push(marker);\r\n\r\n if(markers.length > 2) {\r\n markers = shiftMarkers(markers);\r\n }\r\n\r\n updateInfo();\r\n });\r\n\r\n\r\n return marker;\r\n }\r\n\r\n // Updates the info of the markers array\r\n // Firstly, set the correct icons\r\n // Secondly, update the text fields with the correct airport names\r\n function updateInfo() {\r\n markers[0].setIcon(FIRST_ICON);\r\n $(\".airport .first\").html(markers[0].data.name);\r\n\r\n if (markers.length > 1) {\r\n markers[1].setIcon(SECOND_ICON);\r\n $(\".airport .second\").html(markers[1].data.name);\r\n var distance = PosUtil.getDistance(markers[0].getPosition(), markers[1].getPosition());\r\n $(\".airport .distance\").html(distance + \"km\");\r\n }\r\n }\r\n\r\n\r\n $(\".book\").click(function(e) {\r\n if(markers.length < 2) {\r\n $(\"#status-modal\").modal(\"toggle\");\r\n }\r\n\r\n var flight = {\r\n when: \"now?\",\r\n start: PosUtil.convertLatLng(markers[0].getPosition()),\r\n end: PosUtil.convertLatLng(markers[1].getPosition())\r\n };\r\n\r\n URLUtil.post(\"/api/flight/\", flight).then(function() {\r\n\r\n });\r\n });\r\n}", "function initMap() {\n const sfBayCoords = {\n lat: 37.601773,\n lng: -122.202870\n };\n\n const basicMap = new google.maps.Map(\n document.querySelector('#map'),\n {\n center: sfBayCoords,\n zoom: 11\n }\n );\n\n const sfMarker = new google.maps.Marker({\n position: sfBayCoords,\n title: 'SF Bay',\n map: basicMap\n });\n\n sfMarker.addListener('click', () => {\n alert('Hi!');\n });\n\n const sfInfo = new google.maps.InfoWindow({\n content: '<h1>San Francisco!</h1>'\n });\n\n sfInfo.open(basicMap, sfMarker);\n\n\n const locations = [\n {\n name: 'Hackbright Academy',\n coords: {\n lat: 37.7887459,\n lng: -122.4115852\n }\n },\n {\n name: 'Powell Street Station',\n coords: {\n lat: 37.7844605,\n lng: -122.4079702\n }\n },\n {\n name: 'Montgomery Station',\n coords: {\n lat: 37.7894094,\n lng: -122.4013037\n }\n },\n ];\n\n const markers = [];\n for (const location of locations) {\n markers.push(new google.maps.Marker({\n position: location.coords,\n title: location.name,\n map: basicMap,\n icon: { // custom icon\n url: '/static/img/marker.svg',\n scaledSize: {\n width: 30,\n height: 30\n }\n }\n }));\n }\n\n for (const marker of markers) {\n const markerInfo = (`\n <h1>${marker.title}</h1>\n <p>\n Located at: <code>${marker.position.lat()}</code>,\n <code>${marker.position.lng()}</code>\n </p>\n `);\n\n const infoWindow = new google.maps.InfoWindow({\n content: markerInfo,\n maxWidth: 200\n });\n\n marker.addListener('click', () => {\n infoWindow.open(basicMap, marker);\n });\n }\n}", "function startNavigation(dataArray) {\n let distDiv = document.getElementById(\"distance\");\n // this listener updates html component that displays the distance to the closest measurement and also updates\n // the global variable \"direction\" which stores the direction in which the arrow is pointing\n x.registerListener(function(val) {\n let directionCoordinate = getDirectionCoordinate(dataArray,val);\n direction = getAngle(val.coords.latitude, val.coords.longitude, directionCoordinate.lat, directionCoordinate.lon);\n let closestDistance = getClosest(dataArray,val).distance;\n arrowOrigin = val;\n arrowDestination = directionCoordinate;\n distDiv.innerHTML = \"Closest Data Point: \" + (Math.round(closestDistance * 100) / 100) + \" km\";\n distDiv.style.visibility = \"visible\";\n }, \"direction\");\n // this links google maps to the html component that displays the distance\n distDiv.onclick = function(){urlToNavMap()};\n // this listener updates the particles and the air quality gauge\n x.registerListener(function(val) {\n let closest = getClosest(dataArray,val).closest;\n if (!closestPointToCurrentPosition) {\n closestPointToCurrentPosition = closest;\n }\n let closestLanuvPm10 = getClosest(getLanuvPm10(), val).closest.pm10;\n if (closestPointToCurrentPosition !== closest || lanuvPm10 !== closestLanuvPm10) {\n closestPointToCurrentPosition = closest;\n lanuvPm10 = closestLanuvPm10;\n visualizeParticles(closest.pm10);\n redrawGauge(closest.pm10,closestLanuvPm10);\n }\n }, \"particles\");\n if (x.currentPosition) {\n x.callListeners(x.currentPosition);\n }\n}", "function initialize() {\n // create a google map and center it on the city of portland\n\n var myOptions = {\n center: new google.maps.LatLng(45.5200, -122.6819),\n zoom: 10,\n mapTypeId: google.maps.MapTypeId.ROADMAP\n\n };\n var map = new google.maps.Map(document.getElementById(\"map\"),\n myOptions);\n\n //setMarkers(map);\n\n }", "function initialize() {\n\n //creating variable for current location div in 'Your Stats' section\n var loc = document.getElementById(\"currentLocation\");\n var image = 'http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png';\n\n //checking user location through browser\n if(navigator.geolocation)\n {\n navigator.geolocation.getCurrentPosition(showPosition);\n }\n function showPosition(position)\n {\n\n var lat = position.coords.latitude;\n var latRound = lat.toFixed(4);\n var lon = position.coords.longitude;\n var lonRound = lon.toFixed(4);\n\n //showing current location coordinates in 'Your Stats' section\n loc.innerHTML = \"Lat : \" + latRound + \" | Long : \" + lonRound;\n\n //creating map centered on user location\n var coords = new google.maps.LatLng(latRound, lonRound);\n\n var image = 'source/zombie-outbreak.png';\n\n //map properties\n map = new google.maps.Map(document.getElementById('zero'), {\n scrollwheel: false,\n center: coords,\n zoom: 15\n });\n\n //info window for user location\n var infowindow = new google.maps.InfoWindow({\n map: map,\n position: coords,\n icon: image,\n content:'<p>You are here!</p>' });\n\n //request for store information\n var request = {\n location: coords,\n radius: 400,\n types: ['convenience_store']\n };\n\n //request for shelter information\n var request2 = {\n location: coords,\n radius: 400,\n types: ['library']\n };\n\n //info window for store request\n infowindow2 = new google.maps.InfoWindow();\n var service = new google.maps.places.PlacesService(map);\n service.nearbySearch(request, callback);\n\n //info window for shelter request\n infowindow3 = new google.maps.InfoWindow();\n var service = new google.maps.places.PlacesService(map);\n service.nearbySearch(request2, callback2);\n }\n}", "function initialize() {\n\t// -32 for topbar\n\tdocument.getElementById( 'gmap' ).style.height = (window.innerHeight-32) + 'px';\n\tif (GBrowserIsCompatible()) {\n\t map = new GMap2(document.getElementById(\"gmap\"));\n\t map.setCenter(new GLatLng( DEFAULT_LAT, DEFAULT_LNG ), DEFAULT_ZOOM );\n\t //map.addControl(new GSmallMapControl());\n\t geocoder = new GClientGeocoder();\n\n\t \n GEvent.addListener(map, \"click\", function(overlay,coordinate) {\n showMe();\n updateMe(coordinate.y,coordinate.x);\n var lastCoordinate = readLatestCoordinate();\n var polyline = new GPolyline([\n new GLatLng( lastCoordinate.lat, lastCoordinate.long ),\n new GLatLng( coordinate.y , coordinate.x )\n ], \"#ff0000\", 10);\n \n map.addOverlay( polyline );\n writeCoordinate(coordinate.y, coordinate.x, 0, 0);\n\n }); \n\t\tshowMe();\n\t\t/*\n\t markerIcon = new GIcon();\n\t markerIcon.image = markerImage;\n\t markerIcon.shadow = markerShadow;\n\t markerIcon.shadowSize = new GSize(70, 38);\n\t markerIcon.iconAnchor = new GPoint(23, 30); // new GPoint(6, 39);\n\t markerIcon.infoWindowAnchor = new GPoint(23, 30); // new GPoint(50, - 2); \n\t\t*/\n\t\t\n\t\t// @TODO mockup values\n\t \n\n\t}\n}", "function initializeMap() {\n my_map_options = {\n center: my_center, // to change this value, change my_center above\n zoom: 13, // higher is closer-up\n mapTypeId: google.maps.MapTypeId.HYBRID // you can also use TERRAIN, STREETMAP, SATELLITE\n };\n\n // this one line creates the actual map\n my_map = new google.maps.Map(document.getElementById(\"map_canvas\"),\n my_map_options);\n // this is an *array* that holds all the marker info\n var all_my_markers =\n [{position: new google.maps.LatLng(41.9000,12.5000),\n map: my_map,\n icon: blueURL, // this sets the image that represents the marker in the map to the one\n // located at the URL which is given by the variable blueURL, see above\n title: \"first Marker\",\n window_content: \"<h1>Marker1</h1><p> and this would be the extended description</p>\"\n },\n {position: new google.maps.LatLng(41.8902,12.4923),\n map: my_map,\n icon: blueURL, // this sets the image that represents the marker in the map\n title: \"second Marker\",\n window_content: \"<h1>Marker2</h1><p> and <a href='http://something'>this would</a> be the extended description</p>\"\n },\n {position: new google.maps.LatLng(41.8986,12.4768),\n map: my_map,\n icon: redURL, // this sets the image that represents the marker in the map\n title: \"third Marker\",\n window_content: '<h1>Marker3</h1><img title=\"Picture of Quote. Src: someone, some year\" src=\"https://s-media-cache-ak0.pinimg.com/736x/6d/e2/25/6de2251b8b4be709dcc936ae4f0caaaf.jpg\"/>' +\n '<blockquote>quote quote quote quote</blockquote>'\n }\n ];\n\n for (j = 0; j < all_my_markers.length; j++) {\n var marker = new google.maps.Marker({\n position: all_my_markers[j].position,\n map: my_map,\n icon: all_my_markers[j].icon,\n title: all_my_markers[j].title,\n window_content: all_my_markers[j].window_content});\n\n // this next line is ugly, and you should change it to be prettier.\n // be careful not to introduce syntax errors though. \n legendHTML +=\n \"<div class=\\\"pointer\\\" onclick=\\\"locateMarker(my_markers[\" + j + \"])\\\"> \" +\n marker.window_content + \"</div>\";\n marker.info = new google.maps.InfoWindow({content: marker.window_content});\n var listener = google.maps.event.addListener(marker, 'click', function() {\n // if you want to allow multiple info windows, uncomment the next line\n // and comment out the two lines that follow it\n //this.info.open(this.map, this);\n infowindow.setContent (this.window_content);\n infowindow.open(my_map, this);\n });\n my_markers.push({marker:marker, listener:listener});\n if (all_my_markers[j].icon == blueURL ) {\n blue_markers.push({marker:marker, listener:listener});\n } else if (all_my_markers[j].icon == redURL ) {\n red_markers.push({marker:marker, listener:listener});\n }\n \n }\n document.getElementById(\"map_legend\").innerHTML = legendHTML;\n my_map.data.addGeoJson(myGeoJSON);\n\n var romeCircle = new google.maps.Rectangle({\n strokeColor: '#FF0000',\n strokeOpacity: 0.8,\n strokeWeight: 2,\n fillColor: '#FF0000',\n fillOpacity: 0.35,\n // in general, we always have to *set the map* when we\n // add features. \n map: my_map,\n bounds: {\n north: 42.685,\n south: 40.671,\n east: 12.501,\n west: 12.485\n },\n\n center: {\"lat\": 41.9000, \"lng\":12.5000},\n radius: 1000\n }); \n my_map.data.setStyle(function (feature) {\n var thisColor = feature.getProperty(\"myColor\");\n return {\n fillColor: thisColor,\n strokeColor: thisColor,\n strokeWeight: 5\n };\n\n});\n}", "function initialise() {\n\tvar myLatlng = new google.maps.LatLng(-27.4667, 153.0333);\n\tvar mapOptions = {\n center: myLatlng,\n zoom: 10,\n mapTypeId: google.maps.MapTypeId.ROADMAP\n };\n\t\n \n\tvar map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions)\n\t\n\tvar marker = new google.maps.Marker({\n\t\tposition: myLatlng,\n\t\tmap: map,\n\t\ttitle: 'Brisbane'\n\t});\n}", "function initMap() {\n\tmyMap = new google.maps.Map(\t\n\t\t\tdocument.getElementById('map'),\n\t\t\t{\n\t\t\t\tcenter: {lat:33.883988, lng: -118.231444},\n\t\t\t\tzoom: 12,\n\t\t\t\tstyles: [\n\t\t\t\t\t{featureType:\"poi\", stylers:[{visibility:\"off\"}]}, // No points of interest.\n\t\t\t\t\t{featureType:\"transit.station\",stylers:[{visibility:\"off\"}]} // No bus stations, etc.\n\t\t\t\t]\n\t\t\t}\n\t\t);\n\tlet\tbuttons = document.getElementById(\"addrBtns\").getElementsByTagName(\"button\"); // knappar som ska få attributer och länkar\n\t\n\tfor (let i = 0; i < markerData.length; i++) {\n\t\tlet newMarker = new google.maps.Marker(markerData[i]); // Objekt för markering\n\t\tmyMarkers.push(newMarker);\t\n\t}\n\tlet loop = [\"0\", \"1\", \"2\", \"3\", \"4\"];\t// array som används för att ge attributnummer i loopen\n\tfor (let i = 0; i <loop.length; i++) {\t// loop som ger händelsehanterare och attributer till knappar\n\t\tbuttons[loop[i]].innerHTML = markerData[loop[i]].title;\n\t\tbuttons[loop[i]].addEventListener(\"click\",showAddrMarker);\n\t\tbuttons[loop[i]].setAttribute(\"data-ix\",loop[i]);\n\t}\n\tuserMarker = null;\n\tgoogle.maps.event.addListener(myMap,\"click\",newUserMarker);\n} // End initMap", "function GMC(mapDivName, url, opts) {\r\n\t// store the parameters\r\n\tthis.opts = opts || {};\r\n\tthis.mapDivName = mapDivName;\r\n\tthis.mapIsZoomed = false;\r\n\tthis.mapOriginalSize = {};\r\n\tthis.defaultUrl = url || \"\";\r\n\tthis.latestUrl = url || \"\";\r\n\tthis.currentPageURL = location.href.replace(/#/g,\"\"); //replaces all #\r\n\t// other useful \"global\" stuff\r\n\tthis.gmarkers = [];\r\n\tthis.layerInfo = [];\r\n\tthis.lastMarker = {};\r\n\tthis.markerImageCollection = [];\r\n\tthis.imageNum = 0;\r\n\tthis.previousPosition = null;\r\n\tif(!this.opts.defaultLatitude) { this.opts.defaultLatitude = NZLatitude; }\r\n\tif(!this.opts.defaultLongitude) { this.opts.defaultLongitude = NZLongitude; }\r\n\tif(!this.opts.defaultZoom) { this.opts.defaultZoom = NZZoom; }\r\n\tif(!this.opts.defaultTitle) {this.opts.defaultTitle = \"Map Ready\"; }\r\n\tvar el = null;\r\n\t//clear html areas\r\n\tif(this.opts.changePageTitle) {document.title = this.opts.defaultTitle;}\r\n\tif(this.opts.titleId) { if(el = document.getElementById(this.opts.titleId)) {el.innerHTML = this.opts.defaultTitle;}}\r\n\tif(this.opts.layerListId) { if(el = document.getElementById(this.opts.layerListId)) {el.innerHTML = \"\";} else {this.opts.layerListId = \"\";}}\r\n\tif(this.opts.sideBarId) { if(el = document.getElementById(this.opts.sideBarId)) {el.innerHTML = \"\";} else {this.opts.sideBarId = \"\";}}\r\n\tif(this.opts.dropBoxId) { if(el = document.getElementById(this.opts.dropBoxId)) {el.innerHTML = \"\";} else {this.opts.dropBoxId = \"\";}}\r\n\tif(this.opts.statusDivId) { if( el = document.getElementById(this.opts.statusDivId)) {el.innerHTML = \"loading map . . .\";} else {this.opts.statusDivId = \"statusDivOnMap\";}} else {this.opts.statusDivId = \"statusDivOnMap\";}\r\n\tif(this.opts.directionsDivId) {\r\n\t\tif(el = document.getElementById(this.opts.directionsDivId)) {\r\n\t\t\tel.innerHTML = \"\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.opts.directionsDivId = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tthis.clearRouteVariables();\r\n\tthis.mapAddress = \"\";\r\n\tthis.currentlySetToString = \"<br />Currently set to: \";\r\n\t//setup map\r\n\tif(!map) {\r\n\t\tthis.setupMap(mapDivName);\r\n\t}\r\n\tvar latLng = new google.maps.LatLng(this.opts.defaultLatitude, this.opts.defaultLongitude, true);\r\n\tthis.zoomTo(latLng, this.opts.defaultZoom);\r\n\tmap.clearOverlays();\r\n\tif(this.opts.mapTypeDefaultZeroToTwo) {\r\n\t\tvar mapType = this.mapTypesArray(this.opts.mapTypeDefaultZeroToTwo-0);\r\n\t\t//map.setMapTypeId();\r\n\t}\r\n\tif(this.defaultUrl) {\r\n\t\tthis.downloadXml(this.defaultUrl);\r\n\t}\r\n\t//this.mapOriginalSize = map.getSize();\r\n\tthis.mapOriginalSize = {width: map.getDiv().offsetWidth, height: map.getDiv().offsetHeight};\r\n\tthis.updateStatus(\"Map Ready\");\r\n}", "function google_maps_init() {\n\t'use strict'\n\t\n\tvar markerElement = document.getElementById('marker')\n\tvar mapElement = document.getElementById('map')\n\tvar addressName = mapElement.getAttribute('data-name')\n\tvar roemerberg = {lat: + mapElement.getAttribute(\"data-lat\"), lng: + mapElement.getAttribute(\"data-lng\")}\n\tvar map = new google.maps.Map(mapElement, {\n\t\tzoom: 12,\n\t\tcenter: roemerberg,\n\t\tmarkers: [],\n\t})\n\n\t var contentString = '<div class=\"balon_content\">'+\n '<div>'+\n '</div>'+\n '<p id=\"firstHeading\" class=\"firstHeading\">Shipping address</p>'+\n '<div id=\"bodyContent\">'+\n '<p><b>' + addressName + '</b></p>'+\n '</div>'+\n '</div>';\n\n\tvar infowindow = new google.maps.InfoWindow({\n\t\tcontent: contentString\n\t});\n\n\tvar marker = new google.maps.Marker({\n\t\tposition: roemerberg,\n\t\tmap: map,\n\t\ttitle: \"Shipping address\",\n\t})\n\n\tinfowindow.open(map, marker);\n\tmarker.addListener('click', function() {\n\t\tinfowindow.open(map, marker);\n\t});\n \n\tmap.markers.push(marker);\n}", "function initMap() {\n let sanFrancisco = { lat: 37.790909, lng: -122.417861 };\n map = new google.maps.Map(document.getElementById('map'), {\n zoom: 11,\n center: sanFrancisco,\n mapTypeId: google.maps.MapTypeId.TERRAIN\n });\n\n //Event Listener to place marks when user clicks on the map\n map.addListener('click', e => {\n if (nodes.length > 9) {\n alert(\"You can only have 10 marks!\");\n }\n else {\n placeMarker(e.latLng, map);\n nodes.push(e.latLng);\n }\n });\n }", "function Tour_Map_Canvas()\n{\nconsole.log(\"Tour Map\");\n$('#itinerary_Ui').hide();\n$('#TourMapCanvas').show();\n\nvar useragent = navigator.userAgent;\n//alert(useragent);\nvar mapdiv = document.getElementById(\"Tour_map_canvas\");\nvar mapitem = document.getElementById(\"Tour_map_item\");\n\nif ((useragent.indexOf('Android 3.') != -1) && (screen.width >= 800) && (screen.height >= 800)) {\n // galaxy tab\n mapdiv.style.height = '450px';\n //mapdiv.style.margin = '0.8em';\n} else if ((useragent.indexOf('Android 2.') != -1 ) || (useragent.indexOf('Android 3.') != -1 )) {\n mapitem.style.maxWidth = '490px';\n mapdiv.style.height = '270px';\n //mapdiv.style.margin = '0.4em';\n} else {\n mapdiv.style.height = '420px';\n //mapdiv.style.margin = '1em';\n}\n\nvar mapOptions = {\nzoom: 15,\ncenter: myLatLng,\nmapTypeId: google.maps.MapTypeId.ROADMAP\n}\n\nmap = new google.maps.Map(document.getElementById(\"Tour_map_canvas\"), mapOptions);\n\nvar marker = new google.maps.Marker({\n position: myLatLng,\n map: map\n });\n\nvar infowindow = new google.maps.InfoWindow();\nvar no ='';\nvar name_p = [];\nvar lat_P = [];\nvar long_P = [];\nvar bounds = new google.maps.LatLngBounds();\n$(\".YetToVisitedNode\").each(function() {\n var ID_Place=$(this).attr('id');\n var index = ID_Place.indexOf('_');\n ID_Place= ID_Place.substr(index+1);\n var name = document.getElementById('Place_name'+ID_Place).innerHTML;\n var latitude_p = document.getElementById('Lat_'+ID_Place).value;\n var Longitude_P = document.getElementById('Log_'+ID_Place).value;\n name_p.push(name)\n lat_P.push(latitude_p)\n long_P.push(Longitude_P)\n });\nbounds.extend(myLatLng);\nfor(var j=0; j<name_p.length;j++)\n{\n var position = new google.maps.LatLng(lat_P[j], long_P[j]);\n bounds.extend(position);\n marker = new google.maps.Marker({\n position: position,\n map: map\n });\n \n google.maps.event.addListener(marker, 'click', (function(marker, j) {\n return function() {\n infowindow.setContent((j+1)+' '+name_p[j]);\n infowindow.open(map, marker);\n }\n })(marker, j));\n}\nmap.fitBounds(bounds);\n}", "onAddMarkersToMap() {\r\n let that = this;\r\n let { tasksList, needMap } = that.state;\r\n if (!needMap) {\r\n return;\r\n }\r\n let bounds = needMap.getBounds();\r\n\r\n const greenUrl = \"http://maps.google.com/mapfiles/ms/icons/green-dot.png\"; // material\r\n const yellowUrl = \"http://maps.google.com/mapfiles/ms/icons/yellow-dot.png\"; //service\r\n\r\n //let infoWindow = new google.maps.InfoWindow();\r\n if (tasksList) {\r\n tasksList.forEach(task => {\r\n let iconUrl = \"\";\r\n let position = {\r\n lat: task.lat,\r\n lng: task.lng\r\n };\r\n\r\n if (task.taskType === \"service\") {\r\n iconUrl = yellowUrl;\r\n } else {\r\n iconUrl = greenUrl;\r\n }\r\n let marker = new google.maps.Marker({\r\n position: position,\r\n title: task.summary,\r\n icon: {\r\n url: iconUrl\r\n }\r\n });\r\n\r\n let contentString =\r\n \"<div className='row'></div> \" +\r\n \"<div >\" +\r\n task.summary +\r\n \"s\" +\r\n \"</div> \" +\r\n \"<div >\" +\r\n task.description +\r\n \"</div> </div>\";\r\n let infoWindow = new google.maps.InfoWindow({\r\n content: contentString //\"Summary: \" + task.summary + \" Description \" + task.description\r\n });\r\n\r\n marker.addListener(\"mouseover\", function() {\r\n infoWindow.open(needMap, marker);\r\n });\r\n marker.addListener(\"mouseout\", function() {\r\n infoWindow.close(needMap, marker);\r\n });\r\n\r\n marker.addListener(\"click\", function() {\r\n that.setState({\r\n selectedTask: task\r\n });\r\n let data = {\r\n params: { id: task.id }\r\n };\r\n\r\n let numResovers = 0;\r\n resolverCount(data)\r\n .then(function(res) {\r\n numResovers = res;\r\n if (numResovers <= 5) {\r\n that.onShowAssist();\r\n } else {\r\n that.growl.show({\r\n life: 15000,\r\n severity: \"error\",\r\n summary: \"Number of resolvers\",\r\n detail:\r\n \"There are already 5 resolvers assisting with this request. Please choose another need.\"\r\n });\r\n }\r\n })\r\n .catch(function(error) {\r\n console.log(error);\r\n });\r\n });\r\n marker.setMap(needMap);\r\n\r\n bounds.extend(marker.position);\r\n needMap.fitBounds(bounds);\r\n });\r\n }\r\n //google.maps.event.trigger(needMap, 'resize');\r\n }", "function initMap() {\r\n // [START maps_add_map_instantiate_map]\r\n // The location of United Christian College Kowloon East in Hong Kong\r\n const uccke = { lat: 22.33080, lng: 114.22238 };\r\n // The map, centered at uccke\r\n const map = new google.maps.Map(document.getElementById(\"map\"), {\r\n zoom: 16,\r\n center: uccke,})\r\n \r\n const ac = { lat: 44.154520, lng: -77.393800 };\r\n // The map, centered at AC\r\n const map2 = new google.maps.Map(document.getElementById(\"map2\"), {\r\n zoom: 16,\r\n center: ac,}); \r\n // [END maps_add_map_instantiate_map \r\n \r\n const marker = new google.maps.Marker({\r\n position: uccke,\r\n map: map,});\r\n \r\n const marker2 = new google.maps.Marker({\r\n position: ac,\r\n map: map2,});\r\n}", "function initMap() {\n\n var place1 = {\n info: '<strong>UPMC Centers for Rehab Services</strong><br>\\\n 3471 Fifth Ave., Kaufmann Medical Bldg., Suite 1002, Pittsburgh, PA 15213<br>\\\n <a href=\"https://goo.gl/maps/Piruqvxvrqu\">Get Directions</a>',\n lat: 40.440550,\n long: -79.960626\n };\n\n var place2 = {\n info: '<strong>NovaCare Rehabilitation</strong><br>\\\n 201 N Craig St, Pittsburgh, PA 15213<br>\\\n <a href=\"https://goo.gl/maps/7PfAtzcSKbA2\">Get Directions</a>',\n lat: 40.449913,\n long: -79.951201\n };\n\n var place3 = {\n info: '<strong>UPMC Centers for Rehab Services South Side </strong><br>\\r\\\n 2000 Mary St., South Side Outpatient Center - First Floor, Pittsburgh, PA 15203<br>\\\n <a href=\"https://goo.gl/maps/vYFsY4p2VsA2\">Get Directions</a>',\n lat: 40.425592,\n long: -79.977756\n };\n\n var locations = [\n [place1.info, place1.lat, place1.long, 0],\n [place2.info, place2.lat, place2.long, 1],\n [place3.info, place3.lat, place3.long, 2],\n ];\n\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 13,\n center: new google.maps.LatLng(40.445013, -79.956392),\n mapTypeId: google.maps.MapTypeId.ROADMAP\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 });\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}", "function getMap() {\n esri.config.defaults.io.proxyUrl = \"http://maps1.jeddah.gov.sa/proxy/proxy.ashx\";\n if (maps == null) {\n var mapOption = {\n center: new google.maps.LatLng(21.5018418, 39.1675561),\n zoom: 16,\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n zoomControl: false,\n streetViewControl: false,\n panControl: false \n };\n maps = new google.maps.Map(document.getElementById(\"map\"), mapOption);\n }\n \n }" ]
[ "0.62260365", "0.5998086", "0.5908458", "0.5896668", "0.58569604", "0.58520067", "0.5840177", "0.58329135", "0.5809903", "0.5809279", "0.58089733", "0.5787084", "0.5786722", "0.5778993", "0.5771604", "0.5757256", "0.5756058", "0.5744439", "0.57175815", "0.56943333", "0.5687767", "0.56877065", "0.567834", "0.56695646", "0.5663346", "0.5648939", "0.56405574", "0.5638799", "0.56382084", "0.5636992", "0.5629056", "0.56259054", "0.5623162", "0.56198925", "0.56161726", "0.56010556", "0.55827445", "0.5579481", "0.557567", "0.55683863", "0.55620533", "0.5557686", "0.555057", "0.5546251", "0.5538983", "0.5537513", "0.55371183", "0.5532657", "0.55311775", "0.55291104", "0.55278075", "0.5523628", "0.5521836", "0.5518898", "0.55176723", "0.55176306", "0.5513826", "0.55123466", "0.55122715", "0.5509838", "0.55073744", "0.5488177", "0.54813945", "0.5478771", "0.5478686", "0.547723", "0.5470917", "0.5470444", "0.5469857", "0.54695433", "0.54610234", "0.54548293", "0.5444268", "0.5443327", "0.54396313", "0.54389954", "0.54368913", "0.5433561", "0.54327196", "0.5431732", "0.54299045", "0.54283", "0.5424906", "0.54175633", "0.5417265", "0.5416061", "0.54121506", "0.541127", "0.5409309", "0.5409185", "0.5408317", "0.5406689", "0.5406273", "0.54033", "0.5402827", "0.5399678", "0.5399134", "0.53946614", "0.5388234", "0.53878546", "0.53859603" ]
0.0
-1
This is a dummy function to check if the function name has been altered by minification. If the function has been minified and NODE_ENV !== 'production', warn the user.
function isCrushed() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uglify(name) {\n console.log(\"Hello \" + name);\n}", "function keepNonMinified(file) {\n\tvar keep = true;\n\tif(file.path.match('.js$')) {\n\t\tvar minPath = file.path.replace('.js', '.min.js');\n\t\tkeep = !exists(minPath);\n\t}\n\treturn keep;\n}", "function markFuncFreeze(fun, opt_name) {\n // inline: enforceType(fun, 'function', opt_name);\n if (typeOf(fun) !== 'function') {\n fail('expected function instead of ', typeOf(fun),\n ': ', (opt_name || fun));\n }\n\n // inline: if (isCtor(fun)) {\n if (fun.CONSTRUCTOR___) {\n fail(\"Constructors can't be simple functions: \", fun);\n }\n // inline: if (isXo4aFunc(fun)) {\n if (fun.XO4A___) {\n fail(\"Exophoric functions can't be simple functions: \", fun);\n }\n fun.FUNC___ = opt_name ? String(opt_name) : true;\n return primFreeze(fun);\n }", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"b\" /* isProduction */])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"c\" /* isTest */])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"b\" /* isProduction */])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"c\" /* isTest */])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function isUserFunction(source) {\n return (typeof source === 'function' && source !== exports.NOOP);\n}", "function isUserFunction(source) {\n return (typeof source === 'function' && source !== exports.NOOP);\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"d\" /* isProduction */])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"e\" /* isTest */])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warn(message) {\n if (_warningCallback && \"dev\" !== 'production') {\n _warningCallback(message);\n }\n else if (console && console.warn) {\n console.warn(message);\n }\n}", "function cleanFunctionName(functionName) {\n var ignoredPrefix = 'non-virtual thunk to ';\n if (functionName.startsWith(ignoredPrefix)) {\n return functionName.substr(ignoredPrefix.length);\n }\n return functionName;\n}", "minify() {\n\n }", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "isFileCompressed(file) {\n var dir = path.dirname(file);\n var basename = path.basename(file);\n\n if(this.isScript(basename) || this.isCss(basename) || this.isLess(basename)) {\n if(basename == 'script.js') {\n var compressedName = dir + '/script.min.js';\n } else if(basename == 'styles.css') {\n var compressedName = dir + '/styles.min.css';\n } else if(basename == 'style.css') {\n var compressedName = dir + '/style.min.css';\n } else if(this.isLess(basename)) {\n var compressedName = '../www/local/templates/bootstrap3/styles.css';\n }\n // var compressedName = (basename == 'script.js') ? dir + '/script.min.js' : dir + '/style.min.css';\n\n return this.isDateActual(file, compressedName);\n } else {\n return false;\n }\n }", "function isFallbackFunction(f) {\n return !f.name\n}", "function functionWithoutJSDocWarningsBecauseTheSectionWasCompletelyExcluded() {\n console.log('ASHLDKFJHASKFJSDHFKJSDHFKLSDJHFLJKSDHFLKSDJFHKSDLJFHLSDKJF')\n return true\n}", "function warn(message) {\n if (_warningCallback && \"development\" !== 'production') {\n _warningCallback(message);\n }\n else if (console && console.warn) {\n console.warn(message);\n }\n}", "isPackedFunc(func) {\n // eslint-disable-next-line no-prototype-builtins\n return typeof func == \"function\" && func.hasOwnProperty(\"_tvmPackedCell\");\n }", "function checkFunction(fn) {\n return typeof fn === 'function';\n }", "function istraced (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}", "function istraced (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}", "function istraced (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isProduction() {\n return argv.production\n}", "function isDev(fn) {\n if (devMode) {\n return fn;\n } else {\n return passthrough();\n }\n}", "function isDev() {\n return (process.env.NODE_ENV !== 'production')\n}", "function onValidateGLFunc( functionName, functionArgs ) {\n let functionString;\n if ( log.priority >= 4 ) {\n functionString = getFunctionString( functionName, functionArgs );\n log.info( 4, functionString );\n }\n\n if ( log.break ) {\n functionString = functionString || getFunctionString( functionName, functionArgs );\n const isBreakpoint = log.break &&\n log.break.every( breakOn => functionString.indexOf( breakOn ) !== -1 );\n if ( isBreakpoint ) {\n debugger; // eslint-disable-line\n }\n }\n\n for ( const arg of functionArgs ) {\n if ( arg === undefined ) {\n functionString = functionString || getFunctionString( functionName, functionArgs );\n if ( log.throw ) {\n throw new Error( `Undefined argument: ${functionString}` );\n } else {\n log.error( `Undefined argument: ${functionString}` );\n debugger; // eslint-disable-line\n }\n }\n }\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function can_mangle(name) {\n if (unmangleable.indexOf(name) >= 0) return false;\n if (reserved.indexOf(name) >= 0) return false;\n if (options.only_cache) {\n return cache.props.has(name);\n }\n if (/^-?[0-9]+(\\.[0-9]+)?(e[+-][0-9]+)?$/.test(name)) return false;\n return true;\n }", "function onValidateGLFunc(functionName, functionArgs) {\n let functionString;\n if (log.priority >= 4) {\n functionString = getFunctionString(functionName, functionArgs);\n log.log(4, functionString)();\n }\n\n if (log.break) {\n functionString = functionString || getFunctionString(functionName, functionArgs);\n const isBreakpoint =\n log.break && log.break.every(breakOn => functionString.indexOf(breakOn) !== -1);\n if (isBreakpoint) {\n debugger; // eslint-disable-line\n }\n }\n\n for (const arg of functionArgs) {\n if (arg === undefined) {\n functionString = functionString || getFunctionString(functionName, functionArgs);\n if (log.throw) {\n throw new Error(`Undefined argument: ${functionString}`);\n } else {\n log.error(`Undefined argument: ${functionString}`)();\n log.error(`Undefined argument: ${functionString}`)();\n debugger; // eslint-disable-line\n }\n }\n }\n}", "function untestableFilter(mockName) {\n var cond =\n !(\n mockName === 'font-wishlist' ||\n mockName.indexOf('mapbox_') !== -1\n );\n\n if(!cond) console.log(' -', mockName);\n\n return cond;\n}", "function isProductionBuild() {\n return process.env.NODE_ENV === 'production';\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (isProduction()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!isTest()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function function_exists(function_name)\n{\n if (typeof function_name == 'string')\n return (typeof window[function_name] == 'function');\n return (function_name instanceof Function);\n}", "function warn(message) {\n if (_warningCallback && process.env.NODE_ENV !== 'production') {\n _warningCallback(message);\n }\n else if (console && console.warn) {\n console.warn(message);\n }\n}", "function monitorCodeUse(eventName, data) {\n\t (\"production\" !== process.env.NODE_ENV ? invariant(\n\t eventName && !/[^a-z0-9_]/.test(eventName),\n\t 'You must provide an eventName using only the characters [a-z0-9_]'\n\t ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n\t}", "function monitorCodeUse(eventName, data) {\n\t (\"production\" !== process.env.NODE_ENV ? invariant(\n\t eventName && !/[^a-z0-9_]/.test(eventName),\n\t 'You must provide an eventName using only the characters [a-z0-9_]'\n\t ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n\t}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) {\n type = 'warn';\n }\n if ((0, _environment.isProduction)()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!(0, _environment.isTest)()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) {\n type = 'warn';\n }\n if ((0, _environment.isProduction)()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!(0, _environment.isTest)()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function isProdMode() {\n return process.env.NODE_ENV == 'production';\n}", "function funcName(func) {\n return func.name || \"{anonymous}\"\n }", "function checkIfFunction(func) {\n return typeof func === \"function\";\n}", "function getFunctionName( func ){\n\n\ttry {\n\t\tfunc = func.substr('function '.length);\n\t \tfunc = func.substr(0, func.indexOf('('));\n\n\t\tif( func == \"\" ) func = \"ANONYMOUS_FUNC\";\n\t\tif( func.indexOf( \"=>\" ) >= 0 ) func = \"ANONYMOUS_FUNC\";\n\n\t\treturn func;\n\t} catch( err ){\n\t\tconsole.log( \"\\x1b[31m%s\\x1b[0m\", \"[summer-mvc core]\", \"[logger.js]\", err );\n\t\tthrow err;\n\t}\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function checkFunctions(func1, func2) {\n if (func1.toString() !== func2.toString()) return false;\n return true;\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"production\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function unusedFragMessage(fragName) {\n return 'Fragment \"' + fragName + '\" is never used.';\n}", "function showSpecialWarning() {\r\n return true;\r\n}", "function has_bugs(buggy_code) {\n if (buggy_code) {\n return 'sad days'\n } else {\n return 'it\\'s a good day'\n }\n }", "function function_exists(function_name)\n{\n\tif (typeof function_name == 'string')\n\t\treturn (typeof window[function_name] == 'function');\n\treturn (function_name instanceof Function);\n}", "function StupidBug() {}", "function unusedFragMessage(fragName) {\n return \"Fragment \\\"\".concat(fragName, \"\\\" is never used.\");\n}", "function functionTest(){\n 'use strict';\n console.log(this===window);\n}", "warn() {}", "function isDeployment() {\n return !isDev()\n}", "function getMinimizerConfig() {\n return global.FOO_PROD\n ? [\n new UglifyJsPlugin({\n uglifyOptions: {\n parse: {\n html5_comments: false\n },\n comments: false,\n compress: {\n warnings: false,\n drop_console: true,\n drop_debugger: true\n }\n },\n extractComments: true\n })\n ]\n : [];\n}", "function DEBUG2() {\n if (d) {\n console.warn.apply(console, arguments)\n }\n}", "function existFunction(strNameFunction)\n{\n return (!empty(window[strNameFunction])) ? isFunction(window[strNameFunction]) : false;\n}", "function checkInstrumented() {\n if (proto['__gl_wrapped__']) {\n return false;\n }\n Object.defineProperty(proto, '__gl_wrapped__', {\n 'configurable': true,\n 'enumerable': false,\n 'value': true\n });\n contextRestoreFns.push(function() {\n delete proto['__gl_wrapped__'];\n });\n return true;\n }", "function someFunc() {}", "minifyOneFile () {\n throw new Error('CachingMinifier subclass should implement minifyOneFile!');\n }", "function myReusableFunction(){\n console.log(\"Heyya World\");\n}", "function isHotswappableLambdaFunctionChange(logicalId, change, assetParamsWithEnv) {\n var _a, _b;\n const lambdaCodeChange = isLambdaFunctionCodeOnlyChange(change, assetParamsWithEnv);\n if (typeof lambdaCodeChange === 'string') {\n return lambdaCodeChange;\n }\n else {\n // verify that the Asset changed - otherwise,\n // it's a Code property-only change,\n // but not to an asset change\n // (for example, going from Code.fromAsset() to Code.fromInline())\n if (!common_1.assetMetadataChanged(change)) {\n return common_1.ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT;\n }\n let functionPhysicalName;\n try {\n functionPhysicalName = common_1.stringifyPotentialCfnExpression((_b = (_a = change.newValue) === null || _a === void 0 ? void 0 : _a.Properties) === null || _b === void 0 ? void 0 : _b.FunctionName, assetParamsWithEnv);\n }\n catch (e) {\n // It's possible we can't evaluate the function's name -\n // for example, it can use a Ref to a different resource,\n // which we wouldn't have in `assetParamsWithEnv`.\n // That's fine though - ignore any errors,\n // and treat this case the same way as if the name wasn't provided at all,\n // which means it will be looked up using the listStackResources() call\n // by the later phase (which actually does the Lambda function update)\n functionPhysicalName = undefined;\n }\n return new LambdaFunctionHotswapOperation({\n logicalId,\n physicalName: functionPhysicalName,\n code: lambdaCodeChange,\n });\n }\n}", "function staticallyAnalyze(fn) {\n const report = {\n isAsync: false,\n hasInjectionParam: false,\n injections: [/* alias1, alias2, ... */],\n wantsContainer: false,\n wantedBindingMethods: [],\n // fn, // The function itself\n };\n\n // NOTE Here we say this is a proper function to Esprima\n // since it throws error if the function string like;\n // `boot() { ... }`\n let bootFnStr = fn.toString();\n if (/^(\\w+)\\(([\\w,\\s{}:\\'\\\"]*)\\)\\s{0,1}\\{(?!\\w+)/.test(bootFnStr)) {\n bootFnStr = `function ${bootFnStr}`;\n }\n let pb0 = (esprima.parseScript(bootFnStr)).body[0];\n if (pb0.type !== 'FunctionDeclaration' && pb0.expression) {\n pb0 = pb0.expression;\n }\n\n report.isAsync = pb0.async;\n\n // TODO Loop here at most 2 times (hence the note above)\n // Therefore we can enter the if statement's body below (~:335)\n const maxArgumentCountToProcess = (pb0.params.length < 2 ? pb0.params.length : 2);\n let i = 0;\n while (i < maxArgumentCountToProcess) {\n if (pb0.params[i].type === 'ObjectPattern') {\n // First argument is defined as `{ ... }`\n\n // Extract property names\n //\n const propertyNames = pb0.params[i].properties.map((property) => {\n // TODO Figure out the checks below is really necessary - if not simplify this arrow function\n if (property.computed) {\n throw new Error(`Computed property names (${property.key.name}) are not supported.`);\n }\n if (property.method) {\n throw new Error(`Methods (${property.key.name}) are not supported.`);\n }\n\n return (property.key.name || property.key.value);\n });\n\n // FIXME [MANUALNAME_INJECTABLE]: Manual update required here to sustain consistency\n // See https://stackoverflow.com/a/1885569/250453\n const containerLikeIntersection = [\n 'bind',\n 'singleton',\n 'instance',\n 'make',\n 'callInKernelContext',\n 'paths',\n 'on',\n 'once',\n 'off',\n 'emit',\n // Add Mirket methods that can be injected to the `boot()` of a provider\n ].filter(value => propertyNames.indexOf(value) !== -1);\n\n // NOTE Maybe here we can validate each type of argument's number in the list,\n // e.g. if argument list is like this; `({ binding1 }, container, { instance })\n // do NOT send the container as the 2nd or 3rd argument.\n if (containerLikeIntersection.length > 0) {\n // NOTE Just one container-related method name (e.g. 'bind', 'singleton', 'instance')\n // is enough to say that it want the container.\n report.wantsContainer = true;\n report.wantedBindingMethods.push(...containerLikeIntersection);\n\n // TODO Figure out what to do with others?\n } else {\n report.hasInjectionParam = true;\n report.injections.push(...propertyNames);\n }\n }\n\n i += 1;\n }\n\n return report;\n}", "function isValidExtensionFunction(fn) {\n const reflectionResult = functionReflector.forFunction(fn);\n\n return reflectionResult.params.length === 0\n || (reflectionResult.params[0].type === `DESTRUCTURING`\n && reflectionResult.params[0].value.type === `object`);\n}", "function functionExists(function_name)\n\t{\n\t\t// https://kvz.io/\n\t\t// + original by: Kevin van Zonneveld (https://kvz.io/)\n\t\t// + improved by: Steve Clay\n\t\t// + improved by: Legaev Andrey\n\t\t// * example 1: function_exists('isFinite');\n\t\t// * returns 1: true\n\t\tif (typeof function_name == 'string')\n\t\t{\n\t\t\treturn (typeof window[function_name] == 'function');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn (function_name instanceof Function);\n\t\t}\n\t}", "function funcname(f) {\n const s = f.toString().match(/function (\\w*)/)[1];\n if ((s === null) || (s.length === 0)){ return \"~anonymous~\";}\n return s;\n}", "function strictly() {\n 'use strict';\n\n}", "function test(fn) {\n return Object.defineProperty(fn, \"name\", {\n enumerable: false,\n configurable: true,\n value: \"@\" + fn.name,\n writable: false\n });\n}", "diagnosticDetectFunctionCollisions(file) {\n for (let func of file.callables) {\n const funcName = func.getName(Parser_1.ParseMode.BrighterScript);\n const lowerFuncName = funcName === null || funcName === void 0 ? void 0 : funcName.toLowerCase();\n if (lowerFuncName) {\n //find function declarations with the same name as a stdlib function\n if (globalCallables_1.globalCallableMap.has(lowerFuncName)) {\n this.diagnostics.push(Object.assign(Object.assign({}, DiagnosticMessages_1.DiagnosticMessages.scopeFunctionShadowedByBuiltInFunction()), { range: func.nameRange, file: file }));\n }\n //find any functions that have the same name as a class\n if (this.hasClass(lowerFuncName)) {\n this.diagnostics.push(Object.assign(Object.assign({}, DiagnosticMessages_1.DiagnosticMessages.functionCannotHaveSameNameAsClass(funcName)), { range: func.nameRange, file: file }));\n }\n }\n }\n }", "function warnUser() {\n console.log(\"This is my warning message\");\n}", "function warnUser() {\n console.log(\"This is my warning message\");\n}", "function _checkForUnused() {\n // function params are handled specially\n // assume that parameters are the only thing declared in the param scope\n if (_current[\"(type)\"] === \"functionparams\") {\n _checkParams();\n return;\n }\n var curentLabels = _current[\"(labels)\"];\n for (var labelName in curentLabels) {\n if (curentLabels[labelName][\"(type)\"] !== \"exception\" &&\n curentLabels[labelName][\"(unused)\"]) {\n _warnUnused(labelName, curentLabels[labelName][\"(token)\"], \"var\");\n }\n }\n }", "function formatProdErrorMessage(code){var url='https://reactjs.org/docs/error-decoder.html?invariant='+code;for(var i=1;i<arguments.length;i++){url+='&args[]='+encodeURIComponent(arguments[i]);}return \"Minified React error #\"+code+\"; visit \"+url+\" for the full message or \"+'use the non-minified dev environment for full errors and additional '+'helpful warnings.';}// TODO: this is special because it gets imported during build.", "function f() {\n \"Make sure `this` is unusable in this standalone function.\";\n}", "function check_for_anonymous_functions(){\n\t\n\t// For completing the starting block\n\tfunc_name = '';\n\tfunc_stack = [];\n\n\tfor (var i = 0; i < program_stack.length; i++) {\n\t\tif(program_stack[i] == 'invoke-fun-pre_'){\n\t\t\t\n\t\t\t//If the program starts with a self-invokating function then add \"anonymous\" keyword which will help in further processing\n\t\t\tif(i == 0){\n\t\t\t\tfunc_stack.push(\"anonymous\");\n\t\t\t\tprogram_stack[i] = program_stack[i] + \"anonymous\";\n\t\t\t\tfunction_list.push(\"anonymous\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// For anonymous functions without names assign them the names to which these functions are assigned.\n\t\t\tfunc_name = program_stack[i-1].split('_').splice(-1)[0];\n\t\t\tprogram_stack[i] = program_stack[i] + func_name;\n\t\t\tfunction_list.push(func_name);\n\t\t\tfunc_stack.push(func_name);\t\t\n\t\t}\n\n\t\t//Completing the program stack block ending with appropriate keywords for anonymous functions.\n\t\tif(program_stack[i] == 'invoke-fun_'){\n\t\t\tprogram_stack[i] = program_stack[i] + func_stack.pop();\n\t\t}\n\t};\t\t\n\n}", "function ourReusableFunction() {\r\n console.log(\"Hi World\");\r\n}", "function linting() {\r\n return lintExtension;\r\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}" ]
[ "0.60263145", "0.5777792", "0.57169825", "0.5680016", "0.5680016", "0.5635227", "0.5635227", "0.5620449", "0.5575049", "0.5547515", "0.55280983", "0.5519714", "0.5519714", "0.5519714", "0.5519714", "0.5519714", "0.55096775", "0.54918844", "0.54845864", "0.547782", "0.5477695", "0.5438884", "0.54212534", "0.54212534", "0.54212534", "0.54121196", "0.54121196", "0.54121196", "0.53952163", "0.5375661", "0.53754556", "0.5326752", "0.5326059", "0.5326059", "0.5326059", "0.5326059", "0.5326059", "0.5326059", "0.53237367", "0.53220814", "0.53155565", "0.53006476", "0.52984864", "0.52975756", "0.52897984", "0.5278735", "0.5278735", "0.5241094", "0.5241094", "0.52136767", "0.5194152", "0.5189344", "0.5185895", "0.5182281", "0.5182281", "0.5182281", "0.5182281", "0.5182281", "0.5182281", "0.5182281", "0.5182281", "0.5181832", "0.51761353", "0.51713073", "0.5166172", "0.51632154", "0.5148875", "0.5143427", "0.5139505", "0.5138902", "0.51233876", "0.51229024", "0.51097935", "0.5092281", "0.5090625", "0.5089995", "0.50856423", "0.50839794", "0.5077423", "0.50746924", "0.5070823", "0.50703466", "0.50680345", "0.5065761", "0.50618136", "0.5060655", "0.5049859", "0.50426596", "0.50426596", "0.5036479", "0.50349486", "0.50134397", "0.5012914", "0.5009137", "0.5006066", "0.4985691", "0.4985691", "0.4985691", "0.4985691", "0.4985691", "0.4985691" ]
0.0
-1
v8 likes predictible objects
function Item(fun, array) { this.fun = fun; this.array = array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareLike(a,b){\n var al = a.idLikesProp.length;\n var bl = b.idLikesProp.length;\n if(al > bl) return -1;\n if(bl > al) return 1;\n return 0;\n}", "function lookAround() {\n var objectDescription = \"\"\n tj.see().then(function(objects) {\n objects.forEach(function(each) {\n if (each.score >= 0.4) {\n objectDescription = objectDescription + \", \" + each.class\n }\n })\n tj.speak(\"The objects I see are: \" + objectDescription)\n });\n}", "function recommendNewPosts() {\n model.loadModel();\n getNewPosts(function (err, posts) {\n var label\n ;\n posts.forEach(function (post) {\n label = model.classifyPost(post);\n if (label == 'like') {\n console.log(post);\n }\n });\n });\n }", "function BOT_onLike() {\r\n\tBOT_traceString += \"GOTO command judge\" + \"\\n\"; // change performative\r\n\tBOT_theReqJudgement = \"likeable\";\r\n\tBOT_onJudge(); \t\r\n\tif(BOT_reqSuccess) {\r\n\t\tvar ta = [BOT_theReqTopic,BOT_theReqAttribute]; \r\n\t\tBOT_del(BOT_theUserTopicId,\"distaste\",\"VAL\",ta);\r\n\t\tBOT_add(BOT_theUserTopicId,\"preference\",\"VAL\",ta);\r\n\t}\r\n}", "function like (data, archetype) {\n var name;\n\n for (name in archetype) {\n if (archetype.hasOwnProperty(name)) {\n if (data.hasOwnProperty(name) === false || typeof data[name] !== typeof archetype[name]) {\n return false;\n }\n\n if (object(data[name]) && like(data[name], archetype[name]) === false) {\n return false;\n }\n }\n }\n\n return true;\n }", "function LanguageUnderstandingModel() {\n }", "function guess() {\n classifier.predict(video.elt, 5, gotResult);\n}", "function theBigBang() {\n\t\tinitLibs();\n\t\tinitFuncs();\n\t\tObject.setPrototypeOf(Universe.prototype, universe.kjsclasses._primitive_prototype);\n\t\tObject.setPrototypeOf(Object.prototype, universe); // [0]\n\t}", "function readOwn(obj, name, pumpkin) {\n if (typeof obj !== 'object' || !obj) {\n if (typeOf(obj) !== 'object') {\n return pumpkin;\n }\n }\n if (typeof name === 'number' && name >= 0) {\n if (myOriginalHOP.call(obj, name)) { return obj[name]; }\n return pumpkin;\n }\n name = String(name);\n if (obj[name + '_canRead___'] === obj) { return obj[name]; }\n if (!myOriginalHOP.call(obj, name)) { return pumpkin; }\n // inline remaining relevant cases from canReadPub\n if (endsWith__.test(name)) { return pumpkin; }\n if (name === 'toString') { return pumpkin; }\n if (!isJSONContainer(obj)) { return pumpkin; }\n fastpathRead(obj, name);\n return obj[name];\n }", "function a(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach(function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)})}", "function NXObject() {}", "function isPrimative(val) { return (typeof val !== 'object') }", "function like (data, duck) {\n var name;\n\n assert.object(data);\n assert.object(duck);\n\n for (name in duck) {\n if (duck.hasOwnProperty(name)) {\n if (data.hasOwnProperty(name) === false || typeof data[name] !== typeof duck[name]) {\n return false;\n }\n\n if (object(data[name]) && like(data[name], duck[name]) === false) {\n return false;\n }\n }\n }\n\n return true;\n }", "static get observedAttributes() {\n return ['rainbow', 'lang'];\n }", "function a(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach((function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)}))}", "function testSimpleHole_prototype() {\n var theHole = Object.create({ x: \"in proto\" });\n var theReplacement = \"yay\";\n var serialized = bidar.serialize(theHole, holeFilter);\n var parsed = bidar.parse(serialized, holeFiller);\n\n assert.equal(parsed, theReplacement);\n\n function holeFilter(x) {\n assert.equal(x, theHole);\n return { data: \"blort\" };\n }\n\n function holeFiller(x) {\n assert.equal(x, \"blort\");\n return theReplacement;\n }\n}", "function test() {\n\t// \"ex nihilo\" object creation using the literal\n\t// object notation {}.\n\tvar foo = {\n\t\tname : \"foo\",\n\t\tone : 1,\n\t\ttwo : 2\n\t};\n\n\t// Another \"ex nihilo\" object.\n\tvar bar = {\n\t\ttwo : \"two\",\n\t\tthree : 3\n\t};\n\n\t// Gecko and Webkit JavaScript engines can directly\n\t// manipulate the internal prototype link.\n\t// For the sake of simplicity, let us pretend\n\t// that the following line works regardless of the\n\t// engine used:\n\tbar.__proto__ = foo; // foo is now the prototype of bar.\n\n\t// If we try to access foo's properties from bar\n\t// from now on, we'll succeed.\n\tlog(bar.one) // Resolves to 1.\n\n\t// The child object's properties are also accessible.\n\tlog(bar.three) // Resolves to 3.\n\n\t// Own properties shadow prototype properties\n\tlog(bar.two); // Resolves to \"two\"\n\tlog(foo.name); // unaffected, resolves to \"foo\"\n\tlog(bar.name); // Resolves to \"foo\"\n log(foo.__proto__);\n}", "function wrappedPrimitivePreviewer(className, classObj, objectActor, grip) {\r\n let {_obj} = objectActor;\r\n\r\n if (!_obj.proto || _obj.proto.class != className) {\r\n return false;\r\n }\r\n\r\n let raw = _obj.unsafeDereference();\r\n let v = null;\r\n try {\r\n v = classObj.prototype.valueOf.call(raw);\r\n } catch (ex) {\r\n // valueOf() can throw if the raw JS object is \"misbehaved\".\r\n return false;\r\n }\r\n\r\n if (v === null) {\r\n return false;\r\n }\r\n\r\n let canHandle = GenericObject(objectActor, grip, className === \"String\");\r\n if (!canHandle) {\r\n return false;\r\n }\r\n\r\n grip.preview.wrappedValue = objectActor.getGrip(makeDebuggeeValueIfNeeded(_obj, v));\r\n return true;\r\n}", "function DartObject(o) {\n this.o = o;\n}", "function i(t,e,n){(n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e)).forEach(function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)})}", "function i(t,e,n){(n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e)).forEach(function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)})}", "function likeVsLikes(toyLikeCount){\n\t\tif (toyLikeCount == 1){\n\t\t\treturn 'Like';\n\t\t} else {\n\t\t\treturn 'Likes';\n\t\t}\n\t}", "constructor(spec) {\n this.cached = /* @__PURE__ */ Object.create(null);\n let instanceSpec = this.spec = {};\n for (let prop in spec)\n instanceSpec[prop] = spec[prop];\n instanceSpec.nodes = OrderedMap.from(spec.nodes), instanceSpec.marks = OrderedMap.from(spec.marks || {}), this.nodes = NodeType$1.compile(this.spec.nodes, this);\n this.marks = MarkType.compile(this.spec.marks, this);\n let contentExprCache = /* @__PURE__ */ Object.create(null);\n for (let prop in this.nodes) {\n if (prop in this.marks)\n throw new RangeError(prop + \" can not be both a node and a mark\");\n let type = this.nodes[prop], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] || (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n type.markSet = markExpr == \"_\" ? null : markExpr ? gatherMarks(this, markExpr.split(\" \")) : markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n for (let prop in this.marks) {\n let type = this.marks[prop], excl = type.spec.excludes;\n type.excluded = excl == null ? [type] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n this.nodeFromJSON = this.nodeFromJSON.bind(this);\n this.markFromJSON = this.markFromJSON.bind(this);\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n this.cached.wrappings = /* @__PURE__ */ Object.create(null);\n }", "wordClass(word) {\r\n return {\r\n der: word.artikel == \"der\",\r\n die: word.artikel == \"die\",\r\n das: word.artikel == \"das\",\r\n marked: word.marker\r\n }\r\n }", "function dummyObjects(name, age){\n this.name = name\n this.age = age\n}", "function handleLikes() {\n // Get a random number\n let randomNumber = Math.random();\n // To make it unpredictable, only change the likes if =>\n if (randomNumber < REVEAL_PROBABILITY) {\n defineLikes();\n }\n}", "constructor() { \n \n Like.initialize(this);\n }", "like() {\r\n return this.clone(Comment, \"Like\").postCore();\r\n }", "like() {\r\n return this.getItem().then(i => {\r\n return i.like();\r\n });\r\n }", "added(vrobject){}", "classify(phrase) { return this.clf.classify(phrase) }", "function badIdea(){\n this.idea = \"bad\";\n}", "shouldSerialize(prop, dataKey) {\n const contains = (str, re) => (str.match(re) || []).length > 0;\n const a = contains(dataKey, /\\./g);\n const b = contains(dataKey, /\\[/g);\n return !!prop.object && !(a || b);\n }", "static get observedAttributes(){this.finalize();const e=[];// Use forEach so this works even if for/of loops are compiled to for loops\n// expecting arrays\nreturn this._classProperties.forEach((t,n)=>{const r=this._attributeNameForProperty(n,t);void 0!==r&&(this._attributeToPropertyMap.set(r,n),e.push(r))}),e}", "function oldAndLoud(object){\n\tobject.age++;\n\tobject.name = object.name.toUpperCase();\n}", "like() {\r\n return this.clone(Item, \"like\").postCore();\r\n }", "function classifyPose() {\n if (pose && working) {\n inputs = [];\n for (let i = 0; i < pose.landmarks.length; i++) {\n inputs.push(pose.landmarks[i][0]);\n inputs.push(pose.landmarks[i][1]);\n inputs.push(pose.landmarks[i][2]);\n }\n brain.classify(inputs, gotResult)\n }\n }", "function PropertyDetection() {}", "constructor()\n {\n this.likes = [];\n }", "async TestLikeDoctorPost(){\n var response = await entity.Likes(6,28,true,true);\n //console.log(response)\n if(response != null){\n console.log(\"\\x1b[32m%s\\x1b[0m\",\"TestDOctorRating Passed\");\n }else{\n console.log(\"\\x1b[31m%s\\x1b[0m\",\"TestDOctorRating Failed\");\n }\n\n }", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function showLikes(likes) {\n\tconsole.log(`THINGS I LIKE:\\n`);\n\tfor(let like of likes) {\n\t\tconsole.log(like);\n\t}\n}", "function protoAugment(target,src,keys){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function protoAugment(target,src,keys){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function Nevis() {}", "function Nevis() {}", "function Nevis() {}", "test_primitivesExtended() {\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.primitivesExtended);\n let object = translator.decode(text).getRoot();\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.PrimitivesExtended\", object.constructor.__getClass());\n Assert.equals(\"alpha16\", object.string);\n }", "function buildObjectsObj(gCloudV, azureCV, minScore = 0.0){\n let objects = [];\n\n if(gCloudV) {// gcloud vision results are available\n let gCloudObjects = gCloudV['localizedObjectAnnotations'];\n\n //apply standard bounding box to all the detected objects\n if(azureCV)// azure computer vision results are available\n gCloudVObjsToCogniBoundingBox(gCloudObjects, azureCV['metadata']['width'], azureCV['metadata']['height']);\n\n else//need to retrieve image sizes from gcloud (already done and put in the metadata tag of gcloudv with appropriate calls)\n gCloudVObjsToCogniBoundingBox(gCloudObjects, gCloudV['metadata']['width'], gCloudV['metadata']['height']);\n\n for (let gCloudObj of gCloudObjects) {\n if (gCloudObj['score'] > minScore) { //filter out unwanted tags\n objects.push({\n name: gCloudObj['name'],\n mid: (gCloudObj['mid'] && gCloudObj['mid']!= '')? gCloudObj['mid']: undefined,\n confidence: gCloudObj['score'],\n boundingBox: gCloudObj['boundingBox']\n });\n }\n }\n }\n\n if(azureCV){// azure computer vision results are available\n let azureObjects = azureCV['objects'];\n //apply standard bounding box to all the detected objects\n azureCVObjsToCogniBoundingBox(azureObjects, azureCV['metadata']['width'], azureCV['metadata']['height']);\n for(let aObj of azureObjects){\n if(aObj['confidence'] > minScore) { //filter out unwanted tags\n objects.push({\n name: aObj['object'],\n confidence: aObj['confidence'],\n boundingBox: aObj['boundingBox']\n });\n }\n }\n }\n\n objects = combineObjectsArray(objects);// build an array where labels regarding the same exact object are combined with averaged confidence\n\n objects.sort((a, b) => {\n if(a['confidence']>b['confidence'])\n return -1;\n else if(a['confidence']==b['confidence'])\n return 0;\n else\n return 1;\n });\n\n return objects;\n}", "function V(e){if(null===e||\"[object Object]\"!==function(e){return Object.prototype.toString.call(e)}(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}", "function classifyVideo() {\r\n classifier.classify(vid, gotResult);\r\n\r\n}", "function test_nountag_does_not_think_it_has_watch_tag_when_it_does_not() {\n Assert.equal(TagNoun.fromJSON(\"watch\"), undefined);\n}", "function v11(v12,v13) {\n const v15 = v11(Object,Function);\n // v15 = .unknown\n const v16 = Object(v13,v8,0,v6);\n // v16 = .object()\n const v17 = 0;\n // v17 = .integer\n const v18 = 1;\n // v18 = .integer\n const v19 = 512;\n // v19 = .integer\n const v20 = \"-1024\";\n // v20 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v21 = isFinite;\n // v21 = .function([.anything] => .boolean)\n const v23 = [1337];\n // v23 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v24 = {};\n // v24 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v25 = v23;\n const v26 = -29897853;\n // v26 = .integer\n const v27 = \"replace\";\n // v27 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v28 = Boolean;\n // v28 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v30 = [13.37,13.37];\n // v30 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v31 = 1337;\n // v31 = .integer\n let v32 = 13.37;\n const v36 = [13.37,13.37,13.37];\n // v36 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v38 = [1337,1337];\n // v38 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v39 = [13.37,1337,v38,1337,\"-128\",13.37,\"-128\",\"-128\",2147483647,1337];\n // v39 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v40 = {__proto__:v36,length:v39};\n // v40 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"length\"])\n const v41 = \"0\";\n // v41 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v42 = -4130093409;\n // v42 = .integer\n const v44 = {b:2147483647,e:v38,valueOf:v36};\n // v44 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"b\", \"valueOf\", \"e\"])\n const v45 = \"k**baeaDif\";\n // v45 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v46 = 65536;\n // v46 = .integer\n const v47 = \"k**baeaDif\";\n // v47 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v48 = 13.37;\n // v48 = .float\n const v50 = [13.37,13.37];\n // v50 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v51 = ~v50;\n // v51 = .boolean\n const v53 = [13.37];\n // v53 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n let v54 = v53;\n const v55 = gc;\n // v55 = .function([] => .undefined)\n const v58 = [13.37,13.37,13.37,13.37];\n // v58 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v60 = [1337,1337,1337,1337];\n // v60 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v61 = [3697200800,v58,v60];\n // v61 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v62 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v61};\n // v62 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"length\", \"constructor\", \"toString\", \"valueOf\"])\n const v65 = [13.37,13.37,13.37,13.37];\n // v65 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v67 = [1337,1337,1337,1337];\n // v67 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v68 = [3697200800,v65,v67];\n // v68 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v69 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v68};\n // v69 = .object(ofGroup: Object, withProperties: [\"e\", \"constructor\", \"__proto__\", \"length\", \"toString\", \"valueOf\"])\n const v70 = Object;\n // v70 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n function v71(v72) {\n }\n const v74 = [13.37];\n // v74 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v75 = 1337;\n // v75 = .integer\n const v76 = v44 ** 13.37;\n // v76 = .integer | .float | .bigint\n function v77(v78,v79,v80,v81,v82) {\n }\n let v83 = v74;\n const v84 = \"2\";\n // v84 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v85 = \"2\";\n // v85 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v88 = [13.37,13.37,1337,13.37];\n // v88 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v89(v90,v91,v92) {\n }\n const v94 = [1337,1337,1337,1337];\n // v94 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v95 = [3697200800,v88,v94];\n // v95 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v96(v97,v98) {\n }\n const v99 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,d:v95};\n // v99 = .object(ofGroup: Object, withProperties: [\"toString\", \"length\", \"constructor\", \"__proto__\", \"e\", \"d\"])\n let v100 = 13.37;\n const v101 = typeof v74;\n // v101 = .string\n const v102 = \"symbol\";\n // v102 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v103 = 3697200800;\n // v103 = .integer\n const v104 = \"2\";\n // v104 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v105 = Boolean;\n // v105 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v106 = Function;\n // v106 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v107 = 13.37;\n // v107 = .float\n const v108 = 1337;\n // v108 = .integer\n const v109 = \"2\";\n // v109 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v110 = Function;\n // v110 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v112 = [13.37,13.37,13.37,13.37];\n // v112 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v113 = 1337;\n // v113 = .integer\n let v114 = 13.37;\n const v116 = {...3697200800,...3697200800};\n // v116 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n const v117 = Object;\n // v117 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v118 = Function;\n // v118 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v119 = {};\n // v119 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v120 = v119;\n const v121 = (3697200800).constructor;\n // v121 = .unknown\n function v122(v123,v124) {\n }\n const v125 = Promise;\n // v125 = .object(ofGroup: PromiseConstructor, withProperties: [\"prototype\"], withMethods: [\"race\", \"allSettled\", \"reject\", \"all\", \"resolve\"]) + .constructor([.function()] => .object(ofGroup: Promise, withProperties: [\"__proto__\"], withMethods: [\"finally\", \"then\", \"catch\"]))\n const v128 = 4;\n // v128 = .integer\n let v129 = 0;\n const v131 = [13.37,13.37,13.37,13.37];\n // v131 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v133 = [1337,1337,1337,1337];\n // v133 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v134 = [3697200800,v131,v133];\n // v134 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v135 = Object;\n // v135 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v136 = -944747134;\n // v136 = .integer\n const v139 = [13.37,13.37,13.37,13.37];\n // v139 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v141 = [1337,1337,1337,1337];\n // v141 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v142 = [3697200800,v139,v141];\n // v142 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v143 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v142};\n // v143 = .object(ofGroup: Object, withProperties: [\"toString\", \"constructor\", \"e\", \"__proto__\", \"valueOf\", \"length\"])\n let v144 = v143;\n const v145 = gc;\n // v145 = .function([] => .undefined)\n let v146 = 13.37;\n const v150 = [13.37,13.37,13.37,Function];\n // v150 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v152 = [1337,1337,1337,1337];\n // v152 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v153 = [3697200800,v150,v152];\n // v153 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v154 = v153 + 1;\n // v154 = .primitive\n let v155 = 0;\n const v156 = v155 + 1;\n // v156 = .primitive\n const v158 = \"2\";\n // v158 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v160 = [13.37,13.37,13.37,13.37];\n // v160 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v162 = 0;\n // v162 = .integer\n const v163 = [1337,1337,1337,1337];\n // v163 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v164 = [3697200800,1337,v163];\n // v164 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v166 = 1337;\n // v166 = .integer\n let v167 = 2594067260;\n const v169 = 4;\n // v169 = .integer\n let v170 = 0;\n const v171 = v167 + 1;\n // v171 = .primitive\n const v172 = {__proto__:3697200800,constructor:v163,e:3697200800,length:13.37,toString:3697200800,valueOf:v164};\n // v172 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"constructor\", \"valueOf\", \"length\", \"toString\"])\n const v173 = 0;\n // v173 = .integer\n const v174 = 5;\n // v174 = .integer\n const v175 = 2937513072;\n // v175 = .integer\n const v176 = Object;\n // v176 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v177 = v172.constructor;\n // v177 = .unknown\n const v178 = 0;\n // v178 = .integer\n const v179 = 1;\n // v179 = .integer\n try {\n } catch(v180) {\n const v182 = [13.37,13.37,13.37,13.37];\n // v182 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v183 = v182.__proto__;\n // v183 = .object()\n function v185(v186) {\n }\n const v187 = Object >>> v183;\n // v187 = .integer | .bigint\n }\n function v188(v189,v190,v191,v192,...v193) {\n }\n}", "function markRaw(obj) {\r\n if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) {\r\n return obj;\r\n }\r\n // set the vue observable flag at obj\r\n var ob = createObserver();\r\n ob.__raw__ = true;\r\n def(obj, '__ob__', ob);\r\n // mark as Raw\r\n rawSet.set(obj, true);\r\n return obj;\r\n}", "function markRaw(obj) {\r\n if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) {\r\n return obj;\r\n }\r\n // set the vue observable flag at obj\r\n var ob = createObserver();\r\n ob.__raw__ = true;\r\n def(obj, '__ob__', ob);\r\n // mark as Raw\r\n rawSet.set(obj, true);\r\n return obj;\r\n}", "transient private internal function m185() {}", "function rekognizeLabels(bucket, key) {\n let params = {\n Image: {\n S3Object: {\n Bucket: bucket,\n Name: key\n }\n },\n MaxLabels: 3,\n MinConfidence: 80\n };\n\n return rekognition.detectLabels(params).promise()\n}", "test_doNotRetainAnno(){\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.doNotRetainAnno);\n let object1 = translator.decode(text).getRoot();\n let object2 = translator.decode(text).getRoot();\n\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.DoNotRetainAnno\", object1.constructor.__getClass());\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.DoNotRetainAnno\", object2.constructor.__getClass());\n Assert.notEquals(object1, object2);\n }", "function LK_likeIt(elem) {\n var likeGroup = elem.getAttribute(LK_LIKEGROUP);\n var likeValue = elem.getAttribute(LK_LIKEVALUE);\n localStorage[likeGroup] = likeValue;\n\n // Change the style of the liker nodes\n var siblings = elem.parentNode.childNodes;\n for (var i = 0; i < siblings.length; i++) {\n if (siblings[i].style) { \n LK_applyNormalStyle(siblings[i]);\n }\n }\n LK_applySelectedStyle(elem, likeValue);\n\n // Change the value of any mini likers\n var allSpans = document.getElementsByTagName('span');\n for (var i = 0; i < allSpans.length; i++) {\n var span = allSpans[i];\n if (span.getAttribute(LK_LIKEGROUP) == likeGroup) {\n if (span.getAttribute(LK_LIKETYPE) == 'mini') {\n span.innerHTML = LK_MAPPINGS[likeValue].label;\n LK_applySelectedStyle(allSpans[i], likeValue);\n }\n }\n }\n}", "function OOPExample(who) {\n this.me = who;\n}", "getLikes(state, data) {\n state.likes = data\n }", "function _isAlternativeRecognitionResult(obj) {\r\n return obj && typeof obj === 'object';\r\n}", "function addLikes() {\n if (propLike?.includes(user.username)) {\n let index = propLike.indexOf(user.username);\n let removeLike = [\n ...propLike.slice(0, index),\n ...propLike.slice(index + 1),\n ];\n setLikeGet(removeLike);\n setPropLike(removeLike);\n setRedLike(\"\");\n\n addToLike(eventid, removeLike);\n } else {\n let likesArr = [...propLike, `${user.username}`];\n\n setLikeGet(likesArr);\n setPropLike(likesArr);\n setRedLike(\"red\");\n addToLike(eventid, likesArr);\n }\n }", "function LiteralObject() {\r\n}", "function Komunalne() {}", "function Bevy() {}", "function Prediction() {\n this.score = {};\n}", "function Object() {}", "function Object() {}", "function canEnumPub(obj, name) {\n if (obj === null) { return false; }\n if (obj === void 0) { return false; }\n name = String(name);\n if (obj[name + '_canEnum___']) { return true; }\n if (endsWith__.test(name)) { return false; }\n if (!isJSONContainer(obj)) { return false; }\n if (!myOriginalHOP.call(obj, name)) { return false; }\n fastpathEnum(obj, name);\n if (name === 'toString') { return true; }\n fastpathRead(obj, name);\n return true;\n }", "function Obj(){ return Literal.apply(this,arguments) }", "test_primitives() {\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.primitives);\n let object = translator.decode(text).getRoot();\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.Primitives\", object.constructor.__getClass());\n Assert.equals(\"alpha9\", object.string);\n }", "function hello()\n{\n /* ATTRIBUTES */\n this.coolbeans = 'class';\n this.something = 'hello-class';\n\n}", "function test_cluster_tagged_crosshair_op_vsphere65() {}", "function classifyVideo() {\n classifier.classify(gotResult);\n}", "function classifyVideo() {\n classifier.classify(gotResult);\n}", "constructor(papa,mummy,sivlings,belongs,loving_bro,favs_bro){\n super(papa,mummy,sivlings,belongs)\n this.loving_bro=loving_bro\n this.favs_bro=favs_bro\n }", "function v8(v9,v10) {\n const v16 = [1337,1337];\n // v16 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v17 = [\"536870912\",-3848843708,v16,-3848843708,1337,13.37,13.37,WeakMap,-3848843708];\n // v17 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v18 = {constructor:13.37,e:v16};\n // v18 = .object(ofGroup: Object, withProperties: [\"constructor\", \"e\", \"__proto__\"])\n const v19 = {__proto__:-3848843708,a:v18,b:-3848843708,constructor:1337,d:v18,e:v17,length:WeakMap};\n // v19 = .object(ofGroup: Object, withProperties: [\"d\", \"b\", \"a\", \"__proto__\", \"e\", \"constructor\", \"length\"])\n const v21 = new Float64Array(v19);\n // v21 = .object(ofGroup: Float64Array, withProperties: [\"byteOffset\", \"constructor\", \"buffer\", \"__proto__\", \"byteLength\", \"length\"], withMethods: [\"map\", \"values\", \"subarray\", \"find\", \"fill\", \"set\", \"findIndex\", \"some\", \"reduceRight\", \"reverse\", \"join\", \"includes\", \"entries\", \"reduce\", \"every\", \"copyWithin\", \"sort\", \"forEach\", \"lastIndexOf\", \"indexOf\", \"filter\", \"slice\", \"keys\"])\n v6[6] = v7;\n v7.toString = v9;\n }", "function defineInspect(classObject) {\n var fn = classObject.prototype.toJSON;\n typeof fn === 'function' || invariant(0);\n classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n if (nodejsCustomInspectSymbol[\"a\" /* default */]) {\n classObject.prototype[nodejsCustomInspectSymbol[\"a\" /* default */]] = fn;\n }\n}", "annotate(message: string, data: Object) {\n this.message = message;\n this.data = assign(this.data, data);\n }", "function encodeObject(o) {\n if (_.isNumber(o)) {\n if (_.isNaN(o)) {\n return ['SPECIAL_FLOAT', 'NaN'];\n } else if (o === Infinity) {\n return ['SPECIAL_FLOAT', 'Infinity'];\n } else if (o === -Infinity) {\n return ['SPECIAL_FLOAT', '-Infinity'];\n } else {\n return o;\n }\n } else if (_.isString(o)) {\n return o;\n } else if (_.isBoolean(o) || _.isNull(o) || _.isUndefined(o)) {\n return ['JS_SPECIAL_VAL', String(o)];\n } else if (typeof o === 'symbol') {\n // ES6 symbol\n return ['JS_SPECIAL_VAL', String(o)];\n } else {\n // render these as heap objects\n\n // very important to use _.has since we don't want to\n // grab the property in your prototype, only in YOURSELF ... SUBTLE!\n if (!_.has(o, 'smallObjId_hidden_')) {\n // make this non-enumerable so that it doesn't show up in\n // console.log() or other inspector functions\n Object.defineProperty(o, 'smallObjId_hidden_', { value: smallObjId,\n enumerable: false });\n smallObjId++;\n }\n assert(o.smallObjId_hidden_ > 0);\n\n var ret = ['REF', o.smallObjId_hidden_];\n\n if (encodedHeapObjects[String(o.smallObjId_hidden_)] !== undefined) {\n return ret;\n }\n else {\n assert(_.isObject(o));\n\n var newEncodedObj = [];\n encodedHeapObjects[String(o.smallObjId_hidden_)] = newEncodedObj;\n\n var i;\n\n if (_.isFunction(o)) {\n var funcProperties = []; // each element is a pair of [name, encoded value]\n\n var encodedProto = null;\n if (_.isObject(o.prototype)) {\n // TRICKY TRICKY! for inheritance to be displayed properly, we\n // want to find the prototype of o.prototype and see if it's\n // non-empty. if that's true, then even if o.prototype is\n // empty (i.e., has no properties of its own), then we should\n // still encode it since its 'prototype' \"uber-hidden\n // property\" is non-empty\n var prototypeOfPrototype = Object.getPrototypeOf(o.prototype);\n if (!_.isEmpty(o.prototype) ||\n (_.isObject(prototypeOfPrototype) && !_.isEmpty(prototypeOfPrototype))) {\n encodedProto = encodeObject(o.prototype);\n }\n }\n\n if (encodedProto) {\n funcProperties.push(['prototype', encodedProto]);\n }\n\n // now get all of the normal properties out of this function\n // object (it's unusual to put properties in a function object,\n // but it's still legal!)\n var funcPropPairs = _.pairs(o);\n for (i = 0; i < funcPropPairs.length; i++) {\n funcProperties.push([funcPropPairs[i][0], encodeObject(funcPropPairs[i][1])]);\n }\n\n var funcCodeString = o.toString();\n\n /*\n\n #craftsmanship -- make nested functions look better by indenting\n the first line of a nested function definition by however much\n the LAST line is indented, ONLY if the last line is simply a\n single ending '}'. otherwise it will look ugly since the\n function definition doesn't start out indented, like so:\n\nfunction bar(x) {\n globalZ += 100;\n return x + y + globalZ;\n }\n\n */\n var codeLines = funcCodeString.split('\\n');\n if (codeLines.length > 1) {\n var lastLine = _.last(codeLines);\n if (lastLine.trim() === '}') {\n var lastLinePrefix = lastLine.slice(0, lastLine.indexOf('}'));\n funcCodeString = lastLinePrefix + funcCodeString; // prepend!\n }\n }\n\n newEncodedObj.push('JS_FUNCTION',\n o.name,\n funcCodeString, /* code string*/\n funcProperties.length ? funcProperties : null, /* OPTIONAL */\n null /* parent frame */);\n } else if (_.isArray(o)) {\n newEncodedObj.push('LIST');\n for (i = 0; i < o.length; i++) {\n newEncodedObj.push(encodeObject(o[i]));\n }\n } else if (o.__proto__.toString() === canonicalSet.__proto__.toString()) { // dunno why 'instanceof' doesn't work :(\n newEncodedObj.push('SET');\n // ES6 Set (TODO: add WeakSet)\n for (let item of o) {\n newEncodedObj.push(encodeObject(item));\n }\n } else if (o.__proto__.toString() === canonicalMap.__proto__.toString()) { // dunno why 'instanceof' doesn't work :(\n // ES6 Map (TODO: add WeakMap)\n newEncodedObj.push('DICT'); // use the Python 'DICT' type since it's close enough; adjust display in frontend\n for (let [key, value] of o) {\n newEncodedObj.push([encodeObject(key), encodeObject(value)]);\n }\n } else {\n // a true object\n\n // if there's a custom toString() function (note that a truly\n // prototypeless object won't have toString method, so check first to\n // see if toString is *anywhere* up the prototype chain)\n var s = (o.toString !== undefined) ? o.toString() : '';\n if (s !== '' && s !== '[object Object]') {\n newEncodedObj.push('INSTANCE_PPRINT', 'object', s);\n } else {\n newEncodedObj.push('INSTANCE', '');\n var pairs = _.pairs(o);\n for (i = 0; i < pairs.length; i++) {\n var e = pairs[i];\n newEncodedObj.push([encodeObject(e[0]), encodeObject(e[1])]);\n }\n\n var proto = Object.getPrototypeOf(o);\n if (_.isObject(proto) && !_.isEmpty(proto)) {\n //log('obj.prototype', proto, proto.smallObjId_hidden_);\n // I think __proto__ is the official term for this field,\n // *not* 'prototype'\n newEncodedObj.push(['__proto__', encodeObject(proto)]);\n }\n }\n }\n\n return ret;\n }\n\n }\n assert(false);\n}", "function dist_index_esm_contains(obj,key){return Object.prototype.hasOwnProperty.call(obj,key);}", "function isRawPostcodeObject(o, additionalAttr, blackListedAttr) {\n\tif (!additionalAttr) additionalAttr = [];\n\tif (!blackListedAttr) blackListedAttr = [];\n\tisSomeObject(o, rawPostcodeAttributes, additionalAttr, blackListedAttr);\n}", "function _meta_(v,m){var ms=v['__meta__']||{};for(var k in m){ms[k]=m[k]};v['__meta__']=ms;return v}", "function Animal() {\n this.kind = \"Dog\"\n}", "function Kitten(name, photo, interests, isGoodWithKids, isGoodWithDogs, isGoodWithCats) {\n this.name = name;\n this.photo = photo;\n this.interests = interests;\n this.isGoodWithKids = isGoodWithKids;\n this.isGoodWithCats = isGoodWithCats;\n this.isGoodWithDogs = isGoodWithDogs;\n}", "getMeta () {\n }", "function np(e){return\"[object Object]\"===Object.prototype.toString.call(e)}", "function Obj() {}", "function isFriend(name, object) {\n//use hasWord function to check object names array\n// console.log(object);\n// console.log(name);\n//conditional to check for property\nif (object['friends'] !== undefined) {\nreturn hasWord(object.friends.join(' '), name);\n}\nelse {return false};\n \n}", "function test_fail_hole_prototype() {\n var obj = Object.create({ stuff: \"in prototype\" });\n obj.foo = \"bar\";\n\n function f1() {\n bidar.serialize(obj);\n }\n assert.throws(f1, /Hole-ful graph, but no hole filter/);\n}", "function Person(saying) {\n this.saying = saying;\n /*\n return {\n dumbObject: true\n }\n */\n}", "transient private protected internal function m182() {}", "function kotlin(hljs) {\n const KEYWORDS = {\n keyword:\n 'abstract as val var vararg get set class object open private protected public noinline ' +\n 'crossinline dynamic final enum if else do while for when throw try catch finally ' +\n 'import package is in fun override companion reified inline lateinit init ' +\n 'interface annotation data sealed internal infix operator out by constructor super ' +\n 'tailrec where const inner suspend typealias external expect actual',\n built_in:\n 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',\n literal:\n 'true false null'\n };\n const KEYWORDS_WITH_LABEL = {\n className: 'keyword',\n begin: /\\b(break|continue|return|this)\\b/,\n starts: {\n contains: [\n {\n className: 'symbol',\n begin: /@\\w+/\n }\n ]\n }\n };\n const LABEL = {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '@'\n };\n\n // for string templates\n const SUBST = {\n className: 'subst',\n begin: /\\$\\{/,\n end: /\\}/,\n contains: [ hljs.C_NUMBER_MODE ]\n };\n const VARIABLE = {\n className: 'variable',\n begin: '\\\\$' + hljs.UNDERSCORE_IDENT_RE\n };\n const STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"\"\"',\n end: '\"\"\"(?=[^\"])',\n contains: [\n VARIABLE,\n SUBST\n ]\n },\n // Can't use built-in modes easily, as we want to use STRING in the meta\n // context as 'meta-string' and there's no syntax to remove explicitly set\n // classNames in built-in modes.\n {\n begin: '\\'',\n end: '\\'',\n illegal: /\\n/,\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '\"',\n end: '\"',\n illegal: /\\n/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VARIABLE,\n SUBST\n ]\n }\n ]\n };\n SUBST.contains.push(STRING);\n\n const ANNOTATION_USE_SITE = {\n className: 'meta',\n begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\\\s*:(?:\\\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'\n };\n const ANNOTATION = {\n className: 'meta',\n begin: '@' + hljs.UNDERSCORE_IDENT_RE,\n contains: [\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [\n hljs.inherit(STRING, {\n className: 'meta-string'\n })\n ]\n }\n ]\n };\n\n // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals\n // According to the doc above, the number mode of kotlin is the same as java 8,\n // so the code below is copied from java.js\n const KOTLIN_NUMBER_MODE = NUMERIC;\n const KOTLIN_NESTED_COMMENT = hljs.COMMENT(\n '/\\\\*', '\\\\*/',\n {\n contains: [ hljs.C_BLOCK_COMMENT_MODE ]\n }\n );\n const KOTLIN_PAREN_TYPE = {\n variants: [\n {\n className: 'type',\n begin: hljs.UNDERSCORE_IDENT_RE\n },\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [] // defined later\n }\n ]\n };\n const KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE;\n KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ];\n KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ];\n\n return {\n name: 'Kotlin',\n aliases: [ 'kt' ],\n keywords: KEYWORDS,\n contains: [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance: 0,\n contains: [\n {\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n KEYWORDS_WITH_LABEL,\n LABEL,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n {\n className: 'function',\n beginKeywords: 'fun',\n end: '[(]|$',\n returnBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n relevance: 5,\n contains: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n returnBegin: true,\n relevance: 0,\n contains: [ hljs.UNDERSCORE_TITLE_MODE ]\n },\n {\n className: 'type',\n begin: /</,\n end: />/,\n keywords: 'reified',\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n endsParent: true,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n {\n begin: /:/,\n end: /[=,\\/]/,\n endsWithParent: true,\n contains: [\n KOTLIN_PAREN_TYPE,\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT\n ],\n relevance: 0\n },\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n STRING,\n hljs.C_NUMBER_MODE\n ]\n },\n KOTLIN_NESTED_COMMENT\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface trait', // remove 'trait' when removed from KEYWORDS\n end: /[:\\{(]|$/,\n excludeEnd: true,\n illegal: 'extends implements',\n contains: [\n {\n beginKeywords: 'public protected internal private constructor'\n },\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'type',\n begin: /</,\n end: />/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0\n },\n {\n className: 'type',\n begin: /[,:]\\s*/,\n end: /[<\\(,]|$/,\n excludeBegin: true,\n returnEnd: true\n },\n ANNOTATION_USE_SITE,\n ANNOTATION\n ]\n },\n STRING,\n {\n className: 'meta',\n begin: \"^#!/usr/bin/env\",\n end: '$',\n illegal: '\\n'\n },\n KOTLIN_NUMBER_MODE\n ]\n };\n}", "function kotlin(hljs) {\n const KEYWORDS = {\n keyword:\n 'abstract as val var vararg get set class object open private protected public noinline ' +\n 'crossinline dynamic final enum if else do while for when throw try catch finally ' +\n 'import package is in fun override companion reified inline lateinit init ' +\n 'interface annotation data sealed internal infix operator out by constructor super ' +\n 'tailrec where const inner suspend typealias external expect actual',\n built_in:\n 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',\n literal:\n 'true false null'\n };\n const KEYWORDS_WITH_LABEL = {\n className: 'keyword',\n begin: /\\b(break|continue|return|this)\\b/,\n starts: {\n contains: [\n {\n className: 'symbol',\n begin: /@\\w+/\n }\n ]\n }\n };\n const LABEL = {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '@'\n };\n\n // for string templates\n const SUBST = {\n className: 'subst',\n begin: /\\$\\{/,\n end: /\\}/,\n contains: [ hljs.C_NUMBER_MODE ]\n };\n const VARIABLE = {\n className: 'variable',\n begin: '\\\\$' + hljs.UNDERSCORE_IDENT_RE\n };\n const STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"\"\"',\n end: '\"\"\"(?=[^\"])',\n contains: [\n VARIABLE,\n SUBST\n ]\n },\n // Can't use built-in modes easily, as we want to use STRING in the meta\n // context as 'meta-string' and there's no syntax to remove explicitly set\n // classNames in built-in modes.\n {\n begin: '\\'',\n end: '\\'',\n illegal: /\\n/,\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '\"',\n end: '\"',\n illegal: /\\n/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VARIABLE,\n SUBST\n ]\n }\n ]\n };\n SUBST.contains.push(STRING);\n\n const ANNOTATION_USE_SITE = {\n className: 'meta',\n begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\\\s*:(?:\\\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'\n };\n const ANNOTATION = {\n className: 'meta',\n begin: '@' + hljs.UNDERSCORE_IDENT_RE,\n contains: [\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [\n hljs.inherit(STRING, {\n className: 'meta-string'\n })\n ]\n }\n ]\n };\n\n // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals\n // According to the doc above, the number mode of kotlin is the same as java 8,\n // so the code below is copied from java.js\n const KOTLIN_NUMBER_MODE = NUMERIC;\n const KOTLIN_NESTED_COMMENT = hljs.COMMENT(\n '/\\\\*', '\\\\*/',\n {\n contains: [ hljs.C_BLOCK_COMMENT_MODE ]\n }\n );\n const KOTLIN_PAREN_TYPE = {\n variants: [\n {\n className: 'type',\n begin: hljs.UNDERSCORE_IDENT_RE\n },\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [] // defined later\n }\n ]\n };\n const KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE;\n KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ];\n KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ];\n\n return {\n name: 'Kotlin',\n aliases: [ 'kt' ],\n keywords: KEYWORDS,\n contains: [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance: 0,\n contains: [\n {\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n KEYWORDS_WITH_LABEL,\n LABEL,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n {\n className: 'function',\n beginKeywords: 'fun',\n end: '[(]|$',\n returnBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n relevance: 5,\n contains: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n returnBegin: true,\n relevance: 0,\n contains: [ hljs.UNDERSCORE_TITLE_MODE ]\n },\n {\n className: 'type',\n begin: /</,\n end: />/,\n keywords: 'reified',\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n endsParent: true,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n {\n begin: /:/,\n end: /[=,\\/]/,\n endsWithParent: true,\n contains: [\n KOTLIN_PAREN_TYPE,\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT\n ],\n relevance: 0\n },\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n STRING,\n hljs.C_NUMBER_MODE\n ]\n },\n KOTLIN_NESTED_COMMENT\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface trait', // remove 'trait' when removed from KEYWORDS\n end: /[:\\{(]|$/,\n excludeEnd: true,\n illegal: 'extends implements',\n contains: [\n {\n beginKeywords: 'public protected internal private constructor'\n },\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'type',\n begin: /</,\n end: />/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0\n },\n {\n className: 'type',\n begin: /[,:]\\s*/,\n end: /[<\\(,]|$/,\n excludeBegin: true,\n returnEnd: true\n },\n ANNOTATION_USE_SITE,\n ANNOTATION\n ]\n },\n STRING,\n {\n className: 'meta',\n begin: \"^#!/usr/bin/env\",\n end: '$',\n illegal: '\\n'\n },\n KOTLIN_NUMBER_MODE\n ]\n };\n}", "function Surrogate(){}", "function Surrogate(){}", "function Surrogate(){}", "static serialize(obj, allowPrimitives, fallbackToJson, requireJsonType = false) {\n if (allowPrimitives) {\n if (typeof obj === \"string\") {\n return this.serializePrimitive(obj, \"string\");\n } else if (typeof obj === \"number\") {\n return this.serializePrimitive(obj, \"double\");\n } else if (Buffer.isBuffer(obj)) {\n return this.serializePrimitive(obj, \"bytes\");\n } else if (typeof obj === \"boolean\") {\n return this.serializePrimitive(obj, \"bool\");\n } else if (Long.isLong(obj)) {\n return this.serializePrimitive(obj, \"int64\");\n }\n }\n if (obj.constructor && typeof obj.constructor.encode === \"function\" && obj.constructor.$type) {\n return Any.create({\n // I have *no* idea why it's type_url and not typeUrl, but it is.\n type_url: \"type.googleapis.com/\" + AnySupport.fullNameOf(obj.constructor.$type),\n value: obj.constructor.encode(obj).finish()\n });\n } else if (fallbackToJson && typeof obj === \"object\") {\n let type = obj.type;\n if (type === undefined) {\n if (requireJsonType) {\n throw new Error(util.format(\"Fallback to JSON serialization supported, but object does not define a type property: %o\", obj));\n } else {\n type = \"object\";\n }\n }\n return Any.create({\n type_url: CloudStateJson + type,\n value: this.serializePrimitiveValue(stableJsonStringify(obj), \"string\")\n });\n } else {\n throw new Error(util.format(\"Object %o is not a protobuf object, and hence can't be dynamically \" +\n \"serialized. Try passing the object to the protobuf classes create function.\", obj));\n }\n }" ]
[ "0.527866", "0.52612406", "0.51951283", "0.518796", "0.51302594", "0.5044646", "0.48934332", "0.4857401", "0.484017", "0.48302925", "0.482028", "0.4812441", "0.4808473", "0.47852293", "0.47828078", "0.47574478", "0.47493434", "0.4739314", "0.47239366", "0.4703992", "0.4703992", "0.46990207", "0.4690639", "0.46904448", "0.46862254", "0.46716532", "0.46667543", "0.46522382", "0.46354175", "0.46053663", "0.46017453", "0.45926702", "0.45891586", "0.45877746", "0.458541", "0.45851982", "0.45847243", "0.4584686", "0.458378", "0.45767823", "0.45753202", "0.45753202", "0.45753202", "0.45713404", "0.45637134", "0.45637134", "0.4557141", "0.4557141", "0.4557141", "0.45494914", "0.45366898", "0.45342454", "0.4533338", "0.45322663", "0.45229813", "0.452288", "0.452288", "0.45159692", "0.45102093", "0.45099118", "0.45062032", "0.4506134", "0.45033473", "0.4502599", "0.44998378", "0.4497197", "0.44843012", "0.44764578", "0.44738895", "0.44715428", "0.44715428", "0.4471341", "0.44594073", "0.44552016", "0.44538808", "0.44522536", "0.44464657", "0.44464657", "0.4443469", "0.4443427", "0.44433454", "0.4437557", "0.4436382", "0.4430658", "0.4429719", "0.4428169", "0.44260293", "0.4420813", "0.44155774", "0.44130567", "0.4406073", "0.4401904", "0.44010627", "0.43994573", "0.43948644", "0.43847254", "0.43847254", "0.43830302", "0.43830302", "0.43830302", "0.4381413" ]
0.0
-1
TODO add the mesh getter setter to an Abstract Base Class
get() { return this.mesh; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n this.mesh = null;\n }", "get meshComponents() {\n this.__collectMeshComponents();\n return this.__meshComponents;\n }", "function MeshBase()\n{\n\tthis.indicesLength;\n\t\n\tthis.vertexBufferObject;\n\tthis.normalBufferObject;\n\tthis.tangentBufferObject;\n\tthis.texCoordBufferObject;\n\tthis.indexBufferObject;\n}", "get requiredElementType() { return Mesh }", "constructor() {\n // create geometry\n const geometry = new T.BoxGeometry()\n\n // build mesh\n const mesh = new T.Mesh(geometry, material().ref)\n\n // add mesh shadows\n mesh.castShadow = false\n mesh.receiveShadow = true\n\n // store mesh\n this.mesh = mesh\n }", "get meshes(): Array<M_Mesh>{\n return this._meshes;\n }", "_createMesh() {\n var element = this._element;\n var w = element.calculatedWidth;\n var h = element.calculatedHeight;\n\n var r = this._rect;\n\n // Note that when creating a typed array, it's initialized to zeros.\n // Allocate memory for 4 vertices, 8 floats per vertex, 4 bytes per float.\n var vertexData = new ArrayBuffer(4 * 8 * 4);\n var vertexDataF32 = new Float32Array(vertexData);\n\n // Vertex layout is: PX, PY, PZ, NX, NY, NZ, U, V\n // Since the memory is zeroed, we will only set non-zero elements\n\n // POS: 0, 0, 0\n vertexDataF32[5] = 1; // NZ\n vertexDataF32[6] = r.x; // U\n vertexDataF32[7] = r.y; // V\n\n // POS: w, 0, 0\n vertexDataF32[8] = w; // PX\n vertexDataF32[13] = 1; // NZ\n vertexDataF32[14] = r.x + r.z; // U\n vertexDataF32[15] = r.y; // V\n\n // POS: w, h, 0\n vertexDataF32[16] = w; // PX\n vertexDataF32[17] = h; // PY\n vertexDataF32[21] = 1; // NZ\n vertexDataF32[22] = r.x + r.z; // U\n vertexDataF32[23] = r.y + r.w; // V\n\n // POS: 0, h, 0\n vertexDataF32[25] = h; // PY\n vertexDataF32[29] = 1; // NZ\n vertexDataF32[30] = r.x; // U\n vertexDataF32[31] = r.y + r.w; // V\n\n var vertexDesc = [\n { semantic: SEMANTIC_POSITION, components: 3, type: TYPE_FLOAT32 },\n { semantic: SEMANTIC_NORMAL, components: 3, type: TYPE_FLOAT32 },\n { semantic: SEMANTIC_TEXCOORD0, components: 2, type: TYPE_FLOAT32 }\n ];\n\n var device = this._system.app.graphicsDevice;\n var vertexFormat = new VertexFormat(device, vertexDesc);\n var vertexBuffer = new VertexBuffer(device, vertexFormat, 4, BUFFER_STATIC, vertexData);\n\n var mesh = new Mesh(device);\n mesh.vertexBuffer = vertexBuffer;\n mesh.primitive[0].type = PRIMITIVE_TRIFAN;\n mesh.primitive[0].base = 0;\n mesh.primitive[0].count = 4;\n mesh.primitive[0].indexed = false;\n mesh.aabb.setMinMax(Vec3.ZERO, new Vec3(w, h, 0));\n\n this._updateMesh(mesh);\n\n return mesh;\n }", "function fbx_mesh()\n{\n\tthis.id;\n\tthis.model_id;\n\tthis.vertices = new Array();\n\tthis.polygons = new Array();\n\tthis.uvs = new Array();\n\tthis.color = new v4(1.0,1.0,1.0,1.0);\n\tthis.locTrans = new v3(0,0,0);\n\tthis.locRot = new v3(0,0,0);\n\tthis.locScale = new v3(1,1,1);\n\tthis.vertexPosBuffer;\n\tthis.vertexColBuffer;\n\tthis.vertexNormBuffer;\n\tthis.vertexUVBuffer;\n\tthis.material;\n}", "mesh(ID)\n\t{\n\t\t//We don't require ID as an argument, because this method might be called simply to get its structure\n\t\tconst materials ={\n\t\t\tbasic :new THREE.MeshBasicMaterial ({color: 0xfffff, wireframe: true }),//color.r/g/b, wireframe,\n\t\t\tphong :new THREE.MeshPhongMaterial ( ),//color.r/g/b\n\t\t\tstandard:new THREE.MeshStandardMaterial( ),\n\t\t}\n\t\tlet geometry='box'\n\t\tlet material='basic'\n\t\tlet texture='default'\n\t\tlet parent='scene'\n\t\tlet mesh=new THREE.Mesh(geometries[geometry], materials[material])\n\t\tscene.add(mesh)\n\t\tconst item= {\n\t\t\t//NEW STYLE: Should only be able to get directories; not values. It's Unidirectional now.\n\t\t\t//Convention: The name of the function is the name of the threeObject, which is always put in item (for some hackability-->faster dev time but more messy)\n\t\t\tget ID(){return ID},\n\t\t\ttransform:attributes.transform(mesh),\n\t\t\tget material(){return{\n\t\t\t\tget mode(){return material},\n\t\t\t\tset mode(mode){material=mode;mesh.material=materials[mode]},\n\t\t\t\tmodes:materials,\n\t\t\t}},\n\t\t\tget texture(){return texture},\n\t\t\tset texture(value)\n\t\t\t{\n\t\t\t\ttexture=value;\n\t\t\t\tconst map=textures[texture]||textures.default\n\t\t\t\tfor(const material of Object.values(materials))\n\t\t\t\t{\n\t\t\t\t\tmaterial.map=map\n\t\t\t\t}\n\t\t\t},\n\t\t\tget geometry(){return geometry},\n\t\t\tset geometry(value)\n\t\t\t{\n\t\t\t\tif(value in geometries)\n\t\t\t\t\tmesh.geometry=geometries[geometry=value]\n\t\t\t\telse\n\t\t\t\t\tconsole.error('ERROR setting geometry: '+JSON.stringify(value)+' is not in geometries. ')\n\t\t\t},\n\t\t\tget threeObject() {return mesh },\n\t\t\tset parent(itemID)\n\t\t\t{\n\t\t\t\tif(parent===itemID)return\n\t\t\t\tconst item=items[itemID]\n\t\t\t\tif(item===undefined)\n\t\t\t\t\tconsole.error(repr(itemID),'is not a valid parent! (Failed to set parent of '+repr(ID)+')')\n\t\t\t\telse\n\t\t\t\t\tmesh.parent=item.threeObject//MAKE SOME ASSERTIONS HERE\n\t\t\t\tparent=itemID//Even if we did error, we're going to pretend we succedded to we don't spam the console (it would try setting that parent again and agian every frame otherwise)\n\t\t\t},\n\t\t\tget parent ( ){return parent },\n\t\t\tset visible (x){ mesh.visible =Boolean(x)},\n\t\t\tget visible ( ){return mesh.visible },\n\t\t\tset castShadow (x){ mesh.castShadow =x},\n\t\t\tget castShadow ( ){return mesh.castShadow },\n\t\t\tset receiveShadow(x){ mesh.receiveShadow=x},\n\t\t\tget receiveShadow( ){return mesh.receiveShadow },\n\t\t}\n\t\tmesh.userData.item=item//This is to let click events access this item's ID, which have to originate in the threeObject\n\t\treturn item\n\t}", "constructor (scene, params, meta) {\n /** HEDRON TIP **\n Must define a \"root\" property as a THREE.Group or THREE.Object3D\n Hedron looks for this and will add it to the scene.\n **/\n this.root = new THREE.Group()\n\n /** HEDRON TIP **\n It's good practice to not manipulate the root object\n so we create another group and add it to the root.\n This isn't required and the name isn't important.\n **/\n this.group = new THREE.Group()\n this.root.add(this.group)\n\n // Empty array to be populated with meshes\n this.meshes = []\n\n // Defining a single material for all the polyhedra\n const mat = new THREE.MeshBasicMaterial(\n { wireframe: true, color: 0xffffff }\n )\n const size = 1\n\n // Array geometries (the platonic solids!)\n const geoms = [\n new THREE.IcosahedronGeometry(size),\n new THREE.BoxGeometry(size, size, size),\n new THREE.OctahedronGeometry(size),\n new THREE.TetrahedronGeometry(size),\n new THREE.DodecahedronGeometry(size),\n ]\n\n // Loop through meshes\n geoms.forEach(geom => {\n // Create a mesh for each solid\n const mesh = new THREE.Mesh(geom, mat)\n // Add to array\n this.meshes.push(mesh)\n // Add to scene\n this.group.add(mesh)\n })\n\n // Update the shape based on params\n this._updateShape(params.meshIndex)\n }", "setMesh() {\n\n this.addSphere();\n }", "getThreeFace(){return this.faceMesh;}", "get meshNameInput() {\n return this._meshName;\n }", "function Mesh(gameObject) {\n Component.call(this, gameObject);\n this.bounds = BoundingBox.Create([0,0,0], [1,1,1]);\n }", "static get originalMeshes() {\n return this.__originalMeshes;\n }", "constructor() {\r\n super(\"positions\", \"normals\"); // Name the values we'll define per each vertex. They'll have positions and normals.\r\n\r\n // First, specify the vertex positions -- just a bunch of points that exist at the corners of an imaginary cube.\r\n this.positions.push(...Vec.cast(\r\n [-1, -1, -1], [1, -1, -1], [-1, -1, 1], [1, -1, 1], [1, 1, -1], [-1, 1, -1], [1, 1, 1], [-1, 1, 1],\r\n [-1, -1, -1], [-1, -1, 1], [-1, 1, -1], [-1, 1, 1], [1, -1, 1], [1, -1, -1], [1, 1, 1], [1, 1, -1],\r\n [-1, -1, 1], [1, -1, 1], [-1, 1, 1], [1, 1, 1], [1, -1, -1], [-1, -1, -1], [1, 1, -1], [-1, 1, -1]));\r\n // Supply vectors that point away from eace face of the cube. They should match up with the points in the above list\r\n // Normal vectors are needed so the graphics engine can know if the shape is pointed at light or not, and color it accordingly.\r\n this.normals.push(...Vec.cast(\r\n [0, -1, 0], [0, -1, 0], [0, -1, 0], [0, -1, 0], [0, 1, 0], [0, 1, 0], [0, 1, 0], [0, 1, 0],\r\n [-1, 0, 0], [-1, 0, 0], [-1, 0, 0], [-1, 0, 0], [1, 0, 0], [1, 0, 0], [1, 0, 0], [1, 0, 0],\r\n [0, 0, 1], [0, 0, 1], [0, 0, 1], [0, 0, 1], [0, 0, -1], [0, 0, -1], [0, 0, -1], [0, 0, -1]));\r\n\r\n // Those two lists, positions and normals, fully describe the \"vertices\". What's the \"i\"th vertex? Simply the combined\r\n // data you get if you look up index \"i\" of both lists above -- a position and a normal vector, together. Now let's\r\n // tell it how to connect vertex entries into triangles. Every three indices in this list makes one triangle:\r\n this.indices.push(0, 1, 2, 1, 3, 2, 4, 5, 6, 5, 7, 6, 8, 9, 10, 9, 11, 10, 12, 13, 14, 13, 15, 14, 16, 17, 18, 17, 19, \r\n 18, 20, 21, 22, 21, 23, 22);\r\n // It stinks to manage arrays this big. Later we'll show code that generates these same cube vertices more automatically.\r\n }", "function Mesh(name, shader = \"Unlit\"){\n this.Buffer = {\"position\":null,\n \"normal\":null,\n \"uv\":null,\n \"Index\":null};\n this.Textures = {};\n this.instances = [];\n this.numinstances = 0;\n this.tag = name;\n this.transform = new Transform();\n this.Shader = shader;\n this.initialized = false;\n}", "makeMesh() {\n // @TODO\n\n this.meshGeom = new THREE.Mesh( new THREE.Geometry(), METABALLMATERIAL);//LAMBERT_GREEN);\n this.meshGeom.dynamic = true;\n this.scene.add(this.meshGeom);\n }", "function PolyMesh() {\n this.vertices = [];\n this.edges = [];\n this.faces = [];\n this.components = [];\n this.needsDisplayUpdate = true;\n this.needsIndexDisplayUpdate = true;\n this.vertexBuffer = null;\n this.normalBuffer = null;\n this.indexBuffer = null;\n this.colorBuffer = null;\n this.drawer = null;\n \n /////////////////////////////////////////////////////////////\n //// ADD/REMOVE METHODS /////\n ///////////////////////////////////////////////////////////// \n \n this.addVertex = function(P, color) {\n vertex = new MeshVertex(P, this.vertices.length);\n vertex.color = (typeof color !== 'undefined' ? color : null);\n this.vertices.push(vertex);\n return vertex;\n }\n \n //Create an edge between v1 and v2 and return it\n //This function assumes v1 and v2 are valid vertices in the mesh\n this.addEdge = function(v1, v2) {\n edge = new MeshEdge(v1, v2, this.edges.length);\n this.edges.push(edge);\n v1.edges.push(edge);\n v2.edges.push(edge);\n return edge;\n }\n \n //Given a list of pointers to mesh vertices in CCW order\n //create a face object from them\n this.addFace = function(meshVerts) {\n var vertsPos = Array(meshVerts.length);\n for (var i = 0; i < vertsPos.length; i++) {\n vertsPos[i] = meshVerts[i].pos;\n }\n if (!arePlanar(vertsPos)) {\n console.log(\"Error (PolyMesh.addFace): Trying to add mesh face that is not planar\\n\")\n for (var i = 0; i < vertsPos.length; i++) {\n console.log(vecStr(vertsPos[i]) + \", \");\n }\n return null;\n }\n if (!are2DConvex(vertsPos)) {\n console.log(\"Error (PolyMesh.addFace): Trying to add mesh face that is not convex\\n\");\n for (var i = 0; i < vertsPos.length; i++) {\n console.log(vecStr(vertsPos[i]) + \", \");\n }\n return null;\n }\n var face = new MeshFace(this.faces.length);\n face.startV = meshVerts[0];\n for (var i = 0; i < meshVerts.length; i++) {\n var v1 = meshVerts[i];\n var v2 = meshVerts[(i+1)%meshVerts.length];\n var edge = getEdgeInCommon(v1, v2);\n if (edge === null) {\n edge = this.addEdge(v1, v2);\n }\n face.edges.push(edge);\n edge.addFace(face, v1); //Add pointer to face from edge\n }\n this.faces.push(face);\n return face;\n }\n \n //Remove the face from the list of faces and remove the pointers\n //from all edges to this face\n this.removeFace = function(face) {\n //Swap the face to remove with the last face (O(1) removal)\n this.faces[face.ID] = this.faces[this.faces.length-1];\n this.faces[face.ID].ID = face.ID //Update ID of swapped face\n face.ID = -1;\n this.faces.pop();\n //Remove pointers from all of the face's edges\n for (var i = 0; i < faces.edges.length; i++) {\n edge.removeFace(faces[i]);\n }\n }\n \n //Remove this edge from the list of edges and remove \n //references to the edge from both of its vertices\n //(NOTE: This function is not responsible for cleaning up\n //faces that may have used this edge; that is up to the client)\n this.removeEdge = function(edge) {\n //Swap the edge to remove with the last edge\n this.edges[edge.ID] = this.edges[this.edges.length-1];\n this.edges[edge.ID].ID = edge.ID; //Update ID of swapped face\n edge.ID = -1;\n this.edges.pop();\n //Remove pointers from the two vertices that make up this edge\n var i = edge.v1.edges.indexOf(edge);\n edge.v1.edges[i] = edge.v1.edges[edge.v1.edges.length-1];\n edge.v1.edges.pop();\n i = edge.v2.edges.indexOf(edge);\n edge.v2.edges[i] = edge.v2.edges[edge.v2.edges.length-1];\n edge.v2.edges.pop();\n }\n \n //Remove this vertex from the list of vertices\n //NOTE: This function is not responsible for cleaning up any of\n //the edges or faces that may have used this vertex\n this.removeVertex = function(vertex) {\n this.vertices[vertex.ID] = this.vertices[this.vertices.length-1];\n this.vertices[vertex.ID].ID = vertex.ID;\n vertex.ID = -1;\n this.vertices.pop();\n }\n \n //Make a clone of this mesh in memory\n this.Clone = function() {\n newMesh = new PolyMesh();\n for (var i = 0; i < this.vertices.length; i++) {\n newMesh.addVertex(this.vertices[i].pos, this.vertices[i].color);\n }\n for (var i = 0; i < this.faces.length; i++) {\n vertices = this.faces[i].getVertices();\n for (var j = 0; j < vertices.length; j++) {\n vertices[j] = newMesh.vertices[vertices[j].ID];\n }\n newMesh.addFace(vertices);\n }\n return newMesh;\n }\n \n \n /////////////////////////////////////////////////////////////\n //// GEOMETRY METHODS /////\n /////////////////////////////////////////////////////////////\n\n //Transformations are simple because geometry information is only\n //stored in the vertices\n this.Transform = function(matrix) {\n for (var i = 0; i < this.vertices.length; i++) {\n vec3.transformMat4(this.vertices[i].pos, this.vertices[i].pos, matrix);\n }\n this.needsDisplayUpdate = true;\n this.needsIndexDisplayUpdate = true;\n }\n \n this.Translate = function(dV) {\n for (var i = 0; i < this.vertices.length; i++) {\n vec3.add(this.vertices[i].pos, this.vertices[i].pos, dV);\n }\n this.needsDisplayUpdate = true;\n this.needsIndexDisplayUpdate = true;\n }\n \n this.Scale = function(dx, dy, dz) {\n for (var i = 0; i < this.vertices.length; i++) {\n this.vertices[i].pos[0] *= dx;\n this.vertices[i].pos[1] *= dy;\n this.vertices[i].pos[2] *= dz;\n }\n }\n\n this.getCentroid = function() {\n center = vec3.fromValues();\n for (var i = 0; i < this.vertices.length; i++) {\n vec3.add(center, center, vertices[i].pos);\n }\n vec3.scale(center, center, 1.0/this.vertices.length);\n return center;\n }\n \n this.getBBox = function() {\n if (this.vertices.length == 0) {\n return AABox3D(0, 0, 0, 0, 0, 0);\n }\n var P0 = this.vertices[0].pos;\n var bbox = new AABox3D(P0[0], P0[0], P0[1], P0[1], P0[2], P0[2]);\n for (var i = 0; i < this.vertices.length; i++) {\n bbox.addPoint(this.vertices[i].pos);\n }\n return bbox;\n } \n \n /////////////////////////////////////////////////////////////\n //// LAPLACIAN MESH METHODS /////\n /////////////////////////////////////////////////////////////\n function LaplaceBeltramiWeightFunc(v1, v2, v3, v4) {\n var w = 0.0;\n if (!(v3 === null)) {\n w = w + getCotangent(v1.pos, v2.pos, v3.pos);\n }\n if (!(v4 === null)) {\n w = w + getCotangent(v1.pos, v2.pos, v4.pos);\n }\n //TODO: Fix area scaling\n //return (3.0/(2.0*v1.getOneRingArea()))*w;\n return w;\n }\n \n function UmbrellaWeightFunc(v1, v2, v3, v4) {\n //Very simple function that returns just 1 for the umbrella weights\n return 1;\n }\n \n //Helper function for Laplacian mesh that figures out the vertex on the \n //other side of an edge on a triangle\n function getVertexAcross(v1, v2, f) {\n var Vs = f.getVertices();\n if (Vs.length != 3) {\n console.log(\"Warning(getLaplacianSparseMatrix): Expecting 3 vertices per face\");\n return null;\n }\n var idx = 0;\n if ( (v1.ID != Vs[1].ID) && (v2.ID != Vs[1].ID) ) {\n idx = 1;\n }\n else if ( (v1.ID != Vs[2].ID) && (v2.ID != Vs[2].ID) ) {\n idx = 2;\n }\n return Vs[idx];\n }\n \n //Note: This function assumes a triangle mesh \n this.getLaplacianSparseMatrix = function(weightFunction) {\n var N = this.vertices.length;\n var cols = Array(N); //Store index of row for each element in each column\n var colsv = Array(N); //Store value of each element in each column\n for (var i = 0; i < N; i++) {\n cols[i] = [];\n colsv[i] = [];\n }\n //Loop through all vertices and add a row for each\n for (var i = 0; i < N; i++) {\n var v1 = this.vertices[i];\n //Precompute 1-ring area\n //var oneRingArea = this.vertices[i].getOneRingArea();\n for (var ei = 0; ei < v1.edges.length; ei++) {\n var e = v1.edges[ei];\n var v2 = e.vertexAcross(v1);\n var j = v2.ID;\n var v3 = null;\n var v4 = null;\n if (!(e.f1 === null)) {\n v3 = getVertexAcross(v1, v2, e.f1);\n }\n if (!(e.f2 === null)) {\n v4 = getVertexAcross(v1, v2, e.f2);\n }\n var wij = weightFunction(v1, v2, v3, v4);\n totalWeight += wij;\n cols[j].push(i);\n colsv[j].push(-wij);\n }\n cols[i].push(i);\n colsv[i].push(totalWeight)\n }\n //TODO: Parallel sort cols, colsv by the indices in cols, then setup\n //NumericJS sparse matrix\n }\n \n /////////////////////////////////////////////////////////////\n //// INPUT/OUTPUT METHODS /////\n /////////////////////////////////////////////////////////////\n this.loadFile = function(filename) {\n var textdata = \"\";\n $.ajax({\n async: false,\n url: filename,\n success: function (data) {\n textdata = data;\n },\n dataType: 'text'\n });\n this.loadFileFromLines(textdata.split(\"\\n\"));\n }\n \n this.loadFileFromLines = function(lines) {\n if (lines.length == 0) {\n return;\n }\n var fields = lines[0].match(/\\S+/g);\n if (fields[0].toUpperCase() == \"OFF\" || fields[0].toUpperCase() == \"COFF\") {\n this.loadOffFile(lines);\n }\n else {\n console.log(\"Unsupported file type \" + fields[0] + \" for loading mesh\");\n }\n this.needsDisplayUpdate = true;\n this.needsIndexDisplayUpdate = true;\n } \n \n this.loadOffFile = function(lines) {\n this.vertices = [];\n this.edges = [];\n this.faces = [];\n this.components = [];\n var nVertices = 0;\n var nFaces = 0;\n var nEdges = 0;\n var face = 0;\n var vertex = 0;\n var divideColor = false;\n var fieldNum = 0;\n for (var line = 0; line < lines.length; line++) {\n //http://blog.tompawlak.org/split-string-into-tokens-javascript\n var fields = lines[line].match(/\\S+/g);\n if (fields === null) { //Blank line\n continue;\n }\n if (fields[0].length == 0) {\n continue;\n }\n if (fields[0][0] == \"#\" || fields[0][0] == \"\\0\" || fields[0][0] == \" \") {\n continue;\n }\n //Reading header\n if (nVertices == 0) {\n if (fields[0] == \"OFF\" || fields[0] == \"COFF\") {\n if (fields.length > 2) {\n nVertices = parseInt(fields[1]);\n nFaces = parseInt(fields[2]);\n nEdges = parseInt(fields[3]);\n }\n }\n else {\n if (fields.length >= 3) {\n nVertices = parseInt(fields[0]);\n nFaces = parseInt(fields[1]);\n nEdges = parseInt(fields[2]); \n }\n else if (nVertices == 0) {\n console.log(\"Error parsing OFF file: Not enough fields for nVertices, nFaces, nEdges\");\n }\n }\n }\n //Reading vertices\n else if (vertex < nVertices) {\n if (fields.length < 3) {\n console.log(\"Error parsing OFF File: Too few fields on a vertex line\");\n continue;\n }\n P = vec3.fromValues(parseFloat(fields[0]), parseFloat(fields[1]), parseFloat(fields[2]));\n color = null;\n if (fields.length >= 6) {\n //There is color information\n var color;\n if (divideColor) {\n color = vec3.fromValues(parseFloat(fields[3])/255.0, parseFloat(fields[4])/255.0, parseFloat(fields[5])/255.0);\n }\n else {\n color = vec3.fromValues(parseFloat(fields[3]), parseFloat(fields[4]), parseFloat(fields[5]));\n }\n }\n this.addVertex(P, color);\n vertex++;\n }\n //Reading faces\n else if (face < nFaces) {\n if (fields.length == 0) {\n continue;\n }\n //Assume the vertices are specified in CCW order\n var NVertices = parseInt(fields[0]);\n if (fields.length < NVertices+1) {\n console.log(\"Error parsing OFF File: Not enough vertex indices specified for a face of length \" + NVertices);\n }\n var verts = Array(NVertices);\n for (var i = 0; i < NVertices; i++) {\n verts[i] = this.vertices[parseInt(fields[i+1])];\n }\n this.addFace(verts);\n face++;\n }\n }\n for (var i = 0; i < this.vertices.length; i++) {\n if (!(this.vertices[i].color === null)) {\n if (this.vertices[i].color[0] > 1) {\n //Rescale colors\n for (var k = 0; k < this.vertices.length; k++) {\n vec3.scale(this.vertices[i].color, this.vertices[i].color, 1.0/255.0);\n }\n break;\n }\n }\n }\n console.log(\"Succesfully loaded OFF File with \" + this.vertices.length + \" vertices and \" + this.faces.length + \" faces\");\n }\n \n \n /////////////////////////////////////////////////////////////\n //// RENDERING /////\n ///////////////////////////////////////////////////////////// \n \n //Copy over vertex and triangle information to the GPU\n this.updateBuffers = function(gl) {\n //Check to see if buffers need to be initialized\n if (this.vertexBuffer === null) {\n this.vertexBuffer = gl.createBuffer();\n //console.log(\"New vertex buffer: \" + this.vertexBuffer);\n }\n if (this.normalBuffer === null) {\n this.normalBuffer = gl.createBuffer();\n //console.log(\"New normal buffer: \" + this.normalBuffer);\n }\n if (this.indexBuffer === null) {\n this.indexBuffer = gl.createBuffer();\n //console.log(\"New index buffer: \" + this.indexBuffer);\n }\n if (this.colorBuffer === null) {\n this.colorBuffer = gl.createBuffer();\n //console.log(\"New color buffer: \" + this.colorBuffer);\n }\n //Vertex Buffer\n var V = new Float32Array(this.vertices.length*3);\n for (var i = 0; i < this.vertices.length; i++) {\n V[i*3] = this.vertices[i].pos[0];\n V[i*3+1] = this.vertices[i].pos[1];\n V[i*3+2] = this.vertices[i].pos[2];\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, V, gl.STATIC_DRAW);\n this.vertexBuffer.itemSize = 3;\n this.vertexBuffer.numItems = this.vertices.length;\n \n //Normal buffer\n //TODO: NaNs in normals\n var N = new Float32Array(this.vertices.length*3);\n for (var i = 0; i < this.vertices.length; i++) {\n var n = this.vertices[i].getNormal();\n N[i*3] = n[0];\n N[i*3+1] = n[1];\n N[i*3+2] = n[2];\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, this.normalBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, N, gl.STATIC_DRAW);\n this.normalBuffer.itemSize = 3;\n this.normalBuffer.numItems = this.vertices.length;\n \n //Color buffer\n var C = new Float32Array(this.vertices.length*3);\n for (var i = 0; i < this.vertices.length; i++) {\n if (!(this.vertices[i].color === null)) {\n C[i*3] = this.vertices[i].color[0];\n C[i*3+1] = this.vertices[i].color[1];\n C[i*3+2] = this.vertices[i].color[2];\n }\n else {\n //Default color is greenish gray\n C[i*3] = 0.5;\n C[i*3+1] = 0.55;\n C[i*3+2] = 0.5;\n } \n }\n gl.bindBuffer(gl.ARRAY_BUFFER, this.colorBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, C, gl.STATIC_DRAW);\n this.colorBuffer.itemSize = 3;\n this.colorBuffer.numItems = this.vertices.length;\n \n //Index Buffer\n //First figure out how many triangles need to be used\n var NumTris = 0;\n for (var i = 0; i < this.faces.length; i++) {\n NumTris += this.faces[i].edges.length - 2;\n }\n var I = new Uint16Array(NumTris*3);\n var i = 0;\n var faceIdx = 0;\n //Now copy over the triangle indices\n while (i < NumTris) {\n var verts = this.faces[faceIdx].getVertices();\n for (var t = 0; t < verts.length - 2; t++) {\n I[i*3] = verts[0].ID;\n I[i*3+1] = verts[t+1].ID;\n I[i*3+2] = verts[t+2].ID;\n i++;\n }\n faceIdx++;\n }\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indexBuffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, I, gl.STATIC_DRAW);\n this.indexBuffer.itemSize = 1;\n this.indexBuffer.numItems = 3*NumTris;\n }\n \n //Draw the surface normals as a bunch of blue line segments\n //PMatrix: The projection matrix\n //mvMatrix: The modelview matrix\n //This assumes the upper left 3x3 matrix of the modelview matrix is orthogonal,\n //which it will be if mvMatrix is describing the camera\n this.drawNormals = function(gl, shaders, pMatrix, mvMatrix) {\n if (this.needsDisplayUpdate) {\n //Figure out scale of normals; make 1/20th of the bounding box diagonal\n var dR = 0.05*this.getBBox().getDiagLength();\n for (var i = 0; i < this.vertices.length; i++) {\n var P1 = this.vertices[i].pos;\n var P2 = this.vertices[i].getNormal();\n vec3.scaleAndAdd(P2, P1, P2, dR);\n this.drawer.drawLine(P1, P2, [0.0, 0.0, 1.0]); \n }\n }\n this.drawer.repaint(pMatrix, mvMatrix);\n }\n\n //Draw the surface edges as a bunch of blue line segments\n //PMatrix: The projection matrix\n //mvMatrix: The modelview matrix\n this.drawEdges = function(gl, shaders, pMatrix, mvMatrix) {\n if (this.needsDisplayUpdate) {\n for (var i = 0; i < this.edges.length; i++) {\n var P1 = this.edges[i].v1.pos;\n var P2 = this.edges[i].v2.pos;\n this.drawer.drawLine(P1, P2, [0.0, 0.0, 1.0]); \n }\n }\n this.drawer.repaint(pMatrix, mvMatrix);\n }\n\n\n //Draw the surface points as a red scatterplot\n //PMatrix: The projection matrix\n //mvMatrix: The modelview matrix\n this.drawPoints = function(gl, shaders, pMatrix, mvMatrix) {\n if (this.needsDisplayUpdate) {\n for (var i = 0; i < this.vertices.length; i++) {\n this.drawer.drawPoint(this.vertices[i].pos, [1.0, 0.0, 0.0]); \n }\n }\n this.drawer.repaint(pMatrix, mvMatrix);\n }\n \n //shaders: Shader programs, pMatrix: Perspective projection matrix, mvMatrix: Modelview matrix\n //ambientColor, light1Pos, light2Pos, lightColor are all vec3s\n //drawNormals: Whether or not to draw blue line segments for the vertex normals\n //shaderType: The type of shading to use\n FLAT_SHADING = 0;\n COLOR_SHADING = 1;\n this.render = function(gl, shaders, pMatrix, mvMatrix, ambientColor, light1Pos, light2Pos, lightColor, doDrawNormals, doDrawEdges, doDrawPoints, shaderType) {\n /*console.log(\"this.vertexBuffer = \" + this.vertexBuffer);\n console.log(\"this.normalBuffer = \" + this.normalBuffer);\n console.log(\"this.indexBuffer = \" + this.indexBuffer);\n console.log(\"this.colorBuffer = \" + this.colorBuffer);*/\n if (this.vertices.length == 0) {\n return;\n }\n if (this.needsDisplayUpdate) {\n this.updateBuffers(gl);\n }\n if (this.vertexBuffer === null) {\n console.log(\"Warning: Trying to render when buffers have not been initialized\");\n return;\n }\n \n //Figure out which shader to use\n var sProg; \n if (shaderType == FLAT_SHADING) {\n sProg = shaders.flatColorShader;\n }\n else if (shaderType == COLOR_SHADING) {\n sProg = shaders.colorShader;\n }\n else {\n console.log(\"ERROR: Incorrect shader specified for mesh rendering\");\n return;\n }\n gl.useProgram(sProg);\n \n //Step 1: Bind all buffers\n //Vertex position buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);\n gl.vertexAttribPointer(sProg.vPosAttrib, this.vertexBuffer.itemSize, gl.FLOAT, false, 0, 0);\n if (shaderType == COLOR_SHADING) {\n //Normal buffer (only relevant if lighting)\n gl.bindBuffer(gl.ARRAY_BUFFER, this.normalBuffer);\n gl.vertexAttribPointer(sProg.vNormalAttrib, this.normalBuffer.itemSize, gl.FLOAT, false, 0, 0);\n //Color buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, this.colorBuffer);\n gl.vertexAttribPointer(sProg.vColorAttrib, this.colorBuffer.itemSize, gl.FLOAT, false, 0, 0);\n }\n //Index buffer\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indexBuffer);\n \n //Step 2: Scale, translate, and rotate the mesh appropriately on top of whatever \n //world transformation has already been passed along in mvMatrix, by sending over\n //the matrices to the GPU as uniforms. Also send over lighting variables as uniforms\n gl.uniformMatrix4fv(sProg.pMatrixUniform, false, pMatrix);\n gl.uniformMatrix4fv(sProg.mvMatrixUniform, false, mvMatrix);\n \n if (shaderType == COLOR_SHADING) {\n //Compute normal transformation matrix from world modelview matrix\n //(transpose of inverse of upper 3x3 part)\n nMatrix = mat3.create();\n mat3.normalFromMat4(nMatrix, mvMatrix);\n gl.uniformMatrix3fv(sProg.nMatrixUniform, false, nMatrix);\n \n gl.uniform3fv(sProg.ambientColorUniform, ambientColor);\n gl.uniform3fv(sProg.light1PosUniform, light1Pos);\n gl.uniform3fv(sProg.light2PosUniform, light2Pos);\n gl.uniform3fv(sProg.lightColorUniform, lightColor);\n }\n else if (shaderType == FLAT_SHADING) {\n gl.uniform4fv(sProg.vColorUniform, vec4.fromValues(1, 0.5, 0.5, 1));\n }\n \n //Step 3: Render the mesh\n gl.drawElements(gl.TRIANGLES, this.indexBuffer.numItems, gl.UNSIGNED_SHORT, 0);\n \n //Step 4: Draw lines and points for vertices, edges, and normals if requested\n if (this.needsDisplayUpdate) {\n if (this.drawer === null) {\n this.drawer = new SimpleDrawer(gl, shaders);\n }\n this.drawer.reset();\n }\n if (doDrawNormals) {\n this.drawNormals(gl, shaders, pMatrix, mvMatrix);\n }\n if (doDrawEdges) {\n this.drawEdges(gl, shaders, pMatrix, mvMatrix);\n }\n if (doDrawPoints) {\n this.drawPoints(gl, shaders, pMatrix, mvMatrix);\n }\n \n if (this.needsDisplayUpdate) {\n //By the time rendering is done, there should not be a need to update\n //the display unless this flag is changed again externally\n this.needsDisplayUpdate = false;\n }\n }\n}", "update() {\n\n this.mesh.position.copy(this.body.position);\n this.mesh.quaternion.copy(this.body.quaternion);\n\n }", "function base() {\n\t\tvar geo = new THREE.CubeGeometry( 11, 0.5, 11 );\n\t\tvar mat = new THREE.MeshBasicMaterial(\n\t\t\t\t\t\t{ \tcolor: 0x000000, \n\t\t\t\t\t\t\tside: THREE.FrontSide } );\n\t\tvar base = new THREE.Mesh( geo, mat );\n\t\tbase.position.y -= 0.26;\n\t\n\t\treturn base;\n\t}", "makeModel () {\n const y = -0.3\n const segment = this.size / this.lod;\n for (let i = -this.lod / 2; i < this.lod / 2; i++) {\n for (let j = -this.lod / 2; j < this.lod / 2; j++) {\n this.mesh = this.mesh.concat([\n segment * i, y, segment * j,\n segment * (i + 1), y, segment * j,\n segment * i, y, segment * (j + 1),\n segment * (i + 1), y, segment * j,\n segment * i, y, segment * (j + 1),\n segment * (i + 1), y, segment * (j + 1),\n ]);\n }\n }\n\n for (let i = 0; i < this.lod * this.lod * 6; i++) {\n this.normals = this.normals.concat([ 0.0, 1.0, 0.0 ]);\n }\n\n for (let i = 0; i < this.lod * this.lod; i++) {\n this.textureCoordinates = this.normals.concat([\n 0.0, 1.0,\n 0.0, 0.0,\n 1.0, 1.0,\n 1.0, 0.0,\n 0.0, 0.0,\n 1.0, 1.0,\n ])\n }\n\t}", "function Geometry(id, scene, vertexData, updatable, mesh) {\n if (updatable === void 0) { updatable = false; }\n if (mesh === void 0) { mesh = null; }\n /**\n * Gets the delay loading state of the geometry (none by default which means not delayed)\n */\n this.delayLoadState = 0;\n this._totalVertices = 0;\n this._isDisposed = false;\n this._indexBufferIsUpdatable = false;\n this._positionsCache = [];\n /**\n * If set to true (false by defaut), the bounding info applied to the meshes sharing this geometry will be the bounding info defined at the class level\n * and won't be computed based on the vertex positions (which is what we get when useBoundingInfoFromGeometry = false)\n */\n this.useBoundingInfoFromGeometry = false;\n this.id = id;\n this.uniqueId = scene.getUniqueId();\n this._engine = scene.getEngine();\n this._meshes = [];\n this._scene = scene;\n //Init vertex buffer cache\n this._vertexBuffers = {};\n this._indices = [];\n this._updatable = updatable;\n // vertexData\n if (vertexData) {\n this.setAllVerticesData(vertexData, updatable);\n }\n else {\n this._totalVertices = 0;\n this._indices = [];\n }\n if (this._engine.getCaps().vertexArrayObject) {\n this._vertexArrayObjects = {};\n }\n // applyToMesh\n if (mesh) {\n this.applyToMesh(mesh);\n mesh.computeWorldMatrix(true);\n }\n }", "setUpMeshes() {\nvar i, len, mesh, ref;\nref = this.meshes;\nfor (i = 0, len = ref.length; i < len; i++) {\nmesh = ref[i];\n//---------------\nmesh.prepareSkeleton(this.skeleton);\n}\nreturn void 0; // void result\n}", "constructor() {\n\n\t\tsuper({\n\n\t\t\ttype: \"MeshTriplanarPhysicalMaterial\",\n\n\t\t\tdefines: { PHYSICAL: \"\" },\n\n\t\t\tuniforms: {\n\n\t\t\t\tmapY: new Uniform(null),\n\t\t\t\tmapZ: new Uniform(null),\n\n\t\t\t\tnormalMapY: new Uniform(null),\n\t\t\t\tnormalMapZ: new Uniform(null)\n\n\t\t\t},\n\n\t\t\tfragmentShader: fragment,\n\t\t\tvertexShader: vertex,\n\n\t\t\tlights: true,\n\t\t\tfog: true\n\n\t\t});\n\n\t\t// Clone uniforms to avoid conflicts with built-in materials.\n\t\tconst source = ShaderLib.physical.uniforms;\n\t\tconst target = this.uniforms;\n\n\t\tObject.keys(source).forEach(function(key) {\n\n\t\t\tconst value = source[key].value;\n\t\t\tconst uniform = new Uniform(value);\n\n\t\t\tObject.defineProperty(target, key, {\n\n\t\t\t\tvalue: (value === null) ? uniform : uniform.clone()\n\n\t\t\t});\n\n\t\t});\n\n\t\t/**\n\t\t * An environment map.\n\t\t *\n\t\t * @type {Texture}\n\t\t */\n\n\t\tthis.envMap = null;\n\n\t}", "constructor(scene) {\n this.scene = scene;\n\n let geo = new T.SphereBufferGeometry(.5, 30, 30);\n let mat = new T.MeshStandardMaterial({color: \"blue\"});\n \n // let botLeft = [];\n // for (let i = 0; i < 10; i++) {\n // let mesh = new T.Mesh(geo,mat);\n // scene.add(mesh);\n // }\n //split objects into 4 quadrants\n\n // build ground\n let groundGeo = new T.PlaneBufferGeometry(30,30);\n let groundMat = new T.MeshStandardMaterial( {color: \"red\"});\n this.ground = new T.Mesh(groundGeo, groundMat);\n this.ground.receiveShadow = true;\n this.ground.rotateX(2*Math.PI - Math.PI / 2);\n scene.add(this.ground);\n this.worldSize = 15;\n\n // build objects\n this.objects = [];\n let mesh1 = new T.Mesh(geo, mat);\n mesh1.position.x = -10;\n mesh1.position.y = .5;\n mesh1.position.z = -10;\n this.objects.push(mesh1);\n\n let mesh2 = new T.Mesh(geo, mat);\n mesh2.position.x = -5;\n mesh2.position.y = .5;\n mesh2.position.z = 8;\n this.objects.push(mesh2);\n\n let mesh3 = new T.Mesh(geo, mat);\n mesh3.position.x = -8;\n mesh3.position.y = .5;\n mesh3.position.z = -8;\n this.objects.push(mesh3);\n\n let mesh4 = new T.Mesh(geo, mat);\n mesh4.position.x = -12;\n mesh4.position.y = .5;\n mesh4.position.z = -5;\n this.objects.push(mesh4);\n\n let defGeo = new T.ConeBufferGeometry(1,1,50);\n let defMat = new T.MeshStandardMaterial({color: \"yellow\"});\n\n this.defenders = [];\n this.def2 = new T.Mesh(defGeo, defMat); // the following defender\n this.def2.position.x = 0;\n this.def2.position.z = -15;\n this.def2.position.y = .5;\n //this.scene.add(this.def2);\n this.defenders.push(this.def2);\n\n for (let i = 0; i < this.defenders.length; i++) {\n this.scene.add(this.defenders[i]);\n }\n\n for (let i = 0; i < this.objects.length; i++) {\n this.scene.add(this.objects[i]);\n }\n }", "Mesh(geometry, material, option) {\n\n let mesh, isMesh = false, type = null;\n\n option = option || {};\n option.mass = option.mass || 0;\n option.position = option.position || [0, 0, 0];\n option.quat = option.quat || [0, 0, 0, 1];\n option.scale = option.scale || [1, 1, 1];\n\n\n if (geometry.type == 'Mesh') {\n\n isMesh = true;\n type = geometry.geometry.type;\n } else type = geometry.type;\n\n if (option.type == 'terrain') type = option.type;\n\n switch(type) {\n\n case \"PlaneBufferGeometry\":\n geometry.rotateX(-Math.PI / 2);\n mesh = new THREE.Mesh(geometry, material);\n mesh.position.fromArray(option.position);\n mesh.quaternion.fromArray(option.quat);\n //mesh.scale.fromArray(option.scale);\n option.type = 'Plane';\n this.send('add', option);\n break;\n\n case \"SphereBufferGeometry\":\n mesh = new THREE.Mesh(geometry, material);\n mesh.position.fromArray(option.position);\n mesh.quaternion.fromArray(option.quat);\n mesh.scale.fromArray(option.scale);\n option.type = 'Sphere';\n option.radius = geometry.parameters.radius;\n this.send('add', option);\n break;\n\n case \"BoxBufferGeometry\":\n mesh = new THREE.Mesh(geometry, material);\n mesh.position.fromArray(option.position);\n mesh.quaternion.fromArray(option.quat);\n mesh.scale.fromArray(option.scale);\n option.type = 'Box';\n option.size = [geometry.parameters.width, geometry.parameters.height, geometry.parameters.depth];\n this.send('add', option);\n break;\n\n case \"CylinderBufferGeometry\":\n mesh = new THREE.Mesh(geometry, material);\n mesh.position.fromArray(option.position);\n mesh.quaternion.fromArray(option.quat);\n mesh.scale.fromArray(option.scale);\n option.type = 'Cylinder';\n option.size = [geometry.parameters.height];\n option.radius = geometry.parameters.radiusTop;\n this.send('add', option);\n break;\n\n case \"ConeBufferGeometry\":\n mesh = new THREE.Mesh(geometry, material);\n mesh.position.fromArray(option.position);\n mesh.quaternion.fromArray(option.quat);\n mesh.scale.fromArray(option.scale);\n option.type = 'Cone';\n option.size = [geometry.parameters.height];\n option.radius = geometry.parameters.radius;\n this.send('add', option);\n break;\n\n case \"BufferGeometry\":\n if (isMesh) {\n\n mesh = geometry;\n geometry.position.fromArray(option.position);\n geometry.quaternion.fromArray(option.quat);\n geometry.scale.fromArray(option.scale);\n option.type = 'ThriMesh';\n //option.v = GeometryInfo(geometry.geometry);\n option.v = geometry.geometry.getAttribute('position').array;\n option.index = geometry.geometry.getIndex();\n }\n this.send('add', option);\n break;\n \n case \"terrain\":\n if (isMesh) {\n\n option.max = 0;\n option.min = 0;\n mesh = geometry;\n geometry.position.fromArray(option.position);\n geometry.quaternion.fromArray(option.quat);\n geometry.scale.fromArray(option.scale);\n option.heightData = [];\n\n for (let i = 0; i < geometry.geometry.attributes.position.count; i++) {\n\n if (option.max < geometry.geometry.attributes.position.array[i * 3 + 1]) option.max = geometry.geometry.attributes.position.array[i * 3 + 1];\n if (option.min > geometry.geometry.attributes.position.array[i * 3 + 1]) option.min = geometry.geometry.attributes.position.array[i * 3 + 1];\n option.heightData.push(geometry.geometry.attributes.position.array[i * 3 + 1]);\n }\n\n this.send('add', option);\n }\n break;\n }\n\n if (option.mass) _RigidBody.add(mesh, option);\n\n return mesh;\n }", "constructor(geometry){\n\t\tthis.geometry = geometry;\n\t\t//console.log(JSON.stringify(this.geometry.positions));\n\t\t//Subtract 1 to eliminate imaginary last edge\n\t\tthis.n = geometry.mesh.vertices.length-1;\n\t\tthis.step_count = 0;\n\t\tconsole.log(\"Size\");\n\t\tconsole.log(this.n);\n\t}", "static get_mesh( m_name, json, bin, mat, m_names=null ){\n\t\t\tlet m = this.load_mesh( json, bin, mat, m_names, false );\n\t\t\tm.name = m_name;\n\t\t\treturn App.$( m );\n\t\t}", "worldFaces() {\n return this.baseMesh.geometry.faces;\n }", "__activeMesh(material) {}", "function Object_3DClass(){ \n this._geometry = new THREE.BoxGeometry( 1, 1, 1 );\n this._material = new THREE.MeshBasicMaterial( { color: 0xff00ff } );\n this._mesh = new THREE.Mesh( this._geometry, this._material );\n}", "function Figure () {\n\t\n\tthis.center = new Vector();\n\tthis.dimensions;\n\tthis.vertices = [];\n\tthis.segments = [];\n\tthis.faces = [];\n\n\tthis.scale;\n\tthis.activeAxis = 0;\n\tthis.rotations;\n\tthis.vCount;\n\tthis.posArray;\n\tthis.slide;\n\tthis.input;\n\tthis.devicePixRatio;\n\n\tthis.offsets;\n\tthis.sizes;\n\tthis.rotationAxis;\n\tthis.globalOffset;\n\n\tthis.resize;\n\t\n\tthis.makeMeAMesh = function makeMeAMesh () {\n\t\t\n\t\tthis.faceGeometry = new THREE.InstancedBufferGeometry();\n\t\tthis.lineGeometry = new THREE.InstancedBufferGeometry();\n\t\tthis.pointGeometry = new THREE.InstancedBufferGeometry();\n\t\t\n\t\tvar empty = Math.pow( 2, this.dimensions ) * 3;\n\t\tthis.posArray = [];\n\t\tthis.vCount = this.vertices.length;\n\t\tvar positionFluff = new Float32Array( this.vCount * 3 );\n\t\tthis.axisCount = ( this.dimensions * this.dimensions - this.dimensions ) / 2;\n\t\tthis.resize = false;\n\t//\tthis.totalInstances = this.rendersPerSlide * this.axisCount + 1;\n\n\n\t\t///////////// NON-INSTANCED ATTRIBUTES ///////////////////\n\n\t\tfor ( var pIndex = 0; pIndex < this.dimensions; pIndex++ ) {\n\t\t\tthis.posArray[ pIndex ] = new Float32Array( this.vCount /** this.dimensions*/ );\n\t\t}\n\t\tfor ( var i = 0; i < this.vCount; i++ ) {\n\t\t\tpositionFluff[ i * 3 + 0 ] = this.vertices[ i ].getAxis( 0 );\n\t\t\tpositionFluff[ i * 3 + 1 ] = this.vertices[ i ].getAxis( 1 );\n\t\t\tpositionFluff[ i * 3 + 2 ] = this.vertices[ i ].getAxis( 2 );\n\t\t\tfor ( var dim = 0; dim < this.dimensions; dim++ ) {\n\t\t\t\tthis.posArray[ dim ][ i ] = this.vertices[ i ].getAxis( dim );\n\t\t\t}\n\t\t}\n\t//\talert(positionFluff + \" length: \" + positionFluff.length);\n\t//\talert(this.posArray[ 0 ] + \" length: \" + this.posArray[0].length);\n\t\tpositionFluff = new THREE.BufferAttribute( positionFluff, 1 );\n\t\tthis.addAttributeToAll( 'position', positionFluff );\n\n\t\t//this.faceGeometry.addAttribute( 'normal', positionFluff, 3 ) );\n\t\t//this.faceGeometry.computeVertexNormals(); \n\n\t\tfor ( var att = 1; att <= this.dimensions; att++ ) {\n\t\t\tvar current = new THREE.BufferAttribute( this.posArray[ att - 1 ], 1 );\n\t\t\tthis.addAttributeToAll( ('pos' + att), current );\n\t\t}\n\t\t\n\t\tvar faceIndices = [];\n\t\tfor ( var faceIndex = 0; faceIndex < this.faces.length; faceIndex++ ) {\n\t\t\tfor ( var triangle = 0; triangle <\n\t\t\t this.faces[ faceIndex ].pieces.length; triangle++ ) {\n\t\t\t\tfaceIndices.push( this.faces[ faceIndex ].pieces[ triangle ].a );\n\t\t\t\tfaceIndices.push( this.faces[ faceIndex ].pieces[ triangle ].b );\n\t\t\t\tfaceIndices.push( this.faces[ faceIndex ].pieces[ triangle ].c );\n\t\t\t}\n\t\t}\n\t\tthis.faceGeometry.setIndex( \n\t\t\tnew THREE.BufferAttribute( new Uint16Array( faceIndices ), 1 ) );\n\n\t\tvar segIndices = [];\n\t\tfor ( var segIndex = 0; segIndex < this.segments.length; segIndex++ ) {\n\t\t\tsegIndices.push( this.segments[ segIndex ].a );\n\t\t\tsegIndices.push( this.segments[ segIndex ].b );\n\t\t}\n\t\tthis.lineGeometry.setIndex( \n\t\t\tnew THREE.BufferAttribute( new Uint16Array( segIndices ), 1 ) );\n\n\t\tvar vertIndices = new Uint16Array( this.vCount );\n\t\tfor ( var vertIndex = 0; vertIndex < this.vCount; vertIndex++ ) {\n\t\t\tvertIndices[ vertIndex ] = vertIndex;\n\t\t}\n\t\tthis.pointGeometry.setIndex( new THREE.BufferAttribute( vertIndices, 1 ) );\n\n\n\t\t\t////////////////// INSTANCED ATTRIBUTES ////////////\n\n\t\tthis.slide = new Slider( this.dimensions, this.winWidth, this.winHeight, this );\n\t\tthis.input = new Input( this.axisCount );\n\n\t\tthis.offsets = new THREE.InstancedBufferAttribute( \n\t\t\tnew Float32Array( this.slide.totalInstances * 3 ), 3, 1 ).setDynamic( true );\n\t\t\n\t\tthis.sizes = new Float32Array( this.slide.totalInstances );\n\t\tthis.rotationAxis = new Float32Array( this.slide.totalInstances );\n\t\tthis.globalOffset = new Float32Array( this.slide.totalInstances );\n\t//\talert(rotationAxis);\n\n\t\tthis.addAttributeToAll( 'offset', this.offsets );\n\n\t\tthis.sizes = new THREE.InstancedBufferAttribute( this.sizes, 1, 1 );\n\t\tthis.addAttributeToAll( 'size', this.sizes );\n\n\t\tthis.rotationAxis = new \n\t\t\tTHREE.InstancedBufferAttribute( this.rotationAxis, 1, 1 );\n\t\tthis.addAttributeToAll( 'rotAxis', this.rotationAxis );\n\n\t\tthis.globalOffset = new \n\t\tTHREE.InstancedBufferAttribute( this.globalOffset, 1, 1 );\n\t\tthis.addAttributeToAll( 'gOff', this.globalOffset );\n\n\t\tthis.updateInstances();\n\n\n\t\t////////////// PREPARE UNIFORMS ///////////////\n\n\t\tthis.scale = new Float32Array( this.dimensions );\n\t\tfor ( var a = 0; a < this.dimensions; a++ ) {\n\t\t\tthis.scale[a] = 0.0;\n\t\t}\n\n\t\tthis.rotations = new Float32Array( this.axisCount );\n\t\tfor ( var axis = 0; axis < this.axisCount; axis++ ) {\n\t\t\tthis.rotations[ axis ] = 0.0;\n\t\t}\n\t\t\n\t//\tvar cOffset = new THREE.Vector3( this.center.getAxis( 0 ), \n\t//\t\tthis.center.getAxis( 1 ), this.center.getAxis( 2 ) );\n\t\t\n\t\tvar tMap = THREE.ImageUtils.loadTexture( 'Images/point.png' );\n\t//\tvar loader = new THREE.TextureLoader();\n\t//\tloader.load( 'Images/Point.png',\n\t//\t\t\t\t\tfunction ( texure ) {\n\t//\t\t\t\t\t\ttMap = texure;\n\t//\t\t\t\t\t}, \n\t//\t\t\t\t\tfunction ( xhr ) {\n\t//\t\t\t\t\t\tconsole.log( (xhr.loaded / xhr.total * 100) + '% loaded' );\n\t//\t\t\t\t\t},\n\t//\t\t\t\t\t// Function called when download errors\n\t//\t\t\t\t\tfunction ( xhr ) {\n\t//\t\t\t\t\t\tconsole.log( 'An error happened' );\n\t//\t} );\n\t\t\n\t\tthis.uniforms = {\n\t\t\t\ttime: { type: 'f', value: 0.0 },\n\t\t\t\tnPlaneDistance: { type: 'f', value: 4.5 },\n\t\t\t\tslideWidth: { type: 'f', value: this.slide.axisSpacing },\n\t\t\t\tverticalSpace: { type: 'f', value: this.slide.verticalSpacing },\n\t\t\t\tslideHeight: { type: 'f', value: this.slide.sliderHeight },\n\t\t\t\tslideCenter: { type: 'f', value: this.slide.sliderVCenter },\n\t\t\t\trotMultiplier: { type: 'f', value: this.slide.rotMultiplier },\n\t\t\t//\trotationAxis: { type: 'i', value: -1 },\n\t\t\t//\toffset: { type: 'v3', value: cOffset },\n\t\t\t\tscale: { type: 'fv1', value: this.scale },\n\t\t\t\trotations: { type: 'fv1', value: this.rotations },\n\t\t\t\ttexture: { type: 't', value: tMap }\n\t\t};\n\t//\tthis.uniforms.scale.value[ 0 ] = 0.01;\n\t\t\n\t\t///////// CREATE MATERIALS ///////////\n\n\t\tvar sSource = new ShaderSource( this.dimensions, this.axisCount );\n\n\t\tvar faceMaterial = new THREE.RawShaderMaterial( {\n\t\t\tuniforms: this.uniforms,\n\t\t\tvertexShader: sSource.vertexAttrib(),\n\t\t\tfragmentShader: sSource.cubeFragFaces(),\n\t\t\tside: THREE.DoubleSide,\n\t\t\tdepthWrite: false,\n\t\t\tdepthTest: true,\n\t\t//\tblending: THREE.MultiplyBlending,\n\t\t\ttransparent: true\n\t\t} );\n\n\t\tvar lineMaterial = new THREE.RawShaderMaterial( {\n\t\t\tuniforms: this.uniforms,\n\t\t\tvertexShader: sSource.vertexAttrib(),\n\t\t\tfragmentShader: sSource.cubeFragEdges(),\n\t\t\twireframe: false,\n\t\t\tlinewidth: 5,\n\t\t\tblending: THREE.AlphaMultiplyBlending,\n\t\t\t//side: THREE.DoubleSide,\n\t\t\t//depthWrite: false,\n\t\t\tdepthTest: true,\n\t\t\ttransparent: true\n\t\t} );\n\n\t\tvar pointMaterial = new THREE.RawShaderMaterial( {\n\t\t\tuniforms: this.uniforms,\n\t\t\tvertexShader: sSource.vertexAttrib(),\n\t\t\tfragmentShader: sSource.cubeFragPoints(),\n\t\t\tdepthWrite: true,\n\t\t\tdepthTest: false,\n\t\t//\tblending: THREE.AlphaBlending,\n\t\t\ttransparent: true\n\t\t} );\n\t\t//var pointMaterial = new THREE.PointsMaterial( { size: 0.2, color: 0x00ff00} )\n \n\n\t\t//////// LUMP INTO SINGLE Object ////////////\n\n\t\tvar fM = new THREE.Mesh( this.faceGeometry, faceMaterial );\n\t\tvar lM = new THREE.LineSegments( this.lineGeometry, lineMaterial );\n\t\tvar pM = new THREE.Points( this.pointGeometry, pointMaterial );\n\t\tpM.renderOrder = 1;\n\t\tlM.renderOrder = 2;\n\t\tfM.renderOrder = 3;\n\t\tpM.add( lM );\n\t\tpM.add( fM );\n\t//\talert(Object.getOwnPropertyNames(pM.material));\n\t\treturn pM;\n\t}\n\n\tthis.addAttributeToAll = function addAttributeToAll ( name, attribute ) {\n\t\tthis.faceGeometry.addAttribute( name, attribute );\n\t\tthis.lineGeometry.addAttribute( name, attribute );\n\t\tthis.pointGeometry.addAttribute( name, attribute );\n\t}\n\n\tthis.updateFrame = function() {\n\t\t\n\t\tif ( this.scale[ this.activeAxis ] < 1.0 ) {\n\t\t\tthis.scale[ this.activeAxis ] += 0.00015;\n\t\t\tthis.scale[ this.activeAxis ] *= 1.016;\n\t\t} else if ( this.activeAxis < this.dimensions ) {\n\t\t\tthis.activeAxis++;\n\t\t}\n\t\t\n\t\tif ( this.resize ) {\n\t\t\tthis.updateInstances();\n\t\t\tthis.resize = false;\n\t\t}\n\t\tthis.updateRotation( this.input.getR() );\n\t\tthis.slide.damp();\n\t\tthis.updateRotation( this.slide.spinSpeed );\n\t\tvar tempRot = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0];\n\t\tif ( this.activeAxis > 1 ) {\n\t\t\ttempRot[0] = 0.003;\n\t\t\tif ( this.activeAxis > 2 ) {\n\t\t\t\ttempRot[1] = 0.003;\n\t\t\t\ttempRot[3] = 0.003;\n\t\t\t\tif ( this.activeAxis > 3 ) {\n\t\t\t\t\ttempRot[2] = 0.003;\n\t\t\t\t\ttempRot[4] = 0.003;\n\t\t\t\t\ttempRot[5] = 0.003;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t\tthis.updateRotation( tempRot );\n\t//\tthis.updateRotation( [ 0.003, 0.003, 0.003, 0.003, 0.003, 0.003 ] );\n\t}\n\n\tthis.updateInstances = function updateInstances() {\n\t//\talert(\"Get ready cause here we goooo!\");\n\t\tthis.winWidth = this.window.innerWidth;//screen.width;\n\t\tthis.winHeight = this.window.innerHeight;//screen.height;\n\t\tthis.slide = new Slider( this.dimensions, this.winWidth, this.winHeight, this );\t\t\n\t\t/// LARGE CUBE ATTRIBUTES ///\n\t\tthis.offsets.setXYZ( 0, 0.0, 0.0, -0.0);\n\t\tthis.sizes.setX( 0, this.slide.mainCubeSize );\n\t\tthis.rotationAxis.setX( 0, -1.0 );\n\t\tthis.globalOffset.setX( 0, this.slide.mainCubeVCenter );\n\n\t\t/// SMALL CUBE ATTRIBUTES ///\n\t\tvar instanceIndex;\n\t\tfor ( var column = 1; column <= this.axisCount; column++ ) {\n\t\t\tfor ( var row = 0; row < this.slide.rendersPerSlide; row++ ) {\n\t\t\t\tinstanceIndex = \n\t\t\t\t\tcolumn * this.slide.rendersPerSlide + \n\t\t\t\t\trow - this.slide.rendersPerSlide + 1;\n\t\t\t\tthis.offsets.setXYZ( instanceIndex, \n\t\t\t\t\tthis.slide.axisSpacing * ( column - (2.0/3.0) * this.axisCount ) +\n\t\t\t\t\t0.5 * this.slide.axisSpacing * ( ( this.axisCount - 1 ) % 2 ),\n\t\t\t\t\tthis.slide.verticalSpacing * \n\t\t\t\t\t( row - Math.floor( 0.5 * this.slide.rendersPerSlide ) ), -0.0 );\n\t\t\t\tthis.sizes.setX( instanceIndex, this.slide.sliderCubeSize );\n\t\t\t\tthis.rotationAxis.setX( instanceIndex, column - 1 );\n\t\t\t\tthis.globalOffset.setX( instanceIndex, this.slide.sliderVCenter );\n\t\t\t}\n\t\t}\n\t\t/*\n\t\tvar attribs = this.mesh.geometry.attributes;\n\t\tattribs[ 'offset' ].needsUpdate = true;\n\t\tattribs[ 'size' ].needsUpdate = true;\n\t\tattribs[ 'rotAxis' ].needsUpdate = true;\n\t\tattribs[ 'gOff' ].needsUpdate = true;\n\t\t*/\n\t\tthis.offsets.needsUpdate = true;\n\t\tthis.sizes.needsUpdate = true;\n\t\tthis.rotationAxis.needsUpdate = true;\n\t\tthis.globalOffset.needsUpdate = true;\n\n\t}\t\n\n\tthis.updateRotation = function updateRotation ( vals ) {\n\t\tvar temp;\n\t\tfor ( var axisColumn = 0; axisColumn < this.axisCount; axisColumn++ ) {\n\t\t\ttemp = this.rotations[ axisColumn ] + vals[ axisColumn ];\n\t\t\tthis.rotations[ axisColumn ] = temp % this.slide.verticalSpacing;\n\t\t} \n\t\tvar r = 0;\n\t\tfor ( var a = 0; a < this.dimensions - 1; a++ ) {\n\t\t\tfor ( var b = a + 1; b < this.dimensions; b++ ) {\n\t\t\t\tif ( vals[ r ] !== 0 ) {\n\t\t\t\t\tthis.rotate( vals[ r ] * this.slide.rotMultiplier, a, b );\n\t\t\t\t}\n\t\t\t\tr++;\n\t\t\t}\n\t\t}\n\t//\talert(this.mesh.geometry.attributes.array)\n\n\t\tfor ( var axisUpdate = 1; axisUpdate <= this.dimensions; axisUpdate++ ) {\n\t\t\tthis.mesh.geometry.attributes[ ( 'pos' + axisUpdate ) ].needsUpdate = true;\n\t\t}\n\n\t}\n\n\tthis.rotate = function rotate ( amount, a, b ) {\n\n\t\tvar sin = Math.sin( amount );\n\t\tvar cos = Math.cos( amount );\n\n\t\tvar oldA;\n\t\tvar oldB;\n\t\tfor (var v = 0; v < this.vCount; v++ ) {\n\t\t\toldA = this.posArray[ a ][ v ];\n\t\t\toldB = this.posArray[ b ][ v ];\n\t\t\tthis.posArray[ a ][ v ] = oldA * cos - oldB * sin;\n\t\t\tthis.posArray[ b ][ v ] = oldA * sin + oldB * cos;\n\t\t}\n\n\t}\n\n}", "function Geometry() {\n\n\t\tObject.defineProperty( this, 'id', { value: geometryId += 2 } );\n\n\t\tthis.uuid = _Math.generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'Geometry';\n\n\t\tthis.vertices = [];\n\t\tthis.colors = [];\n\t\tthis.faces = [];\n\t\tthis.faceVertexUvs = [[]];\n\n\t\tthis.morphTargets = [];\n\t\tthis.morphNormals = [];\n\n\t\tthis.skinWeights = [];\n\t\tthis.skinIndices = [];\n\n\t\tthis.lineDistances = [];\n\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\t// update flags\n\n\t\tthis.elementsNeedUpdate = false;\n\t\tthis.verticesNeedUpdate = false;\n\t\tthis.uvsNeedUpdate = false;\n\t\tthis.normalsNeedUpdate = false;\n\t\tthis.colorsNeedUpdate = false;\n\t\tthis.lineDistancesNeedUpdate = false;\n\t\tthis.groupsNeedUpdate = false;\n\n\t}", "function Geometry() {\n\n\t\tObject.defineProperty( this, 'id', { value: geometryId += 2 } );\n\n\t\tthis.uuid = _Math.generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'Geometry';\n\n\t\tthis.vertices = [];\n\t\tthis.colors = [];\n\t\tthis.faces = [];\n\t\tthis.faceVertexUvs = [[]];\n\n\t\tthis.morphTargets = [];\n\t\tthis.morphNormals = [];\n\n\t\tthis.skinWeights = [];\n\t\tthis.skinIndices = [];\n\n\t\tthis.lineDistances = [];\n\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\t// update flags\n\n\t\tthis.elementsNeedUpdate = false;\n\t\tthis.verticesNeedUpdate = false;\n\t\tthis.uvsNeedUpdate = false;\n\t\tthis.normalsNeedUpdate = false;\n\t\tthis.colorsNeedUpdate = false;\n\t\tthis.lineDistancesNeedUpdate = false;\n\t\tthis.groupsNeedUpdate = false;\n\n\t}", "function Geometry() {\n\n\t\tObject.defineProperty( this, 'id', { value: geometryId += 2 } );\n\n\t\tthis.uuid = _Math.generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'Geometry';\n\n\t\tthis.vertices = [];\n\t\tthis.colors = [];\n\t\tthis.faces = [];\n\t\tthis.faceVertexUvs = [[]];\n\n\t\tthis.morphTargets = [];\n\t\tthis.morphNormals = [];\n\n\t\tthis.skinWeights = [];\n\t\tthis.skinIndices = [];\n\n\t\tthis.lineDistances = [];\n\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\t// update flags\n\n\t\tthis.elementsNeedUpdate = false;\n\t\tthis.verticesNeedUpdate = false;\n\t\tthis.uvsNeedUpdate = false;\n\t\tthis.normalsNeedUpdate = false;\n\t\tthis.colorsNeedUpdate = false;\n\t\tthis.lineDistancesNeedUpdate = false;\n\t\tthis.groupsNeedUpdate = false;\n\n\t}", "extractAmmoShapeFromMesh(mesh, scale) {\r\n function traverseModel(mesh, modelVertices=[]) {\r\n if (mesh.type === \"SkinnedMesh\" || mesh.type === \"Mesh\" || mesh.type === \"InstancedMesh\") {\r\n let bufferGeometry = mesh.geometry;\r\n let attr = bufferGeometry.attributes;\r\n let position = attr.position;\r\n let tmpVertices = Array.from(position.array);\r\n //modelVertices = modelVertices.concat(tmpVertices);\r\n modelVertices.push(...tmpVertices);\r\n }\r\n mesh.children.forEach((child, ndx) => {\r\n traverseModel(child, modelVertices);\r\n });\r\n return modelVertices;\r\n }\r\n\r\n if (!scale)\r\n scale = {x:1, y:1, z: 1};\r\n\r\n let vertices = traverseModel(mesh); // Fungerer kun sammen med BufferGeometry!!\r\n let ammoMesh = new Ammo.btTriangleMesh();\r\n for (let i = 0; i < vertices.length; i += 9)\r\n {\r\n let v1_x = vertices[i];\r\n let v1_y = vertices[i+1];\r\n let v1_z = vertices[i+2];\r\n\r\n let v2_x = vertices[i+3];\r\n let v2_y = vertices[i+4];\r\n let v2_z = vertices[i+5];\r\n\r\n let v3_x = vertices[i+6];\r\n let v3_y = vertices[i+7];\r\n let v3_z = vertices[i+8];\r\n\r\n let bv1 = new Ammo.btVector3(v1_x, v1_y, v1_z);\r\n let bv2 = new Ammo.btVector3(v2_x, v2_y, v2_z);\r\n let bv3 = new Ammo.btVector3(v3_x, v3_y, v3_z);\r\n\r\n ammoMesh.addTriangle(bv1, bv2, bv3);\r\n }\r\n let triangleShape = new Ammo.btBvhTriangleMeshShape(ammoMesh, false);\r\n triangleShape.setMargin( 0.01 );\r\n triangleShape.setLocalScaling(new Ammo.btVector3(scale.x, scale.y, scale.z));\r\n return triangleShape;\r\n }", "function Geometry() {\n\n\tObject.defineProperty( this, 'id', { value: geometryId += 2 } );\n\n\tthis.uuid = _Math.generateUUID();\n\n\tthis.name = '';\n\tthis.type = 'Geometry';\n\n\tthis.vertices = [];\n\tthis.colors = [];\n\tthis.faces = [];\n\tthis.faceVertexUvs = [[]];\n\n\tthis.morphTargets = [];\n\tthis.morphNormals = [];\n\n\tthis.skinWeights = [];\n\tthis.skinIndices = [];\n\n\tthis.lineDistances = [];\n\n\tthis.boundingBox = null;\n\tthis.boundingSphere = null;\n\n\t// update flags\n\n\tthis.elementsNeedUpdate = false;\n\tthis.verticesNeedUpdate = false;\n\tthis.uvsNeedUpdate = false;\n\tthis.normalsNeedUpdate = false;\n\tthis.colorsNeedUpdate = false;\n\tthis.lineDistancesNeedUpdate = false;\n\tthis.groupsNeedUpdate = false;\n\n}", "function Geometry() {\n\n\tObject.defineProperty( this, 'id', { value: geometryId += 2 } );\n\n\tthis.uuid = _Math.generateUUID();\n\n\tthis.name = '';\n\tthis.type = 'Geometry';\n\n\tthis.vertices = [];\n\tthis.colors = [];\n\tthis.faces = [];\n\tthis.faceVertexUvs = [[]];\n\n\tthis.morphTargets = [];\n\tthis.morphNormals = [];\n\n\tthis.skinWeights = [];\n\tthis.skinIndices = [];\n\n\tthis.lineDistances = [];\n\n\tthis.boundingBox = null;\n\tthis.boundingSphere = null;\n\n\t// update flags\n\n\tthis.elementsNeedUpdate = false;\n\tthis.verticesNeedUpdate = false;\n\tthis.uvsNeedUpdate = false;\n\tthis.normalsNeedUpdate = false;\n\tthis.colorsNeedUpdate = false;\n\tthis.lineDistancesNeedUpdate = false;\n\tthis.groupsNeedUpdate = false;\n\n}", "function Geometry() {\n\n\tObject.defineProperty( this, 'id', { value: geometryId += 2 } );\n\n\tthis.uuid = _Math.generateUUID();\n\n\tthis.name = '';\n\tthis.type = 'Geometry';\n\n\tthis.vertices = [];\n\tthis.colors = [];\n\tthis.faces = [];\n\tthis.faceVertexUvs = [[]];\n\n\tthis.morphTargets = [];\n\tthis.morphNormals = [];\n\n\tthis.skinWeights = [];\n\tthis.skinIndices = [];\n\n\tthis.lineDistances = [];\n\n\tthis.boundingBox = null;\n\tthis.boundingSphere = null;\n\n\t// update flags\n\n\tthis.elementsNeedUpdate = false;\n\tthis.verticesNeedUpdate = false;\n\tthis.uvsNeedUpdate = false;\n\tthis.normalsNeedUpdate = false;\n\tthis.colorsNeedUpdate = false;\n\tthis.lineDistancesNeedUpdate = false;\n\tthis.groupsNeedUpdate = false;\n\n}", "function Geometry() {\n\n\tObject.defineProperty( this, 'id', { value: geometryId += 2 } );\n\n\tthis.uuid = _Math.generateUUID();\n\n\tthis.name = '';\n\tthis.type = 'Geometry';\n\n\tthis.vertices = [];\n\tthis.colors = [];\n\tthis.faces = [];\n\tthis.faceVertexUvs = [[]];\n\n\tthis.morphTargets = [];\n\tthis.morphNormals = [];\n\n\tthis.skinWeights = [];\n\tthis.skinIndices = [];\n\n\tthis.lineDistances = [];\n\n\tthis.boundingBox = null;\n\tthis.boundingSphere = null;\n\n\t// update flags\n\n\tthis.elementsNeedUpdate = false;\n\tthis.verticesNeedUpdate = false;\n\tthis.uvsNeedUpdate = false;\n\tthis.normalsNeedUpdate = false;\n\tthis.colorsNeedUpdate = false;\n\tthis.lineDistancesNeedUpdate = false;\n\tthis.groupsNeedUpdate = false;\n\n}", "worldVertices() {\n return this.baseMesh.geometry.vertices;\n }", "function MeshBody(mesh, body, options){\n\n\tthis.mesh = mesh;\n\tthis.body = body;\n\tthis.edges = null;\n\n\tconsole.log(this.mesh);\n\t\n\n\tif (options.collidable === undefined ) this.collidable = true;\n\n\tif (options.syncable === undefined ) this.syncable = true;\n\n\tif (options.rayCastable === undefined ) this.rayCastable = true;\n\n\n\t\n\tthis.sync();\n}", "function Mesh() {\n var args = Array.prototype.slice.call(arguments);\n Vector.prototype.constructor.apply(this, args);\n \n /** * *\n * A list of the length of each component of the mesh.\n * For instance, if a mesh's vertices are made up of 3 position,\n * 2 texture mapping and 3 normal components, this list would be [3,2,3].\n * This can be used in determining compatibility of meshes and shaders, and\n * extracting components of specific vertices. By default it doesn't mean much.\n * @type {Array.<number>}\n * * **/\n this.attributeComponentLengths = [1];\n /** * *\n * A list of the names of the attributes of the mesh's vertices.\n * @type {Array.<string>}\n * * **/\n this.attributeComponentNames = [''];\n }", "getGeometryData (geomData) {\n let result = {};\n\n let meshData = geomData.mesh[0];\n let meshSource = meshData.source;\n let vertices = meshData.vertices[0];\n\n if (!meshData.triangles) {\n throw new Error('Only triangles mesh supported');\n }\n\n let triangles = meshData.triangles[0];\n let stride = triangles.input.length;\n\n if (meshData.vertices.length > 1) {\n throw new Error('Multiple mesh.vertices not supported');\n }\n\n let sources = {};\n\n function appendInputSource (input, defaultOffset = 0) {\n for (let i = 0; i < input.length; i++) {\n let inputData = input[i].$;\n let semantic = inputData.semantic;\n\n let offset = inputData.offset;\n if (offset === undefined) {\n offset = defaultOffset;\n }\n\n if (semantic === 'VERTEX') {\n appendInputSource(vertices.input, offset);\n continue;\n };\n\n let source = inputData.source.slice(1); // skip leading #\n if (inputData.set !== undefined) {\n semantic += inputData.set;\n }\n\n sources[semantic] = {\n source: source,\n offset: parseInt(offset)\n };\n }\n }\n\n appendInputSource(triangles.input);\n\n for (let semantic in sources) {\n let source = sources[semantic];\n let arrayID = source.source;\n let offset = source.offset;\n\n result[semantic] = {\n data: this.getGeometryArray(arrayID, meshSource),\n offset: offset\n }\n }\n\n let indices = triangles.p[0].split(\" \");\n for (let i = 0; i < indices.length; i++) {\n indices[i] = parseInt(indices[i]);\n }\n\n result.indices = indices;\n result.stride = stride;\n result.triangleCount = parseInt(triangles.$.count);\n result.renderMode = MODE_TRIANGLES;\n\n return result;\n }", "function Geometry() {\n\n\tObject.defineProperty(this, 'id', { value: geometryId += 2 });\n\n\tthis.uuid = _Math.generateUUID();\n\n\tthis.name = '';\n\tthis.type = 'Geometry';\n\n\tthis.vertices = [];\n\tthis.colors = [];\n\tthis.faces = [];\n\tthis.faceVertexUvs = [[]];\n\n\tthis.morphTargets = [];\n\tthis.morphNormals = [];\n\n\tthis.skinWeights = [];\n\tthis.skinIndices = [];\n\n\tthis.lineDistances = [];\n\n\tthis.boundingBox = null;\n\tthis.boundingSphere = null;\n\n\t// update flags\n\n\tthis.elementsNeedUpdate = false;\n\tthis.verticesNeedUpdate = false;\n\tthis.uvsNeedUpdate = false;\n\tthis.normalsNeedUpdate = false;\n\tthis.colorsNeedUpdate = false;\n\tthis.lineDistancesNeedUpdate = false;\n\tthis.groupsNeedUpdate = false;\n}", "shapeTerrain() {\r\n // MP2: Implement this function!\r\n }", "get meshOwnerInput() {\n return this._meshOwner;\n }", "function Mesh(vertices, material) {\n\n const numVertices = vertices.length;\n\n if (numVertices % 3 !== 0) {\n throw new Error('Mesh requires there to be a multiple of 3 vertices');\n }\n\n Surface.call(this, material);\n\n this._primitives = [];\n\n for (let i = 0; i < numVertices; i += 3) {\n //console.log(i);\n const edgeAB = _subtract(vertices[i + 1], vertices[i]);\n const edgeAC = _subtract(vertices[i + 2], vertices[i]);\n this._primitives.push({\n vertexA: vertices[i],\n vertexB: vertices[i + 1],\n vertexC: vertices[i + 2],\n edgeAB: edgeAB,\n edgeAC: edgeAC,\n normal: _normalise(_crossProduct(edgeAB, edgeAC))\n });\n }\n\n}", "function meshToGeometry(mdata) {\n\n var mesh = mdata.mesh;\n var geometry = createLmvBufferGeometry();\n\n\n geometry.byteSize = 0;\n\n geometry.vb = mesh.vb;\n geometry.vbbuffer = undefined;\n geometry.vbNeedsUpdate = true;\n geometry.byteSize += mesh.vb.byteLength;\n\n geometry.vbstride = mesh.vbstride;\n if (mesh.isLines) /* mesh is SVF lines */\n geometry.isLines = mesh.isLines;\n if (mdata.is2d) /* mesh is from F2D */\n geometry.is2d = true;\n\n geometry.numInstances = mesh.numInstances;\n\n for (var attributeName in mesh.vblayout) {\n var attributeData = mesh.vblayout[attributeName];\n\n //geometry.addAttribute(attributeName, findBufferAttribute(attributeData, geometry.numInstances));\n geometry.attributes[attributeName] = findBufferAttribute(attributeName, attributeData, geometry.numInstances);\n }\n\n //Index buffer setup\n if (!Private_Global.memoryOptimizedLoading) {\n geometry.addAttribute(\"index\", new THREE.BufferAttribute(mesh.indices, 1));\n } else {\n\n geometry.attributes.index = indexAttr;\n geometry.ib = mesh.indices;\n geometry.ibbuffer = undefined;\n }\n\n geometry.attributesKeys = findAttributesKeys(geometry);\n\n geometry.byteSize += mesh.indices.byteLength;\n\n //TODO: Not sure chunking into list of smaller offset/counts\n //is required for LMV data since it's already broken up.\n //if (mesh.indices.length > 65535)\n if (mesh.vb.length / mesh.vbstride > 65535)\n Logger.warn(\"Mesh with >65535 vertices. It will fail to draw.\");\n\n //TODO: This is a transient object that gets freed once the geometry\n //is added to the GeometryList. We can save on the object creation\n //eventually when we do micro optimizations.\n geometry.boundingBox = new THREE.Box3().copy(mesh.boundingBox);\n geometry.boundingSphere = new THREE.Sphere().copy(mesh.boundingSphere);\n\n //MEM\n geometry.drawcalls = null;\n geometry.offsets = null;\n\n mdata.geometry = geometry;\n\n mdata.mesh = null;\n }", "constructor(max_subdivisions) {\n super(\"position\", \"normal\", \"texture_coord\");\n // Start from the following equilateral tetrahedron:\n const tetrahedron = [\n [0, 0, -1],\n [0, 0.9428, 0.3333],\n [-0.8165, -0.4714, 0.3333],\n [0.8165, -0.4714, 0.3333]\n ];\n this.arrays.position = Vec.cast(...tetrahedron);\n // Begin recursion:\n this.subdivide_triangle(0, 1, 2, max_subdivisions);\n this.subdivide_triangle(3, 2, 1, max_subdivisions);\n this.subdivide_triangle(1, 0, 3, max_subdivisions);\n this.subdivide_triangle(0, 2, 3, max_subdivisions);\n\n // With positions calculated, fill in normals and texture_coords of the finished Sphere:\n for (let p of this.arrays.position) {\n // Each point has a normal vector that simply goes to the point from the origin:\n this.arrays.normal.push(p.copy());\n\n // Textures are tricky. A Subdivision sphere has no straight seams to which image\n // edges in UV space can be mapped. The only way to avoid artifacts is to smoothly\n // wrap & unwrap the image in reverse - displaying the texture twice on the sphere.\n // this.arrays.texture_coord.push( Vec.of( Math.asin( p[0]/Math.PI ) + .5, Math.asin( p[1]/Math.PI ) + .5 ) );\n this.arrays.texture_coord.push(\n Vec.of(\n 0.5 - Math.atan2(p[2], p[0]) / (2 * Math.PI),\n 0.5 + Math.asin(p[1]) / Math.PI\n )\n );\n }\n\n // Fix the UV seam by duplicating vertices with offset UV:\n const tex = this.arrays.texture_coord;\n for (let i = 0; i < this.indices.length; i += 3) {\n const a = this.indices[i],\n b = this.indices[i + 1],\n c = this.indices[i + 2];\n if (\n [[a, b], [a, c], [b, c]].some(\n x => Math.abs(tex[x[0]][0] - tex[x[1]][0]) > 0.5\n ) &&\n [a, b, c].some(x => tex[x][0] < 0.5)\n ) {\n for (let q of [[a, i], [b, i + 1], [c, i + 2]]) {\n if (tex[q[0]][0] < 0.5) {\n this.indices[q[1]] = this.arrays.position.length;\n this.arrays.position.push(this.arrays.position[q[0]].copy());\n this.arrays.normal.push(this.arrays.normal[q[0]].copy());\n tex.push(tex[q[0]].plus(Vec.of(1, 0)));\n }\n }\n }\n }\n }", "get Quad() {}", "init() {\n\n // create three.js mesh\n var material = new THREE.MeshPhongMaterial({ color: 0xf0f0f0 });\n this.mesh = new THREE.Mesh(this.createGeometry(this.body.shapes[0]), material);\n \n // add collision callback\n this.body.addEventListener(\"collide\", this.onCollide);\n\n }", "makeObjectGeometry () {\n // A fresh, empty Geometry object that will hold the mesh geometry\n var cylGeom = new THREE.Geometry()\n var normals = []\n\n // The bottom face is set at Y = -1\n cylGeom.vertices.push(new THREE.Vector3(0, -1, 0))\n normals.push(new THREE.Vector3(0, -1, 0))\n\n // Create and push the vertices/normals of the bottom face\n for (let i = this._slices; i > 0; i--) {\n var theta = (i / this._slices) * Math.PI * 2\n cylGeom.vertices.push(new THREE.Vector3(Math.cos(theta), -1, Math.sin(theta)))\n normals.push(new THREE.Vector3(Math.cos(theta), 0, Math.sin(theta)))\n }\n\n // Push the faces for the bottom circle\n for (let i = 1; i <= this._slices; i++) {\n if (i === this._slices) {\n cylGeom.faces.push(new THREE.Face3(1, i, 0, normals[0]))\n } else {\n cylGeom.faces.push(new THREE.Face3(i + 1, i, 0, normals[0]))\n }\n }\n\n // topCircle checks the length of the vertices on the bottom circle\n // Later used to draw faces for the side\n let topCircle = cylGeom.vertices.length\n\n // // The top face is set at Y = 1\n cylGeom.vertices.push(new THREE.Vector3(0, 1, 0))\n normals.push(new THREE.Vector3(0, 1, 0))\n\n // Create and push the vertices/normals of the top face\n for (let i = this._slices; i > 0; i--) {\n theta = (i / this._slices) * Math.PI * 2\n cylGeom.vertices.push(new THREE.Vector3(Math.cos(theta), 1, Math.sin(theta)))\n normals.push(new THREE.Vector3(Math.cos(theta), 0, Math.sin(theta)))\n }\n\n // Push the faces for the top circle\n for (let i = 1; i <= this._slices; i++) {\n if (i === this._slices) {\n cylGeom.faces.push(new THREE.Face3(this._slices + 2, this._slices + 1, i + this._slices + 1, normals[this._slices + 1]))\n } else {\n cylGeom.faces.push(new THREE.Face3(i + this._slices + 2, this._slices + 1, i + this._slices + 1, normals[this._slices + 1]))\n }\n }\n\n // Push the faces for the sides\n // C---D\n // |\\ |\n // | \\ |\n // | \\|\n // A---B\n //\n for (let i = 1; i <= this._slices; i++) {\n let A = i\n let B = A + 1\n let C = topCircle + i\n let D = C + 1\n\n // Alter vertices B and D for the last face of the cylinder\n if (i === this._slices) {\n B = 1\n D = topCircle + 1\n }\n\n cylGeom.faces.push(new THREE.Face3(C, A, B, [normals[C], normals[A], normals[B]]))\n cylGeom.faces.push(new THREE.Face3(C, B, D, [normals[C], normals[B], normals[D]]))\n }\n\n // Return the finished geometry\n return cylGeom\n }", "function Mesh(name, vao) {\n\tvar _name = name;\n\tvar _vao = vao;\n\t\n\tthis.getName = function() {\n\t\treturn _name;\n\t}\n\t\n\tthis.getVAO = function() {\n\t\treturn _vao;\n\t}\n}", "function Model() {\n this._listeners = {\n 'status-change': [],\n 'mode-change': [],\n '2d-scene-change': [],\n '2d-scene-needs-recoloring': [],\n '3d-scene-change': [],\n 'intensities-change': [],\n };\n this._mode = Model.Mode.UNDEFINED;\n this._mesh = null;\n this._spots = null;\n this._mapping = null;\n this._measures = null;\n this._image = null;\n this._activeMeasure = null;\n this._color = new THREE.Color('#001eb2');\n this._backgroundColor = new THREE.Color('black');\n this._colorMap = new JetColorMap();\n this._scale = Model.Scale.LOG;\n this._hotspotQuantile = 0.995;\n this._spotBorder = 0.05;\n\n // 3D scene\n this._scene = new THREE.Scene();\n this._material = new THREE.MeshLambertMaterial({\n vertexColors: THREE.VertexColors,\n transparent: true,\n opacity: 0.9,\n shininess: 3,\n shading: THREE.SmoothShading\n });\n this._light1 = new THREE.PointLight(0xffffff, 1, 0);\n this._light1.position.set(-100, 100, 500);\n this._light2 = new THREE.DirectionalLight(0xffffff, 0.8);\n this._light2.position.set(0, 1, 0);\n this._light3 = new THREE.DirectionalLight(0xffffff, 1);\n this._light3.position.set(0, -1, 0);\n this._scene.add(this._light1);\n this._scene.add(this._light2);\n this._scene.add(this._light3);\n this._scene.add(new THREE.AxisHelper(20));\n\n this._status = '';\n this._tasks = {};\n}", "function Player () {\n \n var self = this;\n \n // Mesh ======================================================================\n\n\tthis.size = new THREE.Vector3( 0.9, 0.9, 1.8 );\n this.position = new THREE.Vector3( 0, 0, 0.45 );\n this.rotation = new THREE.Euler( 0, 0, 0, 'ZYX' );\n \n this.bottomSphereMesh = new THREE.Mesh(\n new THREE.SphereGeometry( 0.45, 32, 32, Math.PI, Math.PI, 0, Math.PI ),\n new THREE.MeshLambertMaterial( { color: 0x166eb6, wireframe: false, wrapAround: true } )\n );\n \n this.cylinderMesh = new THREE.Mesh(\n new THREE.CylinderGeometry( 0.45, 0.45, 0.9, 64, 8, true ),\n new THREE.MeshLambertMaterial( { color: 0x166eb6, wireframe: false, wrapAround: true } )\n );\n this.cylinderMesh.rotation.y = Math.PI / 32;\n this.cylinderMesh.rotation.x = Math.PI / 2;\n this.cylinderMesh.position.z = 0.45;\n \n this.topSphereMesh = new THREE.Mesh(\n new THREE.SphereGeometry( 0.45, 32, 32, 0, Math.PI, 0, Math.PI ),\n new THREE.MeshLambertMaterial( { color: 0x166eb6, wireframe: false, wrapAround: true } )\n );\n this.topSphereMesh.position.z = 0.9;\n\n this.cylinderMesh.updateMatrix();\n this.bottomSphereMesh.geometry.merge( this.cylinderMesh.geometry, this.cylinderMesh.matrix );\n\n this.topSphereMesh.updateMatrix();\n this.bottomSphereMesh.geometry.merge( this.topSphereMesh.geometry, this.topSphereMesh.matrix );\n \n this.bottomSphereMesh.geometry.mergeVertices();\n\n this.mesh = this.bottomSphereMesh;\n this.mesh.position.set( this.position.x, this.position.y, this.position.z );\n \n this.mesh.castShadow = true;\n this.mesh.receiveShadow = true;\n \n // Physics ===================================================================\n \n this.physics.enabled = true;\n \n this.physics.sphereShape = new CANNON.Sphere( 0.45 );\n this.physics.cylinderShape = new CANNON.Cylinder( 0.45, 0.45, 0.9, 64 );\n this.physics.mass = 20;\n \n this.physics.body = new CANNON.Body( { mass: this.physics.mass } );\n // this.physics.body.type = CANNON.Body.KINEMATIC; // TODO Consider if implementing this would be superior to DYNAMIC\n this.physics.body.addShape( this.physics.sphereShape, new CANNON.Vec3( this.position.x, this.position.y, this.position.z - 0.45) );\n this.physics.body.addShape( this.physics.cylinderShape, new CANNON.Vec3( this.position.x, this.position.y, this.position.z ) );\n this.physics.body.addShape( this.physics.sphereShape, new CANNON.Vec3( this.position.x, this.position.y, this.position.z + 0.45 ) );\n \n this.physics.body.position.set( this.position.x, this.position.y, this.position.z );\n this.physics.body.quaternion.setFromEuler( this.rotation.x, this.rotation.y, this.rotation.z, 'ZYX');\n \n this.physics.body.collisionFilterGroup = 2; // Collision group 2, collides with everything, but the player rays won't collide with it\n this.physics.body.collisionFilterMask = 1 | 2 | 4;\n \n this.physics.body.material = theWorld.physics.playerMaterial;\n this.physics.body.fixedRotation = true; // prevents rotation\n this.physics.body.updateMassProperties();\n this.physics.body.gravity = new CANNON.Vec3( 0, 0, 0 );\n this.physics.body.playerGravity = new CANNON.Vec3( 0, 0, -35 );\n // The is the custom value for gravity applied just to the player\n // Can be set to theWorld.physics.gravity if you want\n \n this.physics.groundContact = false;\n this.physics.groundRay = false;\n this.physics.onGround = false;\n \n theWorld.physics.add( this.physics.body );\n \n // Interaction and Commands ==================================================\n \n this.state = {};\n this.commands = {};\n this.resetCommands();\n \n // Builder State =============================================================\n \n this.builder = new Builder();\n this.state.builder = new PlayerState();\n this.state.builder.toolset = this.builder;\n \n this.state.builder.update = function () {\n\n var interactVector = new THREE.Vector3( 0, 1, 0 );\n interactVector.applyAxisAngle( X_AXIS, self.rotation.x );\n interactVector.applyAxisAngle( Z_AXIS, self.rotation.z );\n interactVector.multiplyScalar( self.interactionDistance );\n \n var rayFrom = new CANNON.Vec3().copy( self.physics.body.position );\n rayFrom.z = rayFrom.z + ( self.size.z * 0.4 );\n \n var rayTo = new CANNON.Vec3().copy( rayFrom ).vadd( interactVector );\n \n self.builder.rayToWorld( rayFrom, rayTo );\n \n };\n \n this.state.builder.ui = \"builderBar\";\n UI[\"builderBar\"].makeButtons( this.builder.tools );\n \n this.state.builder.onEnter = function () { theOverlay.elements.builderBar.toggle( true ) };\n this.state.builder.onExit = function () {\n theOverlay.elements.builderBar.toggle( false );\n self.builder.cursor.place( 0, 0, -100 );\n self.builder.cursorSnap.place( 0, 0, -100 );\n };\n \n \n // Interact State ============================================================\n \n this.equipment = new Equipment();\n \n this.state.interact = new PlayerState();\n this.state.interact.toolset = this.equipment;\n\n this.state.interact.ui = \"equipmentBar\";\n UI[\"equipmentBar\"].makeButtons( this.equipment.tools );\n\n this.state.interact.onEnter = function () { theOverlay.elements.equipmentBar.toggle( true ) };\n this.state.interact.onExit = function () { theOverlay.elements.equipmentBar.toggle( false ) };\n \n // Options ===================================================================\n \n this.walkForce = 40;\n this.walkForceInAir = 15;\n this.maxWalkVelocity = 10;\n // this.walkVelocity = new CANNON.Vec3( 0, 0, 0 );\n \n this.jumpForce = 250; // Impulse\n // this.jumpVelocity = new CANNON.Vec3( 0, 0, 0 );\n \n this.frictionGround = 7;\n this.frictionAir = 0.1;\n\n this.rotationSpeed = Math.PI * 0.75; // Radians per second\n // Rate at which the player turns using the keyboard\n\n this.interactionDistance = 6;\n \n // Have to define it this way so the previous state button works\n this.state.current = new PlayerState( this.state.interact );\n this.state.current.setState( this.state.builder );\n \n}", "constructor(){\n this.isLoaded = false;\n this.minXYZ=[0,0,0];\n this.maxXYZ=[0,0,0];\n \n this.numFaces=0;\n this.numVertices=0;\n \n // Allocate vertex array\n this.vBuffer = [];\n // Allocate triangle array\n this.fBuffer = [];\n // Allocate normal array\n this.nBuffer = [];\n // Allocate array for edges so we can draw wireframe\n this.eBuffer = [];\n // Allocate array for texture coordinates\n this.texcoordBuffer = [];\n \n console.log(\"TriMesh: Allocated buffers\");\n \n // Get extension for 4 byte integer indices for drawElements\n var ext = gl.getExtension('OES_element_index_uint');\n if (ext ==null){\n alert(\"OES_element_index_uint is unsupported by your browser and terrain generation cannot proceed.\");\n }\n else{\n console.log(\"OES_element_index_uint is supported!\");\n }\n }", "constructor() {\n this.m_positions = [];\n this.m_texCoords = [];\n this.m_normals = [];\n this.m_tangents = [];\n this.m_indices = [];\n }", "loadMeshes(jsnchrctr) {\n//---------\n// The given jsnchrctr.meshes is an array of mesh file names. We\n// need to read each of these files (itself JSON) and convert it to\n// a Mesh object.\nthis.meshes = jsnchrctr.meshes.map((mfname) => {\nvar mesh;\nmesh = new Mesh(this.gl, this.USE_TRX_BONE_DATA, this.TEST_CPU_TRX_TO_MAT);\nmesh.setFromJSON(this.readJSON(mfname));\nreturn mesh;\n});\nreturn void 0; // void result\n}", "function peep(){\n\n\tthis.geometry = new THREE.CubeGeometry( 1,1,1,1,1,1 );\n\t\n\tthis.id;\n\tthis.speed;\n\t\n\t//q is counter\n\tthis.q;\n\t\n\t//client calls dude, dude calls parts\n\t//function(body size xyz (mx,my,mz), arm length/width(al,aw),leg length,width and separation(ll,lw,ls),eye scale x and y and eye separation(ey,es))\n\t\n\tthis.dude = function (mx,my,mz,al,aw,ll,lw,ls,ex,ey,es) {\n\t\t\n\t\tvar rotColor = Math.random() * 16777215;\n\t\tvar hexValue = parseInt(rotColor , 16);\n\t\t\n\t\tvar white = hexValue;\n\t\tvar black = 0x000000;\n\t\t\n\t\tthis.CTRL = new THREE.Object3D();\n\t\tthis.CTRL.name = \"CTRL\";\n\t\t\n\t\tthis[ this.CTRL.name ] = this.CTRL;\n\t\t\n\t\t//(mesh offset xyz, scale xyz, controller position xyz, name, color)\n\t\tvar rlArm = this.part(0,-.5,0,aw,al,aw,0,-al,0,\"rlarm\",white);\n\t\tvar ruArm = this.part(0,-.5,0,aw,al,aw,(mx+(aw))*.5,0,0,\"ruarm\",white);\n\t\t\n\t\tvar llArm =\tthis.part(0,-.5,0,aw,al,aw,0,-al,0,\"llarm\",white);\n\t\tvar luArm =\tthis.part(0,-.5,0,aw,al,aw,(mx+(aw))*-.5,0,0,\"luarm\",white);\n\t\t\n\t\tvar lLeg =\tthis.part(0,-.5,0,lw,ll,lw,ls,-(my*.5),0,\"lleg\",white);\n\t\tvar rLeg =\tthis.part(0,-.5,0,lw,ll,lw,-ls,-(my*.5),0,\"rleg\",white);\n\t\t\n\t\tvar leye =\tthis.part(0,0,.5,ex,ey,ex,es,0,mz*.5,\"leye\",black);\n\t\tvar reye =\tthis.part(0,0,.5,ex,ey,ex,-es,0,mz*.5,\"reye\",black);\n\t\n\t\tvar bod =\tthis.part(0,0,0,mx,my,mz,0,0,0,\"bod\",white);\n\t\t\n\t\tthis.rotation_ruarm.add(rlArm);\t\t\t\n\t\tthis.rotation_luarm.add(llArm);\n\t\t\n\t\tthis.rotation_bod.add(ruArm);\n\t\tthis.rotation_bod.add(luArm);\n\t\t\n\t\tthis.rotation_bod.add(lLeg);\n\t\tthis.rotation_bod.add(rLeg);\n\t\t\n\t\tthis.rotation_bod.add(leye);\n\t\tthis.rotation_bod.add(reye);\n\t\t\n\t\tthis.CTRL.add(bod);\n\t\t\n\t\tthis.CTRL.position.y = my+ll;\n\t}\t\n\t\n\t/*\n\t//this.geometry is a cube set to a scale of 1,1,1 - this is true of every object that's created\n\t//It is placed inside a group which scales it to the desired size\n\t//this group is placed inside a group designated for 'rotation' although you can do anything with it\n\t//this group is placed inside 'poser' the top group, which is returned\n\t//each item's name is assigned to the peep object so it can be easily accessed later\n\t\n\t//(mesh offset xyz, scale xyz, controller position xyz, name, color)\n\t*/\n\tthis.part = function(px,py,pz,\tsx,sy,sz,\tp2x,p2y,p2z,\tnamer,color){\n\t\t\n\t\tthis.material = new THREE.MeshLambertMaterial( { color:0xffffff, shading: THREE.FlatShading } );\n\t\tthis.material.color.setHex(color);\n\t\t\n\t\tvar pos = new THREE.Vector3(px,py,pz);\n\t\tvar scl = new THREE.Vector3(sx,sy,sz);\n\t\tvar pos2 = new THREE.Vector3(p2x,p2y,p2z);\n\t\t\n\t\tthis.mesh = new THREE.Mesh( this.geometry, this.material );\n\t\t\t\t\t\t\t\n\t\tthis.mesh.updateMatrix();\n\t\tthis.mesh.matrixAutoUpdate = true;\t\t\t\t\t\n\t\tthis.mesh.position = pos;\t\t\t\t\n\t\tthis.scalar = new THREE.Object3D();\t\n\n\t\tthis.mesh.name = \"mesh_\"+namer;\n\t\t\n\t\tthis[ this.mesh.name ] = this.mesh;\n\t\t\n\t\tthis.scalar.name = \"scale_\"+namer;\t\n\t\t\n\t\tthis[ this.scalar.name ] = this.scalar;\n\t\t\n\t\tthis.scalar.matrixAutoUpdate = true;\t\t\t\t\t\n\t\tthis.scalar.add(this.mesh);\t\t\t\t\t\n\t\tthis.scalar.scale = scl;\t\t\t\t\t\n\t\tthis.rotator = new THREE.Object3D();\n\n\t\tthis.rotator.name = \"rotation_\"+namer;\t\n\n\t\tthis[ this.rotator.name ] = this.rotator;\n\t\t\n\t\tthis.rotator.matrixAutoUpdate = true;\t\t\t\t\t\n\t\tthis.rotator.add(this.scalar);\t\t\t\t\t\n\t\tthis.poser = new THREE.Object3D();\t\n\t\t\n\t\tthis.poser.name = \"position_\"+namer;\n\t\t\n\t\tthis.poser.matrixAutoUpdate = true;\t\t\t\t\t\n\t\tthis.poser.add(this.rotator);\t\t\t\t\t\n\t\tthis.poser.position = pos2;\t\n\n\t\tthis[ this.poser.name ] = this.poser;\t\n\n\t\treturn this.poser;\n\t}\n}", "constructor( filename )\r\n { super( \"position\", \"normal\", \"texture_coord\" );\r\n // Begin downloading the mesh. Once that completes, return\r\n // control to our parse_into_mesh function.\r\n this.load_file( filename );\r\n }", "draw() {\r\n this.raycaster.setFromCamera(this.mouse3D, this.camera);\r\n\r\n const intersects = this.raycaster.intersectObjects([this.floor]);\r\n\r\n if (intersects.length) {\r\n const {\r\n x,\r\n z\r\n } = intersects[0].point;\r\n\r\n for (let row = 0; row < this.grid.rows; row++) {\r\n for (let index = 0; index < 1; index++) {\r\n const totalCols = this.getTotalRows(row);\r\n\r\n for (let col = 0; col < totalCols; col++) {\r\n const mesh = this.meshes[row][col];\r\n\r\n const mouseDistance = distance(x, z,\r\n mesh.position.x + this.groupMesh.position.x,\r\n mesh.position.z + this.groupMesh.position.z);\r\n\r\n const y = map(mouseDistance, 7, 0, 0, 6);\r\n TweenMax.to(mesh.position, .3, {\r\n y: y < 1 ? 1 : y\r\n });\r\n\r\n const scaleFactor = mesh.position.y / 1.2;\r\n \r\n const scale = scaleFactor < 1 ? 1 : scaleFactor;\r\n TweenMax.to(mesh.scale, .3, {\r\n ease: Expo.easeOut,\r\n x: scale,\r\n y: scale,\r\n z: scale,\r\n });\r\n\r\n TweenMax.to(mesh.rotation, .7, {\r\n ease: Expo.easeOut,\r\n x: map(mesh.position.y, -1, 1, radians(270), mesh.initialRotation.x),\r\n z: map(mesh.position.y, -1, 1, radians(-90), mesh.initialRotation.z),\r\n y: map(mesh.position.y, -1, 1, radians(45), mesh.initialRotation.y),\r\n });\r\n }\r\n \r\n }\r\n }\r\n }\r\n }", "function initGeom(){\r\n\tvar cubeGeom = new THREE.Geometry();\r\n\t\r\n\t//Array of the vectors of the cube\r\n\tvectorArray = [/**0**/new THREE.Vector3(-blockWidth/2, blockWidth/2, blockWidth/2),\r\n\t\t\t\t /**1**/new THREE.Vector3(-blockWidth/2, -blockWidth/2, blockWidth/2),\r\n\t\t\t\t /**2**/new THREE.Vector3(blockWidth/2, -blockWidth/2, blockWidth/2),\r\n\t\t\t\t /**3**/new THREE.Vector3(blockWidth/2, blockWidth/2, blockWidth/2),\r\n\t\t\t\t /**4**/new THREE.Vector3(blockWidth/2, blockWidth/2, -blockWidth/2),\r\n\t\t\t\t\t/**5**/new THREE.Vector3(blockWidth/2, -blockWidth/2, -blockWidth/2),\r\n\t\t\t\t /**6**/new THREE.Vector3(-blockWidth/2, -blockWidth/2, -blockWidth/2),\r\n\t\t\t\t /**7**/new THREE.Vector3(-blockWidth/2, blockWidth/2, -blockWidth/2)];\r\n\t\r\n\t//Array of the faces of the cube, 2 for each side\r\n\tfaceArray = [/**front**/new THREE.Face3(0, 1, 2), new THREE.Face3(2, 3, 0),\r\n\t\t\t\t /**right**/new THREE.Face3(3, 2, 5), new THREE.Face3(5, 4, 3),\r\n\t\t\t\t /**back**/new THREE.Face3(4, 5, 6), new THREE.Face3(6, 7, 4),\r\n\t\t\t\t /**left**/new THREE.Face3(7, 6, 1), new THREE.Face3(1, 0, 7),\r\n\t\t\t\t /**top**/new THREE.Face3(7, 0, 3), new THREE.Face3(3, 4, 7),\r\n\t\t\t\t /**bottom**/new THREE.Face3(1, 6, 5), new THREE.Face3(5, 2, 1)];\r\n\t\r\n\t//Sets these arrays to the cube's vertices and faces\r\n\tcubeGeom.vertices = vectorArray;\r\n\tcubeGeom.faces = faceArray;\r\n\t\r\n\treturn cubeGeom;\r\n}", "constructor({ width = 1.0, height = 1.0, length = 1.0 }) {\n super();\n /* Points 0, 1, 2, 3 are on the left.\n * Points 4, 5, 6, 7 are on the right.\n * x = width, y = length, z = height*/\n const topLeftOut = [(width / 2), 0, (height / 2)];\n const botLeftOut = [(width / 2), 0, -(height / 2)];\n const topLeftIn = [-(width / 2), 0, (height / 2)];\n const botLeftIn = [-(width / 2), 0, -(height / 2)];\n const topRightOut = [(width / 2), length, (height / 2)];\n const botRightOut = [(width / 2), length, -(height / 2)];\n const topRightIn = [-(width / 2), length, (height / 2)];\n const botRightIn = [-(width / 2), length, -(height / 2)];\n this.vertices.push(topLeftOut);\n this.vertices.push(botLeftOut);\n this.vertices.push(topLeftIn);\n this.vertices.push(botLeftIn);\n this.vertices.push(topRightOut);\n this.vertices.push(botRightOut);\n this.vertices.push(topRightIn);\n this.vertices.push(botRightIn);\n\n // Left side face\n this.triangles.push([0, 1, 2]);\n this.triangles.push([2, 3, 1]);\n // Back side face\n this.triangles.push([2, 3, 6]);\n this.triangles.push([3, 6, 7]);\n // Right side face\n this.triangles.push([4, 5, 6]);\n this.triangles.push([5, 6, 7]);\n // Bottom face\n this.triangles.push([3, 5, 1]);\n this.triangles.push([5, 6, 3]);\n // Front side face\n this.triangles.push([1, 5, 4]);\n this.triangles.push([0, 1, 4]);\n // Top face\n this.triangles.push([0, 2, 4]);\n this.triangles.push([2, 4, 6]);\n }", "getSelectedMesh() {\n let count = 0;\n let mesh = null;\n for (var id in this.selected) {\n count += 1;\n mesh = this.meshes[id];\n }\n if (count > 1) {\n console.warn('More than one mesh selected.');\n }\n return mesh;\n }", "constructor(lw,lh,ll) {\r\n super();\r\n\r\n // create shelf legs\r\n // right rear\r\n this.pfe = MyShelfLegs.createMesh(new THREE.BoxGeometry(lw,lh,ll));\r\n this.pfe.translateX(lw/2);\r\n this.pfe.translateY(lh/2);\r\n this.pfe.translateZ(ll/2);\r\n\r\n // left rear\r\n this.pte = MyShelfLegs.createMesh(new THREE.BoxGeometry(lw,lh,ll));\r\n this.pte.translateX(lw/2);\r\n this.pte.translateY(lh/2);\r\n this.pte.translateZ(5);\r\n\r\n // left middle\r\n this.pfm = MyShelfLegs.createMesh(new THREE.BoxGeometry(lw,lh,ll));\r\n this.pfm.translateX(17);\r\n this.pfm.translateY(lh/2);\r\n this.pfm.translateZ(5);\r\n\r\n // right middle\r\n this.ptm = MyShelfLegs.createMesh(new THREE.BoxGeometry(lw,lh,ll));\r\n this.ptm.translateX(17);\r\n this.ptm.translateY(lh/2);\r\n this.ptm.translateZ(ll/2);\r\n\r\n // left front\r\n this.pfd = MyShelfLegs.createMesh(new THREE.BoxGeometry(lw,lh,ll));\r\n this.pfd.translateX(31);\r\n this.pfd.translateY(lh/2);\r\n this.pfd.translateZ(ll/2);\r\n\r\n // right front\r\n this.ptd = MyShelfLegs.createMesh(new THREE.BoxGeometry(lw,lh,ll));\r\n this.ptd.translateX(31);\r\n this.ptd.translateY(lh/2);\r\n this.ptd.translateZ(5);\r\n\r\n this.add(this.pfe);\r\n this.add(this.pfd);\r\n this.add(this.pte);\r\n this.add(this.ptd);\r\n this.add(this.pfm);\r\n this.add(this.ptm);\r\n\r\n }", "constructor(_componentMesh, _componentMaterial) {\r\n super(\"Enemy\");\r\n this.addComponent(_componentMaterial);\r\n this.addComponent(_componentMesh);\r\n }", "geometry() {\n\t\tvar rv = new THREE.CubeGeometry(this.edge, this.edge, this.edge);\n\n\t\tvar center_mtx = new THREE.Matrix4();\n\t\tcenter_mtx.setPosition( new THREE.Vector3(this.center.x, this.center.y, this.center.z) );\n\t\trv.applyMatrix(center_mtx);\n\n\t\treturn rv;\n\t}", "material() { return new class Material extends Overridable {}().replace({ shader: this }) }", "get objects() {\n return [].concat(this.pointObjects, this.spline.mesh);\n }", "function handle_load(geometry) {\n\n //BASIC MESH\n //var material = new THREE.MeshNormalMaterial(materials);\n\n mesh.push(new THREE.Mesh(geometry, materials[mesh.length]));\n\n scene.add(mesh[mesh.length - 1]);\n mesh[mesh.length - 1].position.z = 0;\n mesh[mesh.length - 1].scale.set(1, 1, 1);\n\n if(mesh[(modeType + 1) % 3] != null) mesh[(modeType + 1) % 3].visible = false;\n if(mesh[(modeType + 2) % 3] != null) mesh[(modeType + 2) % 3].visible = false;\n\n}", "function model_t(scene)\r\n{\r\n\tvar myself=this;\r\n\tmyself.loaded=false;\r\n\tmyself.scene=scene;\r\n\tmyself.mesh=null;\r\n\tmyself.position=new THREE.Vector3(0,0,0);\r\n\tmyself.rotation=new THREE.Euler(0,0,0);\r\n\tmyself.scale=new THREE.Vector3(1,1,1);\r\n\r\n\tmyself.set_color=function(color)\r\n\t{\r\n\t\tif(myself.loaded&&myself.mesh)\r\n\t\t{\r\n\t\t\tmyself.mesh.material.color.setHex(color);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetTimeout(function(){myself.set_color(color);},10);\r\n\t\t}\r\n\t};\r\n\r\n\tmyself.destroy=function()\r\n\t{\r\n\t\tif(myself.loaded)\r\n\t\t{\r\n\t\t\tmyself.scene.remove(myself.mesh);\r\n\t\t\tmyself.loaded=false;\r\n\t\t\tmyself.mesh=null;\r\n\t\t\tmyself.scene=null;\r\n\t\t\tmyself.position=null;\r\n\t\t\tmyself.rotation=null;\r\n\t\t\tmyself.scale=null;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetTimeout(myself.destroy,10);\r\n\t\t}\r\n\t};\r\n\r\n\tmyself.set_parent=function(parent)\r\n\t{\r\n\t\tif(parent)\r\n\t\t{\r\n\t\t\tif(myself.loaded&&myself.mesh)\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tparent.mesh.add(myself.mesh);\r\n\t\t\t\t\tmyself.scene.remove(myself.mesh);\r\n\t\t\t\t\tmyself.scene=parent;\r\n\t\t\t\t}\r\n\t\t\t\tcatch(e)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetTimeout(function(){myself.set_parent(parent);},10);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsetTimeout(function(){myself.set_parent(parent);},10);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}", "constructor( max_subdivisions ) // unit sphere) and group them into triangles by following the predictable pattern of the recursion.\r\n { super( \"positions\", \"normals\", \"texture_coords\" ); // Start from the following equilateral tetrahedron:\r\n this.positions.push( ...Vec.cast( [ 0, 0, -1 ], [ 0, .9428, .3333 ], [ -.8165, -.4714, .3333 ], [ .8165, -.4714, .3333 ] ) );\r\n \r\n this.subdivideTriangle( 0, 1, 2, max_subdivisions); // Begin recursion.\r\n this.subdivideTriangle( 3, 2, 1, max_subdivisions);\r\n this.subdivideTriangle( 1, 0, 3, max_subdivisions);\r\n this.subdivideTriangle( 0, 2, 3, max_subdivisions); \r\n \r\n for( let p of this.positions )\r\n { this.normals.push( p.copy() ); // Each point has a normal vector that simply goes to the point from the origin.\r\n\r\n // Textures are tricky. A Subdivision sphere has no straight seams to which image \r\n // edges in UV space can be mapped. The only way to avoid artifacts is to smoothly \r\n this.texture_coords.push( // wrap & unwrap the image in reverse - displaying the texture twice on the sphere.\r\n Vec.of( Math.asin( p[0]/Math.PI ) + .5, Math.asin( p[1]/Math.PI ) + .5 ) ) }\r\n }", "generateCubeVertices() {\n for (var i = 0; i < 24; i++) {\n this.vertices[i] = new Vertex()\n this.vertices[i].color = [Math.random(), Math.random(), Math.random()]\n }\n\n // Front face\n this.vertices[0].points.elements =[-this.size, -this.size, this.size]\n this.vertices[1].points.elements =[this.size, -this.size, this.size]\n this.vertices[2].points.elements =[this.size, this.size, this.size]\n this.vertices[3].points.elements =[-this.size, this.size, this.size]\n\n // Back face\n this.vertices[4].points.elements =[-this.size, -this.size, -this.size]\n this.vertices[5].points.elements =[-this.size, this.size, -this.size]\n this.vertices[6].points.elements =[ this.size, this.size, -this.size]\n this.vertices[7].points.elements =[ this.size, -this.size, -this.size]\n\n // Top face\n this.vertices[8].points.elements =[-this.size, this.size, -this.size]\n this.vertices[9].points.elements =[-this.size, this.size, this.size]\n this.vertices[10].points.elements =[ this.size, this.size, this.size]\n this.vertices[11].points.elements =[ this.size, this.size, -this.size]\n\n // Bottom face\n this.vertices[12].points.elements =[-this.size, -this.size, -this.size]\n this.vertices[13].points.elements =[ this.size, -this.size, -this.size]\n this.vertices[14].points.elements =[ this.size, -this.size, this.size]\n this.vertices[15].points.elements =[-this.size, -this.size, this.size]\n\n // Right face\n this.vertices[16].points.elements =[ this.size, -this.size, -this.size]\n this.vertices[17].points.elements =[ this.size, this.size, -this.size]\n this.vertices[18].points.elements =[ this.size, this.size, this.size]\n this.vertices[19].points.elements =[ this.size, -this.size, this.size]\n\n // Left face\n this.vertices[20].points.elements =[-this.size, -this.size, -this.size]\n this.vertices[21].points.elements =[-this.size, -this.size, this.size]\n this.vertices[22].points.elements =[-this.size, this.size, this.size]\n this.vertices[23].points.elements =[-this.size, this.size, -this.size]\n }", "function Torre(){\n MultiMesh.call(this,\"/models/\",\"/maps/\");\n\n // Eventos\n this.INIT_COMPLETE=0;\n this.TORRE_TERMINADA=1;\n\n // constantes\n this.ALTURA_DE_PISO=3;\n this.MAXIMO_PISOS=25;\n this.DELTA_TIEMPO_ENTRE_AGREGAR_PISOS=250; // 700 milisegundos\n\n\n this.alturaTotal=0;\n this.alturaActual=0;\n\n\n this._crashersLanzados=0;\n this._container=new THREE.Object3D();\n this._container.rotation.y=Math.PI/2;\n\n\n this._containerAndamios=new THREE.Object3D();\n\tthis._container.add(this._containerAndamios);\n\t\n\tthis._timerLanzamientoCrashers;\n\t\n\tthis._inicioTimerAgregadoDePisos=0;\n\n\tthis._disparosConsecutivosDelMismoLado=1; // signo del lado del que viene el crasher\n this._direccionLanzamientoCrasher=1; // vale 1 o -1\n\n\n\n this._frameUltimoPisoAgregado=0;\n this._cantPisos=0;\n this._alturaAndamio=0; // la coordenada Y desde donde se puede construir (es el limite inferior del piso a agregar)\n\n this._materiales1={}; // materiales de Torre.js\n this._materiales2={}; // se carga en la subclase\n\n this._jsonShapes1={}; // shapes de Torre.js\n this._jsonShapes2={}; // se carga en la subclase\n\n this._jsonTower1=[]; // cuerpos rigidos de Torre.js\n this._jsonTower2=[]; // se carga en la subclase\n\n this._jsonCrashers=[];\n this._jsonHands=[];\n\n this._objetos3D=[]; // todos los objetos de la torre\n\n this._andamios=[];\n\tthis._manoMesh=null;\n\n // modelos DAE\n this.addGeometry(\"crashers/auto.DAE\");\n this.addGeometry(\"crashers/antena.DAE\");\n this.addGeometry(\"crashers/bote.DAE\");\n this.addGeometry(\"crashers/camioneta.DAE\");\n this.addGeometry(\"crashers/cartel.DAE\"); \n\tthis.addGeometry(\"crashers/container.DAE\");\n this.addGeometry(\"crashers/contenedorBasura.DAE\");\n this.addGeometry(\"crashers/lancha.DAE\");\n this.addGeometry(\"crashers/paradaDeBondi.DAE\");\n\tthis.addGeometry(\"crashers/cartelEstacionDeServicio.DAE\");\t\n\tthis.addGeometry(\"crashers/tanqueDeAgua.DAE\");\t\t\n\tthis.addGeometry(\"crashers/paredRota1.DAE\");\t\n\tthis.addGeometry(\"crashers/chimenea.DAE\");\n\n\n // texturas\n this.addTexture(\"crashers/mapaAntena.jpg\");\n this.addTexture(\"crashers/mapaAutoVerde.jpg\");\n this.addTexture(\"crashers/mapaBote.jpg\");\n this.addTexture(\"crashers/mapaCamioneta.jpg\");\n this.addTexture(\"crashers/mapaCartel.jpg\");\t\n this.addTexture(\"crashers/mapaCartelVelocidad.jpg\");\n this.addTexture(\"crashers/mapaCartelFlecha.jpg\");\n this.addTexture(\"crashers/mapaContenedorBasura.jpg\");\n this.addTexture(\"crashers/mapaLanchaAmarilla.jpg\");\n this.addTexture(\"crashers/mapaLanchaAzul.jpg\");\n\tthis.addTexture(\"crashers/mapaContainer1.jpg\");\n\tthis.addTexture(\"crashers/mapaContainer2.jpg\");\n\tthis.addTexture(\"crashers/mapaContainer3.jpg\");\n this.addTexture(\"crashers/paradaDeBondi.jpg\");\n\tthis.addTexture(\"crashers/cartelEstacionDeServicio.jpg\");\n\tthis.addTexture(\"crashers/tanqueDeAgua.jpg\");\t\n\tthis.addTexture(\"crashers/paredRota1.jpg\");\t\n\tthis.addTexture(\"refmap4a.jpg\");\t\n\n this.onAssetsLoaded=function(){\n this.init1();\n this.init();\n }\n}", "shapeTerrain() {\r\n // MP2: Implement this function!\r\n\r\n // set up some variables\r\n let iter = 200\r\n let delta = 0.015\r\n let H = 0.008\r\n\r\n for(let i = 0; i < iter; i++) {\r\n // construct a random fault plane\r\n let p = this.generateRandomPoint();\r\n let n = this.generateRandomNormalVec();\r\n\r\n // raise and lower vertices\r\n for(let j = 0; j < this.numVertices; j++) {\r\n // step1: get vertex b, test which side (b - p) * n >= 0\r\n let b = glMatrix.vec3.create();\r\n this.getVertex(b, j);\r\n\r\n let sub = glMatrix.vec3.create();\r\n glMatrix.vec3.subtract(sub, b, p);\r\n\r\n let dist = glMatrix.vec3.distance(b, p);\r\n\r\n let funcValue = this.calculateCoefficientFunction(dist);\r\n\r\n if (glMatrix.vec3.dot(sub, n) > 0)\r\n b[2] += delta * funcValue\r\n else\r\n b[2] -= delta * funcValue\r\n\r\n this.setVertex(b, j);\r\n }\r\n delta = delta / (Math.pow(2, H));\r\n }\r\n }", "function Fuel() {\n this.mesh = new THREE.Object3D();\n this.berth = 100;\n\n var slab = createBox( 50, 5, 50, Colors.brown, 0, 0, 0 );\n var body = createBox( 20, 100, 15, Colors.red, 0, 0, 0 );\n var leftArm = createBox( 3, 80, 10, Colors.red, 12.5, 0, 0 );\n var rightArm = createBox( 3, 80, 10, Colors.red, -12.5, 0, 0 );\n var frontWindow = createBox( 10, 10, 2, Colors.blue, 0, 35, 10 );\n var backWindow = createBox( 10, 10, 2, Colors.blue, 0, 35, -10 );\n var frontBox = createBox( 8, 8, 3, Colors.red, 0, 15, 10 );\n var backBox = createBox( 8, 8, 3, Colors.red, 0, 15, -10 );\n var head = createTire( 10, 10, 5, 32, Colors.red, 0, 60, 0 );\n var headHighlight = createTire( 6, 6, 8, 32, Colors.golden, 0, 60, 0 );\n\n var light = new THREE.PointLight( 0xffcc00, 1, 100 );\n light.position.set( 0, 60, 0 );\n\n this.mesh.add( slab );\n this.mesh.add( body );\n this.mesh.add( leftArm );\n this.mesh.add( rightArm );\n this.mesh.add( frontWindow );\n this.mesh.add( backWindow );\n this.mesh.add( frontBox );\n this.mesh.add( backBox );\n this.mesh.add( head );\n this.mesh.add( headHighlight );\n this.mesh.add( light );\n\n this.collidable = slab;\n}", "scaled(scale) {\n let vertices = this.vertices.map(\n ([x, y, z]) => [x * scale, y * scale, z * scale]);\n return new Mesh(vertices, this.faces, this.faceNormals, this.vertexNormals, false);\n }", "setupSphere() {\n var myMaterial = new BABYLON.StandardMaterial(\"myMaterial\", this.scene);\n myMaterial.specularColor = new BABYLON.Color3(0.0, 0.0, 0.0);\n myMaterial.alpha = 0.4;\n \n this.sphere.material = myMaterial;\n this.position.y = 0.0;\n this.sphere.scaling = new BABYLON.Vector3(1.0, 1.0, 1.0);\n\n var equator = this.createEquator();\n equator.parent = this.sphere;\n equator.color = this.lineColor;\n\n //Array of points to construct Bloch X axis line\n var xAxisPoints = [\n new BABYLON.Vector3(0, 0, -1.0),\n new BABYLON.Vector3(0, 0, 1.0)\n ];\n\n //Array of points to construct Bloch Y axis line\n var yAxisPoints = [\n new BABYLON.Vector3(-1.0, 0, 0),\n new BABYLON.Vector3(1.0, 0, 0)\n ];\n\n //Array of points to construct Bloch Z axis line\n var zAxisPoints = [\n new BABYLON.Vector3(0, 1.0, 0),\n new BABYLON.Vector3(0, -1.0, 0)\n ];\n\n //Create lines\n var xAxisLine = BABYLON.MeshBuilder.CreateDashedLines(\"xAxisLine\", { points: xAxisPoints, dashSize: 3, gapSize: 3 }, this.scene);\n var yAxisLine = BABYLON.MeshBuilder.CreateDashedLines(\"yAxisLine\", { points: yAxisPoints, dashSize: 3, gapSize: 3 }, this.scene);\n var zAxisLine = BABYLON.MeshBuilder.CreateDashedLines(\"zAxisLine\", { points: zAxisPoints, dashSize: 3, gapSize: 3 }, this.scene);\n\n xAxisLine.color = this.lineColor;\n yAxisLine.color = this.lineColor;\n zAxisLine.color = this.lineColor;\n\n xAxisLine.isPickable = false;\n yAxisLine.isPickable = false;\n zAxisLine.isPickable = false;\n\n xAxisLine.parent = this.sphere;\n yAxisLine.parent = this.sphere;\n zAxisLine.parent = this.sphere;\n\n // Axis labels\n var AxisLabelSize = 0.2\n\n var xChar = this.makeTextPlane(\"X\", \"black\", AxisLabelSize);\n xChar.parent = this.sphere;\n xChar.position = new BABYLON.Vector3(-0.1, -0.1, -0.9);\n xChar.isPickable = false;\n\n var yChar = this.makeTextPlane(\"Y\", \"black\", AxisLabelSize);\n yChar.parent = this.sphere;\n yChar.position = new BABYLON.Vector3(0.9, -0.1, -0.1);\n yChar.isPickable = false;\n\n var zeroKet = this.makeTextPlane(\"|0⟩\", \"black\", AxisLabelSize);\n zeroKet.parent = this.sphere;\n zeroKet.position = new BABYLON.Vector3(-0.1, 0.9, 0);\n zeroKet.isPickable = false;\n\n var oneKet = this.makeTextPlane(\"|1⟩\", \"black\", AxisLabelSize);\n oneKet.parent = this.sphere;\n oneKet.position = new BABYLON.Vector3(-0.1, -0.9, 0);\n oneKet.isPickable = false;\n\n var plusKet = this.makeTextPlane(\"|+⟩\", \"black\", AxisLabelSize);\n plusKet.parent = this.sphere;\n plusKet.position = new BABYLON.Vector3(-0.1, 0.05, -0.9);\n plusKet.isPickable = false;\n \n var minusKet = this.makeTextPlane(\"|-⟩\", \"black\", AxisLabelSize);\n minusKet.parent = this.sphere;\n minusKet.position = new BABYLON.Vector3(-0.1, 0, 0.9);\n minusKet.isPickable = false;\n\n var iKet = this.makeTextPlane(\"|i⟩\", \"black\", AxisLabelSize);\n iKet.parent = this.sphere;\n iKet.position = new BABYLON.Vector3(0.9, 0.05, -0.1);\n iKet.isPickable = false;\n\n var minusiKet = this.makeTextPlane(\"|-i⟩\", \"black\", AxisLabelSize);\n minusiKet.parent = this.sphere;\n minusiKet.position = new BABYLON.Vector3(-0.9, 0, -0.1);\n minusiKet.isPickable = false;\n \n this.quantumStateArrow = this.createQuantumStateArrow(); \n this.quantumStateArrow.parent = this.sphere; \n\n this.updateQuantumStateArrow();\n }", "function Initialize2(meshBinaryName) {\n self.nodesInfo = [];\n\n var nodesLayers = {};\n var i, len;\n for (var layer in self.sceneData.layers) {\n var layerData = self.sceneData.layers[layer];\n for (i = 0, len = layerData.nodes.length; i < len; ++i) {\n var nodeName = layerData.nodes[i];\n nodesLayers[nodeName] = layer;\n }\n }\n \n var meshesData = self.sceneData.meshes[meshBinaryName];\n var node, nodeData;\n for (node in self.sceneData.scene.nodes) {\n nodeData = self.sceneData.scene.nodes[node];\n\n if (meshesData.hasOwnProperty(nodeData.mesh)) {\n var nodeInfo = new NodeInfo();\n nodeInfo.name = node;\n nodeInfo.layer = nodesLayers[nodeInfo.name];\n nodeInfo.mesh = nodeData.mesh;\n nodeInfo.material = nodeData.material;\n nodeInfo.billboard = false;\n nodeInfo.transform = nodeData.transform? ExtendTransform(nodeData.transform) : null;\n nodeInfo.bbox = nodeData.bbox;\n nodeInfo.views = nodeData.views? nodeData.views.sort() : [];\n\n self.nodesInfo.push(nodeInfo);\n }\n }\n for (node in self.sceneData.scene.billboards) {\n nodeData = self.sceneData.scene.billboards[node];\n\n if (meshesData.hasOwnProperty(nodeData.mesh)) {\n var nodeInfo = new NodeInfo();\n nodeInfo.name = node;\n nodeInfo.layer = nodesLayers[nodeInfo.name];\n nodeInfo.mesh = nodeData.mesh;\n nodeInfo.material = nodeData.material;\n nodeInfo.billboard = true;\n nodeInfo.transform = nodeData.transform? ExtendTransform(nodeData.transform) : null;\n nodeInfo.bbox = nodeData.bbox;\n nodeInfo.views = nodeData.views? nodeData.views.sort() : [];\n\n self.nodesInfo.push(nodeInfo);\n }\n }\n\n // Cook the node and billboard information and once mesh is downloaded,\n // we can start populating the meshes.\n self.billboards = [];\n var nodes = [];\n for (i = 0, len = self.nodesInfo.length; i < len; ++i) {\n if (self.nodesInfo[i].billboard) {\n self.billboards.push(self.nodesInfo[i]);\n } else {\n nodes.push(self.nodesInfo[i]);\n }\n }\n self.billboards.sort(function(a, b) {\n return a.mesh.localeCompare(b.mesh);\n });\n\n self.nodes = [];\n self.nodesGroups = [];\n\n if (nodes.length > 0) {\n var nodesGroups = GroupNodes(nodes, meshesData);\n for (i = 0, len = nodesGroups.length; i < len; ++i) {\n if (nodesGroups[i].length > 1) {\n self.nodesGroups.push(nodesGroups[i]);\n } else {\n self.nodes.push(nodesGroups[i][0]);\n }\n }\n\n // Compute the merge cost (benefits) of each group\n if (self.nodesGroups.length > 0) {\n self.groupOrder = new Array(self.nodesGroups.length);\n for (i = 0, len = self.nodesGroups.length; i < len; i++) {\n var cost = ComputeMergeBenefit(self.nodesGroups[i], self.sceneData.meshes[meshBinaryName], self.attributesData); \n self.groupOrder[i] = {\n index: i, \n benefit: cost.benefit,\n indexType: cost.indexType\n };\n //console.log(\"use index type:\" + self.groupOrder[i].indexType);\n }\n \n // Sort the groups in order of benefit\n self.groupOrder.sort(function(a, b) {\n return b.benefit - a.benefit;\n });\n }\n }\n\n self.retMessage.meshBinaryName = meshBinaryName;\n self.retMessage.finished = false;\n }", "constructor(filename) {\n super(\"position\", \"normal\", \"texture_coord\");\n // Begin downloading the mesh. Once that completes, return\n // control to our parse_into_mesh function.\n this.load_file(filename);\n }", "set baseGeometry( geometry ) {\n\n\t\t// Create this.baseGeometry as cleaned-up copy of input geometry.\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tthis._baseGeometry = new THREE.Geometry().fromBufferGeometry( geometry );\n\n\t\t} else {\n\n\t\t\tthis._baseGeometry = geometry;\n\n\t\t}\n\n\t\tthis._baseGeometry.mergeVertices();\n\n\t\tthis.calculateStructure( false );\n\n\t\tthis.reset();\n\n\t}", "function meshify(topology, key) {\n var object = topology.objects[key];\n var features = topojson.feature(topology, object).features;\n var mesh = topojson.mesh(topology, object);\n return {\n features: features,\n mesh: mesh\n };\n }", "create(runChecks=false) {\n // TODO: use Float32Array instead of this, so that we can\n // construct directly from points read in from a file\n let delaunator = Delaunator.from(this.points);\n let graph = {\n _r_vertex: this.points,\n _triangles: delaunator.triangles,\n _halfedges: delaunator.halfedges\n };\n\n if (runChecks) {\n checkPointInequality(graph);\n checkTriangleInequality(graph);\n }\n \n graph = addGhostStructure(graph);\n graph.numBoundaryRegions = this.numBoundaryRegions;\n if (runChecks) {\n checkMeshConnectivity(graph);\n }\n\n return new TriangleMesh(graph);\n }", "constructor()\n {\n this.radarType = Radar.TYPE_PORTAL; // in the original this is TYPE_NONE\n\n let gibMesh = new THREE.Mesh(Gib.GEOMETRY, Gib.MATERIAL);\n gibMesh.scale.x = Gib.SCALE_X;\n gibMesh.scale.y = Gib.SCALE_Y;\n\n this.add(gibMesh);\n this.mesh = gibMesh; // provide an explicit ref to first and only child\n\n // update is a closure passed to Actor, so we need to pass 'self' for gib state\n var self = this;\n var update = function(timeDeltaMillis)\n {\n // move the parent\n var actualMoveSpeed = timeDeltaMillis * Gib.SPEED;\n self.translateZ(-actualMoveSpeed);\n\n // rotate the child\n self.mesh.rotateOnAxis(MY3.Y_AXIS, Gib.ROTATE_SPEED * timeDeltaMillis);\n\n Gib.collideWithObelisks(self);\n Gib.collideWithPlayer(self);\n };\n\n this.actor = new Actors.Actor(this, update, this.radarType);\n }", "addMesh(mesh, folder = this.zip) {\n\n // Throw an error if mesh is not a Mesh\n validate({ mesh }, 'Mesh');\n\n // Throw an error if folder is not a folder\n validate({ folder }, () => (folder && folder.file), `\"folder\" to be a valid ZIP directory`);\n\n // Parse the mesh to an .obj\n const OBJ = new OBJParser(mesh, true);\n\n // Add the .obj to the folder\n folder.file(OBJ.filename, OBJ.content);\n\n // Parse the mesh to an .stl\n const STL = new STLParser(mesh);\n\n // Add the .stl to the folder\n folder.file(STL.filename, STL.content);\n\n // Return the exporter\n return this;\n }", "constructor(shape, material, size) {\n Object.assign(this, { shape, material, size });\n }", "resetOpacity() {\n for (const key of Object.keys(this.meshDict)) {\n if (!this.meshDict[key]['background']) {\n if (!('morph_type' in this.meshDict[key]) ||\n (this.meshDict[key]['morph_type'] != 'Synapse SWC')) {\n for (let i in this.meshDict[key].object.children) {\n if (this.meshDict[key]['opacity'] >= 0.){\n this.meshDict[key].object.children[i].material.opacity = this.meshDict[key]['opacity'] * this.settings.defaultOpacity;\n } else {\n this.meshDict[key].object.children[i].material.opacity = this.settings.defaultOpacity;\n }\n }\n } else {\n for (let i in this.meshDict[key].object.children){\n if (this.meshDict[key]['opacity'] >= 0.){\n this.meshDict[key].object.children[i].material.opacity = this.meshDict[key]['opacity'] * this.settings.synapseOpacity;\n } else {\n this.meshDict[key].object.children[i].material.opacity = this.settings.synapseOpacity;\n }\n }\n }\n } else {\n if (this.meshDict[key]['opacity'] >= 0.){\n this.meshDict[key].object.children[0].material.opacity = this.meshDict[key]['opacity'] * this.settings.backgroundOpacity;\n this.meshDict[key].object.children[1].material.opacity = this.meshDict[key]['opacity'] * this.settings.backgroundWireframeOpacity;\n } else{\n this.meshDict[key].object.children[0].material.opacity = this.settings.backgroundOpacity;\n this.meshDict[key].object.children[1].material.opacity = this.settings.backgroundWireframeOpacity;\n }\n }\n }\n }", "get Wireframe() {}", "static createMesh( spec = {} ) {\n \n // 3. Setup default values or use arguments\n \n let {\n color = '#FF00FF',\n radius = 1,\n detail = 0, // greater than 1, it's effectively a sphere.\n wireframe = true,\n } = spec;\n \n // 4. Use ThreeJS to define a 3D icosahedron\n var geometry = new THREE.IcosahedronGeometry(radius, detail);\n var material = new THREE.MeshBasicMaterial({ \n color: color,\n wireframe: wireframe \n });\n \n return {\n geometry,\n material\n }\n }", "function MeshBuilder( manager ) {\n\n\t\tthis.geometryBuilder = new GeometryBuilder();\n\t\tthis.materialBuilder = new MaterialBuilder( manager );\n\n\t}", "constructor() {\n super(\"position\", \"normal\", \"texture_coord\");\n // Specify the 4 square corner locations, and match those up with normal vectors:\n this.arrays.position = Vec.cast(\n [-1, -1, 0],\n [1, -1, 0],\n [-1, 1, 0],\n [1, 1, 0]\n );\n this.arrays.normal = Vec.cast([0, 0, 1], [0, 0, 1], [0, 0, 1], [0, 0, 1]);\n // Arrange the vertices into a square shape in texture space too:\n this.arrays.texture_coord = Vec.cast([0, 0], [1, 0], [0, 1], [1, 1]);\n // Use two triangles this time, indexing into four distinct vertices:\n this.indices.push(0, 1, 2, 1, 3, 2);\n }", "constructor() {\n super(\"position\", \"normal\", \"texture_coord\");\n\n this.arrays.position.push(Vec.of(0, 0, 0));\n for (let i = 0; i < 11; i++) {\n const spin = Mat4.rotation(i * 2 * Math.PI / 10, Vec.of(0, 0, -1));\n\n const radius = i % 2 ? 4 : 7;\n const new_point = spin.times(Vec.of(0, radius, 0, 1)).to3();\n\n this.arrays.position.push(new_point);\n if (i > 0)\n this.indices.push(0, i, i + 1)\n }\n\n this.arrays.normal = this.arrays.position.map(p => Vec.of(0, 0, -1));\n this.arrays.texture_coord = this.arrays.position.map(p => Vec.of((p[0] + 7) / 14, (p[1] + 7) / 14));\n }", "updateClosetGV() {\n let closetFaces = this.closet.getClosetFaces().entries();\n let closetInitialFaces = this.closet.getInitialClosetFaces().entries();\n for (let closetFace of closetFaces) {\n let closet_face = closetFace[\"1\"].mesh();\n let closet_initial_face = closetInitialFaces.next().value[\"1\"];\n closet_face.scale.x = this.getNewScaleValue(closet_initial_face.width(), closetFace[\"1\"].width(), closet_face.scale.x);\n closet_face.scale.y = this.getNewScaleValue(closet_initial_face.height(), closetFace[\"1\"].height(), closet_face.scale.y);\n closet_face.scale.z = this.getNewScaleValue(closet_initial_face.depth(), closetFace[\"1\"].depth(), closet_face.scale.z);\n closet_face.position.x = closetFace[\"1\"].X();\n closet_face.position.y = closetFace[\"1\"].Y();\n closet_face.position.z = closetFace[\"1\"].Z();\n }\n\n let closetSlotFaces = this.closet.getClosetSlotFaces();\n let closetInitialSlotFaces = this.closet.getInitialClosetSlotFaces();\n\n for (let i = 0; i < closetSlotFaces.length; i++) {\n let closetSlotFace = closetSlotFaces[i];\n let closet_slot_face = closetSlotFace.mesh();\n let closet_initial_slot_face = closetInitialSlotFaces[i];\n closet_slot_face.scale.x = this.getNewScaleValue(closet_initial_slot_face.width(), closetSlotFace.width(), closet_slot_face.scale.x);\n closet_slot_face.scale.y = this.getNewScaleValue(closet_initial_slot_face.height(), closetSlotFace.height(), closet_slot_face.scale.y);\n closet_slot_face.scale.z = this.getNewScaleValue(closet_initial_slot_face.depth(), closetSlotFace.depth(), closet_slot_face.scale.z);\n closet_slot_face.position.x = closetSlotFace.X();\n closet_slot_face.position.y = closetSlotFace.Y();\n closet_slot_face.position.z = closetSlotFace.Z();\n console.log(closetSlotFace);\n }\n }", "function SphereSubdiv (s) {\r\n this.name = \"sphere\";\r\n\r\n var vertices = [\r\n 1.0, 0.0, 0.0,\r\n 0.0, 1.0, 0.0,\r\n -1.0, 0.0, 0.0,\r\n 0.0, -1.0, 0.0,\r\n 0.0, 0.0, 1.0,\r\n 0.0, 0.0, -1.0\r\n ];\r\n var indices = [\r\n /* 0, 1, 4,\r\n 0, 1, 5,\r\n 1, 2, 4,\r\n 1, 2, 5,\r\n 2, 3, 4,\r\n 2, 3, 5,\r\n 3, 0, 4,//*/\r\n 3, 0, 5\r\n ];\r\n\r\n for (var i = 0; i<s; i++){\r\n var newIndices = []\r\n\r\n let vertexCount = vertices.length/3;\r\n\r\n var midpoints = new Array(vertexCount).fill(0).map(row => new Array(vertexCount).fill(-1)); \r\n for (var face = 0; face<indices.length/3; face++){\r\n let f = face*3;\r\n let a = indices[f];\r\n let b = indices[f+1];\r\n let c = indices[f+2];\r\n let ax = vertices[a*3];\r\n let ay = vertices[a*3+1];\r\n let az = vertices[a*3+2];\r\n let bx = vertices[b*3];\r\n let by = vertices[b*3+1];\r\n let bz = vertices[b*3+2];\r\n let cx = vertices[c*3];\r\n let cy = vertices[c*3+1];\r\n let cz = vertices[c*3+2];\r\n\r\n // Find (mx, my, mz), (nx, ny, nz), (px, py, pz) -- centers of segments\r\n var m = midpoints[a][b];\r\n if(m==-1){\r\n var x = (ax+bx)/2;\r\n var y = (ay+by)/2;\r\n var z = (az+bz)/2;\r\n let l = Math.sqrt(x*x + y*y + z*z);\r\n x/=l;\r\n y/=l;\r\n z/=l;\r\n m = vertices.length/3; // The index of the new point\r\n vertices = vertices.concat([x, y, z]);\r\n midpoints[a][b] = m;\r\n midpoints[b][a] = m;\r\n }\r\n var n = midpoints[a][c];\r\n if(n==-1){\r\n var x = (ax+cx)/2;\r\n var y = (ay+cy)/2;\r\n var z = (az+cz)/2;\r\n let l = Math.sqrt(x*x + y*y + z*z);\r\n x/=l;\r\n y/=l;\r\n z/=l;\r\n n = vertices.length/3; // The index of the new point\r\n vertices = vertices.concat([x, y, z]);\r\n midpoints[a][c] = n;\r\n midpoints[c][a] = n;\r\n }\r\n var p = midpoints[c][b];\r\n if(p==-1){\r\n var x = (cx+bx)/2;\r\n var y = (cy+by)/2;\r\n var z = (cz+bz)/2;\r\n let l = Math.sqrt(x*x + y*y + z*z);\r\n x/=l;\r\n y/=l;\r\n z/=l;\r\n p = vertices.length/3; // The index of the new point\r\n vertices = vertices.concat([x, y, z]);\r\n midpoints[c][b] = p;\r\n midpoints[b][c] = p;\r\n }\r\n\r\n newIndices = newIndices.concat([\r\n m, a, n,\r\n m, b, p,\r\n n, c, p,\r\n m, n, p\r\n ]);\r\n }\r\n indices = newIndices;\r\n }\r\n\r\n // Mirror around x\r\n var mirrorStart = vertices.length;\r\n vertices = vertices.concat(vertices);\r\n for(var i = mirrorStart; i<vertices.length; i+=3){\r\n vertices[i] = -vertices[i];\r\n }\r\n var mirrorFacesStart = indices.length;\r\n indices = indices.concat(indices);\r\n for (var i = mirrorFacesStart; i<indices.length; i++){\r\n indices[i]+=mirrorStart/3;\r\n }\r\n // Mirror around y\r\n mirrorStart = vertices.length;\r\n vertices = vertices.concat(vertices);\r\n for(var i = mirrorStart+1; i<vertices.length; i+=3){\r\n vertices[i] = -vertices[i];\r\n }\r\n mirrorFacesStart = indices.length;\r\n indices = indices.concat(indices);\r\n for (var i = mirrorFacesStart; i<indices.length; i++){\r\n indices[i]+=mirrorStart/3;\r\n }\r\n // Mirror around z\r\n mirrorStart = vertices.length;\r\n vertices = vertices.concat(vertices);\r\n for(var i = mirrorStart+2; i<vertices.length; i+=3){\r\n vertices[i] = -vertices[i];\r\n }\r\n mirrorFacesStart = indices.length;\r\n indices = indices.concat(indices);\r\n for (var i = mirrorFacesStart; i<indices.length; i++){\r\n indices[i]+=mirrorStart/3;\r\n }\r\n this.vertices = new Float32Array(vertices);\r\n this.triangleIndices = new Uint16Array(indices);\r\n\r\n this.numVertices = this.vertices.length/3;\r\n this.numTriangles = this.triangleIndices.length/3;\r\n\r\n}", "function meshElect(self)\n{\n // sort all lines into their bucket, rebuild buckets from scratch (some may be GC'd)\n self.buckets = []; // sparse array, one for each distance 0...159\n Object.keys(self.lines).forEach(function(line){\n bucketize(self, self.lines[line])\n });\n var spread = parseInt(MESH_MAX / Object.keys(self.buckets).length);\n if(!(spread > 1)) spread = 1;\n\n // each bucket only gets so many lines elected\n Object.keys(self.buckets).forEach(function(bucket){\n var elected = 0;\n self.buckets[bucket].forEach(function(hn){\n // TODO can use other health quality metrics to elect better/smarter ones\n hn.elected = (elected++ <= spread) ? true : false;\n });\n });\n}", "function Geometry()\r\n{\r\n\tthis.id = MathUtils.generateID();\r\n\tthis.name = \"\";\r\n\tthis.type = \"Geometry\";\r\n\r\n\t/** \r\n\t * Geometry vertices, each vertex is composed of 3 values.\r\n\t */\r\n\tthis.vertex = [];\r\n\r\n\t/**\r\n\t * Vertex UV for texture mapping, each UV is composed of 2 values.\r\n\t */\r\n\tthis.uvs = [];\r\n\r\n\t/**\r\n\t * Normal vector of the vertex, each vector composed of 3 values.\r\n\t */\r\n\tthis.normals = [];\r\n\r\n\t/**\r\n\t * List of faces that compose the geometry, each face is composed of 3 indices. Each one for a point of the face.\r\n\t */\r\n\tthis.faces = [];\r\n\r\n\t/**\r\n\t * Tangent vectors, used for normal mapping in tangent space.\r\n\t */\r\n\tthis.tangent = [];\r\n}", "function createMeshes(){\r\n\r\n createCtrlBox();\r\n // делаем брусчатку\r\n createPlane(170, 148, 0, 0, 0, -0.5, 0, 'img/road2.jpg', 10, true);\r\n // основная башня\r\n createRectangle(30, 66, 30, 0, 33, 0, 'img/Black_brics.jpg', false);\r\n // боковые пристройки\r\n createRectangle(70, 26, 4, -50, 13, 0, 'img/Black_brics.jpg', false);\r\n createRectangle(70, 26, 4, 50, 13, 0, 'img/Black_brics.jpg', false);\r\n // передняя пристройка\r\n createRectangle(18, 26, 16, 0, 13, 23, 'img/Black_brics.jpg', false);\r\n // пристройка сверху\r\n createRectangle(20, 16, 20, 0, 74, 0, 'img/Black_brics.jpg', false);\r\n // еще сверху\r\n createRectangle(10, 28, 10, 0, 84, 0, 'img/Black_brics.jpg', false);\r\n // пристраиваем конус\r\n createCone(4.5, 18, 12, 0, 106, 0, 0x00693A);\r\n // делаем звезду-шар\r\n createSphere(2, 3, 2, 0, 116, 0, 0xE40000);\r\n // делаем часики\r\n createPlane(10, 10, 0, 74, 10.1, 0, 0, 'img/Clock_cut.PNG', 1, false);\r\n createPlane(10, 10, 0, 74, -10.1, 1, 0, 'img/Clock_cut.PNG', 1, false);\r\n createPlane(10, 10, 10.1, 74, 0, 0, 0.5, 'img/Clock_cut.PNG', 1, false);\r\n createPlane(10, 10, -10.1, 74, 0, 0, -0.5, 'img/Clock_cut.PNG', 1, false);\r\n // делаем дверь\r\n createPlane(10, 20, 0, 14, 31.1, 0, 0, 'img/doors.PNG', 1, false);\r\n // делаем заборчики\r\n // правый\r\n for (let i = 18; i < 85; i+=5) {\r\n createRectangle(3, 4, 2, i, 28, 1, 'img/Black_brics.jpg', false);\r\n }\r\n // левый\r\n for (let i = -18; i > -85; i-=5) {\r\n createRectangle(3, 4, 2, i, 28, 1, 'img/Black_brics.jpg', false);\r\n }\r\n // передний спереди\r\n for (let i = -7.5; i < 11; i+=5) {\r\n createRectangle(3, 4, 2, i, 28, 30, 'img/Black_brics.jpg', false);\r\n }\r\n // боковые спереди\r\n for (let i = 26; i > 15; i-=5) {\r\n createRectangle(2, 4, 3, -8, 28, i, 'img/Black_brics.jpg', false);\r\n }\r\n\r\n for (let i = 26; i > 15; i-=5) {\r\n createRectangle(2, 4, 3, 8, 28, i, 'img/Black_brics.jpg', false);\r\n }\r\n\r\n // а теперь верхние 4 заборчика\r\n for (let i = -9.5; i < 10; i+=2) {\r\n createRectangle(1, 2, 1, i, 83, 9.5, 'img/wbricks.jpg', false);\r\n }\r\n\r\n for (let i = -9.5; i < 10; i+=2) {\r\n createRectangle(1, 2, 1, i, 83, -9.5, 'img/wbricks.jpg', false);\r\n }\r\n\r\n for (let i = -9.5; i < 10; i+=2.5) {\r\n createRectangle(1, 2, 1, -9.5, 83, i, 'img/wbricks.jpg', false);\r\n }\r\n\r\n for (let i = -9.5; i < 10; i+=2) {\r\n createRectangle(1, 2, 1, 9.5, 83, i, 'img/wbricks.jpg', false);\r\n }\r\n // добавим конусов\r\n createCone(2, 10, 4, -13, 71, 13, 0xF6F3F3);\r\n createCone(2, 10, 4, 13, 71, 13, 0xF6F3F3);\r\n createCone(2, 10, 4, 13, 71, -13, 0xF6F3F3);\r\n createCone(2, 10, 4, -13, 71, -13, 0xF6F3F3);\r\n // добавим слова\r\n createWords();\r\n // добавим дорогу\r\n createRectangle(18, 4, 42, 0, 2, 52, 'img/road.jpg', true);\r\n // добавим приведений\r\n createBaloon(-20, 80, 20, \"img/ghost1.png\");\r\n createBaloon(30, 70, 30, \"img/ghost2.png\");\r\n createBaloon(-30, 50, 30, \"img/ghost3.png\");\r\n // добавим волков\r\n createWolf(-30, 2, 30, 4, 10);\r\n createWolf(30, 6, 30, 3, 20);\r\n // добавим луну\r\n createMoonObjMTL();\r\n}", "generateTriangles() {\r\n // MP2: Implement the rest of this function!\r\n\r\n // positionData: 1D array of floats\r\n const deltaX = (this.maxX - this.minX) / this.div;\r\n const deltaY = (this.maxY - this.minY) / this.div;\r\n for (let i = 0; i <= this.div; i++) {\r\n for(let j = 0; j <= this.div; j++) {\r\n this.positionData.push(this.minX + deltaX * j);\r\n this.positionData.push(this.minY + deltaY * i);\r\n this.positionData.push(0);\r\n }\r\n }\r\n\r\n\r\n // faceData\r\n for (let i = 0; i < this.div; i++) {\r\n for(let j = 0; j < this.div; j++) {\r\n // bottom left index\r\n let bottomLeft = (i * (this.div + 1)) + j;\r\n let triangular1 = [bottomLeft, bottomLeft+1, bottomLeft + this.div + 1];\r\n let triangular2 = [bottomLeft + 1, bottomLeft + this.div + 2, bottomLeft + this.div + 1];\r\n this.faceData.push(...triangular1);\r\n this.faceData.push(...triangular2);\r\n }\r\n }\r\n\r\n // We'll need these to set up the WebGL buffers.\r\n this.numVertices = this.positionData.length/3;\r\n this.numFaces = this.faceData.length/3;\r\n }" ]
[ "0.73213136", "0.7072631", "0.69715685", "0.6927061", "0.6906819", "0.67797047", "0.66443306", "0.66265225", "0.6575943", "0.64960957", "0.64725983", "0.64595765", "0.6453735", "0.64083743", "0.63717264", "0.6266575", "0.6232345", "0.62310714", "0.61854136", "0.6086941", "0.6081542", "0.6068144", "0.6062735", "0.5987914", "0.59831625", "0.5971712", "0.595222", "0.59477645", "0.5907862", "0.58907217", "0.5880201", "0.58763283", "0.58698994", "0.5869658", "0.5869658", "0.5869658", "0.5860976", "0.5857694", "0.5857694", "0.5857694", "0.5857694", "0.5824895", "0.58078784", "0.5804241", "0.58041173", "0.57945603", "0.57934356", "0.5786055", "0.57786447", "0.5778022", "0.5775804", "0.57753175", "0.5757628", "0.5748013", "0.5744687", "0.57263064", "0.5724078", "0.57217735", "0.5699152", "0.5693817", "0.56785005", "0.567612", "0.567218", "0.5671876", "0.5667136", "0.5665695", "0.5663804", "0.5657902", "0.5650006", "0.5644593", "0.56211823", "0.5606287", "0.5599945", "0.55977714", "0.559697", "0.5588986", "0.5580768", "0.5580351", "0.55800784", "0.55765927", "0.5575205", "0.556878", "0.55636597", "0.555564", "0.5555273", "0.555136", "0.55493635", "0.55466384", "0.55395186", "0.55383027", "0.55292255", "0.55007863", "0.5496348", "0.549428", "0.54936725", "0.5488425", "0.5487308", "0.5482569", "0.5482269", "0.54814035" ]
0.7746989
0
console.log(firstAnagram("gizmo", "sally")); // => false console.log(firstAnagram("elvis", "lives")) // => true console.log(firstAnagram("elviss", "lives")) // => false
function secondAnagram(str1, str2) { str1 = str1.split(""); str2 = str2.split(""); str1.sort(); str2.sort(); str1 = str1.join(""); str2 = str2.join(""); if (str1 == str2) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAnagram(stgOne, stgTwo) {\n \n \n}", "function isAnagram(str1, str2) {}", "function isAnagram(str1, str2) {}", "function isAnagram(str1, str2) {}", "function isAnagram(first, second) {\n let output1 = first.toLowerCase().split(\"\").sort().join(\"\");\n let output2 = second.toLowerCase().split(\"\").sort().join(\"\");\n return output1 == output2;\n}", "function anagram(string, str){\n return string.split('').sort().join('') === str.split('').sort().join('')\n}", "function testAnagram (s1, s2){\n // creating if statments \n if(!s1 || !s2 || s1.length !== s2.length){return false;}\n var lS1 = s1.toLowerCase();\n var lS2 = s2.toLowerCase();\n if(lS1 === lS2) {return false;}\n var rS1 = lS1.split('').sort().join('');\n var rS2 = lS2.split('').sort().join('');\n return rS1 === rS2;\n }", "isAnagram(a, b) {\n\n var x = a.toLowerCase();\n var y = b.toLowerCase();\n if (x.length != y.length) {\n return false;\n //console.log(\"Given string is not Anagram.\");\n }\n else {\n var m = [], n = [];\n m = x.split(\"\");\n n = y.split(\"\");\n m = m.sort();\n n = n.sort();\n if (m.length == n.length) {\n for (let i = 0; i < m.length; i++) {\n if (m[i] != n[i]) {\n return false;\n }\n\n }\n return true;\n }\n }\n }", "function isAnagram (s, t) {\n let anagram = true;\n if ( s.length !== t.length ) {\n return false;\n }\n else {\n let sCharArray = [...s];\n let tCharArray = [...t];\n sCharArray.sort();\n tCharArray.sort();\n for (let i = 0 ; i < sCharArray.length ; i++ ) {\n if ( sCharArray[i] !== tCharArray[i] ) {\n anagram = false;\n break;\n }\n }\n }\n return anagram;\n}", "function isAnagram(s, t) {\n let newS = s.split(\"\").sort().join(\"\");\n let newT = t.split(\"\").sort().join(\"\");\n if (newS === newT) {\n return true\n } else {\n return false\n }\n}", "function isAnagram(s1, s2) {\n var i = 0\n //sortChars :: String -> String\n , sortChars = function (s) {\n return s.toLowerCase().split('').sort().join('');\n }\n ;\n if (s1.length !== s2.length){ return false; }\n if (sortChars(s1) !== sortChars(s2)) { return false; }\n return true;\n}", "function is_anagram (str1, str2) {\n return formatStr(str1) === formatStr(str2);\n}", "function isAnagram(str1, str2) {\n return formatString(str1) === formatString(str2);\n}", "function isAnagram(s, t) {\n let sortedS = s.split(\"\").sort().join(\"\")\n let sortedT = t.split(\"\").sort().join(\"\")\n return sortedS === sortedT\n}", "function anagramCheck (str1, str2) {\n\n // ---------- Your Code Here ----------\n\n // gets rid of all the spaces and makes them lowercase to produce a string of all the letters lumped together, making comparison easier\n str1 = str1.replace(/\\s/g, \"\");\n str1 = str1.toLowerCase();\n str2 = str2.replace(/\\s/g, \"\");\n str2 = str2.toLowerCase();\n\n\n // if (str1.length !== str2.length) {\n // return false;\n // }\n \n str1 = str1.split(\"\").sort().join(\"\");\n str2 = str2.split(\"\").sort().join(\"\");\n \n return (str1 == str2);\n\n // ----------- End Code Area -----------\n\n}", "function isAnagram(str1, str2) {\n return formatStr(str1) === formatStr(str2)\n}", "function validAnagram(str1, str2){\n // add whatever parameters you deem necessary - good luck!\n \n let s1 = str1.split(\"\").sort().join(\"\");\n let s2 = str2.split(\"\").sort().join(\"\");\n \n return s1===s2;\n\n}", "function validAnagram(first, second){\n\tif(first.length !== second.length){\n\t\treturn false;\n\t}\n\t\n\tconst lookup = {}; //obj as freq.counter\n\n\t//Break down the first string.\n\tfor(let i=0; i < first.length ; i++){\n\t\tlet letter = first[i];\n\t\t//if letter exists, increment, otherwise set to 1\n\t\tlookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n\t}\n\n\t//Break down the second string\n\t//then check to first string.\n\tfor(let i=0; i < second.length; i++){\n\t\tlet letter = second[i];\n\t\t//can't find letter or letter is zero then not anagram.\n\t\tif(!lookup[letter]){\n\t\t\treturn false;\n\t\t}else{\n\t\t\tlookup[letter] -= 1;\n\t\t}\t\n\t}\n\treturn true;\n}", "function validAnagram(str1, str2){\n let sortedStr1 = str1.split('').sort().join('');\n let sortedStr2 = str2.split('').sort().join('');\n if (sortedStr1 === sortedStr2) {\n return true;\n } else {\n return false;\n }\n}", "function compare(s1, s2) {\n var flag = 'Strings are not anagram'\n for (var i = 0; i < s1.length; i++) {\n\n if (s1.charAt(i) != s2.charAt(i)) {\n flag = 'Strings are not anagram'\n return flag\n }\n else {\n flag = 'Strings are anagram'\n }\n\n }\n\n if (flag == 'Strings are anagram') {\n return flag\n }\n\n}", "anagram(string1, string2) {\n try {\n var format = /[a-zA-Z0-9]/;\n var result = false;\n /*\n *checks if strings are within the given format\n */\n if (format.test(string1) && format.test(string2)) {\n /*\n *checks if both strings are of equal length\n */\n if (string1.length == string2.length) {\n /*\n *splits the given strings and sorts them\n */\n var sort1 = string1.toString().split(\"\").sort().join(\"\");\n var sort2 = string2.toString().split(\"\").sort().join(\"\");\n result = sort1 == sort2;\n }\n else {\n console.log(\"Strings length must be of equal length\");\n }\n\n /*\n *checks if one string is an anagram of another\n */\n if (result == true) {\n // console.log(string1 + \" \" + string2);\n return true;\n }\n else {\n return false;\n }\n }\n else {\n console.log(\"Enter only string\");\n\n }\n }\n catch (error) {\n console.log(error.message);\n }\n}", "checkAnagram2(str1, str2) {\n let unsortedStr1 = \"\" + str1;\n let unsortedStr2 = \"\" + str2;\n if (unsortedStr1.length != unsortedStr2.length) {\n return false;\n }\n sortedStr1 = this.sort1(unsortedStr1);\n sortedStr2 = this.sort1(unsortedStr2);\n let b = this.check(sortedStr1, sortedStr2);\n if (b == true) {\n return true;\n }\n else {\n return false;\n }\n }", "function isAnagram(str1, str2) {\n if (str1.length !== str2.length) {\n return false;\n }\n for (var i = 0; i < str1.length; i++) {\n var foundEqual = false;\n for (var j = 0; j < str2.length; j++) {\n if (str1[i] === str2[j]) {\n foundEqual = true;\n break;\n }\n }\n if (!foundEqual) {\n return false;\n }\n }\n for (var i = 0; i < str2.length; i++) {\n var foundEqual = false;\n for (var j = 0; j < str1.length; j++) {\n if (str2[i] === str1[j]) {\n foundEqual = true;\n break;\n }\n }\n if (!foundEqual) {\n return false;\n }\n }\n return true;\n}", "function isAnagram(test, original) {\n let sortedLettersOfTest = test.toLowerCase().split('').sort().join();\n let sortedLettersOfOriginal = original.toLowerCase().split('').sort().join();\n\n return sortedLettersOfTest === sortedLettersOfOriginal;\n}", "isAnagram(str1, str2) {\n\n if (str1.length !== str2.length) {\n return false;\n }\n\n var sortStr1 = str1.split('').sort().join('');\n var sortStr2 = str2.split('').sort().join('');\n\n return (sortStr1 === sortStr2);\n }", "function isAnagram2(s1, s2) {\n if (s1.length !== s2.length) return false\n const s1Arr = s1.split(\"\")\n const s2Arr = s2.split(\"\")\n s1Arr.sort()\n s2Arr.sort()\n for (let i = 0;i < s1Arr.length; i++) {\n if (s1Arr[i] !== s2Arr[i]) {\n return false\n }\n }\n return true\n}", "algoanagram(s1, s2) {\n\n var l1 = s1.length\n var l2 = s2.length\n var flag = true\n if (l1 != l2) {\n flag = false\n }\n else {\n var s3 = s1.toLowerCase()\n var s4 = s2.toLowerCase()\n\n s3 = s3.split('').sort().join('');\n s4 = s4.split('').sort().join('');\n\n // console.log(s3);\n // console.log(s4);\n flag = s3 === s4;\n // var c=a.split(\" \")\n // var c=b.split(\" \")\n\n\n //console.log(c)\n // console.log(d)\n\n\n\n\n\n }\n if (flag == true) {\n console.log(s1 + \" and \" + s2 + \" are anagram\")\n }\n else {\n console.log(s1 + \" and \" + s2 + \" are not anagram\")\n }\n }", "function validAnagram(first, second){\n if(first.length !== second.length){\n return false;\n }\n\n const lookup = {};\n\n for (let i = 0; i < first.length; i++){\n let letter = first [i];\n //if letter exists in object list, increment, otherwise set to 1\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n\n for (let i = 0; i < second.length; i ++){\n let letter = second[i];\n // if can't find letter or letter is zero then it's not an anagram, return false\n // zero is falsey so it will return false if lookup[letter] = 0\n if(!lookup[letter]){\n return false;\n }else{\n lookup[letter] -= 1;\n }\n }\n return true;\n}", "function checkAnagram() {\t\n\t\tvar first_str, second_str, first_temp, second_temp;\n\t\tfirst_str = $(\"#anagram-a\").val();\n\t\tfirst_temp = first_str;\n\t\tsecond_str = $(\"#anagram-b\").val();\n\t\tsecond_temp = second_str\n\t\tif(first_str.length != second_str.length) {\n\t\t\t$(\"#anagram-output\").append(\"<p>\\\"\" + first_str + \"\\\" and \\\"\" \n\t\t\t\t+ second_str + \"\\\" are not anagrams for each other</p>\");\n\t\t\treturn;\n\t\t}\n\t\tfirst_str = first_str.split(\"\").sort().join(\"\");\n\t\tsecond_str = second_str.split(\"\").sort().join(\"\");\n\t\tfor(var i = 0; i < first_str.length; i++) {\n\t\t\tif(first_str[i] != second_str[i]) {\n\t\t\t\t$(\"#anagram-output\").append(\"<p>\\\"\" + first_temp + \"\\\" and \\\"\" \n\t\t\t\t+ second_temp + \"\\\" are not anagrams for each other</p>\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t$(\"#anagram-output\").append(\"<p>\\\"\" + first_temp + \"\\\" and \\\"\" \n\t\t\t\t+ second_temp + \"\\\" are anagrams for each other</p>\");\n\t}", "function checkAnagram(str1,str2){\n if(str1.length !== str2.length){\n return false;\n }\n var charStr1=str1.split(\"\").sort();\n var charStr2=str2.split(\"\").sort();\n\n for(var i=0; i<charStr1.length; i++){\n if (charStr1[i]!==charStr2[i]){\n return false;\n }\n }\n\n return true;\n\n}", "function validAnaram2(first, second) {\n if (first.length !== second.length) {\n return false;\n }\n //Initalize object\n const lookup = {};\n\n for (let i = 0; i < first.length; i++) {\n let letter = first[i];\n //if letter exists, incremnt, otherwise set to 1\n lookup[letter] ? (lookup[letter] += 1) : (lookup[letter] = 1);\n }\n\n for (let i = 0; i < second.length; i++) {\n let letter = second[i];\n //Cant find letter or letter is zero then its not an anagram\n //Because zero is falsey\n if (!lookup[letter]) {\n return false;\n } else {\n //If letter exists, subtract one, one is truthy\n lookup[letter] -= 1;\n }\n }\n return true;\n}", "function isAnagram( s, t) {\n let charMap = new Map();\n let slength = s.length;\n let tlength = t.length;\n if( slength !== tlength) {\n return false;\n }\n for( let i=0 ; i < slength ; i++){\n charMap.set(s.charAt(i), (charMap.get(s[i]) || 0) +1);\n charMap.set(t.charAt(i), (charMap.get(t[i]) || 0) -1);\n }\n let isAnagram = true;\n charMap.forEach((countOfChar) => {\n if ( countOfChar !== 0 ) {\n isAnagram = false;\n return;\n }\n });\n return isAnagram;\n}", "function validAnagram2(str1, str2) {\n if(str1.length !== str2.length) return false\n return str1.split(\"\").sort().join(\"\") === str2.split(\"\").sort().join(\"\");\n}", "function isAnagram(s1, s2) {\n if (s1.length !== s2.length) return false\n const map = new Map()\n for (let i = 0; i < s1.length; i++) {\n if (!map.has(s1[i])) {\n map.set(s1[i], 1)\n } else {\n map.set(s1[i], map.get(s1[i]) + 1)\n }\n }\n for (let i = 0; i < s2.length; i++) {\n if (!map.has(s2[i])) return false\n map.set(s2[i], map.get(s2[i]) - 1)\n if (map.get(s2[i]) === 0) {\n map.delete(s2[i])\n }\n }\n return map.size === 0\n}", "function isAnagram(str1, str2) {\n if (str1.length !== str2.length) return false;\n\n let letterMap = {};\n\n for (let i = 0; i < str1.length; i++) {\n let current = str1[i].toLowerCase()\n if (!letterMap[current]) {\n letterMap[current] = 1\n } else {\n letterMap[current] ++\n }\n }\n \n for (let j = 0; j < str2.length; j++) {\n let current = str2[j].toLowerCase();\n if (letterMap[current]) {\n letterMap[current] --\n } else {\n return false;\n }\n }\n return Object.values(letterMap).every(el => el === 0) ? true : false;\n}", "function validAnagram2(first, second) {\n if (first.length !== second.length) return false;\n\n const lookup = {};\n\n for (let i = 0; i < first.length; i++) {\n let letter = first[i];\n // if letter exists, increment, otherwise set to 1\n lookup[letter] ? (lookup[letter] += 1) : (lookup[letter] = 1);\n }\n\n for (let i = 0; i < second.length; i++) {\n let letter = second[i];\n // can't find letter or letter is zero then it's not an anagram\n if (!lookup[letter]) {\n return false;\n } else {\n lookup[letter] -= 1;\n }\n }\n return true;\n}", "function countingAnagrams(str) {\n // Your code here\n counter = 0;\n words = str.split(' ')\n console.log(words)\n for (var i = 0; i < words.length; i++) {\n for (var j=0;j<words.length;j++){\n if (words[i]!==words[j] && isAnagram(words[i],words[j])){\n console.log(isAnagram(words[i],words[j]))\n counter++\n }\n }\n return counter\n }\n}", "function validAnagram(str1, str2) {\n if (str1.length !== str2.length) return false\n\n let check = {}\n\n for (let i = 0; i < str1.length; i++) {\n const letter = str1[i]\n check[letter] ? (check[letter] += 1) : (check[letter] = 1)\n }\n\n for (let i = 0; i < str2.length; i++) {\n const letter = str2[i]\n if (!check[letter]) {\n return false\n } else {\n check[letter] -= 1\n }\n }\n\n return true\n}", "function isAnagram(test, original) {\n if (test.length !== original.length) {\n return false;\n }\n\n let obj = {};\n let obj2 = {};\n\n let tes = test.toLowerCase();\n let orig = original.toLowerCase();\n\n for (let i = 0; i < tes.length; i++) {\n let letter = tes[i];\n obj[letter] = obj[letter] + 1 || 1;\n }\n\n for (let j = 0; j < orig.length; j++) {\n let letter = orig[j];\n obj2[letter] = obj2[letter] + 1 || 1;\n }\n\n for (let k = 0; k < tes.length; k++) {\n let letter = tes[k];\n if (obj[letter] !== obj2[letter]) {\n return false;\n }\n }\n\n return true;\n}", "function isAnagram(str1, str2){\n \n if(str1==null || str2==null \n || str1.length==0 || str2.length==0 \n || str1.length != str2.length){\n return false;\n }\n\n for(let a of str1){\n if(!str2.contains(a)){ /// time complexity = O(n^2) :( \n return false;\n }\n }\n return true;\n\n}", "function validAnagram(str1, str2){\n // add whatever parameters you deem necessary - good luck!\n // check if str1 has the same length as str2 & same characters\n if(str1.length !== str2.length){\n return false\n }\n // create an object call lookup\n let lookup = {}\n// construct the object first\n for (let i = 0; i < str1.length; i++){\n letter = str1[i]\n //if letter exits, increment, otherwise set to 1\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n console.log(lookup)\n for (let i = 0; i < str2.length; i++){\n let letter = second[i];\n // can't find letter of letter is zero then it's not an anagram\n if (!lookup[letter]) {\n return false;\n } else {\n lookup[letter] -= 1;\n }\n return true;\n }\n}", "function validAnagram(str1, str2) {\n if(str1.length !== str2.length) {\n return false;\n }\n \n let lookup = {};\n \n for(i = 0; i < str1.length; i++){\n let letter = str1[i]\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n \n for(let j = 0; j < str2.length; j++) {\n let letter = str2[j]\n if(!lookup[letter]) {\n return false;\n } else {\n lookup[letter] -= 1\n }\n }\n return true;;\n}", "function anagram(str1, str2) {\n\tif (str1.length !== str2.length) {\n\t\treturn false;\n\t}\n\tlet frequencyStr1 = {};\n\tfor (let i = 0; i < str1.length; i++) {\n\t\tlet letter = str1[i];\n\t\tfrequencyStr1[letter] ? (frequencyStr1[letter] += 1) : (frequencyStr1[letter] = 1);\n\t}\n\n\tfor (let i = 0; i < str2.length; i++) {\n\t\tlet letter = str2[i];\n\t\tif (!frequencyStr1[letter]) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tfrequencyStr1[letter] -= 1;\n\t\t}\n\t}\n\treturn true;\n}", "function validAnagram(first,second){\n if(first.length!== second.length){\n return false;\n }\n \n //Create an object \n const lookup = {};\n\n //Loop through first string\n for(let i =0;i<first.length;i++){\n let letter = first[i];\n //If letter exists increment otherwise set to 1\n lookup[letter]?lookup[letter]+=1:lookup[letter]=1;\n }\n console.log(lookup)\n\n //Loop through the second string \n for (let i = 0;i<second.length;i++){\n let letter =second[i];\n //If we can't find a letter or letter is zero , then its not an anagram\n if(!lookup[letter]){\n return false;\n }\n else{\n lookup[letter]-=1;\n }\n }\n\n return true;\n\n}", "function validAnagram(first, second) {\n if (first.length !== second.length) {\n return false;\n }\n const lookup = {}; // Ospace (a)\n const firstLength = first.length;\n for (let index = 0; index < firstLength; index++) { // Otime (a)\n const element = first[index];\n lookup[element] = (lookup[element] || 0) + 1;\n }\n const secondLength = second.length;\n for (let index = 0; index < secondLength; index++) { // Otime (b)\n const element = second[index];\n if (!lookup[element]) {\n return false;\n }\n lookup[element] -= 1;\n }\n return true;\n}", "function isAnagram (test, original) {\r\n \r\n // Make sure both strings are in same cases...\r\n const str1 = test.toLowerCase(); \r\n const str2 = original.toLowerCase(); \r\n\r\n if(str1.length !== str2.length) return false;\r\n\r\n let newObject = {};\r\n\r\n for(let i = 0; i < str1.length; i++) {\r\n let letter = str1[i];\r\n newObject[letter] ? newObject[letter] += 1 : newObject[letter] = 1;\r\n }\r\n \r\n for(let i = 0; i < str2.length; i++) {\r\n let letter = str2[i];\r\n if(!newObject[letter]) return false; \r\n else newObject[letter] -= 1;\r\n }\r\n return true;\r\n}", "function anagram(s, t) {\n if(s.length !== t.length) return false\n let char = {};\n \n for(let i = 0; i < s.length; i++) {\n char[s[i]] ? char[s[i]]++ : char[s[i]] = 1\n }\n \n for(let j = 0; j < t.length; j++) { // one letter might appear more that twice\n // that is why we count them \n // instead of just setting the key to true or false\n if(!char[t[j]]) {\n return false\n }\n char[t[j]]--\n }\n return true;\n }", "function validAnagram(str1, str2) {\n if (str1 === '' && str2 === '') {\n return true;\n }\n\n if (str1 === str2) {\n return true;\n }\n\n if (str1.length !== str2.length) {\n return false;\n }\n\n let anagram1 = {};\n\n for (let char of str1) {\n anagram1[char] = ++anagram1[char] || 1;\n }\n\n console.log('obj: ', anagram1);\n\n for (let char of str2) {\n if (!anagram1[char]) {\n return false;\n } else {\n anagram1[char] -= 1;\n }\n }\n return true;\n}", "function validAnagram(first, second) {\n if (first.length !== second.length) {\n return false;\n }\n\n const lookup = {};\n\n for (let i = 0; i < first.length; i++) {\n let letter = first[i];\n // if letter exists, increment, otherwise set to 1\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n // console.log(lookup)\n\n for (let i = 0; i < second.length; i++) {\n let letter = second[i];\n // can't find letter or letter is zero then it's not an anagram\n if (!lookup[letter]) {\n return false;\n } else {\n lookup[letter] -= 1;\n }\n }\n console.log(lookup)\n return true;\n}", "function anagram (str1,str2){\n if(str1.length!==str2.length)\n return false;\n\n let freqCounter1 = {};\n let freqCounter2 = {};\n\n for(let val of str1)\n freqCounter1[val] = (freqCounter1[val]||0)+1;\n\n for(let val of str2)\n freqCounter2[val] = (freqCounter2[val]||0)+1;\n \n for(let key in freqCounter2){\n \n if(!(key in freqCounter2))\n return false;\n \n if(freqCounter2[key]!==freqCounter1[key])\n return false;\n \n return true;\n }\n\n\n}", "function isAnagram (str1, str2) {\n if(str1.length !== str2.length) return false\n let frequencyCounter1 = getCharFrequency(str1)\n let frequencyCounter2 = getCharFrequency(str2)\n for(let key in frequencyCounter1){\n if(!frequencyCounter2.hasOwnProperty(key)) return false\n if(frequencyCounter1[key] !== frequencyCounter2[key]) return false\n }\n return true\n}", "function validAnagram(str1, str2) {\n if (str1.length !== str2.length) {\n return false;\n }\n\n if (str1 === '' && str2 === '') {\n return true;\n }\n\n const lookup = {};\n\n for (let i = 0; i < str1.length; i++) {\n let char = str1[i];\n lookup[char] ? (lookup[char] += 1) : (lookup[char] = 1);\n }\n\n for (let i = 0; i < str1.length; i++) {\n let char = str2[i];\n if (!lookup[char]) {\n return false;\n } else {\n lookup[char] -= 1;\n }\n }\n\n return true;\n}", "function validAnagram(str1, str2) {\n if (str1.length !== str2.length) {\n return false;\n }\n\n const lookup = {};\n\n for (let i = 0; i < str1.length; i++) {\n let letter = str1[i];\n // if letter exists, increment, otherwise set to 1\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n console.log(lookup)\n\n for (let i = 0; i < str2.length; i++) {\n let letter = str2[i];\n // can't find letter or letter is zero then it's not an anagram\n if (!lookup[letter]) {\n return false;\n } else {\n //we subtract one to make sure both str have same frequency of letter\n lookup[letter] -= 1;\n }\n }\n\n return true;\n}", "function secondAnagram(str1, str2) {\n str1.split(\"\").sort().join(\"\");\n str2.split(\"\").sort().join(\"\");\n\n return str1 === str2;\n}", "function validAnagram (str1, str2) {\n let obj = {};\n if (str1.length !== str2.length) return false;\n for (let char of str1) {\n obj[char] = obj[char] ? obj[char] + 1 : 1;\n }\n for (let char of str2) {\n if (!obj[char]) {\n return false;\n } else {\n obj[char]--;\n }\n }\n return true;\n}", "function anagram(s) {\n const sL = s.length;\n if ((sL & 1) === 0) {\n const mid = sL / 2;\n let firstSlice = s.slice(0, mid).split('');\n let secondSlice = s.slice(mid).split('');\n return sumUp(firstSlice, secondSlice);\n }\n return -1;\n\n}", "function isAnagram(word1,word2) {\n /* \n Check if the length of the first word is equal to the length of the second word. If not, return false\n */\n if (word1.length != word2.length) {\n return false;\n }\n\n // Convert word1 and word2 to lower case\n word1 = word1.toLowerCase();\n word2 = word2.toLowerCase();\n\n /*\n Convert each string to an array, sort in alphabetical order and convert back to a string. Check if the updated strings are the same.\n */\n return word1.split('').sort().join('') == word2.split('').sort().join('');\n}", "isAnagram(string1, string2) {\n string1=string1+\"\";\n string2=string2+\"\";\n if (string1.length != string2.length) {\n return false;\n }\n var arr = [];\n for (let index = 0; index < 36; index++) {\n arr[index] = 0;\n\n }\n for (let index = 0; index < string1.length; index++) {\n var ch = string1.charAt(index);\n if (ch >= 'a' && ch <= 'z') {\n var code = ch.charCodeAt(0);\n\n arr[code - 97]++;\n } else if (ch >= 'A' && ch <= 'Z') {\n var code = ch.charCodeAt(0);\n arr[code - 65]++;\n } else {\n var code = ch.charCodeAt(0);\n arr[code - 22]++;\n }\n ch = string2.charAt(index);\n if (ch >= 'a' && ch <= 'z') {\n var code = ch.charCodeAt(0);\n\n arr[code - 97]--;\n } else if (ch >= 'A' && ch <= 'Z') {\n var code = ch.charCodeAt(0);\n arr[code - 65]--;\n } else {\n var code = ch.charCodeAt(0);\n arr[code - 22]--;\n }\n\n\n }\n for (let index = 0; index < 36; index++) {\n if (arr[index] != 0) {\n return false;\n }\n }\n return true;\n}", "function validAnagram(str1, str2) {\n // add whatever parameters you deem necessary - good luck!\n // Run checks if string is empty or strings are not same length\n if (str1 === \"\" && str2 === \"\") {\n return true;\n }\n if (str1.length !== str2.length) {\n return false;\n }\n //Initalize objects for counters\n let freqCounter1 = {};\n let freqCounter2 = {};\n\n //Create Objects through iteration\n for (let val of str1) {\n freqCounter1[val] = (freqCounter1[val] || 0) + 1;\n }\n for (let val of str2) {\n freqCounter2[val] = (freqCounter2[val] || 0) + 1;\n }\n\n //Iterate through one ob\n for (let key in freqCounter1) {\n if (!(key in freqCounter2)) {\n return false;\n }\n if (freqCounter2[key] !== freqCounter1[key]) {\n return false;\n }\n }\n return true;\n}", "function anagram(s1, s2) {\n\ts1 = s1.replace(/\\W/g,'').toLowerCase();\n\ts2 = s2.replace(/\\W/g,'').toLowerCase();\n\t//does not remove numbers\n\tconsole.log(s1);\n\tif (s1.length != s2.length) return false;\n\treturn s1.split('').sort().join('') == s2.split('').sort().join('');\n}", "function validAnagram(str1, str2) {\n\n // no need to check if strings arent same length\n if(str1.length != str2.length) {\n return false\n }\n\n // storatge for counters\n let cache1 = {}\n let cache2 = {}\n\n // counter\n function counter(cache, str) {\n for(let char of str) {\n if(cache[char]) {\n cache[char] += 1\n } else {\n cache[char] = 1\n }\n }\n }\n\n counter(cache1, str1)\n counter(cache2, str2)\n\n // checking if each cache has same amount of each item\n for(const prop in cache1) {\n if(cache1[prop] !== cache2[prop]) {\n return false\n }\n }\n\n return true\n}", "function validAnagram(word1, word2){\n if (word1.length !== word2.length) {\n return false;\n }\n\n let counter = {};\n\n for (let i = 0; i < word1.length; i++) {\n let letter = word1[i];\n if (counter[letter]) {\n counter[letter]++;\n } else {\n counter[letter] = 1;\n }\n }\n\n for (let i = 0; i < word2.length; i++) {\n let letter = word2[i];\n if (!counter[letter]) {\n return false;\n } else {\n counter[letter] -= 1;\n }\n }\n return true;\n}", "function anagram (str1, str2) {\n\tvar letterCount = { };\n\n\tletterCount = countWords(str1, letterCount, 1) // pass to do positive count of letters in str1\n\tletterCount = countWords(str2, letterCount, -1) // pass to do negative count of letters in str2\n\t\n\t/* If the strings are anagrams, we expect every entry in the dictionary to \n\t * be equal to 0. Otherwise there will be some entry with a negative or positive count. */\n\tfor (key in letterCount) {\n\t\tif (letterCount[key] != 0)\n\t\t\treturn false\n\t}\n\n\treturn true\n}", "function findAnagram(str1, str2){ // You wrote this\r\n if(str1.length !== str2.length){\r\n return false;\r\n }\r\n let obj1 = {}\r\n let obj2 = {}\r\n for(let char of str1){\r\n obj1[char] = (obj1[char] || 0) + 1\r\n }\r\n for(let char of str2){\r\n obj2[char] = (obj2[char] || 0) + 1\r\n }\r\n for(let key in obj1){\r\n if(!(key in obj2)){\r\n return false\r\n }\r\n if(obj2[key] !== obj1[key]){\r\n return false\r\n }\r\n }\r\n return true\r\n}", "function isAnagram(string1, string2){\n if(string1.length !== string2.length) return false;\n\n let string1CharCounts = {};\n let string2CharCounts = {}\n\n for(let i = 0; i < string1.length; ++i){\n let char = string1[i];\n string1CharCounts[char] = string1CharCounts[char] === undefined ? 1 : ++string1CharCounts[char];\n }\n\n for(let i = 0; i < string2.length; ++i){\n let char = string2[i];\n string2CharCounts[char] = string2CharCounts[char] === undefined ? 1 : ++string2CharCounts[char];\n }\n\n for(let char in string1CharCounts){\n let leftCount = string1CharCounts[char];\n let rightCount = string2CharCounts[char];\n\n if(leftCount !== rightCount) return false;\n\n delete string1CharCounts[char];\n delete string2CharCounts[char];\n }\n\n return !Object.keys(string2CharCounts).length;\n}", "function anagram(str1, str2){\n if(str1.length != str2.length)return false;\n characterCount = {}\n for(let s1 of str1){\n characterCount[s1] = characterCount[s1] + 1 || 1\n }\n for(let s2 of str2){\n if(!characterCount[s2])return false;\n else characterCount[s2]--;\n }\n return true;\n}", "function anagramStr(str, input){\n if(str.length != input.length){\n return false;\n }\n let loopData = {};\n str = str.toLowerCase().trim();\n for (let index = 0; index < str.length; index++) {\n let element = str[index];\n loopData[element] = element && loopData[element] ? loopData[element] + 1 : 1;\n }\n console.log(loopData);\n input = input.toLowerCase().trim();\n for (let index = 0; index < input.length; index++) {\n const element = input[index];\n if(!loopData[element]){\n return false;\n }\n loopData[element]--;\n }\n console.log(loopData);\n return true;\n}", "function validAnagram(str1, str2){\n // add whatever parameters you deem necessary - good luck!\n if (str1.length !== str2.length ) {\n return false\n }\n\n let strObj = {};\n\n for (let val in str1 ) {\n // for strings you need to do strObj[str1[val]]\n // if key exists add to it if not create it\n strObj[str1[val]] = (strObj[str1[val]] || 0) + 1;\n }\n\n for (let val in str2) {\n strObj[str2[val]] = (strObj[str2[val]] || 0) + 1;\n }\n\n // now loop over the to see if the values are even\n for (let key in strObj) {\n if (strObj[key] % 2 !== 0) {\n return false\n }\n }\n\n return true\n\n}", "function validAnagram(str1, str2) {\n\tif (str1.length !== str2.length) return false;\n\n\t// Does the strings have the same chars and its counts\n\t// { a: 2, b: 1, r: 3, o: 5}\n\tlet freq1 = {};\n\tlet freq2 = {};\n\n\t// Iterate trough the strings and add the chars to the freq counters\n\tfor (let i of str1) {\n\t\tfreq1[i] = freq1[i] ? freq1[i] + 1 : 1;\n\t}\n\tfor (let i of str2) {\n\t\tfreq2[i] = freq2[i] ? freq2[i] + 1 : 1;\n\t}\n\tconsole.log(freq1, freq2);\n\t// Compare the strings and return bool\n\tfor (let i in freq1) {\n\t\tif (!(i in freq2)) {\n\t\t\treturn false;\n\t\t}\n\t\t// if the value of the key is diffrent\n\t\tif (freq1[i] !== freq2[i]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "function anagramsOfEachOther(s, t) {\n return s.split('').sort().join('') === t.split('').sort().join('');\n}", "function anagrams(str1, str2) {\n return cleanString(str1) === cleanString(str2);\n}", "function checkAnagram(a = '', b = '') {\n var array = {};\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n let res = a.charCodeAt(i) - 97;\n console.log('res', res);\n array[res] = (array[res] || 0) + 1;\n }\n console.log('array', array);\n\n for (let j = 0; j < b.length; j++) {\n let res = b.charCodeAt(j) - 97;\n if (!array[res]) {\n return false;\n }\n array[res]--;\n }\n return true;\n}", "function isIsogram(str) {\n str = str.toLowerCase().split('').sort()\n return str.some((letter, i) => letter === str[i + 1]) ? false : true\n}", "function anagrams(stringA, stringB) {\n const sortedStrA = sortStr(stringA)\n const sortedStrB = sortStr(stringB)\n\n return sortedStrA === sortedStrB\n\n\n}", "function checkAnagramWithTimeComplexity(str1, str2) {\n str1 = str1.toLowerCase();\n str2 = str2.toLowerCase();\n if (str1.length !== str2.length) return false\n let counting = {}\n for (let c of str1) {\n counting[c] = (counting[c] + 1) || 1;\n }\n for (let c of str2) {\n if (counting[c]) {\n --counting[c];\n }\n else {\n return false;\n }\n }\n return true;\n}", "isAnagramPalindrome(primes){\n var arr = []; \n arr = primes;\n console.log('Anagrams that are palindromes');\n \n for (let i = 0; i < arr.length; i++) {\n for (let j = i+1; j < arr.length; j++) {\n if (this.anagramDetection(arr[i].toString(),arr[j].toString())) {\n if (this.isPalindrome(arr[i].toString(),arr[j].toString())) {\n console.log(arr[i]+' '+arr[j]);\n }\n }\n }\n }\n \n }", "function validAnagram(s, t) {\n if (s.length !== t.length) {\n return false\n }\n let charMap = {}\n s = s.split('')\n for (let index = 0; index < s.length; index++) {\n if (charMap[s[index]]) {\n charMap[s[index]] += 1\n } else {\n charMap[s[index]] = 1\n }\n }\n for (let index = 0; index < t.length; index++) {\n if (!charMap[t[index]]) {\n return false\n } else {\n charMap[t[index]]--\n }\n }\n return true\n}", "function anagrams(stringA, stringB) {\n if (stringA.length !== stringB.length) {\n return false;\n }\n const lowerStrA = stringA.toLowerCase();\n const lowerStrB = stringB.toLowerCase();\n const mapStrA = mapStr(lowerStrA);\n const mapStrB = mapStr(lowerStrB);\n\n // console.log(\"mapStrA\", mapStrA);\n // console.log(\"mapStrB\", mapStrB);\n\n let flag = true;\n for (let i in mapStrA) {\n const curValue = mapStrA[i];\n if (mapStrB[i] !== curValue) {\n flag = false;\n break;\n }\n }\n return flag;\n}", "function anagram(stringA, stringB) {\n const charMapA = buildCharMap(stringA);\n const charMapB = buildCharMap(stringB);\n\n if (Object.keys(charMapA).length !== Object.keys(charMapB).length) {\n return false;\n }\n for (const char in charMapA) {\n if (charMapA[char] !== charMapB[char]) {\n return false;\n }\n }\n\n return true;\n}", "function funWithAnagrams(arr) {\n let uniqueWords = [arr[0]];\n for (let i = 1; i < arr.length; i++) {\n let duplicate = false;\n for (let j = 0; j < uniqueWords.length; j++) {\n if (isAnagram(uniqueWords[j], arr[i])) {\n duplicate = true;\n }\n }\n if (!duplicate) uniqueWords.push(arr[i]);\n }\n return uniqueWords.sort();\n}", "function areAnagrams(str1, str2) {\n if (str1.length != str2.length) {\n return false;\n }\n let hash_map = {}\n for (let i = 0; i < str1.length; i++) {\n let char = str1[i];\n if (char in hash_map) {\n hash_map[char]++;\n } else {\n hash_map[char] = 1;\n }\n }\n\n console.log(hash_map);\n\n for (let i = 0; i < str2.length; i++) {\n let char = str2[i];\n if (!hash_map[char]) {\n return false;\n } else {\n hash_map[char]--;\n }\n }\n return true;\n}", "function validAnagram(str1, str2) {\n //if both strings are empty return true\n if(str1.length === 0 && str2.length === 0) return true;\n //create two empty objects\n let obj1 = {};\n let obj2 = {};\n //loop through each of the strings and put them in the objects\n for(let char of str1) {\n if(obj1[char] > 0) {\n obj1[char]++\n } else {\n obj1[char] = 1;\n }\n }\n for(let char of str2) {\n if(obj2[char] > 0) {\n obj2[char]++\n } else {\n obj2[char] = 1;\n }\n }\n //check if each key in strings match to each other \n for(let key in obj1) {\n if(!key in obj2) return false;\n //chack if the frequencies match\n if(obj1[key] !== obj2[key]) return false;\n }\n return true;\n}", "function validAnagram(str1, str2){\n // check length is the same, if so FALSE\n if (str1.length !== str2.length) return false;\n let obj1 = {}\n let obj2 = {}\n // make object 1 for str1: 1 for loop\n for (let char of str1) {\n obj1[char] = (obj1[char] || 0) + 1;\n }\n // make object 2 for str1: 1 for loop\n for (let char of str2) {\n obj2[char] = (obj2[char] || 0) + 1;\n }\n // compare objects!: 1 for loop \n for (let key in obj1) {\n // make sure each key for obj1 is in obj2\n if (!(key in obj2)) return false;\n // make sure each key value for obj1 is the same for obj2 \n if (obj1[key] !== obj2[key]) return false;\n }\n return true}", "function anagrams(stringA, stringB) {\n // use helper function and build a map for each string\n const charMapA = buildCharMap(stringA);\n const charMapB = buildCharMap(stringB);\n\n if (Object.keys(charMapA).length !== Object.keys(charMapB).length) {\n return false;\n }\n\n // iterate through charMap\n for (let char in charMapA) {\n if (charMapA[char] !== charMapB[char]) {\n // if these do not line up, return false because its not an anagram\n return false;\n }\n }\n\n // if all conditions are met, return true for anagram\n return true;\n}", "function anagram(str1, str2) {\n // if not equal then this string is not the same\n if (str1.length !== str2.length) return false\n let mapStr1={};\n let mapStr2={}\n let arr1 = str1.split('');\n let arr2 = str2.split('');\n let v2\n arr1.forEach((v,i)=>{\n mapStr1[v] = mapStr1[v] ? mapStr1[v] + 1 : 1\n v2 = arr2[i]\n mapStr2[v2] = mapStr2[v2] ? mapStr2[v2] + 1 : 1\n })\n\n for(let i in mapStr1) {\n if (mapStr1[i] !== mapStr2[i]) {\n return false\n }\n }\n return true\n}", "function fourthAnagram(str1, str2) {\n let obj = {};\n for (let i = 0; i < str1.length; i++) {\n if (obj[`${str1[i]}1`]) {\n obj[`${str1[i]}1`]++\n } else {\n obj[`${str1[i]}1`] = 1\n }\n }\n for (let i = 0; i < str2.length; i++) {\n if (obj[`${str2[i]}2`]) {\n obj[`${str2[i]}2`]++\n } else {\n obj[`${str2[i]}2`] = 1\n }\n } \n\n for (const key in obj) {\n if (obj[key[0]+\"1\"] !== obj[key[0]+\"2\"]) {\n return false;\n }\n }\n return true;\n}", "function validAnagram(str1, str2) {\n if (str1 === '' && str2 === '') {\n return true;\n }\n\n if (str1 === str2) {\n return true;\n }\n\n if (str1.length !== str2.length) {\n return false;\n }\n\n let arr1 = str1.split('');\n let arr2 = str2.split('');\n\n for (let i = 0; i < str1.length; i++) {\n let correctIndex = arr2.indexOf(arr1[i]);\n if (correctIndex === -1) {\n return false;\n }\n arr2.splice(correctIndex, 1);\n }\n return true;\n}", "function anagrams(stringA, stringB) {\n return cleanAndSort(stringA) === cleanAndSort(stringB);\n}", "function thirdAnagram(str1, str2) {\n let str1Obj = {};\n let str2Obj = {};\n for (let i = 0; i < str1.length; i++) {\n if (str1Obj[str1[i]]) {\n str1Obj[str1[i]]++\n } else {\n str1Obj[str1[i]] = 1\n }\n }\n for (let i = 0; i < str2.length; i++) {\n if (str2Obj[str2[i]]) {\n str2Obj[str2[i]]++\n } else {\n str2Obj[str2[i]] = 1\n }\n\n }\n\n\n for (const key in str1Obj) {\n\n if (str1Obj[key] !== str2Obj[key]) {\n return false\n }\n\n }\n\n return true\n\n}", "function sherlockAndAnagrams(s) {\n let count = 0;\n //글자 수\n for (let i = 1; i < s.length; i++) {\n for (let j = 0; j < s.length - i; j++) {\n const target = s.substring(j, j + i, j);\n // console.log(\"-------\");\n for (let k = 1 + j; k < s.length - i + 1; k++) {\n let compared = s.substring(k, k + i);\n if (isAnagram(target, compared)) {\n count++;\n }\n }\n }\n }\n return count;\n}", "function isDuplicate(str) {\n for (i = 0; i < guessesSoFarArray.length; i++) {\n if (str === guessesSoFarArray[i]) {\n return true;\n } else { }\n } // end of for loop\n return false;\n} // end of isDuplicate()", "function validAnagram(str, expect) {\n if (str.length !== expect.length) {\n return false;\n }\n\n if (str === \"\" && expect === \"\") {\n return true;\n }\n\n // create empty object\n const splitStr = {};\n const splitExpect = {};\n\n // loop\n for (let char of str) {\n if (char in splitStr) {\n // if no str in obj, add str to key, and set its value to 1\n splitStr[char] = splitStr[char] + 1;\n } else {\n //if str in obj, plus its value with 1\n splitStr[char] = 1;\n }\n }\n\n // loop that logic again with expect\n for (let char of expect) {\n if (char in splitExpect) {\n // if no str in obj, add str to key, and set its value to 1\n splitExpect[char] = splitExpect[char] + 1;\n } else {\n //if str in obj, plus its value with 1\n splitExpect[char] = 1;\n }\n }\n\n for (let char in splitStr) {\n if (!(char in splitExpect) || splitStr[char] !== splitExpect[char]) {\n return false;\n }\n }\n\n return true;\n}", "function anagrams(stringA, stringB) {\n\treturn cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(string1, string2){\n let obj = {};\n\n string1.split(\"\").forEach((char) => {\n if (!obj[char]) {\n obj[char] = 1;\n } else {\n obj[char] += 1;\n }\n });\n\n string2.split(\"\").forEach((char) => {\n if (!obj[char]) {\n obj[char] = 1;\n } else {\n obj[char] -= 1;\n }\n });\n\n return Object.values(obj).every(char => char === 0);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function isAnagram (a, b) {\n var a = a.replace(/\\s+/g, '').split('');\n var b = b.replace(/\\s+/g, '').split('');\n var i = 0;\n while(i < b.length){\n if(a.includes(b[i])) {\n a.splice(a.indexOf(b[i]), 1);\n i++;\n } else {\n return false;\n }\n }\n return true;\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}" ]
[ "0.7628381", "0.7606626", "0.7606626", "0.7606626", "0.7489989", "0.7457987", "0.7451937", "0.74071854", "0.73828864", "0.73485065", "0.73197556", "0.72913384", "0.7215078", "0.72076035", "0.71930754", "0.7192925", "0.71700805", "0.7136636", "0.7135387", "0.71331775", "0.70939714", "0.70796305", "0.70644456", "0.70641065", "0.7022061", "0.69990945", "0.6976443", "0.6974948", "0.69532937", "0.69225353", "0.6921386", "0.6912655", "0.6894445", "0.68920386", "0.6889316", "0.68870777", "0.6879658", "0.6876604", "0.68670785", "0.6855109", "0.68549836", "0.68506515", "0.6839222", "0.68268", "0.6799963", "0.67905617", "0.67862904", "0.67768437", "0.677459", "0.6770936", "0.677008", "0.6758802", "0.67508066", "0.67370844", "0.6719341", "0.669898", "0.6695022", "0.6682725", "0.6651565", "0.6634557", "0.6619581", "0.6611624", "0.6611479", "0.6596681", "0.6595538", "0.65884113", "0.6586167", "0.6581028", "0.6568657", "0.6554862", "0.6554113", "0.65536624", "0.65522707", "0.6542975", "0.6535016", "0.65347075", "0.65312755", "0.6519285", "0.65185344", "0.6518223", "0.6513612", "0.6502742", "0.6494808", "0.64915633", "0.6469529", "0.6453696", "0.643458", "0.64201236", "0.64071065", "0.64042693", "0.64004076", "0.6393976", "0.6393049", "0.6377061", "0.6365005", "0.6365005", "0.6365005", "0.6365005", "0.6361617", "0.63571244" ]
0.68044347
44
console.log(secondAnagram("gizmo", "sally")); // => false console.log(secondAnagram("elvis", "lives")) // => true console.log(secondAnagram("elviss", "lives")) // => false
function thirdAnagram(str1, str2) { let str1Obj = {}; let str2Obj = {}; for (let i = 0; i < str1.length; i++) { if (str1Obj[str1[i]]) { str1Obj[str1[i]]++ } else { str1Obj[str1[i]] = 1 } } for (let i = 0; i < str2.length; i++) { if (str2Obj[str2[i]]) { str2Obj[str2[i]]++ } else { str2Obj[str2[i]] = 1 } } for (const key in str1Obj) { if (str1Obj[key] !== str2Obj[key]) { return false } } return true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAnagram(first, second) {\n let output1 = first.toLowerCase().split(\"\").sort().join(\"\");\n let output2 = second.toLowerCase().split(\"\").sort().join(\"\");\n return output1 == output2;\n}", "function isAnagram(str1, str2) {}", "function isAnagram(str1, str2) {}", "function isAnagram(str1, str2) {}", "function isAnagram(stgOne, stgTwo) {\n \n \n}", "isAnagram(a, b) {\n\n var x = a.toLowerCase();\n var y = b.toLowerCase();\n if (x.length != y.length) {\n return false;\n //console.log(\"Given string is not Anagram.\");\n }\n else {\n var m = [], n = [];\n m = x.split(\"\");\n n = y.split(\"\");\n m = m.sort();\n n = n.sort();\n if (m.length == n.length) {\n for (let i = 0; i < m.length; i++) {\n if (m[i] != n[i]) {\n return false;\n }\n\n }\n return true;\n }\n }\n }", "function testAnagram (s1, s2){\n // creating if statments \n if(!s1 || !s2 || s1.length !== s2.length){return false;}\n var lS1 = s1.toLowerCase();\n var lS2 = s2.toLowerCase();\n if(lS1 === lS2) {return false;}\n var rS1 = lS1.split('').sort().join('');\n var rS2 = lS2.split('').sort().join('');\n return rS1 === rS2;\n }", "function is_anagram (str1, str2) {\n return formatStr(str1) === formatStr(str2);\n}", "function anagramCheck (str1, str2) {\n\n // ---------- Your Code Here ----------\n\n // gets rid of all the spaces and makes them lowercase to produce a string of all the letters lumped together, making comparison easier\n str1 = str1.replace(/\\s/g, \"\");\n str1 = str1.toLowerCase();\n str2 = str2.replace(/\\s/g, \"\");\n str2 = str2.toLowerCase();\n\n\n // if (str1.length !== str2.length) {\n // return false;\n // }\n \n str1 = str1.split(\"\").sort().join(\"\");\n str2 = str2.split(\"\").sort().join(\"\");\n \n return (str1 == str2);\n\n // ----------- End Code Area -----------\n\n}", "function isAnagram(s1, s2) {\n var i = 0\n //sortChars :: String -> String\n , sortChars = function (s) {\n return s.toLowerCase().split('').sort().join('');\n }\n ;\n if (s1.length !== s2.length){ return false; }\n if (sortChars(s1) !== sortChars(s2)) { return false; }\n return true;\n}", "function isAnagram2(s1, s2) {\n if (s1.length !== s2.length) return false\n const s1Arr = s1.split(\"\")\n const s2Arr = s2.split(\"\")\n s1Arr.sort()\n s2Arr.sort()\n for (let i = 0;i < s1Arr.length; i++) {\n if (s1Arr[i] !== s2Arr[i]) {\n return false\n }\n }\n return true\n}", "function isAnagram(str1, str2) {\n return formatString(str1) === formatString(str2);\n}", "function anagram(string, str){\n return string.split('').sort().join('') === str.split('').sort().join('')\n}", "checkAnagram2(str1, str2) {\n let unsortedStr1 = \"\" + str1;\n let unsortedStr2 = \"\" + str2;\n if (unsortedStr1.length != unsortedStr2.length) {\n return false;\n }\n sortedStr1 = this.sort1(unsortedStr1);\n sortedStr2 = this.sort1(unsortedStr2);\n let b = this.check(sortedStr1, sortedStr2);\n if (b == true) {\n return true;\n }\n else {\n return false;\n }\n }", "function validAnagram(str1, str2){\n // add whatever parameters you deem necessary - good luck!\n \n let s1 = str1.split(\"\").sort().join(\"\");\n let s2 = str2.split(\"\").sort().join(\"\");\n \n return s1===s2;\n\n}", "function isAnagram(str1, str2) {\n return formatStr(str1) === formatStr(str2)\n}", "function isAnagram (s, t) {\n let anagram = true;\n if ( s.length !== t.length ) {\n return false;\n }\n else {\n let sCharArray = [...s];\n let tCharArray = [...t];\n sCharArray.sort();\n tCharArray.sort();\n for (let i = 0 ; i < sCharArray.length ; i++ ) {\n if ( sCharArray[i] !== tCharArray[i] ) {\n anagram = false;\n break;\n }\n }\n }\n return anagram;\n}", "function validAnagram(first, second){\n\tif(first.length !== second.length){\n\t\treturn false;\n\t}\n\t\n\tconst lookup = {}; //obj as freq.counter\n\n\t//Break down the first string.\n\tfor(let i=0; i < first.length ; i++){\n\t\tlet letter = first[i];\n\t\t//if letter exists, increment, otherwise set to 1\n\t\tlookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n\t}\n\n\t//Break down the second string\n\t//then check to first string.\n\tfor(let i=0; i < second.length; i++){\n\t\tlet letter = second[i];\n\t\t//can't find letter or letter is zero then not anagram.\n\t\tif(!lookup[letter]){\n\t\t\treturn false;\n\t\t}else{\n\t\t\tlookup[letter] -= 1;\n\t\t}\t\n\t}\n\treturn true;\n}", "function checkAnagram() {\t\n\t\tvar first_str, second_str, first_temp, second_temp;\n\t\tfirst_str = $(\"#anagram-a\").val();\n\t\tfirst_temp = first_str;\n\t\tsecond_str = $(\"#anagram-b\").val();\n\t\tsecond_temp = second_str\n\t\tif(first_str.length != second_str.length) {\n\t\t\t$(\"#anagram-output\").append(\"<p>\\\"\" + first_str + \"\\\" and \\\"\" \n\t\t\t\t+ second_str + \"\\\" are not anagrams for each other</p>\");\n\t\t\treturn;\n\t\t}\n\t\tfirst_str = first_str.split(\"\").sort().join(\"\");\n\t\tsecond_str = second_str.split(\"\").sort().join(\"\");\n\t\tfor(var i = 0; i < first_str.length; i++) {\n\t\t\tif(first_str[i] != second_str[i]) {\n\t\t\t\t$(\"#anagram-output\").append(\"<p>\\\"\" + first_temp + \"\\\" and \\\"\" \n\t\t\t\t+ second_temp + \"\\\" are not anagrams for each other</p>\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t$(\"#anagram-output\").append(\"<p>\\\"\" + first_temp + \"\\\" and \\\"\" \n\t\t\t\t+ second_temp + \"\\\" are anagrams for each other</p>\");\n\t}", "function secondAnagram(str1, str2) {\n str1 = str1.split(\"\");\n str2 = str2.split(\"\");\n\n str1.sort();\n str2.sort();\n\n str1 = str1.join(\"\");\n str2 = str2.join(\"\");\n\n if (str1 == str2) {\n return true;\n } else {\n return false;\n }\n}", "function compare(s1, s2) {\n var flag = 'Strings are not anagram'\n for (var i = 0; i < s1.length; i++) {\n\n if (s1.charAt(i) != s2.charAt(i)) {\n flag = 'Strings are not anagram'\n return flag\n }\n else {\n flag = 'Strings are anagram'\n }\n\n }\n\n if (flag == 'Strings are anagram') {\n return flag\n }\n\n}", "function validAnagram(str1, str2){\n let sortedStr1 = str1.split('').sort().join('');\n let sortedStr2 = str2.split('').sort().join('');\n if (sortedStr1 === sortedStr2) {\n return true;\n } else {\n return false;\n }\n}", "algoanagram(s1, s2) {\n\n var l1 = s1.length\n var l2 = s2.length\n var flag = true\n if (l1 != l2) {\n flag = false\n }\n else {\n var s3 = s1.toLowerCase()\n var s4 = s2.toLowerCase()\n\n s3 = s3.split('').sort().join('');\n s4 = s4.split('').sort().join('');\n\n // console.log(s3);\n // console.log(s4);\n flag = s3 === s4;\n // var c=a.split(\" \")\n // var c=b.split(\" \")\n\n\n //console.log(c)\n // console.log(d)\n\n\n\n\n\n }\n if (flag == true) {\n console.log(s1 + \" and \" + s2 + \" are anagram\")\n }\n else {\n console.log(s1 + \" and \" + s2 + \" are not anagram\")\n }\n }", "function isAnagram(str1, str2) {\n if (str1.length !== str2.length) {\n return false;\n }\n for (var i = 0; i < str1.length; i++) {\n var foundEqual = false;\n for (var j = 0; j < str2.length; j++) {\n if (str1[i] === str2[j]) {\n foundEqual = true;\n break;\n }\n }\n if (!foundEqual) {\n return false;\n }\n }\n for (var i = 0; i < str2.length; i++) {\n var foundEqual = false;\n for (var j = 0; j < str1.length; j++) {\n if (str2[i] === str1[j]) {\n foundEqual = true;\n break;\n }\n }\n if (!foundEqual) {\n return false;\n }\n }\n return true;\n}", "function validAnaram2(first, second) {\n if (first.length !== second.length) {\n return false;\n }\n //Initalize object\n const lookup = {};\n\n for (let i = 0; i < first.length; i++) {\n let letter = first[i];\n //if letter exists, incremnt, otherwise set to 1\n lookup[letter] ? (lookup[letter] += 1) : (lookup[letter] = 1);\n }\n\n for (let i = 0; i < second.length; i++) {\n let letter = second[i];\n //Cant find letter or letter is zero then its not an anagram\n //Because zero is falsey\n if (!lookup[letter]) {\n return false;\n } else {\n //If letter exists, subtract one, one is truthy\n lookup[letter] -= 1;\n }\n }\n return true;\n}", "function validAnagram2(str1, str2) {\n if(str1.length !== str2.length) return false\n return str1.split(\"\").sort().join(\"\") === str2.split(\"\").sort().join(\"\");\n}", "function isAnagram(s, t) {\n let newS = s.split(\"\").sort().join(\"\");\n let newT = t.split(\"\").sort().join(\"\");\n if (newS === newT) {\n return true\n } else {\n return false\n }\n}", "function validAnagram2(first, second) {\n if (first.length !== second.length) return false;\n\n const lookup = {};\n\n for (let i = 0; i < first.length; i++) {\n let letter = first[i];\n // if letter exists, increment, otherwise set to 1\n lookup[letter] ? (lookup[letter] += 1) : (lookup[letter] = 1);\n }\n\n for (let i = 0; i < second.length; i++) {\n let letter = second[i];\n // can't find letter or letter is zero then it's not an anagram\n if (!lookup[letter]) {\n return false;\n } else {\n lookup[letter] -= 1;\n }\n }\n return true;\n}", "function secondAnagram(str1, str2) {\n str1.split(\"\").sort().join(\"\");\n str2.split(\"\").sort().join(\"\");\n\n return str1 === str2;\n}", "function isAnagram(str1, str2) {\n if (str1.length !== str2.length) return false;\n\n let letterMap = {};\n\n for (let i = 0; i < str1.length; i++) {\n let current = str1[i].toLowerCase()\n if (!letterMap[current]) {\n letterMap[current] = 1\n } else {\n letterMap[current] ++\n }\n }\n \n for (let j = 0; j < str2.length; j++) {\n let current = str2[j].toLowerCase();\n if (letterMap[current]) {\n letterMap[current] --\n } else {\n return false;\n }\n }\n return Object.values(letterMap).every(el => el === 0) ? true : false;\n}", "function checkAnagram(str1,str2){\n if(str1.length !== str2.length){\n return false;\n }\n var charStr1=str1.split(\"\").sort();\n var charStr2=str2.split(\"\").sort();\n\n for(var i=0; i<charStr1.length; i++){\n if (charStr1[i]!==charStr2[i]){\n return false;\n }\n }\n\n return true;\n\n}", "function isAnagram(s1, s2) {\n if (s1.length !== s2.length) return false\n const map = new Map()\n for (let i = 0; i < s1.length; i++) {\n if (!map.has(s1[i])) {\n map.set(s1[i], 1)\n } else {\n map.set(s1[i], map.get(s1[i]) + 1)\n }\n }\n for (let i = 0; i < s2.length; i++) {\n if (!map.has(s2[i])) return false\n map.set(s2[i], map.get(s2[i]) - 1)\n if (map.get(s2[i]) === 0) {\n map.delete(s2[i])\n }\n }\n return map.size === 0\n}", "anagram(string1, string2) {\n try {\n var format = /[a-zA-Z0-9]/;\n var result = false;\n /*\n *checks if strings are within the given format\n */\n if (format.test(string1) && format.test(string2)) {\n /*\n *checks if both strings are of equal length\n */\n if (string1.length == string2.length) {\n /*\n *splits the given strings and sorts them\n */\n var sort1 = string1.toString().split(\"\").sort().join(\"\");\n var sort2 = string2.toString().split(\"\").sort().join(\"\");\n result = sort1 == sort2;\n }\n else {\n console.log(\"Strings length must be of equal length\");\n }\n\n /*\n *checks if one string is an anagram of another\n */\n if (result == true) {\n // console.log(string1 + \" \" + string2);\n return true;\n }\n else {\n return false;\n }\n }\n else {\n console.log(\"Enter only string\");\n\n }\n }\n catch (error) {\n console.log(error.message);\n }\n}", "function validAnagram(first, second){\n if(first.length !== second.length){\n return false;\n }\n\n const lookup = {};\n\n for (let i = 0; i < first.length; i++){\n let letter = first [i];\n //if letter exists in object list, increment, otherwise set to 1\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n\n for (let i = 0; i < second.length; i ++){\n let letter = second[i];\n // if can't find letter or letter is zero then it's not an anagram, return false\n // zero is falsey so it will return false if lookup[letter] = 0\n if(!lookup[letter]){\n return false;\n }else{\n lookup[letter] -= 1;\n }\n }\n return true;\n}", "isAnagram(str1, str2) {\n\n if (str1.length !== str2.length) {\n return false;\n }\n\n var sortStr1 = str1.split('').sort().join('');\n var sortStr2 = str2.split('').sort().join('');\n\n return (sortStr1 === sortStr2);\n }", "function validAnagram(str1, str2) {\n if (str1.length !== str2.length) return false\n\n let check = {}\n\n for (let i = 0; i < str1.length; i++) {\n const letter = str1[i]\n check[letter] ? (check[letter] += 1) : (check[letter] = 1)\n }\n\n for (let i = 0; i < str2.length; i++) {\n const letter = str2[i]\n if (!check[letter]) {\n return false\n } else {\n check[letter] -= 1\n }\n }\n\n return true\n}", "function validAnagram(str1, str2) {\n if(str1.length !== str2.length) {\n return false;\n }\n \n let lookup = {};\n \n for(i = 0; i < str1.length; i++){\n let letter = str1[i]\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n \n for(let j = 0; j < str2.length; j++) {\n let letter = str2[j]\n if(!lookup[letter]) {\n return false;\n } else {\n lookup[letter] -= 1\n }\n }\n return true;;\n}", "function anagram (str1,str2){\n if(str1.length!==str2.length)\n return false;\n\n let freqCounter1 = {};\n let freqCounter2 = {};\n\n for(let val of str1)\n freqCounter1[val] = (freqCounter1[val]||0)+1;\n\n for(let val of str2)\n freqCounter2[val] = (freqCounter2[val]||0)+1;\n \n for(let key in freqCounter2){\n \n if(!(key in freqCounter2))\n return false;\n \n if(freqCounter2[key]!==freqCounter1[key])\n return false;\n \n return true;\n }\n\n\n}", "function isAnagram(s, t) {\n let sortedS = s.split(\"\").sort().join(\"\")\n let sortedT = t.split(\"\").sort().join(\"\")\n return sortedS === sortedT\n}", "function isAnagram (str1, str2) {\n if(str1.length !== str2.length) return false\n let frequencyCounter1 = getCharFrequency(str1)\n let frequencyCounter2 = getCharFrequency(str2)\n for(let key in frequencyCounter1){\n if(!frequencyCounter2.hasOwnProperty(key)) return false\n if(frequencyCounter1[key] !== frequencyCounter2[key]) return false\n }\n return true\n}", "function anagram(str1, str2) {\n\tif (str1.length !== str2.length) {\n\t\treturn false;\n\t}\n\tlet frequencyStr1 = {};\n\tfor (let i = 0; i < str1.length; i++) {\n\t\tlet letter = str1[i];\n\t\tfrequencyStr1[letter] ? (frequencyStr1[letter] += 1) : (frequencyStr1[letter] = 1);\n\t}\n\n\tfor (let i = 0; i < str2.length; i++) {\n\t\tlet letter = str2[i];\n\t\tif (!frequencyStr1[letter]) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tfrequencyStr1[letter] -= 1;\n\t\t}\n\t}\n\treturn true;\n}", "function validAnagram(first, second) {\n if (first.length !== second.length) {\n return false;\n }\n const lookup = {}; // Ospace (a)\n const firstLength = first.length;\n for (let index = 0; index < firstLength; index++) { // Otime (a)\n const element = first[index];\n lookup[element] = (lookup[element] || 0) + 1;\n }\n const secondLength = second.length;\n for (let index = 0; index < secondLength; index++) { // Otime (b)\n const element = second[index];\n if (!lookup[element]) {\n return false;\n }\n lookup[element] -= 1;\n }\n return true;\n}", "function isAnagram(str1, str2){\n \n if(str1==null || str2==null \n || str1.length==0 || str2.length==0 \n || str1.length != str2.length){\n return false;\n }\n\n for(let a of str1){\n if(!str2.contains(a)){ /// time complexity = O(n^2) :( \n return false;\n }\n }\n return true;\n\n}", "function validAnagram(str1, str2){\n // add whatever parameters you deem necessary - good luck!\n // check if str1 has the same length as str2 & same characters\n if(str1.length !== str2.length){\n return false\n }\n // create an object call lookup\n let lookup = {}\n// construct the object first\n for (let i = 0; i < str1.length; i++){\n letter = str1[i]\n //if letter exits, increment, otherwise set to 1\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n console.log(lookup)\n for (let i = 0; i < str2.length; i++){\n let letter = second[i];\n // can't find letter of letter is zero then it's not an anagram\n if (!lookup[letter]) {\n return false;\n } else {\n lookup[letter] -= 1;\n }\n return true;\n }\n}", "function validAnagram(first, second) {\n if (first.length !== second.length) {\n return false;\n }\n\n const lookup = {};\n\n for (let i = 0; i < first.length; i++) {\n let letter = first[i];\n // if letter exists, increment, otherwise set to 1\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n // console.log(lookup)\n\n for (let i = 0; i < second.length; i++) {\n let letter = second[i];\n // can't find letter or letter is zero then it's not an anagram\n if (!lookup[letter]) {\n return false;\n } else {\n lookup[letter] -= 1;\n }\n }\n console.log(lookup)\n return true;\n}", "function validAnagram(word1, word2){\n if (word1.length !== word2.length) {\n return false;\n }\n\n let counter = {};\n\n for (let i = 0; i < word1.length; i++) {\n let letter = word1[i];\n if (counter[letter]) {\n counter[letter]++;\n } else {\n counter[letter] = 1;\n }\n }\n\n for (let i = 0; i < word2.length; i++) {\n let letter = word2[i];\n if (!counter[letter]) {\n return false;\n } else {\n counter[letter] -= 1;\n }\n }\n return true;\n}", "function validAnagram(first,second){\n if(first.length!== second.length){\n return false;\n }\n \n //Create an object \n const lookup = {};\n\n //Loop through first string\n for(let i =0;i<first.length;i++){\n let letter = first[i];\n //If letter exists increment otherwise set to 1\n lookup[letter]?lookup[letter]+=1:lookup[letter]=1;\n }\n console.log(lookup)\n\n //Loop through the second string \n for (let i = 0;i<second.length;i++){\n let letter =second[i];\n //If we can't find a letter or letter is zero , then its not an anagram\n if(!lookup[letter]){\n return false;\n }\n else{\n lookup[letter]-=1;\n }\n }\n\n return true;\n\n}", "isAnagram(string1, string2) {\n string1=string1+\"\";\n string2=string2+\"\";\n if (string1.length != string2.length) {\n return false;\n }\n var arr = [];\n for (let index = 0; index < 36; index++) {\n arr[index] = 0;\n\n }\n for (let index = 0; index < string1.length; index++) {\n var ch = string1.charAt(index);\n if (ch >= 'a' && ch <= 'z') {\n var code = ch.charCodeAt(0);\n\n arr[code - 97]++;\n } else if (ch >= 'A' && ch <= 'Z') {\n var code = ch.charCodeAt(0);\n arr[code - 65]++;\n } else {\n var code = ch.charCodeAt(0);\n arr[code - 22]++;\n }\n ch = string2.charAt(index);\n if (ch >= 'a' && ch <= 'z') {\n var code = ch.charCodeAt(0);\n\n arr[code - 97]--;\n } else if (ch >= 'A' && ch <= 'Z') {\n var code = ch.charCodeAt(0);\n arr[code - 65]--;\n } else {\n var code = ch.charCodeAt(0);\n arr[code - 22]--;\n }\n\n\n }\n for (let index = 0; index < 36; index++) {\n if (arr[index] != 0) {\n return false;\n }\n }\n return true;\n}", "function validAnagram (str1, str2) {\n let obj = {};\n if (str1.length !== str2.length) return false;\n for (let char of str1) {\n obj[char] = obj[char] ? obj[char] + 1 : 1;\n }\n for (let char of str2) {\n if (!obj[char]) {\n return false;\n } else {\n obj[char]--;\n }\n }\n return true;\n}", "function validAnagram(str1, str2) {\n // add whatever parameters you deem necessary - good luck!\n // Run checks if string is empty or strings are not same length\n if (str1 === \"\" && str2 === \"\") {\n return true;\n }\n if (str1.length !== str2.length) {\n return false;\n }\n //Initalize objects for counters\n let freqCounter1 = {};\n let freqCounter2 = {};\n\n //Create Objects through iteration\n for (let val of str1) {\n freqCounter1[val] = (freqCounter1[val] || 0) + 1;\n }\n for (let val of str2) {\n freqCounter2[val] = (freqCounter2[val] || 0) + 1;\n }\n\n //Iterate through one ob\n for (let key in freqCounter1) {\n if (!(key in freqCounter2)) {\n return false;\n }\n if (freqCounter2[key] !== freqCounter1[key]) {\n return false;\n }\n }\n return true;\n}", "function validAnagram(str1, str2) {\n if (str1.length !== str2.length) {\n return false;\n }\n\n if (str1 === '' && str2 === '') {\n return true;\n }\n\n const lookup = {};\n\n for (let i = 0; i < str1.length; i++) {\n let char = str1[i];\n lookup[char] ? (lookup[char] += 1) : (lookup[char] = 1);\n }\n\n for (let i = 0; i < str1.length; i++) {\n let char = str2[i];\n if (!lookup[char]) {\n return false;\n } else {\n lookup[char] -= 1;\n }\n }\n\n return true;\n}", "function isAnagram(word1,word2) {\n /* \n Check if the length of the first word is equal to the length of the second word. If not, return false\n */\n if (word1.length != word2.length) {\n return false;\n }\n\n // Convert word1 and word2 to lower case\n word1 = word1.toLowerCase();\n word2 = word2.toLowerCase();\n\n /*\n Convert each string to an array, sort in alphabetical order and convert back to a string. Check if the updated strings are the same.\n */\n return word1.split('').sort().join('') == word2.split('').sort().join('');\n}", "function validAnagram(str1, str2){\n // add whatever parameters you deem necessary - good luck!\n if (str1.length !== str2.length ) {\n return false\n }\n\n let strObj = {};\n\n for (let val in str1 ) {\n // for strings you need to do strObj[str1[val]]\n // if key exists add to it if not create it\n strObj[str1[val]] = (strObj[str1[val]] || 0) + 1;\n }\n\n for (let val in str2) {\n strObj[str2[val]] = (strObj[str2[val]] || 0) + 1;\n }\n\n // now loop over the to see if the values are even\n for (let key in strObj) {\n if (strObj[key] % 2 !== 0) {\n return false\n }\n }\n\n return true\n\n}", "function anagram(str1, str2){\n if(str1.length != str2.length)return false;\n characterCount = {}\n for(let s1 of str1){\n characterCount[s1] = characterCount[s1] + 1 || 1\n }\n for(let s2 of str2){\n if(!characterCount[s2])return false;\n else characterCount[s2]--;\n }\n return true;\n}", "function validAnagram(str1, str2) {\n\n // no need to check if strings arent same length\n if(str1.length != str2.length) {\n return false\n }\n\n // storatge for counters\n let cache1 = {}\n let cache2 = {}\n\n // counter\n function counter(cache, str) {\n for(let char of str) {\n if(cache[char]) {\n cache[char] += 1\n } else {\n cache[char] = 1\n }\n }\n }\n\n counter(cache1, str1)\n counter(cache2, str2)\n\n // checking if each cache has same amount of each item\n for(const prop in cache1) {\n if(cache1[prop] !== cache2[prop]) {\n return false\n }\n }\n\n return true\n}", "function validAnagram(str1, str2) {\n if (str1.length !== str2.length) {\n return false;\n }\n\n const lookup = {};\n\n for (let i = 0; i < str1.length; i++) {\n let letter = str1[i];\n // if letter exists, increment, otherwise set to 1\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n console.log(lookup)\n\n for (let i = 0; i < str2.length; i++) {\n let letter = str2[i];\n // can't find letter or letter is zero then it's not an anagram\n if (!lookup[letter]) {\n return false;\n } else {\n //we subtract one to make sure both str have same frequency of letter\n lookup[letter] -= 1;\n }\n }\n\n return true;\n}", "function anagramsOfEachOther(s, t) {\n return s.split('').sort().join('') === t.split('').sort().join('');\n}", "function validAnagram(str1, str2) {\n if (str1 === '' && str2 === '') {\n return true;\n }\n\n if (str1 === str2) {\n return true;\n }\n\n if (str1.length !== str2.length) {\n return false;\n }\n\n let anagram1 = {};\n\n for (let char of str1) {\n anagram1[char] = ++anagram1[char] || 1;\n }\n\n console.log('obj: ', anagram1);\n\n for (let char of str2) {\n if (!anagram1[char]) {\n return false;\n } else {\n anagram1[char] -= 1;\n }\n }\n return true;\n}", "function checkAnagramWithTimeComplexity(str1, str2) {\n str1 = str1.toLowerCase();\n str2 = str2.toLowerCase();\n if (str1.length !== str2.length) return false\n let counting = {}\n for (let c of str1) {\n counting[c] = (counting[c] + 1) || 1;\n }\n for (let c of str2) {\n if (counting[c]) {\n --counting[c];\n }\n else {\n return false;\n }\n }\n return true;\n}", "function isAnagram(string1, string2){\n if(string1.length !== string2.length) return false;\n\n let string1CharCounts = {};\n let string2CharCounts = {}\n\n for(let i = 0; i < string1.length; ++i){\n let char = string1[i];\n string1CharCounts[char] = string1CharCounts[char] === undefined ? 1 : ++string1CharCounts[char];\n }\n\n for(let i = 0; i < string2.length; ++i){\n let char = string2[i];\n string2CharCounts[char] = string2CharCounts[char] === undefined ? 1 : ++string2CharCounts[char];\n }\n\n for(let char in string1CharCounts){\n let leftCount = string1CharCounts[char];\n let rightCount = string2CharCounts[char];\n\n if(leftCount !== rightCount) return false;\n\n delete string1CharCounts[char];\n delete string2CharCounts[char];\n }\n\n return !Object.keys(string2CharCounts).length;\n}", "function anagrams(str1, str2) {\n return cleanString(str1) === cleanString(str2);\n}", "function countingAnagrams(str) {\n // Your code here\n counter = 0;\n words = str.split(' ')\n console.log(words)\n for (var i = 0; i < words.length; i++) {\n for (var j=0;j<words.length;j++){\n if (words[i]!==words[j] && isAnagram(words[i],words[j])){\n console.log(isAnagram(words[i],words[j]))\n counter++\n }\n }\n return counter\n }\n}", "function anagram(s1, s2) {\n\ts1 = s1.replace(/\\W/g,'').toLowerCase();\n\ts2 = s2.replace(/\\W/g,'').toLowerCase();\n\t//does not remove numbers\n\tconsole.log(s1);\n\tif (s1.length != s2.length) return false;\n\treturn s1.split('').sort().join('') == s2.split('').sort().join('');\n}", "function anagrams(stringA, stringB) {\n if (stringA.length !== stringB.length) {\n return false;\n }\n const lowerStrA = stringA.toLowerCase();\n const lowerStrB = stringB.toLowerCase();\n const mapStrA = mapStr(lowerStrA);\n const mapStrB = mapStr(lowerStrB);\n\n // console.log(\"mapStrA\", mapStrA);\n // console.log(\"mapStrB\", mapStrB);\n\n let flag = true;\n for (let i in mapStrA) {\n const curValue = mapStrA[i];\n if (mapStrB[i] !== curValue) {\n flag = false;\n break;\n }\n }\n return flag;\n}", "function validAnagram(str1, str2) {\n\tif (str1.length !== str2.length) return false;\n\n\t// Does the strings have the same chars and its counts\n\t// { a: 2, b: 1, r: 3, o: 5}\n\tlet freq1 = {};\n\tlet freq2 = {};\n\n\t// Iterate trough the strings and add the chars to the freq counters\n\tfor (let i of str1) {\n\t\tfreq1[i] = freq1[i] ? freq1[i] + 1 : 1;\n\t}\n\tfor (let i of str2) {\n\t\tfreq2[i] = freq2[i] ? freq2[i] + 1 : 1;\n\t}\n\tconsole.log(freq1, freq2);\n\t// Compare the strings and return bool\n\tfor (let i in freq1) {\n\t\tif (!(i in freq2)) {\n\t\t\treturn false;\n\t\t}\n\t\t// if the value of the key is diffrent\n\t\tif (freq1[i] !== freq2[i]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "function anagram (str1, str2) {\n\tvar letterCount = { };\n\n\tletterCount = countWords(str1, letterCount, 1) // pass to do positive count of letters in str1\n\tletterCount = countWords(str2, letterCount, -1) // pass to do negative count of letters in str2\n\t\n\t/* If the strings are anagrams, we expect every entry in the dictionary to \n\t * be equal to 0. Otherwise there will be some entry with a negative or positive count. */\n\tfor (key in letterCount) {\n\t\tif (letterCount[key] != 0)\n\t\t\treturn false\n\t}\n\n\treturn true\n}", "function isAnagram(test, original) {\n let sortedLettersOfTest = test.toLowerCase().split('').sort().join();\n let sortedLettersOfOriginal = original.toLowerCase().split('').sort().join();\n\n return sortedLettersOfTest === sortedLettersOfOriginal;\n}", "function areAnagrams(str1, str2) {\n if (str1.length != str2.length) {\n return false;\n }\n let hash_map = {}\n for (let i = 0; i < str1.length; i++) {\n let char = str1[i];\n if (char in hash_map) {\n hash_map[char]++;\n } else {\n hash_map[char] = 1;\n }\n }\n\n console.log(hash_map);\n\n for (let i = 0; i < str2.length; i++) {\n let char = str2[i];\n if (!hash_map[char]) {\n return false;\n } else {\n hash_map[char]--;\n }\n }\n return true;\n}", "function anagrams(stringA, stringB) {\n // use helper function and build a map for each string\n const charMapA = buildCharMap(stringA);\n const charMapB = buildCharMap(stringB);\n\n if (Object.keys(charMapA).length !== Object.keys(charMapB).length) {\n return false;\n }\n\n // iterate through charMap\n for (let char in charMapA) {\n if (charMapA[char] !== charMapB[char]) {\n // if these do not line up, return false because its not an anagram\n return false;\n }\n }\n\n // if all conditions are met, return true for anagram\n return true;\n}", "function fourthAnagram(str1, str2) {\n let obj = {};\n for (let i = 0; i < str1.length; i++) {\n if (obj[`${str1[i]}1`]) {\n obj[`${str1[i]}1`]++\n } else {\n obj[`${str1[i]}1`] = 1\n }\n }\n for (let i = 0; i < str2.length; i++) {\n if (obj[`${str2[i]}2`]) {\n obj[`${str2[i]}2`]++\n } else {\n obj[`${str2[i]}2`] = 1\n }\n } \n\n for (const key in obj) {\n if (obj[key[0]+\"1\"] !== obj[key[0]+\"2\"]) {\n return false;\n }\n }\n return true;\n}", "function anagrams(stringA, stringB) {\n const sortedStrA = sortStr(stringA)\n const sortedStrB = sortStr(stringB)\n\n return sortedStrA === sortedStrB\n\n\n}", "function findAnagram(str1, str2){ // You wrote this\r\n if(str1.length !== str2.length){\r\n return false;\r\n }\r\n let obj1 = {}\r\n let obj2 = {}\r\n for(let char of str1){\r\n obj1[char] = (obj1[char] || 0) + 1\r\n }\r\n for(let char of str2){\r\n obj2[char] = (obj2[char] || 0) + 1\r\n }\r\n for(let key in obj1){\r\n if(!(key in obj2)){\r\n return false\r\n }\r\n if(obj2[key] !== obj1[key]){\r\n return false\r\n }\r\n }\r\n return true\r\n}", "function anagram(str1, str2) {\n // if not equal then this string is not the same\n if (str1.length !== str2.length) return false\n let mapStr1={};\n let mapStr2={}\n let arr1 = str1.split('');\n let arr2 = str2.split('');\n let v2\n arr1.forEach((v,i)=>{\n mapStr1[v] = mapStr1[v] ? mapStr1[v] + 1 : 1\n v2 = arr2[i]\n mapStr2[v2] = mapStr2[v2] ? mapStr2[v2] + 1 : 1\n })\n\n for(let i in mapStr1) {\n if (mapStr1[i] !== mapStr2[i]) {\n return false\n }\n }\n return true\n}", "function isAnagram (test, original) {\r\n \r\n // Make sure both strings are in same cases...\r\n const str1 = test.toLowerCase(); \r\n const str2 = original.toLowerCase(); \r\n\r\n if(str1.length !== str2.length) return false;\r\n\r\n let newObject = {};\r\n\r\n for(let i = 0; i < str1.length; i++) {\r\n let letter = str1[i];\r\n newObject[letter] ? newObject[letter] += 1 : newObject[letter] = 1;\r\n }\r\n \r\n for(let i = 0; i < str2.length; i++) {\r\n let letter = str2[i];\r\n if(!newObject[letter]) return false; \r\n else newObject[letter] -= 1;\r\n }\r\n return true;\r\n}", "function isAnagram( s, t) {\n let charMap = new Map();\n let slength = s.length;\n let tlength = t.length;\n if( slength !== tlength) {\n return false;\n }\n for( let i=0 ; i < slength ; i++){\n charMap.set(s.charAt(i), (charMap.get(s[i]) || 0) +1);\n charMap.set(t.charAt(i), (charMap.get(t[i]) || 0) -1);\n }\n let isAnagram = true;\n charMap.forEach((countOfChar) => {\n if ( countOfChar !== 0 ) {\n isAnagram = false;\n return;\n }\n });\n return isAnagram;\n}", "function validAnagram(str1, str2) {\n //if both strings are empty return true\n if(str1.length === 0 && str2.length === 0) return true;\n //create two empty objects\n let obj1 = {};\n let obj2 = {};\n //loop through each of the strings and put them in the objects\n for(let char of str1) {\n if(obj1[char] > 0) {\n obj1[char]++\n } else {\n obj1[char] = 1;\n }\n }\n for(let char of str2) {\n if(obj2[char] > 0) {\n obj2[char]++\n } else {\n obj2[char] = 1;\n }\n }\n //check if each key in strings match to each other \n for(let key in obj1) {\n if(!key in obj2) return false;\n //chack if the frequencies match\n if(obj1[key] !== obj2[key]) return false;\n }\n return true;\n}", "function checkAnagram(a = '', b = '') {\n var array = {};\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n let res = a.charCodeAt(i) - 97;\n console.log('res', res);\n array[res] = (array[res] || 0) + 1;\n }\n console.log('array', array);\n\n for (let j = 0; j < b.length; j++) {\n let res = b.charCodeAt(j) - 97;\n if (!array[res]) {\n return false;\n }\n array[res]--;\n }\n return true;\n}", "function anagrams(stringA, stringB) {\n return cleanAndSort(stringA) === cleanAndSort(stringB);\n}", "function anagram(stringA, stringB) {\n const charMapA = buildCharMap(stringA);\n const charMapB = buildCharMap(stringB);\n\n if (Object.keys(charMapA).length !== Object.keys(charMapB).length) {\n return false;\n }\n for (const char in charMapA) {\n if (charMapA[char] !== charMapB[char]) {\n return false;\n }\n }\n\n return true;\n}", "function annagram(word1, word2) {\n let clean1 = word1.replace(/[.,\\/#№?\\d@!$%\\^&\\*;:{}=\\-_`~()]/g, \"\").replace(/\\s{2,}/g, \" \").toLowerCase().split(' ').join('').trim();\n let clean2 = word2.replace(/[.,\\/#№?\\d@!$%\\^&\\*;:{}=\\-_`~()]/g, \"\").replace(/\\s{2,}/g, \" \").toLowerCase().split(' ').join('').trim();\n console.log(clean1, clean2)\n\n let newStr1 = clean1.split('').sort().join('')\n let newStr2 = clean2.split('').sort().join('')\n console.log(newStr1, newStr2)\n\n if (newStr1.length === newStr2.length) {\n return newStr1 === newStr2 ? true : false\n } else {\n return false\n }\n}", "function checkAnagram(str1, str2){\n\n // Check if the length of the two array is the samey\n if(str1.length !== str2.length){\n return false;\n }\n\n// create two object frequencies\n let strFrequency1 = {};\n let strFrequency2 = {};\n\n // loop through each of the two string respectively and add their count to their objects\n for(let char of str1){\n strFrequency1[char] = ++strFrequency1[char] || 1;\n }\n for(let char of str2){\n strFrequency2[char] = ++strFrequency2[char] || 1;\n }\n console.log(strFrequency1);\n console.log(strFrequency2);\n // compare the two objects with occupiance of the frequencies\n for(let key in strFrequency1){\n if(strFrequency2[key] !== strFrequency1[key]){\n return false;\n }\n }\n // return either true or false\n return true;\n}", "function validAnagram(str1, str2) {\n if (str1 === '' && str2 === '') {\n return true;\n }\n\n if (str1 === str2) {\n return true;\n }\n\n if (str1.length !== str2.length) {\n return false;\n }\n\n let arr1 = str1.split('');\n let arr2 = str2.split('');\n\n for (let i = 0; i < str1.length; i++) {\n let correctIndex = arr2.indexOf(arr1[i]);\n if (correctIndex === -1) {\n return false;\n }\n arr2.splice(correctIndex, 1);\n }\n return true;\n}", "function isAnagram (a, b) {\n var a = a.replace(/\\s+/g, '').split('');\n var b = b.replace(/\\s+/g, '').split('');\n var i = 0;\n while(i < b.length){\n if(a.includes(b[i])) {\n a.splice(a.indexOf(b[i]), 1);\n i++;\n } else {\n return false;\n }\n }\n return true;\n}", "function isAnagram (a, b) {\n\t// turn each string into arrays to check for equality\n\tlet stringAArray = a.split('');\n let stringBArray = b.split('');\n\n // have a counter variable to keep track of how many characters match\n let numberOfMatches = 0;\n\n // check which string is smaller to loop through that string in the first loop\n // so we can reduce the number of equality checks\n if (stringAArray.length > stringBArray.length) {\n \tstringAArray = b.split('');\n stringBArray = a.split('');\n }\n\n // loop through both array of strings to check if stringAArray[i] === stringBArray[j]\n // push 2 counters to numberOfMatches for each match\n // set stringBArray[j] to null so that when we do an equality check it would not check that same value again and add counters to numberOfMatches\n for (let i = 0; i < stringAArray.length; i++) {\n for (let j = 0; j < stringBArray.length; j++) {\n if (stringAArray[i] === stringBArray[j]) {\n \t// console.log('match');\n numberOfMatches += 2;\n stringBArray[j] = null;\n break;\n }\n }\n }\n\n // console.log('number of matches: ' + numberOfMatches);\n // console.log('string a array: ' + stringAArray);\n // console.log('string b array: ' + stringBArray);\n // console.log('number of cuts: ' + (stringAArray.length + stringBArray.length) - numberOfMatches);\n\n // return total amount of cuts to both strings\n return (stringAArray.length + stringBArray.length) - numberOfMatches;\n}", "function validAnagram(str1, str2){\n // check length is the same, if so FALSE\n if (str1.length !== str2.length) return false;\n let obj1 = {}\n let obj2 = {}\n // make object 1 for str1: 1 for loop\n for (let char of str1) {\n obj1[char] = (obj1[char] || 0) + 1;\n }\n // make object 2 for str1: 1 for loop\n for (let char of str2) {\n obj2[char] = (obj2[char] || 0) + 1;\n }\n // compare objects!: 1 for loop \n for (let key in obj1) {\n // make sure each key for obj1 is in obj2\n if (!(key in obj2)) return false;\n // make sure each key value for obj1 is the same for obj2 \n if (obj1[key] !== obj2[key]) return false;\n }\n return true}", "function anagrams(string1, string2){\n let obj = {};\n\n string1.split(\"\").forEach((char) => {\n if (!obj[char]) {\n obj[char] = 1;\n } else {\n obj[char] += 1;\n }\n });\n\n string2.split(\"\").forEach((char) => {\n if (!obj[char]) {\n obj[char] = 1;\n } else {\n obj[char] -= 1;\n }\n });\n\n return Object.values(obj).every(char => char === 0);\n}", "function isAnagram(test, original) {\n if (test.length !== original.length) {\n return false;\n }\n\n let obj = {};\n let obj2 = {};\n\n let tes = test.toLowerCase();\n let orig = original.toLowerCase();\n\n for (let i = 0; i < tes.length; i++) {\n let letter = tes[i];\n obj[letter] = obj[letter] + 1 || 1;\n }\n\n for (let j = 0; j < orig.length; j++) {\n let letter = orig[j];\n obj2[letter] = obj2[letter] + 1 || 1;\n }\n\n for (let k = 0; k < tes.length; k++) {\n let letter = tes[k];\n if (obj[letter] !== obj2[letter]) {\n return false;\n }\n }\n\n return true;\n}", "function anagram(s, t) {\n if(s.length !== t.length) return false\n let char = {};\n \n for(let i = 0; i < s.length; i++) {\n char[s[i]] ? char[s[i]]++ : char[s[i]] = 1\n }\n \n for(let j = 0; j < t.length; j++) { // one letter might appear more that twice\n // that is why we count them \n // instead of just setting the key to true or false\n if(!char[t[j]]) {\n return false\n }\n char[t[j]]--\n }\n return true;\n }", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(stringA, stringB) {\n\treturn cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(str1, str2) {\n let resultsHash = {};\n\n str1.split('').forEach( char => {\n if (!resultsHash[char]) resultsHash[char] = 0;\n resultsHash[char] += 1;\n })\n\n str2.split('').forEach( char => {\n if (!resultsHash[char]) resultsHash[char] = 0;\n resultsHash[char] -= 1;\n })\n\n // console.log(resultsHash)\n return Object.values(resultsHash).every( value => value == 0);\n}", "function thirdAnagram(str1, str2) {\n // Complexity (n + m) - time | space - 2 ==> 1\nlet obj = {}\nlet obj2 = {}\n\nfor (let i = 0; i < str1.length || i < str2.length; i++){\n const str1Key = str1[i], str2Key = str2[i];\n if(obj[str1Key]){\n obj[str1Key]++\n }else {\n obj[str1Key] = 1\n }\n if(obj2[str2Key]){\n obj2[str2Key]++\n }else {\n obj2[str2Key] = 1\n }\n}\n// const val1Array = Object.entries(obj);\n// const val2Array = Object.entries(obj2);\n\nfor (let key1 in obj) {\n if (obj[key1] !== obj2[key1]){\n return false;\n }\n}\nfor (let key2 in obj) {\n if (obj2[key2] !== obj1[key2]){\n return false;\n }\n}\nreturn true;\n\n// if (val1Array.sort().join('') === val2Array.sort().join('')){\n// return true\n// }else return false\n// console.log(val1Array)\n// console.log(val2Array)\n}", "function validAnagram(str1, str2) {\n let charItemsOne = str1.split('');\n let charItemsTwo = str2.split('');\n // console.log(charItemsOne);\n // console.log(charItemsTwo);\n if (charItemsTwo.length !== charItemsOne.length) {\n return false;\n }\n frequencyCounterOne = {};\n frequencyCounterTwo = {};\n\n for (const ItemOneElement of charItemsOne) {\n // console.log(ItemOneElement);\n frequencyCounterOne[ItemOneElement] =\n (frequencyCounterOne[ItemOneElement] || 0) + 1;\n }\n for (const ItemTwoElement of charItemsTwo) {\n frequencyCounterTwo[ItemTwoElement] =\n (frequencyCounterTwo[ItemTwoElement] || 0) + 1;\n }\n\n // console.log(frequencyCounterOne);\n // console.log(frequencyCounterTwo);\n // console.log('------------');\n\n for (const prop in frequencyCounterOne) {\n if (frequencyCounterOne.hasOwnProperty(prop)) {\n // console.log(frequencyCounterOne[prop]);\n // console.log(prop);\n\n if (!(prop in frequencyCounterTwo)) {\n return false;\n }\n\n if (frequencyCounterOne[prop] !== frequencyCounterTwo[prop]) {\n return false;\n }\n }\n }\n return true;\n}", "function anagrams(stringA, stringB) {\n //make strings into alphabatized strings:\n let newA = stringA.toLowerCase().split(\"\").sort().join('').trim().replace(/[^a-zA-Z ]/g, \"\");\n let newB = stringB.toLowerCase().split(\"\").sort().join('').trim().replace(/[^a-zA-Z ]/g, \"\");\n\n\n //if they are the same or different\n return newA === newB ? true : false;\n}", "function mineValidAnagram(wordA, wordB) {\n\t// add whatever parameters you deem necessary - good luck!\n\tif (wordA.length !== wordB.length) return false;\n\tconst objA = {};\n\tconst objB = {};\n\tfor (const word of wordA) {\n\t\tobjA[word] = (objA[word] || 0) + 1;\n\t}\n\tfor (const word of wordB) {\n\t\tobjB[word] = (objB[word] || 0) + 1;\n\t}\n\n\tfor (let key in objA) {\n\t\t// If the key exist\n\t\tif (!(key in objB)) return false;\n\n\t\tif (objA[key] !== objB[key]) return false;\n\t}\n\n\treturn true;\n}", "function anagrams2(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n }" ]
[ "0.81070924", "0.80907714", "0.80907714", "0.80907714", "0.80286396", "0.80146086", "0.80103767", "0.7897891", "0.78327984", "0.7832157", "0.7789089", "0.7781562", "0.7767145", "0.77567077", "0.77519786", "0.77479035", "0.7717633", "0.769828", "0.7694583", "0.76883805", "0.7679278", "0.76690376", "0.7665402", "0.7661154", "0.765839", "0.76522154", "0.76445234", "0.76286054", "0.76115704", "0.7576279", "0.7575129", "0.75696975", "0.7562186", "0.7557366", "0.75548756", "0.7545462", "0.7514157", "0.7513658", "0.74905175", "0.7489329", "0.74702334", "0.7465664", "0.7419095", "0.74183446", "0.74117064", "0.7401241", "0.73942393", "0.73864853", "0.73648036", "0.7348959", "0.73424584", "0.73385", "0.7332202", "0.7328136", "0.7305995", "0.73050284", "0.73045444", "0.7297549", "0.7292413", "0.7290832", "0.72831744", "0.7283131", "0.72809803", "0.7275314", "0.72687125", "0.7267666", "0.72668755", "0.7263611", "0.72371453", "0.72340685", "0.7227812", "0.72074693", "0.7195187", "0.71889174", "0.7182292", "0.7181325", "0.7165141", "0.7153626", "0.71522105", "0.71497136", "0.7140427", "0.7128311", "0.71189183", "0.71088976", "0.7096974", "0.7096666", "0.70924616", "0.70899194", "0.7082925", "0.7082925", "0.7082925", "0.7082925", "0.7082784", "0.7077259", "0.70655745", "0.706356", "0.70626825", "0.70342207", "0.70341706", "0.701974" ]
0.72051805
72
console.log(thirdAnagram("gizmo", "sally")); // => false console.log(thirdAnagram("elvis", "lives")) // => true console.log(thirdAnagram("elviss", "lives")) // => false
function fourthAnagram(str1, str2) { let obj = {}; for (let i = 0; i < str1.length; i++) { if (obj[`${str1[i]}1`]) { obj[`${str1[i]}1`]++ } else { obj[`${str1[i]}1`] = 1 } } for (let i = 0; i < str2.length; i++) { if (obj[`${str2[i]}2`]) { obj[`${str2[i]}2`]++ } else { obj[`${str2[i]}2`] = 1 } } for (const key in obj) { if (obj[key[0]+"1"] !== obj[key[0]+"2"]) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAnagram(stgOne, stgTwo) {\n \n \n}", "isAnagram(a, b) {\n\n var x = a.toLowerCase();\n var y = b.toLowerCase();\n if (x.length != y.length) {\n return false;\n //console.log(\"Given string is not Anagram.\");\n }\n else {\n var m = [], n = [];\n m = x.split(\"\");\n n = y.split(\"\");\n m = m.sort();\n n = n.sort();\n if (m.length == n.length) {\n for (let i = 0; i < m.length; i++) {\n if (m[i] != n[i]) {\n return false;\n }\n\n }\n return true;\n }\n }\n }", "function isAnagram(str1, str2) {}", "function isAnagram(str1, str2) {}", "function isAnagram(str1, str2) {}", "function isAnagram (s, t) {\n let anagram = true;\n if ( s.length !== t.length ) {\n return false;\n }\n else {\n let sCharArray = [...s];\n let tCharArray = [...t];\n sCharArray.sort();\n tCharArray.sort();\n for (let i = 0 ; i < sCharArray.length ; i++ ) {\n if ( sCharArray[i] !== tCharArray[i] ) {\n anagram = false;\n break;\n }\n }\n }\n return anagram;\n}", "function isAnagram(first, second) {\n let output1 = first.toLowerCase().split(\"\").sort().join(\"\");\n let output2 = second.toLowerCase().split(\"\").sort().join(\"\");\n return output1 == output2;\n}", "function isAnagram(s, t) {\n let newS = s.split(\"\").sort().join(\"\");\n let newT = t.split(\"\").sort().join(\"\");\n if (newS === newT) {\n return true\n } else {\n return false\n }\n}", "function anagram(string, str){\n return string.split('').sort().join('') === str.split('').sort().join('')\n}", "function testAnagram (s1, s2){\n // creating if statments \n if(!s1 || !s2 || s1.length !== s2.length){return false;}\n var lS1 = s1.toLowerCase();\n var lS2 = s2.toLowerCase();\n if(lS1 === lS2) {return false;}\n var rS1 = lS1.split('').sort().join('');\n var rS2 = lS2.split('').sort().join('');\n return rS1 === rS2;\n }", "function thirdAnagram(str1, str2) {\n let str1Obj = {};\n let str2Obj = {};\n for (let i = 0; i < str1.length; i++) {\n if (str1Obj[str1[i]]) {\n str1Obj[str1[i]]++\n } else {\n str1Obj[str1[i]] = 1\n }\n }\n for (let i = 0; i < str2.length; i++) {\n if (str2Obj[str2[i]]) {\n str2Obj[str2[i]]++\n } else {\n str2Obj[str2[i]] = 1\n }\n\n }\n\n\n for (const key in str1Obj) {\n\n if (str1Obj[key] !== str2Obj[key]) {\n return false\n }\n\n }\n\n return true\n\n}", "function anagramCheck (str1, str2) {\n\n // ---------- Your Code Here ----------\n\n // gets rid of all the spaces and makes them lowercase to produce a string of all the letters lumped together, making comparison easier\n str1 = str1.replace(/\\s/g, \"\");\n str1 = str1.toLowerCase();\n str2 = str2.replace(/\\s/g, \"\");\n str2 = str2.toLowerCase();\n\n\n // if (str1.length !== str2.length) {\n // return false;\n // }\n \n str1 = str1.split(\"\").sort().join(\"\");\n str2 = str2.split(\"\").sort().join(\"\");\n \n return (str1 == str2);\n\n // ----------- End Code Area -----------\n\n}", "function is_anagram (str1, str2) {\n return formatStr(str1) === formatStr(str2);\n}", "function isAnagram(s, t) {\n let sortedS = s.split(\"\").sort().join(\"\")\n let sortedT = t.split(\"\").sort().join(\"\")\n return sortedS === sortedT\n}", "algoanagram(s1, s2) {\n\n var l1 = s1.length\n var l2 = s2.length\n var flag = true\n if (l1 != l2) {\n flag = false\n }\n else {\n var s3 = s1.toLowerCase()\n var s4 = s2.toLowerCase()\n\n s3 = s3.split('').sort().join('');\n s4 = s4.split('').sort().join('');\n\n // console.log(s3);\n // console.log(s4);\n flag = s3 === s4;\n // var c=a.split(\" \")\n // var c=b.split(\" \")\n\n\n //console.log(c)\n // console.log(d)\n\n\n\n\n\n }\n if (flag == true) {\n console.log(s1 + \" and \" + s2 + \" are anagram\")\n }\n else {\n console.log(s1 + \" and \" + s2 + \" are not anagram\")\n }\n }", "anagram(string1, string2) {\n try {\n var format = /[a-zA-Z0-9]/;\n var result = false;\n /*\n *checks if strings are within the given format\n */\n if (format.test(string1) && format.test(string2)) {\n /*\n *checks if both strings are of equal length\n */\n if (string1.length == string2.length) {\n /*\n *splits the given strings and sorts them\n */\n var sort1 = string1.toString().split(\"\").sort().join(\"\");\n var sort2 = string2.toString().split(\"\").sort().join(\"\");\n result = sort1 == sort2;\n }\n else {\n console.log(\"Strings length must be of equal length\");\n }\n\n /*\n *checks if one string is an anagram of another\n */\n if (result == true) {\n // console.log(string1 + \" \" + string2);\n return true;\n }\n else {\n return false;\n }\n }\n else {\n console.log(\"Enter only string\");\n\n }\n }\n catch (error) {\n console.log(error.message);\n }\n}", "function isAnagram(s1, s2) {\n var i = 0\n //sortChars :: String -> String\n , sortChars = function (s) {\n return s.toLowerCase().split('').sort().join('');\n }\n ;\n if (s1.length !== s2.length){ return false; }\n if (sortChars(s1) !== sortChars(s2)) { return false; }\n return true;\n}", "function checkAnagram() {\t\n\t\tvar first_str, second_str, first_temp, second_temp;\n\t\tfirst_str = $(\"#anagram-a\").val();\n\t\tfirst_temp = first_str;\n\t\tsecond_str = $(\"#anagram-b\").val();\n\t\tsecond_temp = second_str\n\t\tif(first_str.length != second_str.length) {\n\t\t\t$(\"#anagram-output\").append(\"<p>\\\"\" + first_str + \"\\\" and \\\"\" \n\t\t\t\t+ second_str + \"\\\" are not anagrams for each other</p>\");\n\t\t\treturn;\n\t\t}\n\t\tfirst_str = first_str.split(\"\").sort().join(\"\");\n\t\tsecond_str = second_str.split(\"\").sort().join(\"\");\n\t\tfor(var i = 0; i < first_str.length; i++) {\n\t\t\tif(first_str[i] != second_str[i]) {\n\t\t\t\t$(\"#anagram-output\").append(\"<p>\\\"\" + first_temp + \"\\\" and \\\"\" \n\t\t\t\t+ second_temp + \"\\\" are not anagrams for each other</p>\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t$(\"#anagram-output\").append(\"<p>\\\"\" + first_temp + \"\\\" and \\\"\" \n\t\t\t\t+ second_temp + \"\\\" are anagrams for each other</p>\");\n\t}", "function isAnagram(str1, str2) {\n return formatString(str1) === formatString(str2);\n}", "function validAnagram(str1, str2){\n // add whatever parameters you deem necessary - good luck!\n \n let s1 = str1.split(\"\").sort().join(\"\");\n let s2 = str2.split(\"\").sort().join(\"\");\n \n return s1===s2;\n\n}", "function countingAnagrams(str) {\n // Your code here\n counter = 0;\n words = str.split(' ')\n console.log(words)\n for (var i = 0; i < words.length; i++) {\n for (var j=0;j<words.length;j++){\n if (words[i]!==words[j] && isAnagram(words[i],words[j])){\n console.log(isAnagram(words[i],words[j]))\n counter++\n }\n }\n return counter\n }\n}", "checkAnagram2(str1, str2) {\n let unsortedStr1 = \"\" + str1;\n let unsortedStr2 = \"\" + str2;\n if (unsortedStr1.length != unsortedStr2.length) {\n return false;\n }\n sortedStr1 = this.sort1(unsortedStr1);\n sortedStr2 = this.sort1(unsortedStr2);\n let b = this.check(sortedStr1, sortedStr2);\n if (b == true) {\n return true;\n }\n else {\n return false;\n }\n }", "function isAnagram(str1, str2) {\n return formatStr(str1) === formatStr(str2)\n}", "function validAnagram(str1, str2){\n let sortedStr1 = str1.split('').sort().join('');\n let sortedStr2 = str2.split('').sort().join('');\n if (sortedStr1 === sortedStr2) {\n return true;\n } else {\n return false;\n }\n}", "function isAnagram2(s1, s2) {\n if (s1.length !== s2.length) return false\n const s1Arr = s1.split(\"\")\n const s2Arr = s2.split(\"\")\n s1Arr.sort()\n s2Arr.sort()\n for (let i = 0;i < s1Arr.length; i++) {\n if (s1Arr[i] !== s2Arr[i]) {\n return false\n }\n }\n return true\n}", "function compare(s1, s2) {\n var flag = 'Strings are not anagram'\n for (var i = 0; i < s1.length; i++) {\n\n if (s1.charAt(i) != s2.charAt(i)) {\n flag = 'Strings are not anagram'\n return flag\n }\n else {\n flag = 'Strings are anagram'\n }\n\n }\n\n if (flag == 'Strings are anagram') {\n return flag\n }\n\n}", "function validAnagram2(str1, str2) {\n if(str1.length !== str2.length) return false\n return str1.split(\"\").sort().join(\"\") === str2.split(\"\").sort().join(\"\");\n}", "function isAnagram(str1, str2) {\n if (str1.length !== str2.length) {\n return false;\n }\n for (var i = 0; i < str1.length; i++) {\n var foundEqual = false;\n for (var j = 0; j < str2.length; j++) {\n if (str1[i] === str2[j]) {\n foundEqual = true;\n break;\n }\n }\n if (!foundEqual) {\n return false;\n }\n }\n for (var i = 0; i < str2.length; i++) {\n var foundEqual = false;\n for (var j = 0; j < str1.length; j++) {\n if (str2[i] === str1[j]) {\n foundEqual = true;\n break;\n }\n }\n if (!foundEqual) {\n return false;\n }\n }\n return true;\n}", "function thirdAnagram(str1, str2) {\n // Complexity (n + m) - time | space - 2 ==> 1\nlet obj = {}\nlet obj2 = {}\n\nfor (let i = 0; i < str1.length || i < str2.length; i++){\n const str1Key = str1[i], str2Key = str2[i];\n if(obj[str1Key]){\n obj[str1Key]++\n }else {\n obj[str1Key] = 1\n }\n if(obj2[str2Key]){\n obj2[str2Key]++\n }else {\n obj2[str2Key] = 1\n }\n}\n// const val1Array = Object.entries(obj);\n// const val2Array = Object.entries(obj2);\n\nfor (let key1 in obj) {\n if (obj[key1] !== obj2[key1]){\n return false;\n }\n}\nfor (let key2 in obj) {\n if (obj2[key2] !== obj1[key2]){\n return false;\n }\n}\nreturn true;\n\n// if (val1Array.sort().join('') === val2Array.sort().join('')){\n// return true\n// }else return false\n// console.log(val1Array)\n// console.log(val2Array)\n}", "function validAnagram(str1, str2) {\n if (str1.length !== str2.length) return false\n\n let check = {}\n\n for (let i = 0; i < str1.length; i++) {\n const letter = str1[i]\n check[letter] ? (check[letter] += 1) : (check[letter] = 1)\n }\n\n for (let i = 0; i < str2.length; i++) {\n const letter = str2[i]\n if (!check[letter]) {\n return false\n } else {\n check[letter] -= 1\n }\n }\n\n return true\n}", "function checkAnagram(str1,str2){\n if(str1.length !== str2.length){\n return false;\n }\n var charStr1=str1.split(\"\").sort();\n var charStr2=str2.split(\"\").sort();\n\n for(var i=0; i<charStr1.length; i++){\n if (charStr1[i]!==charStr2[i]){\n return false;\n }\n }\n\n return true;\n\n}", "function isAnagram(test, original) {\n let sortedLettersOfTest = test.toLowerCase().split('').sort().join();\n let sortedLettersOfOriginal = original.toLowerCase().split('').sort().join();\n\n return sortedLettersOfTest === sortedLettersOfOriginal;\n}", "function isAnagram( s, t) {\n let charMap = new Map();\n let slength = s.length;\n let tlength = t.length;\n if( slength !== tlength) {\n return false;\n }\n for( let i=0 ; i < slength ; i++){\n charMap.set(s.charAt(i), (charMap.get(s[i]) || 0) +1);\n charMap.set(t.charAt(i), (charMap.get(t[i]) || 0) -1);\n }\n let isAnagram = true;\n charMap.forEach((countOfChar) => {\n if ( countOfChar !== 0 ) {\n isAnagram = false;\n return;\n }\n });\n return isAnagram;\n}", "function validAnagram(first, second){\n\tif(first.length !== second.length){\n\t\treturn false;\n\t}\n\t\n\tconst lookup = {}; //obj as freq.counter\n\n\t//Break down the first string.\n\tfor(let i=0; i < first.length ; i++){\n\t\tlet letter = first[i];\n\t\t//if letter exists, increment, otherwise set to 1\n\t\tlookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n\t}\n\n\t//Break down the second string\n\t//then check to first string.\n\tfor(let i=0; i < second.length; i++){\n\t\tlet letter = second[i];\n\t\t//can't find letter or letter is zero then not anagram.\n\t\tif(!lookup[letter]){\n\t\t\treturn false;\n\t\t}else{\n\t\t\tlookup[letter] -= 1;\n\t\t}\t\n\t}\n\treturn true;\n}", "isAnagram(str1, str2) {\n\n if (str1.length !== str2.length) {\n return false;\n }\n\n var sortStr1 = str1.split('').sort().join('');\n var sortStr2 = str2.split('').sort().join('');\n\n return (sortStr1 === sortStr2);\n }", "function validAnaram2(first, second) {\n if (first.length !== second.length) {\n return false;\n }\n //Initalize object\n const lookup = {};\n\n for (let i = 0; i < first.length; i++) {\n let letter = first[i];\n //if letter exists, incremnt, otherwise set to 1\n lookup[letter] ? (lookup[letter] += 1) : (lookup[letter] = 1);\n }\n\n for (let i = 0; i < second.length; i++) {\n let letter = second[i];\n //Cant find letter or letter is zero then its not an anagram\n //Because zero is falsey\n if (!lookup[letter]) {\n return false;\n } else {\n //If letter exists, subtract one, one is truthy\n lookup[letter] -= 1;\n }\n }\n return true;\n}", "function anagramsOfEachOther(s, t) {\n return s.split('').sort().join('') === t.split('').sort().join('');\n}", "function anagram(s, t) {\n if(s.length !== t.length) return false\n let char = {};\n \n for(let i = 0; i < s.length; i++) {\n char[s[i]] ? char[s[i]]++ : char[s[i]] = 1\n }\n \n for(let j = 0; j < t.length; j++) { // one letter might appear more that twice\n // that is why we count them \n // instead of just setting the key to true or false\n if(!char[t[j]]) {\n return false\n }\n char[t[j]]--\n }\n return true;\n }", "function isAnagram(str1, str2) {\n if (str1.length !== str2.length) return false;\n\n let letterMap = {};\n\n for (let i = 0; i < str1.length; i++) {\n let current = str1[i].toLowerCase()\n if (!letterMap[current]) {\n letterMap[current] = 1\n } else {\n letterMap[current] ++\n }\n }\n \n for (let j = 0; j < str2.length; j++) {\n let current = str2[j].toLowerCase();\n if (letterMap[current]) {\n letterMap[current] --\n } else {\n return false;\n }\n }\n return Object.values(letterMap).every(el => el === 0) ? true : false;\n}", "function thirdAnagram(str1, str2) {\n let letterCounts1 = {},\n letterCounts2 = {};\n\n str1\n .split(\"\")\n .forEach((e) => (letterCounts1[e] = (letterCounts1[e] || 0) + 1));\n str2\n .split(\"\")\n .forEach((e) => (letterCounts2[e] = (letterCounts2[e] || 0) + 1));\n\n const haveSameCount = function (obj1, obj2) {\n const obj1Length = Object.keys(obj1).length;\n const obj2Length = Object.keys(obj2).length;\n\n if (obj1Length === obj2Length) {\n return Object.keys(obj1).every(\n (key) => obj2.hasOwnProperty(key) && obj2[key] === obj1[key]\n );\n }\n return false;\n };\n return haveSameCount(letterCounts1, letterCounts2);\n}", "function validAnagram(str1, str2) {\n if(str1.length !== str2.length) {\n return false;\n }\n \n let lookup = {};\n \n for(i = 0; i < str1.length; i++){\n let letter = str1[i]\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n \n for(let j = 0; j < str2.length; j++) {\n let letter = str2[j]\n if(!lookup[letter]) {\n return false;\n } else {\n lookup[letter] -= 1\n }\n }\n return true;;\n}", "isAnagram(string1, string2) {\n string1=string1+\"\";\n string2=string2+\"\";\n if (string1.length != string2.length) {\n return false;\n }\n var arr = [];\n for (let index = 0; index < 36; index++) {\n arr[index] = 0;\n\n }\n for (let index = 0; index < string1.length; index++) {\n var ch = string1.charAt(index);\n if (ch >= 'a' && ch <= 'z') {\n var code = ch.charCodeAt(0);\n\n arr[code - 97]++;\n } else if (ch >= 'A' && ch <= 'Z') {\n var code = ch.charCodeAt(0);\n arr[code - 65]++;\n } else {\n var code = ch.charCodeAt(0);\n arr[code - 22]++;\n }\n ch = string2.charAt(index);\n if (ch >= 'a' && ch <= 'z') {\n var code = ch.charCodeAt(0);\n\n arr[code - 97]--;\n } else if (ch >= 'A' && ch <= 'Z') {\n var code = ch.charCodeAt(0);\n arr[code - 65]--;\n } else {\n var code = ch.charCodeAt(0);\n arr[code - 22]--;\n }\n\n\n }\n for (let index = 0; index < 36; index++) {\n if (arr[index] != 0) {\n return false;\n }\n }\n return true;\n}", "function validAnagram(first, second){\n if(first.length !== second.length){\n return false;\n }\n\n const lookup = {};\n\n for (let i = 0; i < first.length; i++){\n let letter = first [i];\n //if letter exists in object list, increment, otherwise set to 1\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n\n for (let i = 0; i < second.length; i ++){\n let letter = second[i];\n // if can't find letter or letter is zero then it's not an anagram, return false\n // zero is falsey so it will return false if lookup[letter] = 0\n if(!lookup[letter]){\n return false;\n }else{\n lookup[letter] -= 1;\n }\n }\n return true;\n}", "function validAnagram2(first, second) {\n if (first.length !== second.length) return false;\n\n const lookup = {};\n\n for (let i = 0; i < first.length; i++) {\n let letter = first[i];\n // if letter exists, increment, otherwise set to 1\n lookup[letter] ? (lookup[letter] += 1) : (lookup[letter] = 1);\n }\n\n for (let i = 0; i < second.length; i++) {\n let letter = second[i];\n // can't find letter or letter is zero then it's not an anagram\n if (!lookup[letter]) {\n return false;\n } else {\n lookup[letter] -= 1;\n }\n }\n return true;\n}", "function isAnagram(test, original) {\n if (test.length !== original.length) {\n return false;\n }\n\n let obj = {};\n let obj2 = {};\n\n let tes = test.toLowerCase();\n let orig = original.toLowerCase();\n\n for (let i = 0; i < tes.length; i++) {\n let letter = tes[i];\n obj[letter] = obj[letter] + 1 || 1;\n }\n\n for (let j = 0; j < orig.length; j++) {\n let letter = orig[j];\n obj2[letter] = obj2[letter] + 1 || 1;\n }\n\n for (let k = 0; k < tes.length; k++) {\n let letter = tes[k];\n if (obj[letter] !== obj2[letter]) {\n return false;\n }\n }\n\n return true;\n}", "function validAnagram(str1, str2) {\n\n // no need to check if strings arent same length\n if(str1.length != str2.length) {\n return false\n }\n\n // storatge for counters\n let cache1 = {}\n let cache2 = {}\n\n // counter\n function counter(cache, str) {\n for(let char of str) {\n if(cache[char]) {\n cache[char] += 1\n } else {\n cache[char] = 1\n }\n }\n }\n\n counter(cache1, str1)\n counter(cache2, str2)\n\n // checking if each cache has same amount of each item\n for(const prop in cache1) {\n if(cache1[prop] !== cache2[prop]) {\n return false\n }\n }\n\n return true\n}", "function isAnagram(str1, str2){\n \n if(str1==null || str2==null \n || str1.length==0 || str2.length==0 \n || str1.length != str2.length){\n return false;\n }\n\n for(let a of str1){\n if(!str2.contains(a)){ /// time complexity = O(n^2) :( \n return false;\n }\n }\n return true;\n\n}", "function validAnagram(word1, word2){\n if (word1.length !== word2.length) {\n return false;\n }\n\n let counter = {};\n\n for (let i = 0; i < word1.length; i++) {\n let letter = word1[i];\n if (counter[letter]) {\n counter[letter]++;\n } else {\n counter[letter] = 1;\n }\n }\n\n for (let i = 0; i < word2.length; i++) {\n let letter = word2[i];\n if (!counter[letter]) {\n return false;\n } else {\n counter[letter] -= 1;\n }\n }\n return true;\n}", "function anagram (str1,str2){\n if(str1.length!==str2.length)\n return false;\n\n let freqCounter1 = {};\n let freqCounter2 = {};\n\n for(let val of str1)\n freqCounter1[val] = (freqCounter1[val]||0)+1;\n\n for(let val of str2)\n freqCounter2[val] = (freqCounter2[val]||0)+1;\n \n for(let key in freqCounter2){\n \n if(!(key in freqCounter2))\n return false;\n \n if(freqCounter2[key]!==freqCounter1[key])\n return false;\n \n return true;\n }\n\n\n}", "function validAnagram (str1, str2) {\n let obj = {};\n if (str1.length !== str2.length) return false;\n for (let char of str1) {\n obj[char] = obj[char] ? obj[char] + 1 : 1;\n }\n for (let char of str2) {\n if (!obj[char]) {\n return false;\n } else {\n obj[char]--;\n }\n }\n return true;\n}", "function isAnagram(s1, s2) {\n if (s1.length !== s2.length) return false\n const map = new Map()\n for (let i = 0; i < s1.length; i++) {\n if (!map.has(s1[i])) {\n map.set(s1[i], 1)\n } else {\n map.set(s1[i], map.get(s1[i]) + 1)\n }\n }\n for (let i = 0; i < s2.length; i++) {\n if (!map.has(s2[i])) return false\n map.set(s2[i], map.get(s2[i]) - 1)\n if (map.get(s2[i]) === 0) {\n map.delete(s2[i])\n }\n }\n return map.size === 0\n}", "function anagram(str1, str2) {\n\tif (str1.length !== str2.length) {\n\t\treturn false;\n\t}\n\tlet frequencyStr1 = {};\n\tfor (let i = 0; i < str1.length; i++) {\n\t\tlet letter = str1[i];\n\t\tfrequencyStr1[letter] ? (frequencyStr1[letter] += 1) : (frequencyStr1[letter] = 1);\n\t}\n\n\tfor (let i = 0; i < str2.length; i++) {\n\t\tlet letter = str2[i];\n\t\tif (!frequencyStr1[letter]) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tfrequencyStr1[letter] -= 1;\n\t\t}\n\t}\n\treturn true;\n}", "function secondAnagram(str1, str2) {\n str1 = str1.split(\"\");\n str2 = str2.split(\"\");\n\n str1.sort();\n str2.sort();\n\n str1 = str1.join(\"\");\n str2 = str2.join(\"\");\n\n if (str1 == str2) {\n return true;\n } else {\n return false;\n }\n}", "function isAnagram (test, original) {\r\n \r\n // Make sure both strings are in same cases...\r\n const str1 = test.toLowerCase(); \r\n const str2 = original.toLowerCase(); \r\n\r\n if(str1.length !== str2.length) return false;\r\n\r\n let newObject = {};\r\n\r\n for(let i = 0; i < str1.length; i++) {\r\n let letter = str1[i];\r\n newObject[letter] ? newObject[letter] += 1 : newObject[letter] = 1;\r\n }\r\n \r\n for(let i = 0; i < str2.length; i++) {\r\n let letter = str2[i];\r\n if(!newObject[letter]) return false; \r\n else newObject[letter] -= 1;\r\n }\r\n return true;\r\n}", "function validAnagram(first, second) {\n if (first.length !== second.length) {\n return false;\n }\n const lookup = {}; // Ospace (a)\n const firstLength = first.length;\n for (let index = 0; index < firstLength; index++) { // Otime (a)\n const element = first[index];\n lookup[element] = (lookup[element] || 0) + 1;\n }\n const secondLength = second.length;\n for (let index = 0; index < secondLength; index++) { // Otime (b)\n const element = second[index];\n if (!lookup[element]) {\n return false;\n }\n lookup[element] -= 1;\n }\n return true;\n}", "function isAnagram (str1, str2) {\n if(str1.length !== str2.length) return false\n let frequencyCounter1 = getCharFrequency(str1)\n let frequencyCounter2 = getCharFrequency(str2)\n for(let key in frequencyCounter1){\n if(!frequencyCounter2.hasOwnProperty(key)) return false\n if(frequencyCounter1[key] !== frequencyCounter2[key]) return false\n }\n return true\n}", "function validAnagram(str1, str2){\n // add whatever parameters you deem necessary - good luck!\n // check if str1 has the same length as str2 & same characters\n if(str1.length !== str2.length){\n return false\n }\n // create an object call lookup\n let lookup = {}\n// construct the object first\n for (let i = 0; i < str1.length; i++){\n letter = str1[i]\n //if letter exits, increment, otherwise set to 1\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n console.log(lookup)\n for (let i = 0; i < str2.length; i++){\n let letter = second[i];\n // can't find letter of letter is zero then it's not an anagram\n if (!lookup[letter]) {\n return false;\n } else {\n lookup[letter] -= 1;\n }\n return true;\n }\n}", "function checkAnagramWithTimeComplexity(str1, str2) {\n str1 = str1.toLowerCase();\n str2 = str2.toLowerCase();\n if (str1.length !== str2.length) return false\n let counting = {}\n for (let c of str1) {\n counting[c] = (counting[c] + 1) || 1;\n }\n for (let c of str2) {\n if (counting[c]) {\n --counting[c];\n }\n else {\n return false;\n }\n }\n return true;\n}", "function validAnagram(str1, str2){\n // add whatever parameters you deem necessary - good luck!\n if (str1.length !== str2.length ) {\n return false\n }\n\n let strObj = {};\n\n for (let val in str1 ) {\n // for strings you need to do strObj[str1[val]]\n // if key exists add to it if not create it\n strObj[str1[val]] = (strObj[str1[val]] || 0) + 1;\n }\n\n for (let val in str2) {\n strObj[str2[val]] = (strObj[str2[val]] || 0) + 1;\n }\n\n // now loop over the to see if the values are even\n for (let key in strObj) {\n if (strObj[key] % 2 !== 0) {\n return false\n }\n }\n\n return true\n\n}", "function fourthAnagram(str1, str2) {\n let letterSums = {};\n\n // If we do the exact same subractions for each letter in\n // str2 as we do additions for str1, letter_sums will all be 0.\n str1.split(\"\").forEach((e) => (letterSums[e] = (letterSums[e] || 0) + 1));\n str2.split(\"\").forEach((e) => (letterSums[e] = (letterSums[e] || 0) - 1));\n\n // It's a zero-sum game!\n return Object.values(letterSums).every((sum) => sum === 0);\n}", "function validAnagram(str1, str2) {\n if (str1.length !== str2.length) {\n return false;\n }\n\n if (str1 === '' && str2 === '') {\n return true;\n }\n\n const lookup = {};\n\n for (let i = 0; i < str1.length; i++) {\n let char = str1[i];\n lookup[char] ? (lookup[char] += 1) : (lookup[char] = 1);\n }\n\n for (let i = 0; i < str1.length; i++) {\n let char = str2[i];\n if (!lookup[char]) {\n return false;\n } else {\n lookup[char] -= 1;\n }\n }\n\n return true;\n}", "function validAnagram(str1, str2) {\n // add whatever parameters you deem necessary - good luck!\n // Run checks if string is empty or strings are not same length\n if (str1 === \"\" && str2 === \"\") {\n return true;\n }\n if (str1.length !== str2.length) {\n return false;\n }\n //Initalize objects for counters\n let freqCounter1 = {};\n let freqCounter2 = {};\n\n //Create Objects through iteration\n for (let val of str1) {\n freqCounter1[val] = (freqCounter1[val] || 0) + 1;\n }\n for (let val of str2) {\n freqCounter2[val] = (freqCounter2[val] || 0) + 1;\n }\n\n //Iterate through one ob\n for (let key in freqCounter1) {\n if (!(key in freqCounter2)) {\n return false;\n }\n if (freqCounter2[key] !== freqCounter1[key]) {\n return false;\n }\n }\n return true;\n}", "function isAnagram(word1,word2) {\n /* \n Check if the length of the first word is equal to the length of the second word. If not, return false\n */\n if (word1.length != word2.length) {\n return false;\n }\n\n // Convert word1 and word2 to lower case\n word1 = word1.toLowerCase();\n word2 = word2.toLowerCase();\n\n /*\n Convert each string to an array, sort in alphabetical order and convert back to a string. Check if the updated strings are the same.\n */\n return word1.split('').sort().join('') == word2.split('').sort().join('');\n}", "isAnagramPalindrome(primes){\n var arr = []; \n arr = primes;\n console.log('Anagrams that are palindromes');\n \n for (let i = 0; i < arr.length; i++) {\n for (let j = i+1; j < arr.length; j++) {\n if (this.anagramDetection(arr[i].toString(),arr[j].toString())) {\n if (this.isPalindrome(arr[i].toString(),arr[j].toString())) {\n console.log(arr[i]+' '+arr[j]);\n }\n }\n }\n }\n \n }", "function validAnagram(first,second){\n if(first.length!== second.length){\n return false;\n }\n \n //Create an object \n const lookup = {};\n\n //Loop through first string\n for(let i =0;i<first.length;i++){\n let letter = first[i];\n //If letter exists increment otherwise set to 1\n lookup[letter]?lookup[letter]+=1:lookup[letter]=1;\n }\n console.log(lookup)\n\n //Loop through the second string \n for (let i = 0;i<second.length;i++){\n let letter =second[i];\n //If we can't find a letter or letter is zero , then its not an anagram\n if(!lookup[letter]){\n return false;\n }\n else{\n lookup[letter]-=1;\n }\n }\n\n return true;\n\n}", "function validAnagram(s, t) {\n if (s.length !== t.length) {\n return false\n }\n let charMap = {}\n s = s.split('')\n for (let index = 0; index < s.length; index++) {\n if (charMap[s[index]]) {\n charMap[s[index]] += 1\n } else {\n charMap[s[index]] = 1\n }\n }\n for (let index = 0; index < t.length; index++) {\n if (!charMap[t[index]]) {\n return false\n } else {\n charMap[t[index]]--\n }\n }\n return true\n}", "function anagram(str1, str2){\n if(str1.length != str2.length)return false;\n characterCount = {}\n for(let s1 of str1){\n characterCount[s1] = characterCount[s1] + 1 || 1\n }\n for(let s2 of str2){\n if(!characterCount[s2])return false;\n else characterCount[s2]--;\n }\n return true;\n}", "function validAnagram(str1, str2) {\n if (str1 === '' && str2 === '') {\n return true;\n }\n\n if (str1 === str2) {\n return true;\n }\n\n if (str1.length !== str2.length) {\n return false;\n }\n\n let anagram1 = {};\n\n for (let char of str1) {\n anagram1[char] = ++anagram1[char] || 1;\n }\n\n console.log('obj: ', anagram1);\n\n for (let char of str2) {\n if (!anagram1[char]) {\n return false;\n } else {\n anagram1[char] -= 1;\n }\n }\n return true;\n}", "function isAnagram(string1, string2){\n if(string1.length !== string2.length) return false;\n\n let string1CharCounts = {};\n let string2CharCounts = {}\n\n for(let i = 0; i < string1.length; ++i){\n let char = string1[i];\n string1CharCounts[char] = string1CharCounts[char] === undefined ? 1 : ++string1CharCounts[char];\n }\n\n for(let i = 0; i < string2.length; ++i){\n let char = string2[i];\n string2CharCounts[char] = string2CharCounts[char] === undefined ? 1 : ++string2CharCounts[char];\n }\n\n for(let char in string1CharCounts){\n let leftCount = string1CharCounts[char];\n let rightCount = string2CharCounts[char];\n\n if(leftCount !== rightCount) return false;\n\n delete string1CharCounts[char];\n delete string2CharCounts[char];\n }\n\n return !Object.keys(string2CharCounts).length;\n}", "function validAnagram(first, second) {\n if (first.length !== second.length) {\n return false;\n }\n\n const lookup = {};\n\n for (let i = 0; i < first.length; i++) {\n let letter = first[i];\n // if letter exists, increment, otherwise set to 1\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n // console.log(lookup)\n\n for (let i = 0; i < second.length; i++) {\n let letter = second[i];\n // can't find letter or letter is zero then it's not an anagram\n if (!lookup[letter]) {\n return false;\n } else {\n lookup[letter] -= 1;\n }\n }\n console.log(lookup)\n return true;\n}", "function anagramStr(str, input){\n if(str.length != input.length){\n return false;\n }\n let loopData = {};\n str = str.toLowerCase().trim();\n for (let index = 0; index < str.length; index++) {\n let element = str[index];\n loopData[element] = element && loopData[element] ? loopData[element] + 1 : 1;\n }\n console.log(loopData);\n input = input.toLowerCase().trim();\n for (let index = 0; index < input.length; index++) {\n const element = input[index];\n if(!loopData[element]){\n return false;\n }\n loopData[element]--;\n }\n console.log(loopData);\n return true;\n}", "function checkAnagram(a = '', b = '') {\n var array = {};\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n let res = a.charCodeAt(i) - 97;\n console.log('res', res);\n array[res] = (array[res] || 0) + 1;\n }\n console.log('array', array);\n\n for (let j = 0; j < b.length; j++) {\n let res = b.charCodeAt(j) - 97;\n if (!array[res]) {\n return false;\n }\n array[res]--;\n }\n return true;\n}", "function areAnagrams(str1, str2) {\n if (str1.length != str2.length) {\n return false;\n }\n let hash_map = {}\n for (let i = 0; i < str1.length; i++) {\n let char = str1[i];\n if (char in hash_map) {\n hash_map[char]++;\n } else {\n hash_map[char] = 1;\n }\n }\n\n console.log(hash_map);\n\n for (let i = 0; i < str2.length; i++) {\n let char = str2[i];\n if (!hash_map[char]) {\n return false;\n } else {\n hash_map[char]--;\n }\n }\n return true;\n}", "function anagrams(str1, str2) {\n return cleanString(str1) === cleanString(str2);\n}", "function anagrams(stringA, stringB) {\n // use helper function and build a map for each string\n const charMapA = buildCharMap(stringA);\n const charMapB = buildCharMap(stringB);\n\n if (Object.keys(charMapA).length !== Object.keys(charMapB).length) {\n return false;\n }\n\n // iterate through charMap\n for (let char in charMapA) {\n if (charMapA[char] !== charMapB[char]) {\n // if these do not line up, return false because its not an anagram\n return false;\n }\n }\n\n // if all conditions are met, return true for anagram\n return true;\n}", "function secondAnagram(str1, str2) {\n str1.split(\"\").sort().join(\"\");\n str2.split(\"\").sort().join(\"\");\n\n return str1 === str2;\n}", "function anagram(s1, s2) {\n\ts1 = s1.replace(/\\W/g,'').toLowerCase();\n\ts2 = s2.replace(/\\W/g,'').toLowerCase();\n\t//does not remove numbers\n\tconsole.log(s1);\n\tif (s1.length != s2.length) return false;\n\treturn s1.split('').sort().join('') == s2.split('').sort().join('');\n}", "function validAnagram(str1, str2) {\n if (str1.length !== str2.length) {\n return false;\n }\n\n const lookup = {};\n\n for (let i = 0; i < str1.length; i++) {\n let letter = str1[i];\n // if letter exists, increment, otherwise set to 1\n lookup[letter] ? lookup[letter] += 1 : lookup[letter] = 1;\n }\n console.log(lookup)\n\n for (let i = 0; i < str2.length; i++) {\n let letter = str2[i];\n // can't find letter or letter is zero then it's not an anagram\n if (!lookup[letter]) {\n return false;\n } else {\n //we subtract one to make sure both str have same frequency of letter\n lookup[letter] -= 1;\n }\n }\n\n return true;\n}", "function validAnagram(str1, str2) {\n\tif (str1.length !== str2.length) return false;\n\n\t// Does the strings have the same chars and its counts\n\t// { a: 2, b: 1, r: 3, o: 5}\n\tlet freq1 = {};\n\tlet freq2 = {};\n\n\t// Iterate trough the strings and add the chars to the freq counters\n\tfor (let i of str1) {\n\t\tfreq1[i] = freq1[i] ? freq1[i] + 1 : 1;\n\t}\n\tfor (let i of str2) {\n\t\tfreq2[i] = freq2[i] ? freq2[i] + 1 : 1;\n\t}\n\tconsole.log(freq1, freq2);\n\t// Compare the strings and return bool\n\tfor (let i in freq1) {\n\t\tif (!(i in freq2)) {\n\t\t\treturn false;\n\t\t}\n\t\t// if the value of the key is diffrent\n\t\tif (freq1[i] !== freq2[i]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "function anagram (str1, str2) {\n\tvar letterCount = { };\n\n\tletterCount = countWords(str1, letterCount, 1) // pass to do positive count of letters in str1\n\tletterCount = countWords(str2, letterCount, -1) // pass to do negative count of letters in str2\n\t\n\t/* If the strings are anagrams, we expect every entry in the dictionary to \n\t * be equal to 0. Otherwise there will be some entry with a negative or positive count. */\n\tfor (key in letterCount) {\n\t\tif (letterCount[key] != 0)\n\t\t\treturn false\n\t}\n\n\treturn true\n}", "function anagrams(stringA, stringB) {\n if (stringA.length !== stringB.length) {\n return false;\n }\n const lowerStrA = stringA.toLowerCase();\n const lowerStrB = stringB.toLowerCase();\n const mapStrA = mapStr(lowerStrA);\n const mapStrB = mapStr(lowerStrB);\n\n // console.log(\"mapStrA\", mapStrA);\n // console.log(\"mapStrB\", mapStrB);\n\n let flag = true;\n for (let i in mapStrA) {\n const curValue = mapStrA[i];\n if (mapStrB[i] !== curValue) {\n flag = false;\n break;\n }\n }\n return flag;\n}", "function stringAnagrams(a, b) {\n let y = a.split(\"\").sort().join(\"\"),\n z = b.split(\"\").sort().join(\"\");\n \n console.log(\n z === y \n ? a + \" and \" + b + \" are anagrams! \"\n : a + \" and \" + b + \" are not anagrams! \"\n )\n}", "function anagrams(stringA, stringB) {\n const sortedStrA = sortStr(stringA)\n const sortedStrB = sortStr(stringB)\n\n return sortedStrA === sortedStrB\n\n\n}", "function isAnagram (a, b) {\n var a = a.replace(/\\s+/g, '').split('');\n var b = b.replace(/\\s+/g, '').split('');\n var i = 0;\n while(i < b.length){\n if(a.includes(b[i])) {\n a.splice(a.indexOf(b[i]), 1);\n i++;\n } else {\n return false;\n }\n }\n return true;\n}", "function validAnagram(str1, str2) {\n //if both strings are empty return true\n if(str1.length === 0 && str2.length === 0) return true;\n //create two empty objects\n let obj1 = {};\n let obj2 = {};\n //loop through each of the strings and put them in the objects\n for(let char of str1) {\n if(obj1[char] > 0) {\n obj1[char]++\n } else {\n obj1[char] = 1;\n }\n }\n for(let char of str2) {\n if(obj2[char] > 0) {\n obj2[char]++\n } else {\n obj2[char] = 1;\n }\n }\n //check if each key in strings match to each other \n for(let key in obj1) {\n if(!key in obj2) return false;\n //chack if the frequencies match\n if(obj1[key] !== obj2[key]) return false;\n }\n return true;\n}", "function findAnagram(str1, str2){ // You wrote this\r\n if(str1.length !== str2.length){\r\n return false;\r\n }\r\n let obj1 = {}\r\n let obj2 = {}\r\n for(let char of str1){\r\n obj1[char] = (obj1[char] || 0) + 1\r\n }\r\n for(let char of str2){\r\n obj2[char] = (obj2[char] || 0) + 1\r\n }\r\n for(let key in obj1){\r\n if(!(key in obj2)){\r\n return false\r\n }\r\n if(obj2[key] !== obj1[key]){\r\n return false\r\n }\r\n }\r\n return true\r\n}", "function validAnagram(str1, str2) {\n if (str1 === '' && str2 === '') {\n return true;\n }\n\n if (str1 === str2) {\n return true;\n }\n\n if (str1.length !== str2.length) {\n return false;\n }\n\n let arr1 = str1.split('');\n let arr2 = str2.split('');\n\n for (let i = 0; i < str1.length; i++) {\n let correctIndex = arr2.indexOf(arr1[i]);\n if (correctIndex === -1) {\n return false;\n }\n arr2.splice(correctIndex, 1);\n }\n return true;\n}", "function anagrams(stringA, stringB) {\n return cleanAndSort(stringA) === cleanAndSort(stringB);\n}", "function funWithAnagrams(arr) {\n let uniqueWords = [arr[0]];\n for (let i = 1; i < arr.length; i++) {\n let duplicate = false;\n for (let j = 0; j < uniqueWords.length; j++) {\n if (isAnagram(uniqueWords[j], arr[i])) {\n duplicate = true;\n }\n }\n if (!duplicate) uniqueWords.push(arr[i]);\n }\n return uniqueWords.sort();\n}", "function anagrams(stringA, stringB) {\n\treturn cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(string1, string2){\n let obj = {};\n\n string1.split(\"\").forEach((char) => {\n if (!obj[char]) {\n obj[char] = 1;\n } else {\n obj[char] += 1;\n }\n });\n\n string2.split(\"\").forEach((char) => {\n if (!obj[char]) {\n obj[char] = 1;\n } else {\n obj[char] -= 1;\n }\n });\n\n return Object.values(obj).every(char => char === 0);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function anagrams(stringA, stringB) {\n return cleanString(stringA) === cleanString(stringB);\n}", "function annagram(word1, word2) {\n let clean1 = word1.replace(/[.,\\/#№?\\d@!$%\\^&\\*;:{}=\\-_`~()]/g, \"\").replace(/\\s{2,}/g, \" \").toLowerCase().split(' ').join('').trim();\n let clean2 = word2.replace(/[.,\\/#№?\\d@!$%\\^&\\*;:{}=\\-_`~()]/g, \"\").replace(/\\s{2,}/g, \" \").toLowerCase().split(' ').join('').trim();\n console.log(clean1, clean2)\n\n let newStr1 = clean1.split('').sort().join('')\n let newStr2 = clean2.split('').sort().join('')\n console.log(newStr1, newStr2)\n\n if (newStr1.length === newStr2.length) {\n return newStr1 === newStr2 ? true : false\n } else {\n return false\n }\n}", "function validAnagram(str1, str2){\n // check length is the same, if so FALSE\n if (str1.length !== str2.length) return false;\n let obj1 = {}\n let obj2 = {}\n // make object 1 for str1: 1 for loop\n for (let char of str1) {\n obj1[char] = (obj1[char] || 0) + 1;\n }\n // make object 2 for str1: 1 for loop\n for (let char of str2) {\n obj2[char] = (obj2[char] || 0) + 1;\n }\n // compare objects!: 1 for loop \n for (let key in obj1) {\n // make sure each key for obj1 is in obj2\n if (!(key in obj2)) return false;\n // make sure each key value for obj1 is the same for obj2 \n if (obj1[key] !== obj2[key]) return false;\n }\n return true}", "function isAnagram (a, b) {\n\t// turn each string into arrays to check for equality\n\tlet stringAArray = a.split('');\n let stringBArray = b.split('');\n\n // have a counter variable to keep track of how many characters match\n let numberOfMatches = 0;\n\n // check which string is smaller to loop through that string in the first loop\n // so we can reduce the number of equality checks\n if (stringAArray.length > stringBArray.length) {\n \tstringAArray = b.split('');\n stringBArray = a.split('');\n }\n\n // loop through both array of strings to check if stringAArray[i] === stringBArray[j]\n // push 2 counters to numberOfMatches for each match\n // set stringBArray[j] to null so that when we do an equality check it would not check that same value again and add counters to numberOfMatches\n for (let i = 0; i < stringAArray.length; i++) {\n for (let j = 0; j < stringBArray.length; j++) {\n if (stringAArray[i] === stringBArray[j]) {\n \t// console.log('match');\n numberOfMatches += 2;\n stringBArray[j] = null;\n break;\n }\n }\n }\n\n // console.log('number of matches: ' + numberOfMatches);\n // console.log('string a array: ' + stringAArray);\n // console.log('string b array: ' + stringBArray);\n // console.log('number of cuts: ' + (stringAArray.length + stringBArray.length) - numberOfMatches);\n\n // return total amount of cuts to both strings\n return (stringAArray.length + stringBArray.length) - numberOfMatches;\n}", "function anagram(str1, str2) {\n // if not equal then this string is not the same\n if (str1.length !== str2.length) return false\n let mapStr1={};\n let mapStr2={}\n let arr1 = str1.split('');\n let arr2 = str2.split('');\n let v2\n arr1.forEach((v,i)=>{\n mapStr1[v] = mapStr1[v] ? mapStr1[v] + 1 : 1\n v2 = arr2[i]\n mapStr2[v2] = mapStr2[v2] ? mapStr2[v2] + 1 : 1\n })\n\n for(let i in mapStr1) {\n if (mapStr1[i] !== mapStr2[i]) {\n return false\n }\n }\n return true\n}" ]
[ "0.76745754", "0.76693237", "0.76247543", "0.76247543", "0.76247543", "0.7601986", "0.7530106", "0.7501478", "0.7493195", "0.74318606", "0.741391", "0.740721", "0.73391813", "0.7331515", "0.73256433", "0.7269973", "0.7254811", "0.7231702", "0.72288543", "0.7227069", "0.7211976", "0.71846074", "0.71803373", "0.71531403", "0.71320295", "0.7122301", "0.71111196", "0.7102108", "0.708529", "0.7064341", "0.70629025", "0.70490587", "0.7036118", "0.7014241", "0.7006004", "0.6989498", "0.69892955", "0.6976228", "0.69666857", "0.69626445", "0.69493645", "0.6948299", "0.6924414", "0.69110376", "0.6901261", "0.6896034", "0.6872884", "0.68509763", "0.6849571", "0.6842462", "0.6842326", "0.68336403", "0.6829262", "0.682817", "0.682478", "0.6824713", "0.6820118", "0.6819775", "0.68135846", "0.6813139", "0.6780547", "0.6777496", "0.677313", "0.6773032", "0.6768311", "0.67665255", "0.67576206", "0.67549103", "0.675325", "0.67520165", "0.6745488", "0.67435676", "0.67326176", "0.6732337", "0.6726811", "0.67208856", "0.6713448", "0.67041063", "0.67028564", "0.6702255", "0.6699231", "0.66901296", "0.6676135", "0.66731584", "0.66516125", "0.6647428", "0.6645464", "0.66407275", "0.66159743", "0.660429", "0.6602667", "0.66010845", "0.66010845", "0.66010845", "0.66010845", "0.6596352", "0.6591463", "0.6563549", "0.6562224", "0.6561301" ]
0.7194154
21
draw everything on the canvas
function drawEverything() { drawthetrack(); player1.DrawItSelf(i); player2.DrawItSelf(j); allTheObstacles1.forEach((eachObstacle) => { eachObstacle.drawItSelf(); if (eachObstacle.x < 20) { allTheObstacles1.shift(); } }) allTheObstacles2.forEach((eachObstacle) => { eachObstacle.drawItSelf(); if (eachObstacle.x < 20) { allTheObstacles2.shift(); } }) allCloud1.forEach((cloud) => { cloud.drawItSelf(); if (cloud.x < 20) { allCloud1.shift(); } }) allCloud2.forEach((cloud) => { cloud.drawItSelf(); if (cloud.x < 20) { allCloud2.shift(); } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "draw() { \r\n // Make sure the canvas has been prepared\r\n if (!this._setup) {\r\n this.prepare();\r\n }\r\n \r\n // Get the drawing context\r\n let ctx = this._canvas.getContext(\"2d\");\r\n \r\n // Clear the canvas by displaying only the background color\r\n ctx.fillStyle = this._background;\r\n ctx.fillRect(0, 0, this._width, this._height);\r\n \r\n // Loop through all of the shapes, asking them to draw theirselves\r\n // on the drawing context\r\n this._shapes.forEach(s => s.draw(ctx));\r\n }", "function drawCanvas() {\n clearCanvas();\n\n var i,\n shape;\n\n for (i = 0; i < shapes.length; i += 1) {\n shape = shapes[i];\n shape.draw(drawingContext);\n }\n }", "drawCanvas() {\n\n\t}", "function drawAll() {\n\tdrawBackground();\n\tdrawMarkers();\n\tpanForTranslation();\n\tblob.show();\n\n\tfor (var i = 0; i < playerData.length; i++) {\n\t\tif (playerData[i].id !== socket.id) {\n\t\t\tcanvasContext.fillStyle = 'white';\n\t\t\tcanvasContext.beginPath();\n\t\t\tcanvasContext.arc(playerData[i].xPos, playerData[i].yPos, 10, 0,Math.PI*2, true);\n\t\t\tcanvasContext.fill();\n\t\t}\n\t}\n}", "function drawCanvas() {\n if( drawio.loadedIMG != ''){\n drawio.ctx.drawImage(drawio.loadedIMG, 0, 0);\n }\n for( var i = 0; i < drawio.shapes.length; i++) {\n drawio.shapes[i].render();\n }\n if(drawio.selectedElement) {\n drawio.selectedElement.render();\n }\n }", "function drawEverything() {\n context.clearRect(0, 0, canvas.width, canvas.height);\n drawGrid();\n drawPlayer();\n drawTreasure();\n}", "draw(){\n this._context.fillStyle = '#000';\n this._context.fillRect(0, 0, canvas.width, canvas.height);\n \n // draw ball and players\n this.drawRectangle(this.ball) \n this.players.forEach(player => this.drawRectangle(player));\n\n //draw score\n this.drawScore();\n }", "Draw()\n\t{\n\t\t// Clear the canvas, optimize later if enough brain\n\t\tthis.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);\n\n\t\t// Draw everything\n\t\tfor(var i = 0; i < this.CanvasComponentCollection.orderedCollection.length; i++)\n\t\t{\n\t\t\tthis.CanvasComponentCollection.orderedCollection[i].Draw();\n\t\t}\n\t}", "_draw () {\r\n\t\tthis.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\r\n\r\n\t\tthis.particles.forEach(particle => {\r\n\t\t\tparticle.draw(this.context);\r\n\t\t});\r\n\t}", "draw() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n // display problem\n this.drawProblem()\n // display input field\n if (this.input) {\n this.input._value = ''\n }\n \n this.drawInputField()\n\n // draw attacks\n this.attacks.draw(this.ctx, this.attackIndex)\n\n // draw player data\n this.player.drawPlayerData(this.ctx)\n // draw computer data\n this.computer.drawComputerData(this.ctx)\n \n }", "function drawAll() {\n //refreshes canvas everyone to give the animation effect\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n if (optionScreen) {\n clickOption();\n return;\n }\n \n //calling functions to draw objects\n drawNet();\n drawRectangle1();\n drawRectangle2();\n drawBall();\n drawScorePlayer();\n drawScoreComputer();\n computerMovement();\n drawWinner();\n moveObjects();\n \n \n //requests an animation from the browser API onto canvas = to user refresh rate\n window.requestAnimationFrame(drawAll);\n }", "function drawCanvas() {\n\t\tdraw(context, drawer, colours, solver);\n\t\tsolver.callStateForItem(spanState);\n\t}", "Draw(){\n\t\tthis.context.beginPath();\n\t\tthis.context.fillRect(this.posX, this.posY, this.width, this.height);\n\t\tthis.context.closePath();\n }", "function drawAll()\n{\t\n //\tDraw background\n ctx.fillStyle = \"black\";\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n //\tDraw the universe\n univ.draw();\n}", "draw() {\n this.clearCanvas();\n\n this._ball.draw();\n this._paddle1.draw();\n this._paddle2.draw();\n\n this.drawScore();\n\n this.detectCollision();\n\n this.movePaddles();\n\n this._ball.move();\n }", "function draw() {\n\t\t\t\tctx.fillStyle = \"black\";\n\t\t\t\tctx.fillRect(0,0,canvasWidth, canvasHeight);\n\t\t\t\tplayer.draw();\n\t\t\t\tcomputer.draw();\n\t\t\t\tball.draw();\n\t\t\t}", "function drawCanvas() {\n\t\tdrawing(context, drawer, colours, solver, selectedSpacesGrid);\n\t\tsolver.callStateForItem(spanState);\n\t}", "function drawCanvas() {\n\t\tdrawer.drawWallGrid(context, solver.gridWall, solver.xLength, solver.yLength, selectedSpacesGrid); \n\t\tdrawInsideSpaces(context, drawer, colourSet, solver, purificator, selectedSpacesGrid);\n\t\tdrawer.drawSudokuFrames(context, solver, mouseCoorsItem); \n\t\tsolver.callStateForItem(spanState);\n\t}", "function drawCanvas() {\r\n // Clear everything\r\n context1.clearRect(0, 0, canvas1.width, canvas1.height); // Clear canvas\r\n\r\n // Background grids\r\n drawGrid(context1,canvas1.width, canvas1.height); // Draw background grid\r\n\r\n // Curve through points and vertices\r\n drawCurve(context1, styleUniformParametrization, computeUniformInterpolation(numberOfPoints, points)); // Draw uniform parametrization\r\n drawCurve(context1, styleNonUniformParametrization, computeNonUniformInterpolation(numberOfPoints, points)); // Draw non-uniform parametrization\r\n\r\n drawVertices(context1, style, points); // Draw vertices as circles\r\n\r\n }", "function drawAll() {\n\n // color in the background\n ctx.fillStyle = \"#000000\";\n ctx.fill(0, 0, canvasWidth, canvasHeight);\n\n // draw ship\n ship.draw();\n\n // draw rocks\n for (var i = 0; i < rocks.length; i++) {\n rocks[i].draw();\n }\n\n // draw bullets\n for (var i = 0; i < bullets.length; i++) {\n bullets[i].draw();\n }\n\n // draw stars\n for (var i = 0; i < stars.length; i++) {\n stars[i].draw();\n }\n\n // draw everything else\n}", "function canvasDraw(){\n context.clearRect(0, 0, canvas.width, canvas.height);\n // define a function to be carried out on every object in the \"balls\" array\n // name of element in forEach function doesn't matter\n balls.forEach(function(ball_obj){\n ball_obj.draw();\n ball_obj.move();\n })\n }", "function drawCanvas() {\n // clear canvas before next draw\n ctx.clearRect(0, 0, canvas.width, canvas.height)\n\n // draw\n drawLayout()\n drawTargets()\n drawBalls()\n drawAliasBalls()\n if (mouseDrag && ballClicked && mouseLoc) {\n drawCatapultLine()\n }\n\n //test for selecting ball\n // ctx.strokeStyle = 'rgba(255, 0, 0, .5)'\n // ctx.strokeRect(ballRect.x, ballRect.y, ballRect.width, ballRect.height)\n\n // used to render canvas at 60FPS\n raf = requestAnimationFrame(drawCanvas)\n }", "function draw() {\n ctx.fillStyle = \"#70c5ce\";\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n cloud.draw();\n pipes.draw();\n ball.draw();\n ground.draw();\n bird.draw();\n getReady.draw();\n gameOver.draw();\n score.draw();\n}", "function drawCanvas() {\t\t\n\t// Erase everything currently on the canvas\n\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\t\n\t// Loop through each layer in the list and draw it to the canvas\n\tlayer_list.forEach(function(layer, index) {\n\t\t\n\t\t// If the layer has a blend mode set, use that blend mode, otherwise use normal\n\t\tif (layer.blend) {\n\t\t\tcontext.globalCompositeOperation = layer.blend;\n\t\t} else {\n\t\t\tcontext.globalCompositeOperation = 'normal';\n\t\t}\n\t\t\n\t\t// Set the opacity of the layer\n\t\tcontext.globalAlpha = layer.opacity;\n\t\t\n\t\t// Draw the layer into the canvas context\n\t\tcontext.drawImage(layer.image, layer.position.x, layer.position.y);\n\t});\n\t\n\t// Loop this function! requestAnimationFrame is a special built in function that can draw to the canvas at 60 frames per second\n\t// NOTE: do not call drawCanvas() without using requestAnimationFrame here—things will crash!\n\trequestAnimationFrame(drawCanvas);\n}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "paintCanvas() {\n // Draw the tile map\n this.game.map.drawMap();\n\n // Draw dropped items\n this.game.map.drawItems();\n\n // Draw the NPCs\n this.game.map.drawNPCs();\n\n // Draw the player\n this.game.map.drawPlayer();\n\n // Draw the mouse selection\n this.game.map.drawMouse();\n }", "drawCanvas() {\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.ctx.fillStyle = '#18121e';\n this.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);\n this.moveDots();\n }", "draw() {\n // Clear the Canvas\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n // Check Win\n this.checkWin();\n // Draw the dashes in the center\n this.drawDashes();\n // Draw the Ball\n this.drawBall();\n // Draw the Paddle 1\n this.drawPaddle1();\n // Draw the Paddle 2\n this.drawPaddle2();\n // Move the ball\n this.moveBall();\n // Check Ball Collision\n this.checkBallCollision();\n // Display the score\n this.displayScore();\n // Move the paddles\n this.movePaddle();\n // Check Paddle Collision\n this.checkPaddleCollision();\n }", "function draw(){\n\n requestAnimationFrame(draw);\n \n //Draw background\n ctx.fillStyle = 'teal';\n ctx.fillRect(0,0, canvas.width, canvas.height);\n\n //Draw map\n drawCheckpoints();\n\n //Draw objects\n objects.forEach(obj => {\n obj.draw();\n });\n\n drawText();\n}", "_draw_all(){\r\n\t\tthis._draw_bg();\r\n\t\tthis._draw_fg();\r\n\t}", "function draw(canvas)\n{\t\n\thelper.clear(canvas) // Clear canvas and set size\n \tvar ctx=canvas[0].getContext(\"2d\");\t\n\tctx.fillStyle=\"green\";\n\tctx.fillRect(0, 0, canvas.width(), canvas.height());\n}", "draw(context) {\n context.fillStyle = '#414048';\n context.beginPath();\n for (let i = 0; i < this.length; ++i) {\n context.fillRect(this.units[i].x, this.units[i].y, this.size, this.size);\n }\n context.closePath();\n }", "draw() {\n\t\t\tc.beginPath();\n\t\t\tc.fillStyle = this.color;\n\t\t\tc.fillRect(\n\t\t\t this.x - width / 2,\n\t\t\t this.y - height / 2,\n\t\t\t\twidth,\n\t\t\t\theight\n\t\t\t);\n\t\t\tc.closePath();\n\t\t }", "function renderCanvas()\n {\n if (drawing)\n {\n context.moveTo(lastPos.x, lastPos.y);\n context.lineTo(mousePos.x, mousePos.y);\n context.stroke();\n lastPos = mousePos;\n }\n }", "function draw(){\n context.clearRect(0, 0, canvas.width, canvas.height);\n boxes.forEach(function(box, i){\n context.fillStyle = box.color;\n context.fillRect(box.x, box.y, box.width, box.height);\n });\n}", "function draw()\n{\n\trequestAnimationFrame(draw);\n\tg_canvas.clearRect(0, 0, g_canvasWidth, g_canvasHeight);\n\tfor (let renderable of g_renderables)\n\t{\n\t\trenderable.render();\n\t}\n}", "function draw(){\n\n\n // canvas.save();\n // canvas.clearRect(0, 0, width, height);\n // canvas.translate(transform_x, transform_y);\n // canvas.scale(scale_value, scale_value);\n\n coresetData.forEach(function(d){\n canvas.beginPath();\n canvas.rect(parseFloat(d.x), -parseFloat(d.y), parseFloat(d.delta), parseFloat(d.delta));\n canvas.fillStyle = d.color;\n canvas.fill();\n //canvas.closePath();\n });\n }", "function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }", "function draw(){\r\n ctx.fillStyle = '#70c5ce';\r\n ctx.fillRect(0, 0, cWidth, cHeight);\r\n bg.draw();\r\n pipes.draw();\r\n fg.draw();\r\n kca.draw();\r\n bird.draw();\r\n getReady.draw();\r\n gameOver.draw();\r\n score.draw();\r\n \r\n\r\n}", "function drawCanvas() {\n\tif (imageId != null) {\n\t\tdrawJointJS(imageId);\n\t\timageId = null;\n\t}\n}", "draw() {\n // push the scene objects to the scene array\n this.prepareScene();\n\n // call each object's draw method\n this.drawSceneToCanvas();\n }", "function draw() {\n ctx.clearRect(0,0, canvas.width, canvas.height);\n drawList.forEach((shape) => {\n shape.draw();\n });\n raf = window.requestAnimationFrame(draw);\n}", "function draw() {\n computeBoardSize(board);\n\n context.drawImage(\n this,\n current_x_offset,\n current_y_offset,\n board.width,\n board.height\n );\n\n positionPlayer();\n clearBlinkers();\n\n for (let i of allObjects) {\n if (isInView(i.x, i.y) && !i.completed) {\n const [x, y] = normalize_image_position(i.x, i.y);\n createBlinker(x, y, i.isGold);\n }\n }\n }", "function draw() {\n\t//clear the board\n\tctx.clearRect(0, 0, canvas[0].width, canvas[0].height);\n\n\t//draw the player\n\tplayer.draw(ctx);\n\n\t//draw the turrets\n\t$.each(turrets, function(i,turr) {\n\t\tturr.draw(ctx);\n\t});\n\n\t//draw the projectiles\n\t$.each(projectiles, function(i,proj) {\n\t\tproj.draw(ctx);\n\t});\n\n\t//draw the effects\n\t//make sure damaging effects are on top\n\tvar damagingEffects = [];\n\t$.each(effects, function(i,eff) {\n\t\tif (eff.getDoesDamage()) {\n\t\t\tdamagingEffects.push(eff);\n\t\t} else {\n\t\t\teff.draw(ctx);\n\t\t}\n\t});\n\n\t$.each(damagingEffects, function(i,eff) {\n\t\teff.draw(ctx);\n\t});\n}", "draw(){\r\n ctx.beginPath();\r\n ctx.fillStyle = 'white';\r\n ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);\r\n ctx.fill();\r\n }", "draw() {\n ctx.beginPath();\n ctx.fillStyle = \"white\";\n ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);\n ctx.fill();\n }", "function draw(){\n tile.clearRect(0, 0, canvas.width, canvas.height);\n drawFoundAnswers();\n drawSelection();\n drawBoard();\n drawAnswers();\n drawWinner();\n}", "draw(ctx) {\n\t\t\n\t\tctx.beginPath();\n\t\t\n\t\tctx.fillStyle = this.fillStyle;\n\t ctx.fillRect(this.x, this.y, this.w, this.h);\n\t\t\n\t\tif (this.lineWidth && this.strokeStyle) {\n\t\t\tctx.lineWidth = this.lineWidth;\n\t\t\tctx.strokeStyle = this.strokeStyle;\n\t\t ctx.strokeRect(this.x, this.y, this.w, this.h);\n\t\t\tctx.stroke();\n\t\t}\n\n\t\tctx.closePath();\n\t}", "function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }", "function redraw() {\n // clear(context);\n canvas.width = canvas.getAttribute(\"width\");\n canvas.height = canvas.getAttribute(\"height\");\n // for (var child = root.firstChild; child; child = child.nextSibling) draw(child);\n var circle = {x: 10, y: 10, r: 10, strokeStyle: \"red\"};\n draw(context, circle);\n }", "function draw1() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n time.draw();\n stock.draw();\n // compass.draw();\n}", "function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }", "function redraw() {\n canvas.width = root.getAttribute('width');\n canvas.height = root.getAttribute('height');\n for (var child = root.firstChild; child; child = child.nextSibling) draw(child);\n }", "draw() {\n ctx.beginPath();\n ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2, false);\n ctx.fillStyle = this.color;\n ctx.fill();\n }", "function init() {\n clearCanvas()\n drawBackgroundColor()\n drawOrigin()\n }", "function mainDraw() {\n\t\tif (canvasValid == false) {\n\t\tclear(ctx);\n\t\t\n\t\t// Add stuff you want drawn in the background all the time here\n\t\t\n\t\t// draw all boxes\n\t\tvar l = boxes2.length;\n\t\tfor (var i = 0; i < l; i++) {\n\t\t\tboxes2[i].draw(ctx); // we used to call drawshape, but now each box draws itself\n\t\t}\n\t\t\n\t\t// Add stuff you want drawn on top all the time here\n\t\tdocument.querySelector('#iou').innerHTML = computeIoU(boxes2[0], boxes2[1]);\n\t\t\n\t\tcanvasValid = true;\n\t\t}\n\t}", "draw() {\n this._drawLines(this.linesData);\n this._drawLines(this.linesAux);\n this._drawThickLines();\n this._drawSurfaces(this.surfaces);\n }", "draw() {\n this.loop(DrawableArray.drawFunction);\n }", "draw() {\n this.loop(DrawableArray.drawFunction);\n }", "draw() {\n this.loop(DrawableArray.drawFunction);\n }", "function drawAll() {\n drawRect(0, 0, canvas.width, canvas.height, \"#5394FC\");\n drawCircle(ballX, ballY, ballRadius, \"white\");\n drawRect(paddleX, paddleY, PADDLE_WIDTH, PADDLE_HEIGHT, \"white\");\n drawBricks();\n drawText(\"20px Sabo\", `Score : ${score}`, 10, 40);\n}", "function drawAll() {\n let dimensions = appVars.canvasDimensions;\n appVars.context.clearRect(0, 0, dimensions.width, dimensions.height);\n\n for(var i = 0; i < appVars.shapes.length; i++) {\n var shape = appVars.shapes[i];\n if(!shape.deleted) {\n shape.draw(appVars.context);\n }\n }\n}", "function draw(){\r\n\t\t \t\tctx.clearRect(0,0,canvas.width,canvas.height);\r\n\t\t\t\t\r\n\t\t\t\tconsole.log(\"TEngine se esta ejecutando correctamente...\")\r\n\t\t\t}", "draw() {\n // Clear the Canvas\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n // Draw the Ball\n this.drawBall();\n // Draw the Paddle\n this.drawPaddle();\n this.drawBricks();\n // Move the Ball\n this.moveBall();\n // Move the Paddle\n this.movePaddle();\n // Check Ball Collision\n this.checkBallCollision();\n // Check Paddle Collision\n this.checkPaddleCollision();\n // Check Brick Collision\n this.checkBrickCollision();\n // Calculate and Diaplay the score\n this.calculateDisplayScore();\n }", "function drawCanvas(){\n\tclearCanvas();\n\t// loop over the objects of the paint\n\tif (dataLoaded){\n\t\tif (!isFullHistory){\n\t\t\tctx.save();\n\t\t\tctx.globalAlpha = globalAlpha;\n\t\t\tfor (index in objArr)\n\t\t\t{\n\t\t\t\tobjArr[index].draw();\n\t\t\t}\n\t\t\tctx.restore();\n\n\t\t\thistoryObj.draw();\n\t\t\tif (moveToFullHistoy != 0){\n\t\t\t \tmoveToFullHistoy--;\n\t\t\t \tvar currInterval = (HISTORY_ANIMATION_TIME-moveToFullHistoy)/HISTORY_ANIMATION_TIME;\n\t\t\t\tgraphW = BASE_GRAPH_W + ((MAX_GRAPH_W - BASE_GRAPH_W) * currInterval);\n\t\t\t\tgraphH = BASE_GRAPH_H + ((MAX_GRAPH_H - BASE_GRAPH_H) * currInterval);\n\t\t\t\thistoryObj.pos.x = MIN_GRAPH_X + ((BASE_GRAPH_X-MIN_GRAPH_X) * (moveToFullHistoy/HISTORY_ANIMATION_TIME));\n\t\t\t\thistoryObj.pos.y = MIN_GRAPH_Y + ((BASE_GRAPH_Y-MIN_GRAPH_Y) * (moveToFullHistoy/HISTORY_ANIMATION_TIME));\n\t\t\t\tglobalAlpha = 1-currInterval;\n\t\t\t\tif (moveToFullHistoy == 0){\n\t\t\t\t\tisFullHistory = true;\n\t\t\t\t\tmoveToFullHistoy =-1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\thistoryObj.draw();\n\t\t\tfor (index in objArr)\n\t\t\t{\n\t\t\t\tif (objArr[index].kind == WATT_KIND) \n\t\t\t\t\tobjArr[index].draw();\n\t\t\t}\n\t\t\tif (moveToFullHistoy != -1){\n\t\t\t\tmoveToFullHistoy++;\n\t\t\t \tvar currInterval = (HISTORY_ANIMATION_TIME-moveToFullHistoy)/HISTORY_ANIMATION_TIME;\n\t\t\t\tglobalAlpha = 1;\n\t\t\t\tgraphW = BASE_GRAPH_W + ((MAX_GRAPH_W - BASE_GRAPH_W) * currInterval);\n\t\t\t\tgraphH = BASE_GRAPH_H + ((MAX_GRAPH_H - BASE_GRAPH_H) * currInterval);\n\t\t\t\thistoryObj.pos.x = MIN_GRAPH_X + ((BASE_GRAPH_X-MIN_GRAPH_X) * (moveToFullHistoy/HISTORY_ANIMATION_TIME));\n\t\t\t\thistoryObj.pos.y = MIN_GRAPH_Y + ((BASE_GRAPH_Y-MIN_GRAPH_Y) * (moveToFullHistoy/HISTORY_ANIMATION_TIME));\n\t\t\t\tif (moveToFullHistoy == HISTORY_ANIMATION_TIME){\n\t\t\t\t\tisFullHistory = false;\n\t\t\t\t\tmoveToFullHistoy = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "canvasDraw() {\n let prev = this.p0;\n for (const point of this.points) {\n Point.drawLine(prev, point, false, this.isSelected, this.color);\n prev = point;\n }\n Point.drawLine(prev, this.p3);\n Point.drawLine(this.p0, this.p1, true);\n Point.drawLine(this.p2, this.p3, true);\n this.p0.draw();\n this.p1.draw();\n this.p2.draw();\n this.p3.draw();\n }", "function draw() { \n\n\tctx.clearRect(0,0,canvas.width, canvas.height); \n\t\n}", "draw() {\n if (this._page !== currentPage) {\n return;\n }\n this.drawRectangles();\n if (!isReady) {\n return;\n }\n // Only used if using text lines.\n if (this._textLines.length > 0) {\n for (var i = 0; i < this._textLines.length; i++) {\n this._textLines[i].draw();\n }\n }\n // Only used if using input panels.\n if (this._inputPanels.length > 0) {\n for (var i = 0; i < this._inputPanels.length; i++) {\n this._inputPanels[i].draw();\n }\n }\n // Only used if using progress bars.\n if (this._progressBars.length > 0) {\n for (var i = 0; i < this._progressBars.length; i++) {\n this._progressBars[i].draw();\n }\n }\n }", "draw(){ \n ctx.beginPath();\n ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2, false)\n ctx.fillStyle = this.color\n ctx.fill();\n }", "function renderCanvas() {\n\tframeCount++;\n\tif (frameCount < fCount) {\n\t\t// skips the drawing for this frame\n\t\trequestAnimationFrame(renderCanvas);\n\t\treturn;\n\t}\n\telse frameCount = 0;\n\n\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\t// context.fillStyle = \"#999999\";\n\t// context.fillRect(0,0,canvas.width,canvas.height);\n\n\t\n\n\tGhost.draw()\n\trequestAnimationFrame(renderCanvas);\n}", "draw() {\n ctx.beginPath();\n ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2, false); //creates a circle\n ctx.fillStyle = '#ffffff';\n ctx.fill();\n }", "paint () {\n // Clearing canvas first\n this.clear()\n this.root.__paint(this.canvasContext)\n }", "function draw() {\n\n var ctx = getContext();\n\n // Log.group(\"A draw started\");\n //alert('Paint 1')\n reset(getCanvas());\n\n //if grid visible paint it\n//\tif(gridVisible){ //paint grid\n addBackground(getCanvas());\n//\t}\n\n //alert('Paint 2')\n STACK.paint(ctx);\n\n minimap.updateMinimap();\n// Log.groupEnd();\n//alert('Paint 3')\n\n refCabecera();\n}", "draw(ctx){\n ctx.save();\n ctx.fillStyle = \"green\";\n ctx.fillRect(this.x-this.width/2,this.y-this.height/2,this.width,this.height);\n ctx.restore();\n }", "function drawScreen(){\r\n //clear canvas\r\n ctx.clearRect(0, 0, WIDTH, HEIGHT);\r\n // draw pretty much everything\r\n myball.draw();\r\n mypaddle.draw();\r\n drawBricks(bricksArray);\r\n drawText();\r\n\r\n}", "function paintCanvas() {\r\n ctx.clearRect(0, 0, width, height);\r\n }", "draw(context) {\n //TO-DO\n }", "function draw() {\n\t\tfor (var i = 0; i < loop.graphics.length; i++) {\n\t\t\tloop.graphics[i](graphics, 0.0);\n\t\t}\n\t}", "draw(ctx){\n saveMatrix();\n ctx.save();\n translate(0,0);\n\n if (this.extended) {\n this.dockPointsReq.forEach((value) => {\n value.draw(ctx);\n });\n this.dockPointsDev.forEach((value) => {\n value.draw(ctx);\n });\n }\n\n ctx.strokeRect(this.x,this.y+this.margin_top,this.width,this.height);\n restoreMatrix();\n ctx.restore();\n }", "function draw() {\n // Clear the drawing surface and fill it with a black background\n context.fillStyle = \"rgba(0, 0, 0, 0.5)\";\n context.fillRect(0, 0, 400, 400);\n\n // Go through all of the particles and draw them.\n particles.forEach(function(particle) {\n particle.draw();\n });\n}", "function drawEverythingFromScratch() {\n\tcanvas.width = canvas.width;\n\tdrawThings();\n}", "function draw() {\n\t// clear drawing area\n\tctx.clearRect(0, 0, 400, 400);\n\n\t// draw all people\n\tfor (var id in people) {\n\t\tctx.fillRect(people[id].x, people[id].y, 10, 10);\n\t}\n\n\twindow.requestAnimationFrame(draw);\n}", "draw() {\n\t\tinfo.context.beginPath();\n\t\tinfo.context.arc(this.position.x, this.position.y, 30, 0, 2 * Math.PI);\n\t\tinfo.context.fillStyle = this.color;\n\t\tinfo.context.fill();\n\t}", "draw(){\n this.ctx.strokeStyle = this.getStrokeColor();\n this.ctx.lineWidth = 2;\n this.ctx.beginPath()\n this.ctx.moveTo(this.prevx, this.prevy);\n this.ctx.lineTo(this.x, this.y)\n this.ctx.stroke()\n this.ctx.fill();\n }", "doDraw() {\n draw_context.strokeStyle = \"#000\";\n draw_context.fillStyle = \"#eee\";\n draw_context.font = \"40px Times\";\n draw_context.lineWidth = 10;\n draw_context.strokeText(this.text, canvas_element.width/2, this.vertical);\n draw_context.fillText(this.text, canvas_element.width/2, this.vertical);\n }", "function renderCanvas() {\n if (drawing) {\n ctx.beginPath();\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.closePath();\n ctx.stroke();\n\n lastPos = mousePos;\n }\n}", "draw() {\n this.bg.forEach((a) => a.draw());\n this.shapes.forEach((a) => a.draw());\n Help.clean(this.shapes);\n }", "function updateCanvas() {\n ctx.clearRect(0, 0, 430, 430);\n fillCanvas();\n }", "draw(){\n\t\t\n\t\tlet height = this.height; //100\n\t\tlet width = this.width; //100\n\t\t\n\t\tlet ctx = this.ctx;\n\t\t//save last frame\n\t\tlet lastFrame = ctx.getImageData(0, 0, width, height);\n\t\t//clear canvas\n\t\tctx.clearRect(0, 0, width, height);\n\t\t//now, move frame 1 pixel to the left\n\t\tctx.putImageData(lastFrame, -1, 0);\n\t\t\n\t\t//then, draw the lines\n\t\tfor(var line of this.lines){\n\t\t\t\n\t\t\t\n\t\t\tlet range = line.maxValue - line.minValue;\n\t\t\tlet value = line.value;\n\t\t\t\n\t\t\t//Multiply line's value by the ratio between height and range, to get effective range the same but zero at the top\n\t\t\tvalue *= 1 * height / range;\n\t\t\t\n\t\t\t//Now, zero the value by adding the difference between minValue and 0\n\t\t\tvalue -= line.minValue * height / range;\n\t\t\t\n\t\t\t//Now, invert by subtracting from height\n\t\t\tvalue = height - value;\n\t\t\t\n\t\t\tctx.beginPath();\n\t\t\tctx.strokeStyle = line.color;\n\t\t\tctx.moveTo(width - 2, value);\n\t\t\tctx.lineTo(width, value);\n\t\t\tctx.stroke();\n\t\t}\n\t}", "function paint() {\n detectEndGame();\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n drawPaddle();\n drawBricks();\n movePaddle();\n drawBall(ctx, ballX, ballY, ballRadius);\n detectCollision();\n moveBall(ballDX, ballDY);\n drawScore();\n drawLives();\n requestAnimationFrame(paint);\n}", "function redraw () {\n\t\tctx.clearRect(0, 0, canvas.width, canvas.height)\n\n\t\tforEach(shapesList, function (shape) {\n\t\t\tshape.draw()\n\t\t})\n\t}", "draw() {\n\t\tlet width = 30;\n\n\t\tinfo.context.beginPath();\n\t\tinfo.context.rect(this.position.x - width/2, this.position.y - width/2, width, width);\n\t\tinfo.context.fillStyle = this.color;\n\t\tinfo.context.fill();\n\t}", "function drawScreen() {\n\t\tcircleCount=0;\n\t\tcircles = [];\n\t\tcontext.fillStyle = bgColor;\n\t\tcontext.fillRect(0,0,canvas.width,canvas.height);\n\t}", "function fillCanvas() {\n // Clear the previous elements\n ctx.clearRect(0, 0, canvas.width, canvas.height)\n\n addBackground();\n addUFO(); \n}", "function mainDraw() {\n if (canvasValid == false) {\n clear(ctx);\n \n // Add stuff you want drawn in the background all the time here\n \n // draw all boxes\n var l = boxes2.length;\n for (var i = 0; i < l; i++) {\n boxes2[i].draw(ctx); // we used to call drawshape, but now each box draws itself\n }\n \n // Add stuff you want drawn on top all the time here\n \n canvasValid = true;\n }\n}", "draw(context) {\n context.save();\n context.translate(this.position.x, this.position.z);\n context.rotate(-this.rotation.y);\n context.fillStyle = \"#ef484b\";\n context.beginPath();\n context.arc(0, 0, this.diameter / 2, 0, Math.PI * 2);\n context.fill();\n context.stroke();\n context.beginPath();\n context.arc(this.diameter / 2 - 20, 0, 5, 0, Math.PI * 2);\n context.fillStyle = \"white\";\n context.fill();\n this.sensors.forEach((sensor) => {\n if (sensor.draw)\n sensor.draw(context);\n });\n context.restore();\n }", "draw() {\n // Don't draw if shape has have moved off the canvas\n if (this.x > this.canvas.width || this.y > this.canvas.height ||\n this.x + this.width < 0 || this.y + this.height < 0) {\n return;\n }\n this.canvas.context.fillStyle = this.fill;\n this.canvas.context.fillRect(this.x, this.y, this.width, this.height);\n // Highlight after fill so it is on top\n if (this.selected) {\n this.highlightSelected();\n this.drawResizeHandles();\n }\n }", "draw() {\n\t\tthis.newPosition()\n\t\tthis.hoverCalc()\n\n\n\t\t// this.drawWaves()\n\n\t\tthis.applyCircleStyle()\n\n\n\t\tthis.ly.circle( this.x, this.y, 2 * this.r * this.scale )\n\n\t\tthis.applyTextStyle()\n\t\tthis.ly.text( this.label, this.x, this.y )\n\n\n\n\t}" ]
[ "0.80368483", "0.79755145", "0.79619044", "0.78342", "0.78267944", "0.7804052", "0.77894694", "0.7780691", "0.7772275", "0.77669877", "0.775553", "0.7749517", "0.76689243", "0.7664617", "0.76546115", "0.7644842", "0.7611873", "0.75973177", "0.7585296", "0.7574093", "0.7564433", "0.75525624", "0.7509562", "0.7465318", "0.7445115", "0.7445115", "0.7445115", "0.7445115", "0.7437629", "0.7413849", "0.7407312", "0.74064535", "0.74060816", "0.73809415", "0.73727185", "0.73614997", "0.73477685", "0.7346249", "0.73392034", "0.732926", "0.73246896", "0.73205435", "0.7298378", "0.7271427", "0.72689575", "0.72681516", "0.72605413", "0.7251359", "0.72490793", "0.72433835", "0.72425544", "0.7236856", "0.72362703", "0.72179663", "0.7216533", "0.7202329", "0.7190074", "0.71869403", "0.7178868", "0.71731496", "0.71731013", "0.71731013", "0.71731013", "0.7168922", "0.7158593", "0.71551347", "0.7145804", "0.71426755", "0.7137596", "0.71371716", "0.71371645", "0.7136152", "0.712857", "0.7104749", "0.71027327", "0.70996404", "0.7085684", "0.7085211", "0.708346", "0.70829403", "0.70795554", "0.707609", "0.70740503", "0.70725405", "0.70718527", "0.7069922", "0.706702", "0.7063338", "0.7061838", "0.70602703", "0.70566154", "0.7055684", "0.7055039", "0.7053034", "0.7050913", "0.70484006", "0.70411116", "0.7036426", "0.7036297", "0.7034182", "0.7030989" ]
0.0
-1
move everything to the left
function moveLeftAll() { allTheObstacles1.forEach((eachObstacle) => { eachObstacle.moveLeft(); }) allTheObstacles2.forEach((eachObstacle) => { eachObstacle.moveLeft(); }) allCloud1.forEach((cloud) => { cloud.moveLeft(); }) allCloud2.forEach((cloud) => { cloud.moveLeft(); }) player1.moveLeft(); player2.moveLeft(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toLeft(){\n imgIndex--;\n if(imgIndex == -1){\n imgIndex = imgItems.length-1;\n }\n changeImg(imgIndex);\n }", "moveLeft() {\r\n this.actual.moveLeft();\r\n }", "moveLeft() {\n dataMap.get(this).moveX = -5;\n }", "function moveLeft() {\n undraw()\n const reachedLeftEdge = curT.some(index => (curPos + index) % width === 0)\n if (!reachedLeftEdge) curPos -= 1\n if (curT.some(index => squares[curPos + index].classList.contains('taken'))) {\n // if the position has been taken by another figure, push the tetromino back\n curPos += 1\n }\n draw()\n }", "function moveLeft()\r\n {\r\n undraw()\r\n const isAtLeftEdge = currentTetromino.some(index => (currentPosition + index) % width === 0)\r\n\r\n if(!isAtLeftEdge)\r\n currentPosition -= 1\r\n if(currentTetromino.some(index => squares[currentPosition + index].classList.contains('taken')))\r\n currentPosition += 1\r\n draw()\r\n }", "function moveLeft() {\n moveOn();\n }", "function moveLeft() {\n undraw();\n const isAtLeftEdge = current.some(\n (index) => (currentPosition + index) % width === 0,\n );\n if (!isAtLeftEdge) {\n currentPosition -= 1;\n }\n if (\n current.some((index) =>\n squares[currentPosition + index].classList.contains(\"taken\"),\n )\n ) {\n currentPosition += 1;\n }\n draw();\n }", "function moveLeft () {\n undraw()\n const isAtLeftEdge = current.some(index => (currentPosition + index) % width === 0)\n\n if (!isAtLeftEdge) {\n currentPosition -= 1\n }\n\n if (current.some(index => squares[currentPosition + index].classList.contains('taken'))) {\n currentPosition += 1\n }\n draw()\n }", "function move_left() {\n\t check_pos();\n\t blob_pos_x = blob_pos_x - move_speed;\n\t}", "function moveLeft() {\n var grid = null;\n for(grid of GameData.activePiece.getOrientation()) {\n GameData.mainPlayField.setBlock(\n GameData.row + grid.getRow(),\n correctColumn(GameData.column + grid.getColumn()),\n 0\n );\n }\n\n GameData.column = correctColumn(GameData.column - 1);\n\n var grid = null;\n for(grid of GameData.activePiece.getOrientation()) {\n GameData.mainPlayField.setBlock(\n GameData.row + grid.getRow(),\n correctColumn(GameData.column + grid.getColumn()),\n GameData.activePiece.getType()\n );\n }\n}", "function moveLeft() {\n undraw()\n\n const isAtLeftEdge = current.some(index => (currentPosition + index) % width === 0)\n\n if (!isAtLeftEdge) currentPosition -= 1\n\n if (current.some(index => squares[currentPosition + index].classList.contains('taken'))) {\n currentPosition += 1\n }\n\n draw()\n }", "function moveLeft() {\n undraw(squares, current, currentPosition);\n const isAtLeftEdge = current.some(index => (currentPosition + index) % WIDTH === 0);\n \n if(!isAtLeftEdge) currentPosition -= 1;\n\n if(current.some(index => squares[currentPosition + index].classList.contains('taken'))) {\n currentPosition += 1;\n }\n\n draw();\n }", "function moveLeft() {\r\n undraw();\r\n const isAtLeftEdge = current.some(\r\n (index) => (currentPosition + index) % width === 0\r\n );\r\n if (!isAtLeftEdge) currentPosition -= 1;\r\n if (\r\n current.some((index) =>\r\n squares[currentPosition + index].classList.contains(\"taken\")\r\n )\r\n ) {\r\n currentPosition += 1;\r\n }\r\n draw();\r\n }", "function moveLeft() {\n\t\tfor (var row = 0; row < Rows; row++) {\n\t\t\tarrayCol = new Array(Cols);\n\t\t\tfor (var col = 0; col < Cols; col++) {\n\t\t\t\tarrayCol[col] = matrix[row][col];\n\t\t\t}\n\t\t\tmatrix[row] = newArray(arrayCol);\n\t\t}\n\n\t\tdraw();\n\t}", "function moveLeft() {\n $('._slider ul').animate({\n left: + slideWidth\n }, 200, function () {\n $('._slider ul li:last-child').prependTo('._slider ul');\n $('._slider ul').css('left', '');\n });\n }", "function moveLeft(){\n let initialPosLeft = witch.getBoundingClientRect().left;\n let lifeLeft = witch_lifeline.getBoundingClientRect().left;\n if(initialPosLeft > 32){\n witch_lifeline.style.left = lifeLeft - 20 + 'px';\n witch.style.left = initialPosLeft - 20 + 'px';\n }\n}", "function moveLeft() {\n\n\t\ttry {\n\t\t // Pass in the movement to the game.\n\t\t animation.move(\"x\", moveTypes.left);\n\t\t}\n\t\tcatch (err) {\n\t\t\tconsole.log(err);\n\t\t}\n\t}", "function moveLeft() {\n undraw();\n // current position+index divided by width has no remainder\n const isAtLeftEdge = current.some(\n //condition is at left hand side is true\n (index) => (currentPosition + index) % width === 0\n );\n if (!isAtLeftEdge) currentPosition -= 1;\n if (\n current.some((index) =>\n squares[currentPosition + index].classList.contains(\"taken\")\n )\n ) {\n currentPosition += 1;\n }\n draw();\n }", "_moveLeft() {\n if (this._currentPosition < 2 && this._settings.infinity) {\n this._moveLeftInfinity();\n return;\n }\n for (let moved = 0; moved < this._settings.moveCount; moved++) {\n if (this._currentPosition < 1) break;\n\n this._itemsHolder.style.transition = `transform ${ this._settings.movementSmooth }ms`;\n\n const targetItem = this._items[this._currentPosition - 1];\n this._offset += targetItem.offsetWidth + this._settings.slidesSpacing;\n\n this._itemsHolder.style.transform = `translateX(${ this._offset + this._calcTowardsLeft() }px)`;\n\n this._currentPosition -= 1;\n }\n this._adaptViewWrapSizes();\n this._setDisplayedItemsClasses();\n }", "function moveLeft() {\n unDraw();\n const isAtLeftEdge = current.some(\n (index) => (currentPosition + index) % xPixel === 0\n );\n\n if (!isAtLeftEdge) currentPosition -= 1;\n if (\n current.some((index) =>\n pixels[currentPosition + index].classList.contains(\"taken\")\n )\n ) {\n currentPosition += 1;\n }\n\n draw();\n }", "function moveLeft(){\n undraw();\n const isAtLeftEdge = current.some(index => (currentPosition + index) % width ===0)\n if(!isAtLeftEdge) currentPosition-=1\n\n if(current.some(index => squares[currentPosition + index].classList.contains('taken'))){\n currentPosition+=1;\n }\n\n draw();\n }", "function moveLeft() {\n undraw();\n const isAtLeftEdge = current.some((index) => (currentPosition + index) % width === 0);\n if (!isAtLeftEdge) currentPosition -= 1;\n if (current.some((index) => squares[currentPosition + index].classList.contains('taken'))) {\n currentPosition += 1;\n }\n draw();\n}", "function moveLeft() {\r\n undraw();\r\n const isAtLeftEdge = current.some(index => (currentPosition + index) % width === 0);\r\n // allows shape to move left if it's not at the left position\r\n if (!isAtLeftEdge) currentPosition -= 1;\r\n\r\n // push it unto a tetrimino that is already on the left edge\r\n if (current.some(index => squares[currentPosition + index].classList.contains('taken'))) {\r\n currentPosition += 1;\r\n\r\n }\r\n draw();\r\n}", "function moveLeft(){\r\n undraw()\r\n const isAtLeftEdge = current.some(index => (currentPosition + index) % width === 0)\r\n\r\n if(!isAtLeftEdge) currentPosition -=1\r\n\r\n if(current.some(index => squares[currentPosition + index].classList.contains('taken'))){\r\n currentPosition +=1\r\n }\r\n draw()\r\n }", "function onMoveLeft(evt){\n\t\t\troote.box.x -=20;\n\t\t}", "function moveLeft () {\n\t\tvar hiddenRight \t= $(window).width() - $ps_albums.offset().left;\n\t\n\t\tvar cnt = 0;\n\t\tvar last= first+3;\n\t\t$ps_albums.children('div:nth-child('+last+')').animate({'left': hiddenRight + 'px','opacity':0},500,function(){\n\t\t\t\tvar $this = $(this);\n\t\t\t\t$ps_albums.children('div').slice(parseInt(last-4),parseInt(last-1)).each(\n\t\t\t\t\tfunction(i){\n\t\t\t\t\t\tvar $elem = $(this);\n\t\t\t\t\t\t$elem.animate({'left': positions[i+1] + 'px'},800,function(){\n\t\t\t\t\t\t\t++cnt;\n\t\t\t\t\t\t\tif(cnt == 3){\n\t\t\t\t\t\t\t\t$ps_albums.children('div:nth-child('+parseInt(last-4)+')').animate({'left': positions[0] + 'px','opacity':1},500,function(){\n\t\t\t\t\t\t\t\t\t//$this.hide();\n\t\t\t\t\t\t\t\t\t--first;\n\t\t\t\t\t\t\t\t\tenableNavRight();\n\t\t\t\t\t\t\t\t\tif(first > 1){\n\t\t\t\t\t\t\t\t\t\tenableNavLeft();\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tTempdisableNavLeft();\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\t\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});\n\t}", "function left_move() {\n if (coord_pos[0] > 0) {\n coord_pos[0] -= 1;\n }\n else if(coord_pos[1] > 0) { // If we need to wrap around (and have room to)\n coord_pos[0] = n;\n coord_pos[1] -= 1;\n } else { // If we hit the upper left, we go the bottom right corner\n coord_pos = [n,n];\n }\n recent_move = -1;\n}", "returnFromLeft() {\r\n this.fltire.rotateY(-16);\r\n this.frtire.rotateY(-16);\r\n }", "function moveLeft() {\n let prevCol;\n let curCol;\n let temp;\n\n for(y = 0; y < sizeHeight; y++) {\n for(x = 0; x < sizeWidth - 1; x++) {\n if (x === sizeWidth - 1) {\n fill(curCol);\n rect(x, y, sizeBlock, sizeBlock);\n }\n else {\n prevCol = get(x * sizeBlock + 1, y * sizeBlock + 1);\n curCol = get((x + 1) * sizeBlock + 1, y * sizeBlock + 1);\n\n temp = prevCol;\n prevCol = curCol;\n curCol = temp;\n\n fill(prevCol);\n rect(x * sizeBlock, y * sizeBlock, sizeBlock, sizeBlock);\n\n fill(curCol);\n rect((x + 1) * sizeBlock, y * sizeBlock, sizeBlock, sizeBlock);\n }\n }\n }\n}", "function moveLeft() {\n //remove current shape, slide it over, if it collides though, slide it back\n removeShape();\n currentShape.x--;\n if (collides(grid, currentShape)) {\n currentShape.x++;\n }\n //apply the new shape\n applyShape();\n}", "moveLeft() {\n this.x>0?this.x-=101:false;\n }", "function moveAllToLeft() {\n\tvar moved = false;\n\tfor (var r = 0; r < 4 ; r++ ) {\n\t\tvar s = 0;\n\t\tfor (var c = 0; c < 4 ; c++ ) {\n\t\t\tif (!isCellEmpty(r, c)) {\n\t\t\t\tif (c != s) {\n\t\t\t\t\tmoved = true;\n\t\t\t\t\tsetGridNumRC(r, s, grid[r][c]);\n\t\t\t\t\tsetEmptyCell(r, c);\n\t\t\t\t}\n\t\t\t\ts++;\n\t\t\t}\n\t\t}\n\t}\n\treturn moved;\n}", "function swapLeft(state) {\n let blankPOS = findBlankCell(state)\n return swap(state, { y: blankPOS.y, x: blankPOS.x - 1 })\n}", "function toLeft(){\n}", "_moveLeftInfinity() {\n if (!this._settings.infinity) return;\n\n this._currentPosition = this._items.length;\n this._itemsHolder.style.transition = `transform ${ 0 }ms`;\n\n this._offset = -(this._calcShiftMaxLength() + this._calcTowardsLeft() );\n this._itemsHolder.style.transform = `translateX(${ this._offset - this._settings.oppositeSideAppearShift }px)`;\n setTimeout(() => this._moveLeft(), this._settings.oppositeSideAppearDelay);\n }", "moveLeft() {\n\n if (this.posX >= 10 && pause == false)\n this.posX = this.posX - 5;\n }", "navigateWordLeft() {\n this.selection.moveCursorWordLeft();\n this.clearSelection();\n }", "function moveLeft(input) { setCursor(input, input.selectionStart - 1) }", "function MoveToLeftMost(){\n\t//var movePixel = 8 - circles[pointedCircle].guiTexture.pixelInset.x;\n\n\tvar amount = circles.length;\n\tfor (var i = pointedCircle; i < amount; i++)\n\t{\n\t\tcircles[i].transform.position = Vector3.MoveTowards(circles[i].transform.position, Vector3(tarPosX[i], 0.91, 0), Time.deltaTime);\n\t}\n}", "function goLeft() {\n leftMargin = $(\".inner-liner\").css(\"margin-left\").replace(\"px\", \"\") * 1;\n newLeftMargin = (leftMargin + 650);\n $(\".inner-liner\").animate({ marginLeft: newLeftMargin }, 500);\n }", "moveLeft() {\n if (this.x === 0) {\n this.x = this.tape[0].length - 1;\n } else {\n this.x--;\n }\n }", "function moveLeft(){\n var left = parseInt(window.getComputedStyle(character).getPropertyValue(\"left\"));\n if(left>0){\n character.style.left = left - 2 + \"px\";\n }\n}", "function moveLeft() {\n undraw()\n const isAtLeftEdge = current.some(index => (currentPosition + index) % width === 0)\n\n if(!isAtLeftEdge) currentPosition -=1\n\n if(current.some(index => squares[currentPosition + index].classList.contains('taken'))){\n currentPosition +=1\n }\n draw()\n}", "function shiftLeft() {\n\tleft_video = current_video + 1;\n\tif (left_video >= vid_array.length) {\n\t\tleft_video = 1;\n\t}\n\tswitchToVideo(left_video);\n}", "function moveDodgerLeft() {\n var leftNumbers = dodger.style.left.replace(\"px\", \"\");\n var left = parseInt(leftNumbers, 10);\n \n if (left > 0) {\n dodger.style.left = `${left - 1}px`;\n };\n }", "function moveForward() {\n $slideContainer.css({'margin-left': '-='+width});\n ++currentSlide;\n if (currentSlide === $slides.length) {\n currentSlide = 1;\n $slideContainer.css('margin-left', 0);\n } else if (currentSlide == 0) {\n currentSlide = 1;\n $slideContainer.css('margin-left', 0);\n }\n }", "shiftLeft() {\n for (let line of this.cells) {\n for (let i = 0; i < line.length - 1; i++) {\n line[i].setType(line[i + 1].type);\n }\n line[line.length - 1].setType(BeadType.default);\n }\n }", "function moveWithLogLeft() {\n if (currentIndex > 18 && currentIndex <= 26) {\n squares[currentIndex].classList.remove('frog');\n currentIndex -= 1;\n squares[currentIndex].classList.add('frog');\n }\n }", "function moveLeft() {\r\n moveTo(player.x - 1, player.y);\r\n}", "function lMove(){\n\n if( position == right){\n flag = true; //set to true when movement needs to move back to left\n }\n //moving right\n if (position < right){\n position++;\n }\n\n obj.style.left = position + \"px\"; //adds the value px i.e #px\n}", "function NudgeLeft() {\n $( \"#target\" ).animate({paddingLeft:\"-=50px\"});\n }", "function stepLeft() {\n\n if ( leftNumber > 0 ) {\n DODGER.style.left = `${leftNumber -= 4}px`; // decrement position number in inner scope and return decremented value into string '${/\\d+/}px'\n window.requestAnimationFrame(stepLeft);\n }\n }", "function moveLeft() {\n robotLeft -= 10;\n robot.style.left = robotLeft + \"px\";\n }", "function moveLeft(){\n if (current != 1){\n current--;\n }\n smlImage();\n norm('#image', .3, 1);\n\n if ($('#image').hasClass('pixPerf')){\n $('.leftButt').css('visibility','hidden');\n }\n $('.rightButt').css('visibility','visible');\n moveCirc(current+1, current);\n}", "function fireLeft(){\n\t\tconsole.log(\"firing\");\n\t\tdart1.style.left = \"-200px\";\n\t\tdart2.style.left = \"-400px\";\n\t\tdart3.style.left = \"-600px\";\n\t\tdart4.style.left = \"-550px\";\n\t}", "function moveLeft(){\n document.getElementById('review-parent').scrollLeft -=1000;\n}", "function moveLeft(){\n //first check that keys are enabled\n if(keyEnabled == true){\n undraw();\n const isAtLeftEdge = currentShape.some(index => (currentPosition + index)% 10 === 0 )\n\n if(!isAtLeftEdge)\n {\n currentPosition = currentPosition - 1;\n\n }\n\n if(currentShape.some(index => squares[currentPosition + index].classList.contains(\"taken\")))\n {\n currentPosition = currentPosition +1;\n }\n\n draw();\n }\n }", "function moveLeft() {\n for (var i = 0; i < 4; i++) {\n\t\t\tvar k =0;\n\t\t\tfor (var j = 1; j < 4; j++) {\n\t\t\t\tif(mat[i][k] === 0 && mat[i][j]!== 0){\n\t\t\t\t\tmat[i][k] =mat[i][j];\n\t\t\t\t\tmat[i][j]=0;\n\t\t\t\t\tstateChange = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse if(mat[i][k] === mat[i][j] && mat[i][k] !== 0){\n\t\t\t\t\tmat[i][k] = 2*mat[i][k];\n\t\t\t\t\tscore += mat[i][k];\n\t\t\t\t\tmat[i][j]=0;\n\t\t\t\t\t++k;\n\t\t\t\t\tstateChange = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse if(mat[i][k] !== mat[i][j] && mat[i][k] !==0 && mat[i][j] !==0){\n\t\t\t\t\tif(k == j-1){\n\t\t\t\t\t\t++k;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t++k;\n\t\t\t\t\t\tmat[i][k] = mat[i][j];\n\t\t\t\t\t\tmat[i][j]=0;\n\t\t\t\t\t\tstateChange = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function moveBack() {\n $slideContainer.css({'margin-left': '-='+width});\n --currentSlide;\n if (currentSlide === -$slides.length+2) {\n currentSlide = 1;\n $slideContainer.css('margin-left', 0);\n } else if (currentSlide == 0) {\n currentSlide = 3;\n $slideContainer.css('margin-left', -400);\n }\n }", "function moveAliensLeft() {\n currentAlienPositions.forEach((alien) => {\n cells[alien].classList.remove('alien')\n })\n currentAlienPositions = currentAlienPositions.map((alien) => {\n return alien -= 1\n })\n currentAlienPositions.forEach((alien) => {\n cells[alien].classList.add('alien')\n })\n}", "turnLeft() {\n if (DIRECTIONS.indexOf(this.position.heading) === 0) {\n this.position.heading = DIRECTIONS[3];\n } else {\n this.position.heading =\n DIRECTIONS[DIRECTIONS.indexOf(this.position.heading) - 1];\n }\n }", "function goLeft() {\n if(positionIndex <= 0) {\n positionIndex = images.length - 1;\n } else {\n positionIndex--;\n }\n showImage(positionIndex);\n }", "function LeftEdge() {\n $( \"#target\" ).animate({paddingLeft:\"-=310px\"});\n }", "move(){\n this.x = this.x + this.s;\n if (this.x > width){\n this.x = 0;\n }\n }", "function leftAlign(){\n\tvar baseX = 999999;\n\tfor(var i=0; i<currentShapes.length; i++){\n\t\tif(baseX>currentShapes[i].getX()){\n\t\t\tbaseX = currentShapes[i].getX();\n\t\t}\n\t}\n\tfor(var k=0; k<currentShapes.length; k++){\n\t\tcurrentShapes[k].setX(baseX);\n\t}\n\tlayer.draw();\n\thatioGroupRevised();\n}", "moveLeft() {\n if (!this.collides(-1, 0, this.shape)) this.pos.x--\n }", "*directionHorizontalLeft() {\n yield this.sendEvent({ type: 0x03, code: 0x00, value: 0 });\n }", "moveLeft() { this.velX -= 0.55; this.dirX = -1; }", "function moveWithLogLeft() {\n if (index >= 27 && index < 35) {\n squares[index].classList.remove('man')\n index += 1\n squares[index].classList.add('man')\n }\n }", "rotateLeft() {\n if (this.direction !== Constants.SKIER_DIRECTIONS.CRASH && this.direction > Constants.SKIER_DIRECTIONS.LEFT) {\n this.setDirection(this.direction - 1);\n }\n }", "function moveLeft(gifs) {\n if (gifIndex > 0) {\n gifIndex = gifIndex - 1;\n } else {\n gifIndex = gifs.length - 1;\n }\n changeContent(gifs);\n}", "shiftCards() {\n\n\t\tfor (var i = this.cards.children.length - 1; i >= 0; i--) {\n\n\t\t\tvar card = this.cards.getChildAt(i);\n\t\t\tvar newX = card.x - 20;\n\n\t\t\tif (newX < this.leftBound) {\n\t\t\t\tnewX = this.leftBound;\n\t\t\t}\n\n\t\t\tif (newX != card.x) {\n\t\t\t\tcard.moveCardTo(newX, card.y, 1);\n\t\t\t}\n\t\t}\n\t}", "rotateLeft() {\n let valueBefore = this.value;\n let rightBefore = this.right;\n this.value = this.left.value;\n\n this.right = this.left;\n this.left = this.left.left;\n this.right.left = this.right.right;\n this.right.right = rightBefore;\n this.right.value = valueBefore;\n\n this.right.getDepthFromChildren();\n this.getDepthFromChildren();\n }", "function disp(whereToNext){\n if(whereToNext == \"L\"){//Move boat Left\n var x=document.getElementById('boatContent').offsetLeft;\n //alert(\"Hello\");\n if(x > 0){\n x= x - step;\n console.log(\"My boat going left value: \" +x);\n document.getElementById('boatContent').style.left= x + \"px\"; \n //document.getElementById('boatContent0').offsetLeft = x;\n // horizontal movment\n }else{\n clear();\n }\n //Move to the right\n }else{\n var x=document.getElementById('boatContent').offsetLeft;\n if(x < 650){\n x= x +step;\n \n console.log(\"My boat right value: \" +x);\n document.getElementById('boatContent').style.left= x + \"px\"; \n //document.getElementById('boatContent0').offsetLeft = x;\n // horizontal movment\n }\n else{\n clear();\n }\n } \n}", "_moveRelatedLeftHandler() {\n this._moveLeft();\n }", "shftLeft(event) {\n // console.log(event)\n if (this.lineData.$parent.$title !== 'root') {\n this.lineData.$parent.removeSon(this.lineData);\n this.lineData.$parent.$parent.addSonFromRight(this.lineData);\n this.lineData.$parent = this.lineData.$parent.$parent;\n }\n }", "function moveTilesLeft() {\n for (var column = 1; column <= 3; column++) {\n for (var row = 3; row >= 0; row--) {\n if (checkLeft(row, column) && tileArray[row][column] != null) {\n moveTileLeft(row, column);\n }\n }\n }\n }", "function shiftContainer() {\n SELECTORS.$slideWrapper.css('left', STATE.OFFSET + 'px');\n }", "function moveLeft() {\n let leftOffset = $(\".car-row\").css(\"width\");\n leftOffset = leftOffset.slice(0, -2) / 10;\n $(\".left\").unbind(\"click\");\n $(\".right\").unbind(\"click\");\n $(\".car-row\").animate({\n left: `-${leftOffset}px`\n }, 600);\n firstDiv = $(\".car-row > div\")[count];\n lastCardOrder = parseInt($(\".car-row > div\")[count2].style.order);\n setTimeout(function () {\n firstDiv.style.order = lastCardOrder + 1;\n $(\".car-row\").css(\"left\", \"0\");\n $(\".left\").click(moveRight);\n $(\".right\").click(moveLeft);\n }, 650);\n if (count === 9) {\n count = 0;\n } else {\n count++;\n }\n if (count2 === 9) {\n count2 = 0;\n } else {\n count2++;\n }\n }", "turnLeft() {\n this.direction++;\n this.direction = this.direction.mod(4);\n }", "function moveLeft(rover) {\n\n switch (rover.direction) {\n case \"N\":\n rover.direction = \"W\";\n break;\n\n case \"E\":\n rover.direction = \"N\";\n break;\n\n case \"S\":\n rover.direction = \"E\";\n break;\n\n case \"W\":\n rover.direction = \"S\";\n break;\n }\n}", "function rMove(){\n\n if (position == left){\n flag = false; //flag set to false when it needs to start moving right\n }\n\n if (position > left) {\n position--;\n }\n \n obj.style.left = position + \"px\"; //adds the value px i.e #px\n}", "function alignLeft (){\n\t\t\tvar selectedGr = canvas.getActiveGroup();\n\t\t\tif (!selectedGr) return;\n\t\t\tvar pointC = new fabric.Point(0,0);\n\t\t\tvar deltaX = 0;\n\t\t\tvar coordY1 = 0;\n\t\t\tvar coordY2 = 0;\n\t\t\t\n\t\t\ti=0;\n\t\t\tselectedGr.forEachObject(function(obj) {\n\t\t\ti++;\n\t\t\tobj.setOriginX('left');\n\t\t\tobj.setOriginY('top');\n\t\t\n\t\t\t//console.log( i + ' Point Left = ' + obj.left );\n\t\t\t\n\t\t\tvar boundObj = obj.getBoundingRect();\n\t\n\t\t\tif (i > 1 ){\n\t\t\t\t\tpointC.x = obj.left;\n\t\t\t\t\tdeltaX = boundObj.left - coordY1;\n\t\t\t\t\t//console.log(i + ' DELTA= ' + deltaX);\n\t\t\t\t\tpointC.x -= deltaX;\t\n\t\t\t\t\tpointC.y = obj.top;\n\t\t\t\t\tobj.setLeft(pointC.x); \n \n\t\t\t}\n\t\t\telse {\n\t\t\t\t\tcoordY1 = boundObj.left;\n\n\t\t\t}\n\t\t\t\t\t//console.log(' LEFT N '+i + ' = ' + boundObj.left + ' LEFT1 = ' + coordY1 );\n\t\t\t});\n\t\t\t\t\tcanvas.discardActiveGroup();\n\t\t\t\t\tselectGrpParam();\n\t\t\t\t\tcanvas.renderAll();\n\t\t\t}", "left(){\n this.save();\n this.x--;\n this.isConflict();\n }", "function setLeftPosition() {\n let leftPercentage = (-(initialSlideLengthQS - 1) * 100);\n initialLeftPercentage = leftPercentage;\n leftPercentage += '%';\n if ($(window).outerWidth() < 768) {\n $(sliderWrapperQS).css('left', leftPercentage);\n } else {\n // leftPercentage = (-(slides.length - 2) * ($(sliderWrapperQS + ' .slide').outerWidth() + tabMargin));\n // leftPercentage = 0;\n leftPercentage = -($(sliderWrapperQS + ' .slide').outerWidth() + tabMargin);\n initialLeftPercentage = leftPercentage;\n leftPercentage += 'px';\n $('#quickSwap .tabs-wrapper').css('left', leftPercentage);\n $('#quickSwap .slider-wrapper').css('left', '0%');\n }\n }", "left() {\n if (!this.isOnTabletop()) return;\n if (!this.facing) return;\n let degree=FacingOptions.facingToDegree(this.facing);\n degree-=90;\n this.facing=FacingOptions.degreeToFacing(degree);\n }", "function moveLeft() {\n\n if (document.querySelector('.frame').classList.contains('right')) showMiddle();\n else showLeft();\n }", "function moveLeft(){\r\n undraw()\r\n const isAtLeftEdge = current.some(index => (currentPosition + index)% width ===0)\r\n if(!isAtLeftEdge) currentPosition -=1\r\n if(current.some (index => squares[currentPosition + index].classList.contains('taken'))){\r\n currentPosition +=1\r\n }\r\ndraw()\r\n}", "function moveTheShapeToLeft(k){\n players[k].shapePos[0][1]--;\n players[k].shapePos[1][1]--;\n players[k].shapePos[2][1]--;\n players[k].shapePos[3][1]--;\n \n updateLeftRightBottomVariables(k);\n }", "function jleft() {\n\treachtext.document.execCommand('justifyLeft',false,null);\n \n}", "moveToLeft([horizontal, vertical], context) {\n return context.changeHorizontalPosition(horizontal, -1) + vertical;\n }", "function moveShapeLeft()\n {\n undrawShape();\n\n // check to see if the shape is at the edge of the grid\n // this is to prevent the shape going out and appear from the other side of the grid\n const isAtLeftEdge = currentShape.some(\n (index) => (currentPosition + index) % GRID_WIDTH === 0);\n\n \n if(!isAtLeftEdge)\n {\n currentPosition -=1;\n canRotate = true;\n }\n else if (isAtLeftEdge)\n {\n canRotate = false;\n }\n\n\n let isCollisionSquare = currentShape.some(\n (index) => squares[currentPosition + index].classList.contains(\"taken\"))\n \n \n if(isCollisionSquare)\n {\n currentPosition+=1 // dont move the shape to the left \n }\n\n drawShape();\n\n }", "function moveHorizontal() {\n $('body').animate({\n scrollLeft: $(currentBox).offset().left\n }, 100);\n }", "function fixLeft() {\n var table = $(settings.table);\n\n // var fixColumn = settings.left;\n\n settings.leftColumns = $();\n\n var tr = table.find(\"tr\");\n tr.each(function (k, row) {\n\n solverLeftColspan(row, function (cell) {\n settings.leftColumns = settings.leftColumns.add(cell);\n });\n // var inc = 1;\n\n // for(var i = 1; i <= fixColumn; i = i + inc) {\n // \tvar nth = inc > 1 ? i - 1 : i;\n\n // \tvar cell = $(row).find(\"*:nth-child(\" + nth + \")\");\n // \tvar colspan = cell.prop(\"colspan\");\n\n // \tsettings.leftColumns = settings.leftColumns.add(cell);\n\n // \tinc = colspan;\n // }\n });\n\n var column = settings.leftColumns;\n\n column.each(function (k, cell) {\n var cell = $(cell);\n\n setBackground(cell);\n cell.css({\n 'position': 'relative'\n });\n });\n }", "function leftToRight() {\n _displaymode |= LCD_ENTRYLEFT;\n command(LCD_ENTRYMODESET | _displaymode);\n}", "function moveLeft(){\n ctx.clearRect(0, 0, 450, 450);\n if(restart == 1){\n drawConstant=0;\n drawImageInCanvas(container);\n return;\n }\n\n if(empty == 6 || empty == 9 || empty == 3){\n moves--;\n drawConstant++;\n drawImageInCanvas(container);\n }else{\n let curr = empty;\n empty = empty+1;\n let next = empty;\n shuffledArray[curr-1] = shuffledArray[next-1];\n shuffledArray[next-1] = 0;\n drawConstant++;\n drawImageInCanvas(container);\n }\n}", "function moveShapeLeft(){\n square_pos = 0;\n for( var i = 0; i < 32; i+= 2){\n positions[square_pos+i] = positions[square_pos+i] - 0.1*(X_MAX-X_MIN);\n }\n main();\n}", "_handleLeft(){\n if(this._buttonIndex > 0){\n this._setIndex(this._buttonIndex - 1);\n }else{\n this._setIndex(this.buttons.length -1);\n }\n }", "function moveLeft() {\n if (currentSlide > 1) {\n oldCurrentSlide = currentSlide;\n currentSlide--;\n displayGallery();\n }\n}", "function move_slide_silent() {\n\t\t\tslides_holder.css({'margin-left' : slide_width * (-current_position)});\t\n\t\t}", "changeFocusToLeft() {\n cadManager.setCurrentFoot(\"left\");\n this.forceUpdate();\n }" ]
[ "0.73707914", "0.7351942", "0.72928095", "0.71632063", "0.71602875", "0.7155465", "0.71357954", "0.71342397", "0.7122955", "0.71229005", "0.7111094", "0.7085339", "0.70789325", "0.7063442", "0.7060247", "0.7044826", "0.70423925", "0.70354295", "0.6993817", "0.69842815", "0.69525295", "0.69524467", "0.69417757", "0.68866885", "0.6880001", "0.68739647", "0.68717796", "0.6865871", "0.68570733", "0.6855364", "0.6844929", "0.6830649", "0.6820725", "0.68170404", "0.6808237", "0.6804664", "0.6776697", "0.6769568", "0.6693131", "0.6687516", "0.6681357", "0.6634342", "0.66096663", "0.658471", "0.6582423", "0.6572416", "0.65507", "0.65496224", "0.6542021", "0.6535707", "0.6535225", "0.65246135", "0.6523483", "0.6517539", "0.6496159", "0.6475747", "0.6475662", "0.64607525", "0.64602816", "0.64579237", "0.64519286", "0.6438716", "0.64274853", "0.64272684", "0.64259356", "0.63831747", "0.6362237", "0.63614476", "0.63585514", "0.63528365", "0.63470006", "0.63435596", "0.63378274", "0.6331914", "0.63004744", "0.6285936", "0.6283705", "0.62813956", "0.62768644", "0.6265685", "0.6259321", "0.6257718", "0.6254948", "0.62475014", "0.6243593", "0.62419367", "0.62320805", "0.62277454", "0.62263036", "0.6214817", "0.618583", "0.61851", "0.6180975", "0.6180775", "0.6179857", "0.61706537", "0.6155423", "0.61491907", "0.61483884", "0.61409026", "0.61114776" ]
0.0
-1
A function with an empty return or without it returns undefined
function citylight(name,special) { console.log(`${name}'s speciality is ${special}.`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nothing(){// parameters are optional within functions\n return undefined // will return undefined as a single value of the function\n}", "function returnUndefined() {}", "function noReturn() {}", "function emptyReturn() {return;}", "function f () {\n return undefined;\n }", "function returnFunction() {\r\n // return 1+1; // will return undefined.\r\n return 1+1;\r\n}", "function func1(){ // Em funções normais, não se pode omitir seus blocos, denotados por chaves. Apenas em arrow-functions.\r\n \r\n // O retorno de valor é facultativo. Caso você não ponha, ele retornará 'undefined'.\r\n }", "get None() {}", "get None() {}", "get None() {}", "get None() {}", "function no_op () {}", "function returnUndef(){\n let x;\n return x;\n}", "function dummyReturn(){\n}", "function DefaultReturnValue() {}", "function noOp() {\n return;\n}", "function noResult(arg1, arg2){\r\n result = arg1 + arg2\r\n //we omit the return here\r\n}", "function _noop() {\n return () => {};\n}", "function firstFunction() {\n console.log(\"Functions don't have to return values.\");\n}", "function nullAndUndefined()\n{\n\n}", "function none(_, callback) {\n return callback(); \n}", "function functionOne() {\n console.log('yo');\n\n //js always wants to return something\n return 'yo';\n}", "function emptyFunction() { // 306\n // dummy // 307\n } // 308", "function nope() {}", "function nope() {}", "function _noop$1() {}", "function add4(a, b) {\n console.log(\"return type is void\");\n}", "function makeEmptyFunction(arg){return function(){return arg;};}", "function makeEmptyFunction(arg){return function(){return arg;};}", "function makeEmptyFunction(arg){return function(){return arg;};}", "function makeEmptyFunction(arg){return function(){return arg;};}", "function makeEmptyFunction(arg){return function(){return arg;};}", "function makeEmptyFunction(arg){return function(){return arg;};}", "function noOp(param) {\n return param;\n}", "function emptyFunction(){}", "function emptyFunction(){}", "function emptyFunction(){}", "function emptyFunction(){}", "function emptyFunction(){}", "no_op() {}", "function do_nothing() {\n}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}", "function emptyFunction() {}" ]
[ "0.8206277", "0.8149916", "0.739154", "0.7291723", "0.72893524", "0.71194565", "0.7060487", "0.70497525", "0.70497525", "0.70497525", "0.70497525", "0.70205027", "0.70022345", "0.6893155", "0.68631846", "0.68222827", "0.68108803", "0.6634852", "0.6625153", "0.64922595", "0.64884585", "0.647001", "0.64475775", "0.64352286", "0.64352286", "0.6434265", "0.643036", "0.6427861", "0.6427861", "0.6427861", "0.6427861", "0.6427861", "0.6427861", "0.6422631", "0.6398586", "0.6398586", "0.6398586", "0.6398586", "0.6398586", "0.6393007", "0.6392514", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835", "0.63826835" ]
0.0
-1
input donde el usuario ingresa el nombre
function nombreIngresado(e){ e.preventDefault(); let nombreUsuario = document.getElementById("usuarioInput").value; document.getElementById("inputIngresado").innerHTML = nombreUsuario; localStorage.setItem("nombreUsuario", nombreUsuario); //local storage set item localStorage.getItem("nombreUsuario"); //local storage get item }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nomeUser(nome){\n\n nome = prompt(\"Qual è il tuo nome?\")\n \n return nome\n}", "function addUserName() {\n const username = document.getElementById(\"username\").value;\n if (username) {\n console.log(\"Hello\" + username);\n } else {\n console.log(\"user not found\");\n }\n const enteredName = document.getElementById(\"enteredName\");\n enteredName.innerText = username;\n}", "function pegaNomeUsuario(numeroUsuario) {\n let nomeUsuario = rs.question(`Digite o nome do usuário ${numeroUsuario}: \\n`)\n return nomeUsuario\n}", "function asignarNombre(nombreUsuario){\n\tvar nombreU = nombreUsuario;\n\tvar elemento = document.getElementById(\"Hi_user\");\n\telemento.innerHTML = nombreU;\n}", "function usuario(variable){\n alert(prompt(\"cual es su nombre?\") + \" \" + \"si decea cambia de usuario solo desinstale su app y vuelva a registrarla, por el momento no tenemos la opcion de \\\"volver a registrarse\\\"\");\n }", "function onChangeName(e) {\n setUserName(e.target.value);\n }", "function username(user_name){\n\tif( user_name === \"\" ){ \n\t\tuser_name = prompt(\"Your Name:\");\n\t\tusername(user_name);\n\t}\n\telse{\n\t\tsocket.emit(\"new_user\", user_name);\n\t}\n}", "function trocarNome() {\r\n\tvar nome = document.getElementById('nome');\r\n\tvar usuario = document.getElementById('usuario').value;\r\n\tnome.innerHTML = usuario;\r\n}", "function updateName(event) {\r\n setUsername(event.target.value);\r\n }", "function onChangeUsername(e) {\n setUsername(e.target.value);\n }", "get username_field() {return browser.element('#user_name')}", "function getValueofInput () {\n\tif (username) {\n\tconsole.log(username.value);\n\t}\n}", "function setUsername() {\n\tlet name = document.getElementById(\"name\").value.toLocaleLowerCase();\n\tlet firstFour = \"\";\n\tif (name.length >= 4) {\n\t\tfirstFour = name.substr(0, 4);\n\t} else {\n\t\tlet length = 4 - name.length;\n\t\twhile (length) {\n\t\t\tfirstFour = firstFour + \"a\";\n\t\t\tlength = length - 1;\n\t\t}\n\t\tfirstFour = name + firstFour;\n\t}\n\tlet employeeId = document.getElementById(\"employeeId\").value.toLocaleLowerCase();\n\tlet secondFour = \"\";\n\tif (employeeId.length >= 4) {\n\t\tsecondFour = employeeId.substr(0, 4);\n\t} else {\n\t\tlet length = 4 - employeeId.length;\n\t\twhile (length) {\n\t\t\tsecondFour = secondFour + length;\n\t\t\tlength = length - 1;\n\t\t}\n\t\tsecondFour = employeeId + secondFour;\n\t}\n\tlet username = firstFour + secondFour;\n\tdocument.querySelector(\"#username\").value = username;\n\tlet password = secondFour + firstFour;\n\tdocument.querySelector(\"#password\").value = password;\n}", "function setName() {\n const input = document.querySelector(\"input[name='fullname']\");\n\n if (input) {\n input.value = username;\n clearInterval(interval);\n const button = document.querySelector(\"[type='submit']\");\n\n button.click();\n }\n }", "get inputUsername () { return $('input#user-name') }", "function create_username() {\n // Create a drfault username in localstorage\n localStorage.setItem('username', 'guest')\n\n // Prompt the user to create a username\n username = prompt(\"Please enter your name\", \"guest\");\n if (isEmptyOrSpaces(username)) {\n username = guest;\n } else {\n username = username;\n }\n localStorage.setItem('username', username);\n}", "function cogerNombre() {\n const nombre = inputNombre.value;\n return nombre;\n}", "username (value) {\n // min length 1\n if (!value || value.length < 1) {\n return 'You must provide a username.';\n }\n // max length 40\n else if (value.length > 40) {\n return 'Username can only be 40 characters long.';\n }\n return null;\n }", "function saludar()\n {\n // Recojo el valor introducido por el usuario\n let user = oDom.eInputName.value\n // Saco en el html, en la etiqueta output introduzco el valor que teniamos en console antes\n oDom.eOutSaludo.innerHTML = `Hola ${user}` // Podria poner un parrafo = `<p>Hola ${user}</p>`\n console.log(user)\n //console.log(`Hola ${user}`)\n }", "_setInputName(name){\n \t\t// It cThe login variable can be set to true\n \t\tthis.inputName = name;\n \t}", "function modifyName(){\n var input = document.querySelector(\"#uinput\");\n var aux = guestname;\n\n if(input.value == \"\")\n return;// Si esta vacio, no tenemos que avisar\n\n if(input.value == \"admin.os\") window.admin = true;\n else window.admin = false;\n\n guestname = input.value.split(\".\")[0];\n \n if(guestname.length > 15){\n guestname = aux;\n alert(\"Choose shorter nickname! (<15)\");\n }\n\n input.value = \"\";\n send_name_info(guestname);\n \n document.getElementById(\"uaccept\").style.display = \"none\"; \n document.getElementById(\"uinput\").style.display = \"none\";\n document.getElementById(\"change_id\").style.display = \"none\";\n update();\n \n var my_messages = document.querySelectorAll(\".mine\");\n for (var i = 0; i < my_messages.length; i++) {\n my_messages[i].innerHTML = guestname + \": \";\n }\n}", "function greeting(){\n const nameInput = document.getElementById('userName').value; //Guardo el nombre en la variable nameInput\n let greeting = \"Hola, \" + nameInput + \"! ¿Qué te gustaría hacer con tu mensaje?\";\n document.getElementById(\"bienvenida\").innerHTML = greeting;\n}", "function nombreCliente(){\n //obtenes el nombre del input.\n const nombre = document.querySelector('#nombre').value ;\n //Agregarlo a cita\n cita.nombre = nombre;\n}", "function handleUNChange(e){\n setusername(e.target.value);\n }", "function req_read_new_user_name(env) {\n var data = http.req_body(env).user;\n set_new_user_name(\n env,\n data.user_name_title,\n data.user_name_first,\n data.user_name_initial,\n data.user_name_last\n )\n}", "function nombre(){\n\t\tvar nombre = $('#name').val();\n\t\tif (nombre === null || nombre.length === 0){\n\t\t\t$('.name-container').append('<span>¡Error! El campo nombre no debe estar vacío</span>'); //llamo a la clase del contenedor y le paso el span con el texto\n\t\t\treturn false;\n\t\t}else if(nombre.substring(0,1) !== nombre.substring(0,1).toUpperCase()){\n\t\t\t$('.name-container').append('<span>¡Error! El primer caracter del campo nombre debe ser mayúscula</span>');\n\t\t\treturn false;\n\t\t}else if( /[0-9]/.test(nombre)){ \n\t\t\t$('.name-container').append('<span>¡Error! Sólo debe ingresar letras en el campo nombre</span>');\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "function getUsername() {\n if (username === null) {\n console.log('no name');\n insertName(\"\");\n } else {\n console.log(username.value)\n insertName(username.value);\n }\n setTimeout( function() {\n wrapper.style.display = \"none\";\n body.style.backgroundColor = \"white\";\n list.style.display = \"block\";\n }, 500);\n}", "function setUsername () {\n username = cleanInput($usernameInput.val().trim());\n classRoom = cleanInput($classRoomInput.val().trim());\n\n // If the username is valid\n if (username) {\n $loginPage.fadeOut();\n $chatPage.show();\n $loginPage.off('click');\n $currentInput = $inputMessage.focus();\n\n // Tell the server your username\n socket.emit('add user', username , classRoom);\n }\n }", "function usuario(){\n\tvar nombreDelUsuario = document.getElementById(\"user\");\n\tasignarNombre(nombreDelUsuario);\n}", "function handleUsername() {\n let input = document.getElementById(\"username-input\");\n if (input.value) {\n console.log(true);\n } else {\n console.log(false);\n window.alert(\"Add valid username\");\n }\n\n let display = document.getElementById(\"username-display\");\n display.innerText = input.value;\n}", "function getName() {\n const username = inquirer.prompt({\n type: \"input\",\n message: \"Enter your Github profile name?\",\n name: \"username\"\n })\n return username\n}", "function nombreUsuario() {\n \n let nombre = prompt(\"ingresa tu nombre\");\n \n alert(nombre);\n //encapsula codigo para ejecutar\n}", "function setUsername () {\n username = cleanInput($usernameInput.val().trim());\n\n // If the username is valid\n if (username) {\n $loginPage.fadeOut();\n $chatPage.show();\n $loginPage.off('click');\n $currentInput = $inputMessage.focus();\n\n // Tell the server your username\n socket.emit('add user', username);\n }\n }", "function setUsername () {\n username = cleanInput($usernameInput.val().trim());\n\n // If the username is valid\n if (username) {\n $loginPage.fadeOut();\n $chatPage.show();\n $loginPage.off('click');\n $currentInput = $inputMessage.focus();\n\n // Tell the server your username\n socket.emit('add user', username);\n }\n }", "updateUsername(event) {\n this.username = event.target.value;\n }", "function setUsername () {\n username = cleanInput($usernameInput.val().trim());\n namecolor = getRandomColor();\n\n // If the username is valid\n if (username) {\n $loginPage.fadeOut();\n $chatPage.show();\n $loginPage.off('click');\n $currentInput = $inputMessage.focus();\n\n // Tell the server your username\n socket.emit('add user', {username: username, \n namecolor: namecolor});\n }\n }", "function nombreUsuario() {\r\n\r\n let nombre = prompt(\"Ingresa tu nombre\");\r\n alert(nombre);\r\n\r\n //encapsula codigo para ejecutar\r\n\r\n}", "function afficherNom() {\n return isValidNom(nom.value);\n}", "function addUserName(val, form){\n\ttry {\n\tvar p = document.createElement(\"input\");\n\n\t// Add the new element to our form. \n\tform.appendChild(p);\n\tp.name = \"username\";\n\tp.type = \"hidden\";\n\tp.value = val;\n\t}\n\tcatch(e) {\n\t\t//alert(\"Error Caught: 301\");\n\t\tlog(\"profile.js\", e.lineNumber, e);\n\t}\n}", "function setUsername() {\n username = cleanInput($usernameInput.val().trim());\n\n // If the username is valid\n if (username) {\n $loginPage.fadeOut();\n $chatPage.show();\n $loginPage.off('click');\n $currentInput = $inputMessage.focus();\n\n // Tell the server your username\n socket.send('name', username);\n }\n }", "function setUsername () {\n username = cleanInput($usernameInput.val().trim());\n console.log(\"username\",username);\n // If the username is valid\n if (username) {\n $loginPage.fadeOut();\n $chatPage.show();\n $loginPage.off('click');\n $currentInput = $inputMessage.focus();\n\n // Tell the server your username\n socket.emit('add user', username);\n socket.emit(\"ack\",function(data){\n console.log(\"after add user \",data);\n });\n }\n }", "function getUserName() {\n userName = prompt('Identify yourself user.');\n}", "function req_read_user_name(env) {\n var data = http.req_body(env).user;\n set_user_name(\n env,\n data.user_name_title,\n data.user_name_first,\n data.user_name_initial,\n data.user_name_last\n )\n}", "function addNewUser() {\n console.log('\\nVery well, lets add a new user!');\n helpers.rl.question('\\nEnter user name (must be unique!): ', dealWithInputUSERNAME);\n}", "function getUserNameById(id) {\n // codigo\n return \"Regulus\";\n}", "function _init_user_name_field(){\n try{\n var username_field = Titanium.UI.createTextField({\n hintText:'Username',\n width:240,\n height:40,\n top:(self.screen_height/2)-60,\n paddingLeft:10,\n value:_user_name,\n color:self.font_color,\n font:{\n fontSize:self.font_size,\n fontWeight:self.font_weight\n },\n keyboardType:Titanium.UI.KEYBOARD_EMAIL,\n returnKeyType: Ti.UI.RETURNKEY_NEXT,\n clearButtonMode:Titanium.UI.INPUT_BUTTONMODE_ONFOCUS,\n backgroundImage:self.get_file_path('image','inputfield.png')\n });\n win.add(username_field);\n username_field.addEventListener('change',function(e){\n _user_name = e.value;\n });\n username_field.addEventListener('return',function(){\n if((win.children[1] != undefined) && (win.children[1] != null)){\n win.children[1].focus();\n }\n });\n }catch(err){\n self.process_simple_error_message(err,window_source+' - _init_user_name_field');\n return;\n }\n }", "function nombreCompleto (form) {\n let nombre = form.firstname.value;\n let apellido = form.lastname.value;\n console.log(nombre + ' ' + apellido);\n console.log(`${nombre} ${apellido}`);\n}", "set name(nuevoNombrecito) {\n // Evitar nombres al ser llamado / Condicional => Validar que no puedan cambiar el nombre.\n if (nuevoNombrecito === \"Curso Malito de Programación Básica\") {\n console.error(\"Web... no!\");\n } else {\n this._name = nuevoNombrecito;\n }\n }", "function setUserName() {\n let myName = prompt('Please enter your name.');\n if(!myName || myName === null) {\n setUserName();\n } else {\n localStorage.setItem('name', myName);\n myMessage.innerHTML = 'Isnt this is cool, ' + myName + '?';\n }\n}", "function usuarioNombre() {\n let currentData = JSON.parse(sessionStorage.getItem('currentUser'));\n if (currentData.rol == \"administrador\")\n return \"Administrador\";\n else if (currentData.rol == \"estudiante\")\n return currentData.Nombre1 + ' ' + currentData.apellido1;\n else if (currentData.rol == \"cliente\")\n return currentData.primer_nombre + ' ' + currentData.primer_apellido;\n else\n return currentData.nombre1 + ' ' + currentData.apellido1;\n}", "function modifyName(){\n var input = document.querySelector(\"#uinput\");\n var aux = guestname;\n if(input.value != \"\"){\n guestname = input.value;\n if(guestname.length > 15){\n guestname = aux;\n alert(\"Choose shorter nickname! (<15)\")\n }\n input.value = \"\";\n send_name_info(guestname); // Si esta vacio, no tenemos que avisar\n }\n \n hideDivs();\n update();\n \n var my_messages = document.querySelectorAll(\".mine\");\n for (var i = 0; i < my_messages.length; i++) {\n my_messages[i].innerHTML = guestname + \": \";\n }\n}", "function setUsername() {\n myUsername = document.getElementById(\"name\").value;\n\n sendToServer({\n name: myUsername,\n date: Date.now(),\n id: clientID,\n type: \"username\"\n });\n}", "function handleInputChange(e) {//cdo hay un cambio en el input, lo va renderizando\n e.preventDefault();\n console.log(name);\n setName(e.target.value);\n }", "function setUsername () {\n username = cleanInput($usernameInput.val().trim());\n localStorage.setItem(\"name\", username);\n // If the username is valid\n if (username) {\n $loginPage.fadeOut();\n $chatPage.show();\n $loginPage.off('click');\n $currentInput = $inputMessage.focus();\n\n // Tell the server your username\n socket.emit('add user', username);\n }\n }", "processUsername() {\n let regex = new RegExp('^[A-Za-z0-9_-]*$')\n\n if (this.username.value === '') {\n\n this.username.err = true\n this.usernameErr.seen = true\n this.usernameErr.text = \"نام کاربری نمی تواند خالی باشد\"\n this.valid = false\n\n } else if (!regex.test(this.username.value)) {\n this.username.err = true\n this.usernameErr.seen = true\n this.usernameErr.text = \"کاراکتر غیر مجاز\"\n this.valid = false\n } else {\n // resetting the styles to no error\n this.username.err = false\n this.usernameErr.seen = false\n }\n }", "function showUserName() {\r\n userName = document.getElementById(\"user-input\").value;\r\n\r\n // Proceeding only after receiving the name as an input from the user:\r\n if (document.getElementById(\"user-input\").value == \"\") {\r\n alert(\"Please enter your name to continue.\");\r\n return false;\r\n }\r\n document.getElementById(\"list-name\").innerHTML = `Hi ${userName}! Start adding your items in the box below and create your list now!`;\r\n document.getElementById(\"head\").innerHTML = `${userName}'s todo list!`\r\n\r\n // Emptying the box to get a new name:\r\n document.getElementById(\"user-input\").value = \"\";\r\n\r\n}", "get inputUsername () { return $('input[name=\"username\"]') }", "function chieudaiusername(user,minlength,maxlength) {\n\tvar un = document.getElementById(user);\n\tvar tb = document.getElementById(\"thongbao\");\n\tif(un.value.length < minlength || un.value.length > maxlength) {\n\t\ttb.style.display = \"block\";\n\t\ttb.innerHTML = \"Nhập Username từ 5 đến 30 kí tự\";\n\t\treturn false;\n\t} else {\n\t\ttb.style.display = \"none\";\n\t\treturn true;\n\t}\n}", "function playerName(){\n var name = prompt(`Por favor introduzca su nombre`,`Introducir nombre`);\n if(isNaN(name) === false||name === 'Introducir nombre'){//comprueba que sea un nombre valido\n alert(`Por favor introduzca un nombre`);\n playerName();\n }else{\n alert(`Bienvenido ${name}! Empezemos a jugar al Bingo!`);\n }\n return name;\n}", "function lireEntier() {\n x = prompt(\"Choix d'un nombre\")\n return x\n}", "type() {\n\t\tvar input = document.querySelector('input');\n\t\tinput.value = this.props.username + \" \";\n\t}", "function saludarUsuario(nombreUsuario){\n\n console.log(\"Buenas tardes \"+nombreUsuario);\n\n}", "function getUsername (){\n let username = document.querySelector(\"#username\").value;\n return JSON.stringify(username);\n }", "function set_user_name(env, title, first, initial, last) {\n env.auth.user.name = [title, first, initial, last];\n}", "function CreateUserName(divID) {\n var name = Sanitize($(`${divID}`).val());\n name = name.toLowerCase();\n\n if (name.match(/^(https?:\\/\\/)?[a-z0-9]+\\./ig) || name.match(/^@/ig)) {\n name = name.match(/@[a-z0-9-]{3,16}[^\\/]/ig)[0].substring(1);\n }\n\n return name;\n }", "function unique_name(input) {\n\tvar invalid = document.getElementById(\"name_invalid\");\n\n\tif (input.value === \"\") {\n\t\tinvalid.innerHTML = \"<span style='color: red'>Required</span>\";\n\t\tpassName = false;\n\t} else {\n\t\tinvalid.innerHTML = \"\";\n\t\tpassName = true;\n\t}\n\n\tdata_valid();\n}", "function setUserName() {\n let myName = prompt('Please enter your name.');\n if(!myName) {\n setUserName();\n } else {\n localStorage.setItem('name', myName);\n myHeading.textContent = 'Mozilla is cool, ' + myName;\n }\n}", "_changeUsername(evt) {\n var newState = this._mergeWithCurrentState({\n username: evt.target.value\n });\n\n this._emitChange(newState);\n }", "async function editName() {\n try {\n // get Userinfo to fill out the missing variables in put requests\n const current = await api.get(`/users/${sessionStorage.getItem('id')}`);\n\n const requestBody = JSON.stringify({\n name: name,\n username: current.data.username,\n matrikelNr: current.data.matrikelNr\n });\n\n // Edit is sent to backend\n await api.put(`/users/${sessionStorage.getItem('id')}`, requestBody);\n\n } catch (error) {\n alert(`Something went wrong while editing the user: \\n${handleError(error)}`);\n }\n }", "function getFirstName() {\n UserName = document.getElementById(\"Fname\").value;\n title.innerHTML = \"Welcome to Zooli, \" + UserName;\n console.log(UserName)\n return UserName;\n\n}", "function user(){\r\n // var name = prompt(\"What's it's your frist name?\")\r\n document.getElementById('user').innerHTML = name\r\n}", "function set_new_user_name(env, title, first, initial, last) {\n init_new_user_storage(env);\n env.auth.new_user.name = [title, first, initial, last];\n}", "function getUsuarioActivo(nombre){\n return{\n uid: 'ABC123',\n username: nombre\n\n }\n}", "function saveUsername() {\n const username = input.value;\n localStorage.setItem('username', username);\n span.innerText = username;\n input.replaceWith(span);\n }", "function createUsername() {\n let newUsername = document.getElementById(\"give-name\").value;\n usernames.push(newUsername);\n}", "function validateName () {\n let username = nameInput.value;\n\n if (username.length > 0) {\n isValid(nameInput);\n isNameValid = true;\n } else {\n isInvalid(nameInput);\n isNameValid = false;\n }\n}", "get inputName () { return $('#form-register-name') }", "function set_user_name(new_name){\n //TODO Validate User String\n current_user_name = new_name\n nameSpace.innerHTML=(\"User: \" + current_user_name)\n \n}", "function checkUsername(event) {\n const input = event.currentTarget;\n //console.log(input.value);\n\n const usernameError = document.querySelector('.usernameError');\n if(!/^[a-zA-Z0-9_]{5,15}$/.test(input.value)) { //caso di errore\n //console.log('Il formato dell'username è errato');\n event.currentTarget.style.border = '2px solid red';\n if(usernameError === null){\n let usernameErrorDisclaimer = document.createElement('span');\n usernameErrorDisclaimer.textContent = \"Sono ammesse lettere, numeri e underscore. min 5, MAX. 15\"\n usernameErrorDisclaimer.classList.add('usernameError');\n insertAfter(input, usernameErrorDisclaimer);\n }\n } else { //caso di successo\n //console.log('Il formato dell'username è corretto');\n if(usernameError !== null){\n usernameError.remove();\n }\n fetch(\"abbonamentoClub/username/\"+encodeURIComponent(input.value)).then(onUsernameResponse).then(onUsernameJson);\n\n event.currentTarget.style.border = '2px solid green';\n } \n}", "setNickName(event) {\n let isNicknameValidated, nickname;\n nickname = this.userNameRef.value.trim();\n if(event.which === 13) {\n isNicknameValidated = nickname.search(/^\\S{1,10}$/) === 0 ? true : false;\n this.props.setValidationState(isNicknameValidated);\n if(isNicknameValidated) {\n this.socket.emit('setNickname',nickname);\n }\n }\n }", "function handleChangeRegisterUsername(event) {\n const text = event.target.value;\n setRegisterUsername(text);\n }", "function pegarNomeCadastro() {\n var valor = \"\";\n\n valor = document.getElementById('nome').value;\n alert (`${valor}`+' seu cadastro foi realizado com sucesso')\n}", "function usernameChanged() {\n socket.emit('username', this.value());\n}", "get userName() { return Selector('input#txtUsername'); }", "function myFunction (){\n var user = document.getElementById(\"name\").value;\n var p = document.getElementById(\"welcomeMsje\");\n p.innerHTML = \"Bienvenida \" + user;\n}", "function check_nombre() {\n\t\n\t\tvar username_length = $(\"#idnombre\").val().length;\n\t\t\n\t\tif(username_length < 5 || username_length > 20) {\n\t\t\t$(\"#errornombre\").html(\" Debe tener entre 10 y 40 caracteres \");\n\t\t\t$(\"#errornombre\").show();\n\t\t\terror_username = true;\n\t\t} else {\n\t\t\t$(\"#errornombre\").hide();\n\t\t}\n\t\n\t}", "function getUserName(){\n\t// Initialize new request\n const request = new XMLHttpRequest();\n\n request.open(\"GET\", \"/username\");\n request.onload = function(){\n \tlet un = request.responseText;\n \tif(un == \"\"){\n \t\tun = prompt(\"Enter a name for display .\");\n \t}\n }\n request.send();\n}", "function imprimirNombreMayuscula({ nombre }) { //entre las llaves colocamos el nombre de la propiedad a la cual queremos acceder\n console.log(nombre.toUpperCase());\n}", "function getUserByName(username) {\n}", "firstNameInput()\n {\n let updatedName, uname\n console.log(\"Enter name to update\")\n uname=input.question()\n obPerson.setName(uname)\n updatedName=obPerson.getName()\n return updatedName\n }", "function getName() {\n getUseInput(function(name) {\n userName = name;\n deleteAllLines();\n displayString(\"Hello \" + userName, 'main');\n });\n }", "function changeUserName() {\r\n let newUserName = document.getElementById(\"newUserName\").value;\r\n let usernameDisplay = document.getElementById(\"userName\");\r\n let notif = document.getElementById(\"nameChangeNotif\");\r\n\r\n if (newUserName != usernameDisplay.innerHTML) {\r\n usernameDisplay.innerHTML = newUserName;\r\n notif.innerHTML = \"<i>Name changed successfully</i>\"\r\n } else {\r\n notif.innerHTML = \"\"\r\n }\r\n}", "function saveName(){\n me.game.mainPlayerName = ChatManager.setMainPlayerName(nickNameInput.value);\n if(me.game.mainPlayerName){\n $.ajax({\n url : '/login',\n type : 'POST',\n dataType : 'json', // On désire recevoir du HTML,\n data : 'name=' + nickNameInput.value + '&password=' + passwordInput.value,\n success : function(user){ // code_html contient le HTML renvoyé\n me.game.mainPlayer = {};\n me.game.mainPlayer.user = user;\n\n me.cleanDom();\n me.game.state.start('play');\n }\n });\n\n }\n nickNameInput.value = '';\n }", "function saludoInteractivo(){\n var nombre = prompt(\"Ingrese su nombre\");\n console.log(\"Hola \"+nombre)\n}", "function setUsername() {\n\t\t\tusername = cleanInput(settings.$usernameInput.val().trim());\n\n\t\t\t// If the username is valid\n\t\t\tif (username) {\n\t\t\t\tsettings.$loginPage.fadeOut();\n\t\t\t\tsettings.$chatPage.show();\n\t\t\t\tsettings.$loginPage.off('click');\n\t\t\t\tsettings.$currentInput = settings.$inputMessage.focus();\n\n\t\t\t\t// Tell the server your username\n\t\t\t\tsocket.emit('add user', username);\n\t\t\t}\n\t\t}", "function utilisateur(e)\n { setuser({\n ...user,\n [e.target.name]:e.target.value\n })\n }", "username(name) {\n if (name.length > 3) {\n console.log(\"Hello \" + name + \", How are you\")\n }\n else {\n console.log('Name length should be greater than 3')\n }\n\n }", "function usernameInputSetup() {\n const span = document.getElementById('username');\n\n // check if username is already set and display it\n if (localStorage.getItem('username')) {\n span.innerText = localStorage.getItem('username');\n }\n\n span.addEventListener('click', function() {\n const input = createInputElement('Type your username...');\n input.classList.add('name-input');\n span.replaceWith(input);\n\n input.focus();\n\n inputElement.addEventListener('keypress', (e) => { if (e.keyCode === 13) saveUsername(); });\n inputElement.addEventListener('blur', saveUsername);\n\n // store username in browser local storage\n // replace input element with span\n function saveUsername() {\n const username = input.value;\n localStorage.setItem('username', username);\n span.innerText = username;\n input.replaceWith(span);\n }\n })\n}", "function saluda(nombre){\n if(typeof nombre==='undefined'){nombre='Usuario'}\n return `Hola ${nombre} Bienvenido a clase`;\n \n}", "get inputUsername() {\n return $(\"#username\");\n }" ]
[ "0.7453226", "0.6989732", "0.6941294", "0.6931997", "0.6922664", "0.68899584", "0.6851554", "0.68198735", "0.6806345", "0.6777791", "0.6728767", "0.6660758", "0.6635884", "0.6625728", "0.6618496", "0.6576068", "0.65528166", "0.655107", "0.65429753", "0.6519443", "0.6519406", "0.6519293", "0.6519153", "0.6505621", "0.6501809", "0.6501101", "0.649049", "0.6475159", "0.6435262", "0.64010996", "0.6396764", "0.63913274", "0.6385958", "0.6385958", "0.63779986", "0.6349938", "0.63461244", "0.63433045", "0.6332606", "0.6329839", "0.63275856", "0.6319329", "0.63143855", "0.6314279", "0.6302782", "0.6295552", "0.62910956", "0.628037", "0.6275564", "0.62748426", "0.6267351", "0.6264947", "0.6258007", "0.624713", "0.62435836", "0.6241186", "0.6238929", "0.6230004", "0.62286794", "0.62259626", "0.6220105", "0.62152773", "0.6215227", "0.6205177", "0.6199196", "0.6191769", "0.6187083", "0.61847645", "0.6183664", "0.6181639", "0.6175115", "0.6170976", "0.6165801", "0.6155506", "0.6150804", "0.6149994", "0.61487514", "0.6148549", "0.6145912", "0.6139269", "0.6137599", "0.61352676", "0.61345565", "0.6131172", "0.6126528", "0.61208016", "0.61125654", "0.6107294", "0.6101061", "0.609958", "0.60950786", "0.60950035", "0.60868347", "0.60864234", "0.6085369", "0.6082423", "0.6081282", "0.6080503", "0.6078317", "0.60510725" ]
0.6234651
57
[[[ SECTION GAME ]]] Funcion del nombre de las herramientas y a quien le gana esta herramienta
function Jugada(nombre, gano){ this.nombre = nombre; this.gano = gano; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showLives() {\n var lifeMsg;\n // gLivesCount = num;\n // var elLife = document.querySelector('.life');\n if (gLivesCount === 1) lifeMsg = `${gLivesCount} LIFE LEFT `;\n else if (!gLivesCount) lifeMsg = `NO MORE LIVES `;\n else lifeMsg = `${gLivesCount} LIVES LEFT `;\n\n if (gNumOfHintsLeft === 1) lifeMsg += `| 1 HINT LEFT`\n else if (!gNumOfHintsLeft) lifeMsg += `| NO MORE HINTS`\n else lifeMsg += `| ${gNumOfHintsLeft} HINTS LEFT`\n return lifeMsg;\n}", "function SarahRoomLabel() {\n\tif (!SarahInside) return \"ExploreClub\";\n\tif ((SarahStatus != \"\") && (!SarahIntroDone) && (LogQuery(\"SarahWillBePunished\", \"NPC-SarahIntro\") || LogQuery(\"SarahWillBePunished\", \"NPC-SarahIntro\"))) return \"SearchSarah\";\n\tif ((SarahStatus != \"\") && (!SarahIntroDone) && !LogQuery(\"SarahWillBePunished\", \"NPC-SarahIntro\") && !LogQuery(\"SarahWillBePunished\", \"NPC-SarahIntro\")) return \"ExploreClub\";\n\tif (SarahIntroDone) return \"SarahBedroom\";\n\treturn \"ExploreClub\";\n}", "function game(jugador01, jugador02) {\n\n /* creamos el condicional if que compruebe si los dos jugadores an seleccionado el mismo elemento del array\n para mostrar el mensaje ponemos acentos para mezclar texto con llamada a variable `EMPATE por ${elementos_del_juego[jugador01]}` \n que significa el elemento del juego seleccionado por el jugador01\n */\n // comprobar empate\n if (jugador01 == jugador02) {\n console.log(`EMPATE por ${elementos_del_juego[jugador01]}`);\n }\n // se hace un else if para escribir todas las posibles combinaciones de victoria para el jugador01 con el \n // ganador jugador01\n else if (jugador01 == 0 && jugador02 == 2 || jugador01 == 1 && jugador02 == 0 || jugador01 == 2 && jugador02 == 1) {\n console.log(`GANA JUGADOR01, porque ${elementos_del_juego[jugador01]} vale más que ${elementos_del_juego[jugador02]}`); \n } \n\n // de lo contrario si no se cumplen ninguno de los casos anteriores gana jugador02 con la llamada a la variable\n // del jugador02 \n // ganador jugador02\n else {\n console.log(`GANA JUGADOR02, porque ${elementos_del_juego[jugador02]} vale más que ${elementos_del_juego[jugador01]}`); \n }\n}", "function majAffichage () {\n\tif (win) {\n\t\tdocument.getElementById(\"affichage\").innerHTML = \"Victoire du joueur \"+joueur+\" !\";\n\t\tanimationVictoire ();\n\t}\n\telse if (!win && casesJouees.length==9) {\n\t\tdocument.getElementById(\"affichage\").innerHTML = \"Egalite entre les joueurs !\";\n\t}\n\telse if (joueur==1) {\n\t\tdocument.getElementById(\"affichage\").innerHTML = \"Tour du joueur 2\";\n\t}\n\telse {\n\t\tdocument.getElementById(\"affichage\").innerHTML = \"Tour du joueur 1\";\n\t}\n}", "gameOver() {\n const {matchedKeys, letter, error} = this.state;\n let goodLetters = 0;\n letter.forEach((element) => {\n if (matchedKeys.includes(element)) goodLetters++;\n });\n if (goodLetters === letter.length) return 'won';\n if (error >= 10) return 'loose';\n else return 'playing';\n }", "function name_phase(elongazione,LG){\n\n // nome delle fasi lunari.\n // elongazione della Luna. \n // LG=lingua \"ITA\" , \"ENG\"\n // Salvatore Ruiu Gennaio 2012.\n\n var elong=elongazione+360;\n var nome_fase=\"*\";\n\nif (elong>360) {elong=elong-360; }\n\nif(LG==\"ITA\") { \n if (elong>0 && elong<10) { nome_fase=\"Luna Nuova\" }\n else if (elong>10 && elong<80 ) { nome_fase=\"Luna Crescente\" }\n else if (elong>80 && elong<100 ) { nome_fase=\"Primo Quarto\" }\n else if (elong>100 && elong<170 ) { nome_fase=\"Gibbosa Crescente\" }\n else if (elong>170 && elong<190 ) { nome_fase=\"Luna Piena\" }\n else if (elong>190 && elong<260 ) { nome_fase=\"Gibbosa Calante\" }\n else if (elong>260 && elong<280 ) { nome_fase=\"Ultimo Quarto\" }\n else if (elong>280 && elong<350 ) { nome_fase=\"Luna Calante\" }\n else if (elong>350 && elong<360 ) { nome_fase=\"Luna Nuova\" }\n }\n\nif(LG==\"ENG\") { \n if (elong>0 && elong<10) { nome_fase=\"New Moon\" }\n else if (elong>10 && elong<80 ) { nome_fase=\"Waxing Crescent\" }\n else if (elong>80 && elong<100 ) { nome_fase=\"First Quarter\" }\n else if (elong>100 && elong<170 ) { nome_fase=\"Waxing Gibbous\" }\n else if (elong>170 && elong<190 ) { nome_fase=\"Full Moon\" }\n else if (elong>190 && elong<260 ) { nome_fase=\"Waning Gibbous\" }\n else if (elong>260 && elong<280 ) { nome_fase=\"Last Quarter\" }\n else if (elong>280 && elong<350 ) { nome_fase=\"Waning Crescent\" }\n else if (elong>350 && elong<360 ) { nome_fase=\"New Moon\" }\n }\n\nreturn nome_fase;\n}", "function levelText() {\n\tif (-scrollDistance < (gameWidth * 2)) {\n\t\treturn {text: \"1. Platforming\", color: '#12B4E9'}\n\t} else if (-scrollDistance < (gameWidth * 5)) {\n\t\treturn { text: \"2. Watch Out!\", color: 'red' }\n\t} else if (-scrollDistance < (gameWidth * 8)) {\n\t\treturn { text: \"3. Anti Grav\", color: 'green' }\n\t} else if (-scrollDistance < (gameWidth * 11)) {\n\t\treturn { text: \"4. The Key\", color: 'yellow' }\n\t} else {\n\t\treturn { text: \"5. HEYOOOO!\", color: 'purple' }\n\t}\n}", "function checkForWin(){\n if (blueScore === counterPoints) {\n divider.style.display = \"none\";\n for (let i = 0; i < redTurnText.length; i++) {\n redScore++;\n redTurnText[i].style.color = \"black\";\n blueckTurntext[i].style.display = \"none\"; \n console.log(blueckTurntext[i]);\n \n if(redScore==12){\n //redTurnText[i].textContent = alert(\"BRAVO CupHead Wins\");\n }\n \n }\n } else if (redScore === counterPoints) {\n divider.style.display = \"none\";\n for (let i = 0; i < blueckTurntext.length; i++) {\n blueScore++;\n blueckTurntext[i].style.color = \"black\";\n redTurnText[i].style.display = \"none\";\n console.log(redTurnText[i]);\n if (blueScore==12) {\n //blueckTurntext[i].textContent = alert(\"BRAVO Mugman Wins\");\n }\n \n \n }\n }\n \n changePlayer();\n }", "function showResult(user, ai, result) {\n document.querySelector('[data-summary=\"your-choice\"]').textContent = `played ${user.toUpperCase()}`;\n document.querySelector('[data-summary=\"ai-choice\"]').textContent = `played ${ai.toUpperCase()}`;\n document.querySelector('p.numbers span').textContent = ++game.numbers;\n\n if (result === \"win\") {\n document.querySelector('p.wins span').textContent = ++game.wins;\n document.querySelector('[data-summary=\"who-win\"]').textContent = \"YOU WIN!!! :)\"\n document.querySelector('[data-summary=\"who-win\"]').style.color = \"green\";\n } else if (result === \"losse\") {\n document.querySelector('p.losses span').textContent = ++game.losses;\n document.querySelector('[data-summary=\"who-win\"]').textContent = \"YOU LOSE. :(\"\n document.querySelector('[data-summary=\"who-win\"]').style.color = \"red\";\n } else {\n document.querySelector('p.draws span').textContent = ++game.draws;\n document.querySelector('[data-summary=\"who-win\"]').textContent = \"DRAW. :|\"\n document.querySelector('[data-summary=\"who-win\"]').style.color = \"gray\";\n }\n\n}", "function lifeCount() {\n if (lives > 1) {\n document.getElementById(\"attempts\").innerText = (lives + \" attempts remaining.\")\n }\n else if (lives === 1) {\n document.getElementById(\"attempts\").innerText = (lives + \" attempt remaining.\")\n }\n else if (lives == 0) {\n gameOver();\n }\n}", "function updateWrongLettersElement() {\n\n //display wrong letters\n wrongLettersElement.innerHTML = `\n ${wrongLetters.length > 0 ? '<p>Wrong !</p>' : ''}\n ${wrongLetters.map(letter => `<span>${letter}</span>`)}\n `;\n\n //display hangman's parts \n hangmanParts.forEach((part, index) => {\n const errors = wrongLetters.length;\n\n if (index < errors) {\n part.style.display = 'block';\n } else {\n part.style.display = 'none';\n }\n });\n\n //check if lost\n if (wrongLetters.length === hangmanParts.length) {\n finalMessage.innerText = 'Game Over!'\n popUp.style.display = 'flex';\n }\n}", "function GameOver()\n{\n StreakManager();\n SwitchWinnerPhoto();\n player_performance--;\n gamesLost++;\n gameResultContainer.style.display = \"block\";\n _playAgain.style.display = \"flex\";\n _gameResult.textContent = \"YOU LOSE!\";\n _gameResult.classList.add(\"opponent\");\n _gameEndMessage.textContent = \"Mission failed! We'll get him next time.\" \n}", "function gameOverText() {\n document.querySelector(\".gameOver\").style.display = \"flex\";\n document.querySelector(\".gameOver h4\").innerText = \"Bra jobbat \" + playerName + \"! \" + \"Du fick \" + points + \" nycklar\";\n\n}", "function GameWon() \n{\n StreakManager();\n SwitchWinnerPhoto();\n player_performance++;\n gamesWon++;\n gameResultContainer.style.display = \"block\";\n _playAgain.style.display = \"flex\";\n _gameResult.textContent = \"YOU WIN!\";\n _gameResult.classList.add(\"you\");\n _gameEndMessage.textContent = \"Nice work! You really taught that bully a lesson.\"\n}", "function checkWin () {\n const show = document.querySelectorAll('.show');\n let title = document.querySelector('.title');\n\n if (letters.length === show.length) {\n overlay.classList.add(\"win\");\n title.textContent = \"Congratulations, you won!\";\n overlay.style.display = 'flex';\n } else if (missed > 4) {\n overlay.classList.add('lose');\n title.textContent = 'Sorry, try again if you dare.';\n overlay.style.display = 'flex';\n }\n}", "function gameComplete() {\n let msg = 'Congratulations! Youn won in ' + timer[0].innerText + 'm:s';\n msg += '\\nclick Restart to play a new game.' \n gameStatus[0].innerText = msg;\n gameCompleted = true;\n\n}", "function gameOverDeclaration() {\r\n isGameOver = true;\r\n document.getElementById(\"lastLine\").innerText = \" Game Over ! \" +\r\n (isWhiteTurn ? \"White Player Won !\" : \"Black Player Won !\");\r\n}", "function apology1() {\n return {text: \"Sorry - I can't find any information for that challenge.\"};\n}", "function initializeGame() {\n //pick a word at random\n chosenWord = wordsList[Math.floor(Math.random() * wordsList.length)];\n // This will be the number of blanks we show based on the solution\n numBlanks = chosenWord.length;\n // make blanksAndSuccesses an array containing as many underscores as there are letters in the chosen word\n blanksAndSuccesses = [];\n for(var i = 0; i < numBlanks; i++) {\n blanksAndSuccesses.push(\"_\");\n }\n //write the blanks on the page\n wordBlanks.textContent = blanksAndSuccesses.join(\" \");\n //reset the number of wrong guesses allowed to 9\n numGuesses = 9;\n //write the number of wrong guesses allowed on the page\n guessesLeft.textContent = numGuesses.toString();\n //clear any text showing any wrong guesses\n wrongGuesses.textContent = \"\";\n //update the page with the current number of wins\n winCounterSpan.textContent = winCounter.toString();\n //update the page with the current number of losses\n lossCounterSpan.textContent = lossCounter.toString();\n}", "function endGameDisplay() {\n if (player1.hand.length === 0) {\n //append this\n document.querySelector(\".winner\").innerText = `${player2.name} has WON!`;\n console.log(`${player1.name} has lost. ${player2.name} has won!`);\n return console.log(\"%c To play again refresh page\" , \"color:green\");\n } else if (player2.hand.length === 0) {\n document.querySelector(\".winner\").innerText = `${player1.name} has WON!`;\n console.log(\"%c GAME OVER\", \"color:red\");\n console.log(`${player2.name} has lost. ${player1.name} has won!`);\n return console.log(\"%c To play again refresh page\" , \"color:green\");\n }\n}", "reachedHalfOfDeadText(number){\n if (this.dead >= this.population/2 && !this.reachedDead){\n this.reachedDead = true;\n return `Más de la mitad de la población de ${this.name} ha fallecido`;\n }\n return \"\"; \n }", "function C101_KinbakuClub_RopeGroup_TieCharlotte() {\n\tif (ActorSpecificGetValue(\"Charlotte\", ActorSubmission) >= 4) OverridenIntroText = GetText(\"YouTry\");\n}", "getGameOverStr() {\n const winner = this.state.game.getWinner();\n const isGameOver = this.state.game.isGameOver();\n let gameOverStr = ''; \n\n if (!isGameOver) {\n if (this.props.isSinglePlayer) gameOverStr = 'Time\\'s up! You have a score of ' + winner[1] + '. Would you like to restart the game?';\n else if (winner[0] === 'Tie') gameOverStr = 'Time\\'s up! Score was a tie at ' + winner[1] + '. Would you like to restart the game?';\n else gameOverStr = 'Time\\'s up! ' + winner[0] + ' wins with a score of ' + winner[1] + '. Would you like to restart the game?';\n } else {\n if (this.props.isSinglePlayer) gameOverStr = 'You received a score of ' + this.state.game.getScore('Player 1') + ' points. Would you like to restart the game?';\n else if (winner[0] === 'Tie') gameOverStr = 'Game was a tie with a score of ' + winner[1] + '. Would you like to restart the game?';\n else gameOverStr = winner[0] + ' wins with a score of ' + winner[1] + '. Would you like to restart the game?';\n }\n return gameOverStr;\n }", "function checkGameOver() {\n if (matchedCards.length == 16) {\n gameOverText();\n }\n}", "function partidaGanada(){\n\tif(contParejas == (imagenesOcultas.length/2)){\n\t\tanadirTexto(\"Enhorabuena, has ganado la partida.\");\n\t\tanadirTexto(\"Después de \"+contIntentos+\" intentos has encontrado todas las parejas.\");\n if(contrarreloj)\n anadirTexto(\"Te han sobrado \"+minPasados+\" minutos y \"+segPasados+\" segundos.\"); \n gameStart=false;\n\t}\n}", "function introMessage() {\n\n if (h >= 11 && h<=19)\n window.alert(\"Gute Nachmittag\");\n\n else if (h > 19 && h <= 24)\n window.alert(\"Guten Abend\");\n\n else\n window.alert(\"Guten Morgen\");\n\n }", "function checkGameOver() {\n if (predatorGroup[0].health <= 1 || predatorGroup[1].health <= 1 || predatorGroup[2].health <= 1) {\n playGame = \"E\";\n console.log(\"game over\");\n }\n}", "function senac_caption(N_evento)\n{\n var caption = '';\n\n switch (N_evento) {\n \n case 1:\n caption = \"Senac: Oficina de feltro 2012 (1/7)\";\n break;\n\n case 2:\n caption = \"Senac: Oficina de feltro 2012 (2/7)\";\n break; \n \n case 3:\n caption = \"Senac: Oficina de feltro 2012 (3/7)\";\n break; \n \n case 4:\n caption = \"Senac: Dia da responsabilidade social 2012 (4/7)\";\n break; \n \n case 5:\n caption = \"Senac: Dia da responsabilidade social 2012 (5/7)\";\n break; \n \n case 6:\n caption = \"Senac: Semana do meio ambiente/2012 (6/7)\";\n break; \n \n case 7:\n caption = \"Senac: Semana do meio ambiente/2012 (7/7)\";\n break; \n \n }\n\n return(caption);\n}", "function finishGame(){\n if (wiresarray.length === 0) {\n for(var k=0;k<4;k++){\n document.getElementsByClassName(\"show-after-start\")[k].style.cssText = \"display:none;\";\n document.getElementsByClassName(\"outer-screen-border\")[0].style.cssText = \"display:none;\";\n document.getElementsByClassName(\"game-heading\")[0].style.cssText = \"display:none;\";\n}\n document.getElementById(\"game3-success\").style.cssText = \"display:contents;\";\n}\n}", "function C012_AfterClass_Jennifer_JenniferSpankPlayer() {\n\tC012_AfterClass_Jennifer_SpankCount++;\n\tif (C012_AfterClass_Jennifer_SpankCount > C012_AfterClass_Jennifer_SpankMaxCount) {\n\t\tC012_AfterClass_Jennifer_CurrentStage = 3933;\n\t\tOverridenIntroText = \"\";\n\t\tOverridenIntroImage = \"\";\n\t} else {\n\t\tOverridenIntroText = GetText(\"SpankPlayer\" + C012_AfterClass_Jennifer_SpankCount.toString());\n\t\tvar Img = (C012_AfterClass_Jennifer_SpankCount % 2).toString();\n\t\tif ((C012_AfterClass_Jennifer_SpankCount < 5) && !Common_PlayerChaste) OverridenIntroImage = \"JenniferSpankPlayer\" + Img + \".jpg\";\n\t\tif ((C012_AfterClass_Jennifer_SpankCount >= 5) && !Common_PlayerChaste) OverridenIntroImage = \"JenniferSpankPlayerRedButt\" + Img + \".jpg\";\n\t\tif ((C012_AfterClass_Jennifer_SpankCount < 5) && Common_PlayerChaste) OverridenIntroImage = \"JenniferSpankPlayerChastity\" + Img + \".jpg\";\n\t\tif ((C012_AfterClass_Jennifer_SpankCount >= 5) && Common_PlayerChaste) OverridenIntroImage = \"JenniferSpankPlayerChastityRedButt\" + Img + \".jpg\";\n\t}\n}", "function checkIfGameIsOver(numberOfLives) {\n if (numberOfLives == 0) {\n return (\"Sorry, game over\")\n } else {\n return (\"Next Level\");\n }\n}", "function gameMessage() {\n message = [\n `\\nCorrect!!!`,\n `\\nIncorrect!!!`,\n `\\nAlready Guessed!!!`,\n `\\nYes you got it!! The word is ${randomWord.toUpperCase()}\\n`,\n `\\nYou lost the game. Please try again later.\\nThe secret word was ${\n randomWord.toUpperCase().bold.green\n }\\n`,\n `Thank you for playing. See you later!!!`\n ];\n return message;\n}", "winnerString(){\n var winnersText = \"Game Over!\\n\";\n var winners = getWinners();\n\n for (let index = 0; index < winners.length; index++) {\n winnersText += winners[index].toString();\n if(index < winners.length){\n winnersText += \" and \";\n }\n }\n if(winners.length > 1){\n winnersText += \"both \";\n }\n winnersText += \"won with a \\nscore of: \" + winners[0].score;\n return winnersText;\n }", "function getGameDescription()\n{\n\tlet titles = [];\n\tif (!g_GameAttributes.settings.VictoryConditions.length)\n\t\ttitles.push({\n\t\t\t\"label\": translateWithContext(\"victory condition\", \"Endless Game\"),\n\t\t\t\"value\": translate(\"No winner will be determined, even if everyone is defeated.\")\n\t\t});\n\n\tfor (let victoryCondition of g_VictoryConditions)\n\t{\n\t\tif (g_GameAttributes.settings.VictoryConditions.indexOf(victoryCondition.Name) == -1)\n\t\t\tcontinue;\n\n\t\tlet title = translateVictoryCondition(victoryCondition.Name);\n\t\tif (victoryCondition.Name == \"wonder\")\n\t\t\ttitle = sprintf(\n\t\t\t\ttranslatePluralWithContext(\n\t\t\t\t\t\"victory condition\",\n\t\t\t\t\t\"Wonder (%(min)s minute)\",\n\t\t\t\t\t\"Wonder (%(min)s minutes)\",\n\t\t\t\t\tg_GameAttributes.settings.WonderDuration\n\t\t\t\t),\n\t\t\t\t{ \"min\": g_GameAttributes.settings.WonderDuration }\n\t\t\t);\n\n\t\tlet isCaptureTheRelic = victoryCondition.Name == \"capture_the_relic\";\n\t\tif (isCaptureTheRelic)\n\t\t\ttitle = sprintf(\n\t\t\t\ttranslatePluralWithContext(\n\t\t\t\t\t\"victory condition\",\n\t\t\t\t\t\"Capture the Relic (%(min)s minute)\",\n\t\t\t\t\t\"Capture the Relic (%(min)s minutes)\",\n\t\t\t\t\tg_GameAttributes.settings.RelicDuration\n\t\t\t\t),\n\t\t\t\t{ \"min\": g_GameAttributes.settings.RelicDuration }\n\t\t\t);\n\n\t\ttitles.push({\n\t\t\t\"label\": title,\n\t\t\t\"value\": victoryCondition.Description\n\t\t});\n\n\t\tif (isCaptureTheRelic)\n\t\t\ttitles.push({\n\t\t\t\t\"label\": translate(\"Relic Count\"),\n\t\t\t\t\"value\": g_GameAttributes.settings.RelicCount\n\t\t\t});\n\n\t\tif (victoryCondition.Name == \"regicide\")\n\t\t\tif (g_GameAttributes.settings.RegicideGarrison)\n\t\t\t\ttitles.push({\n\t\t\t\t\t\"label\": translate(\"Hero Garrison\"),\n\t\t\t\t\t\"value\": translate(\"Heroes can be garrisoned.\")\n\t\t\t\t});\n\t\t\telse\n\t\t\t\ttitles.push({\n\t\t\t\t\t\"label\": translate(\"Exposed Heroes\"),\n\t\t\t\t\t\"value\": translate(\"Heroes cannot be garrisoned and they are vulnerable to raids.\")\n\t\t\t\t});\n\t}\n\n\tif (g_GameAttributes.settings.RatingEnabled &&\n\t g_GameAttributes.settings.PlayerData.length == 2)\n\t\ttitles.push({\n\t\t\t\"label\": translate(\"Rated game\"),\n\t\t\t\"value\": translate(\"When the winner of this match is determined, the lobby score will be adapted.\")\n\t\t});\n\n\tif (g_GameAttributes.settings.LockTeams)\n\t\ttitles.push({\n\t\t\t\"label\": translate(\"Locked Teams\"),\n\t\t\t\"value\": translate(\"Players can't change the initial teams.\")\n\t\t});\n\telse\n\t\ttitles.push({\n\t\t\t\"label\": translate(\"Diplomacy\"),\n\t\t\t\"value\": translate(\"Players can make alliances and declare war on allies.\")\n\t\t});\n\n\tif (g_GameAttributes.settings.LastManStanding)\n\t\ttitles.push({\n\t\t\t\"label\": translate(\"Last Man Standing\"),\n\t\t\t\"value\": translate(\"Only one player can win the game. If the remaining players are allies, the game continues until only one remains.\")\n\t\t});\n\telse\n\t\ttitles.push({\n\t\t\t\"label\": translate(\"Allied Victory\"),\n\t\t\t\"value\": translate(\"If one player wins, his or her allies win too. If one group of allies remains, they win.\")\n\t\t});\n\n\ttitles.push({\n\t\t\"label\": translate(\"Ceasefire\"),\n\t\t\"value\":\n\t\t\tg_GameAttributes.settings.Ceasefire == 0 ?\n\t\t\t\ttranslate(\"disabled\") :\n\t\t\t\tsprintf(translatePlural(\n\t\t\t\t\t\"For the first minute, other players will stay neutral.\",\n\t\t\t\t\t\"For the first %(min)s minutes, other players will stay neutral.\",\n\t\t\t\t\tg_GameAttributes.settings.Ceasefire),\n\t\t\t\t{ \"min\": g_GameAttributes.settings.Ceasefire })\n\t});\n\n\tif (g_GameAttributes.map == \"random\")\n\t\ttitles.push({\n\t\t\t\"label\": translateWithContext(\"Map Selection\", \"Random Map\"),\n\t\t\t\"value\": translate(\"Randomly select a map from the list.\")\n\t\t});\n\telse\n\t{\n\t\ttitles.push({\n\t\t\t\"label\": translate(\"Map Name\"),\n\t\t\t\"value\": translate(g_GameAttributes.settings.Name)\n\t\t});\n\t\ttitles.push({\n\t\t\t\"label\": translate(\"Map Description\"),\n\t\t\t\"value\": g_GameAttributes.settings.Description ?\n\t\t\t\t\ttranslate(g_GameAttributes.settings.Description) :\n\t\t\t\t\ttranslate(\"Sorry, no description available.\")\n\t\t});\n\t}\n\n\ttitles.push({\n\t\t\"label\": translate(\"Map Type\"),\n\t\t\"value\": g_MapTypes.Title[g_MapTypes.Name.indexOf(g_GameAttributes.mapType)]\n\t});\n\n\tif (typeof g_MapFilterList !== \"undefined\")\n\t\ttitles.push({\n\t\t\t\"label\": translate(\"Map Filter\"),\n\t\t\t\"value\": g_MapFilterList.name[g_MapFilterList.id.findIndex(id => id == g_GameAttributes.mapFilter)]\n\t\t});\n\n\tif (g_GameAttributes.mapType == \"random\")\n\t{\n\t\tlet mapSize = g_MapSizes.Name[g_MapSizes.Tiles.indexOf(g_GameAttributes.settings.Size)];\n\t\tif (mapSize)\n\t\t\ttitles.push({\n\t\t\t\t\"label\": translate(\"Map Size\"),\n\t\t\t\t\"value\": mapSize\n\t\t\t});\n\t}\n\n\tif (g_GameAttributes.settings.Biome)\n\t{\n\t\tlet biome = g_Settings.Biomes.find(b => b.Id == g_GameAttributes.settings.Biome);\n\t\ttitles.push({\n\t\t\t\"label\": biome ? biome.Title : translateWithContext(\"biome\", \"Random Biome\"),\n\t\t\t\"value\": biome ? biome.Description : translate(\"Randomly select a biome from the list.\")\n\t\t});\n\t}\n\n\tif (g_GameAttributes.settings.TriggerDifficulty !== undefined)\n\t{\n\t\tlet difficulty = g_Settings.TriggerDifficulties.find(difficulty => difficulty.Difficulty == g_GameAttributes.settings.TriggerDifficulty);\n\t\ttitles.push({\n\t\t\t\"label\": difficulty.Title,\n\t\t\t\"value\": difficulty.Tooltip\n\t\t});\n\t}\n\n\ttitles.push({\n\t\t\"label\": g_GameAttributes.settings.Nomad ? translate(\"Nomad Mode\") : translate(\"Civic Centers\"),\n\t\t\"value\":\n\t\t\tg_GameAttributes.settings.Nomad ?\n\t\t\t\ttranslate(\"Players start with only few units and have to find a suitable place to build their city.\") :\n\t\t\t\ttranslate(\"Players start with a Civic Center.\")\n\t});\n\n\ttitles.push({\n\t\t\"label\": translate(\"Starting Resources\"),\n\t\t\"value\": sprintf(translate(\"%(startingResourcesTitle)s (%(amount)s)\"), {\n\t\t\t\"startingResourcesTitle\":\n\t\t\t\tg_StartingResources.Title[\n\t\t\t\t\tg_StartingResources.Resources.indexOf(\n\t\t\t\t\t\tg_GameAttributes.settings.StartingResources)],\n\t\t\t\"amount\": g_GameAttributes.settings.StartingResources\n\t\t})\n\t});\n\n\ttitles.push({\n\t\t\"label\": translate(\"Population Limit\"),\n\t\t\"value\":\n\t\t\tg_PopulationCapacities.Title[\n\t\t\t\tg_PopulationCapacities.Population.indexOf(\n\t\t\t\t\tg_GameAttributes.settings.PopulationCap)]\n\t});\n\n\ttitles.push({\n\t\t\"label\": translate(\"Treasures\"),\n\t\t\"value\": g_GameAttributes.settings.DisableTreasures ?\n\t\t\ttranslateWithContext(\"treasures\", \"Disabled\") :\n\t\t\ttranslateWithContext(\"treasures\", \"As defined by the map.\")\n\t});\n\n\ttitles.push({\n\t\t\"label\": translate(\"Revealed Map\"),\n\t\t\"value\": g_GameAttributes.settings.RevealMap\n\t});\n\n\ttitles.push({\n\t\t\"label\": translate(\"Explored Map\"),\n\t\t\"value\": g_GameAttributes.settings.ExploreMap\n\t});\n\n\ttitles.push({\n\t\t\"label\": translate(\"Cheats\"),\n\t\t\"value\": g_GameAttributes.settings.CheatsEnabled\n\t});\n\n\treturn titles.map(title => sprintf(translate(\"%(label)s %(details)s\"), {\n\t\t\"label\": coloredText(title.label, g_DescriptionHighlight),\n\t\t\"details\":\n\t\t\ttitle.value === true ? translateWithContext(\"gamesetup option\", \"enabled\") :\n\t\t\t\ttitle.value || translateWithContext(\"gamesetup option\", \"disabled\")\n\t})).join(\"\\n\");\n}", "gameOver(gameWon) {\r\n const overlay = document.querySelector('#overlay');\r\n overlay.style.display = '';\r\n \r\n const gameOverMsg = document.querySelector('#game-over-message');\r\n // checks for win/lose and display win/lose message, classNames used for formating\r\n if(gameWon) {\r\n gameOverMsg.textContent = 'Succesfull Game!';\r\n overlay.classList.remove('start','lose');\r\n overlay.classList.add('win');\r\n } else {\r\n gameOverMsg.textContent = 'Game Over!';\r\n overlay.classList.remove('start', 'win');\r\n overlay.classList.add('lose');\r\n };\r\n document.querySelector(\".main-container\").style.background=\"white\";\r\n\r\n const lis = document.querySelector(\"#phrase ul\");\r\n lis.innerHTML = \"\";\r\n\r\n // resets key buttons\r\n const buttons = document.querySelectorAll('#qwerty button');\r\n buttons.forEach(btn => {\r\n btn.disabled = false;\r\n btn.classList.remove('chosen');\r\n btn.classList.remove('wrong');\r\n });\r\n\r\n const hearts = document.querySelectorAll('.tries img');\r\n hearts.forEach(heart => {\r\n heart.src = 'images/liveHeart.png';\r\n });\r\n }", "function checkWin (){\n const letters = document.getElementsByClassName('letter');\n const correctLetters = document.getElementsByClassName('show');\n let h2 = document.querySelector('.title');\n if (letters.length === correctLetters.length){\n overlay.className = 'win reset';\n h2.textContent = 'You Won!';\n overlay.style.display = 'flex';\n btnReset.textContent = 'Play Again'\n } else if (missed> 4){\n overlay.classname='lose reset';\n h2.textContent = 'You Lose!'\n overlay.style.display = 'flex';\n btnReset.textContent = 'Try Again'\n }\n}", "function Status({state}) {\n\t\tif (util.gameWon(state.recorded)) { \n\t\t\treturn <p id=\"Win\">You Win!</p>\n\t\t}\n\t\telse if (util.gameLost(state.recorded)) { \n\t\t\treturn <p id=\"Lose\">You Lose!</p>\n\t\t}\n\t\telse {\n\t\t\tvar msg = \"Guesses left: \" + (8 - state.recorded.length)\n\t\t\treturn <p>{msg}</p>;\n\t\t}\n\t}", "function estacio_caption(N_evento)\n{\n var caption = '';\n\n switch (N_evento) {\n \n case 1:\n caption = \"Estácio: Exposição de Artesanato 2017 (1/3)\";\n break;\n\n case 2:\n caption = \"Estácio: Exposição de Artesanato 2017 (2/3)\";\n break; \n \n case 3:\n caption = \"Estácio: Exposição de Artesanato 2017 (3/3)\";\n break; \n \n }\n\n return(caption);\n}", "function displayname(gametype){\n let x = gametype.name;\n if (x==\"Counter-Strike: Global Offensive\") {\n x = \"CS:GO\" ;\n }\n return x;\n}", "function isGameOver() {\n //game is over if the player has 6 wrong guesses\n if (wrongGuesses === 6) {\n //display game over\n $(\"#gameOver\").text(\"You Lost! Maggie will be lost in space!\").css(\"color\", \"red\").show();\n $(\"#hangman\").hide();\n }\n //game is over if the player has guessed the word\n if (dashes.join(\"\") === randomWordArray.join(\"\")) {\n //display you won, yay\n $(\"#gameOver\").text(\"You guessed it! Maggie can get back to her ship now!\").css(\"color\", \"blue\").show();\n $(\"#hangman\").hide();\n }\n }", "printScore() {\n if (this.gameOver()) {\n return `${this.getLeadingPlayer()} wins the game`;\n }\n if (this.deuce()) {\n return 'Deuce';\n }\n if (this.inAdvantage()) {\n return `${this.getLeadingPlayer()} has the advantage`;\n }\n return `Score is ${this.scoreNames[this.playerOneScore]} - ${this.scoreNames[this.playerTwoScore]}`;\n }", "function checkWin() {\n const letter = document.querySelectorAll(\".letter\");\n const show = document.querySelectorAll(\".show\");\n const head = document.querySelector(\".title\");\n const overlay = document.getElementById(\"overlay\");\n if (show.length === letter.length) {\n overlay.className = \"win\";\n overlay.style.display = \"flex\";\n head.textContent = \"You won! Good job.\";\n } else if (missed === 5) {\n overlay.className = \"lose\";\n overlay.style.display = \"flex\";\n head.textContent = \"You lost, would you like to try again?\";\n }\n}", "function showGameOver() {\n textSize(32);\n textAlign(CENTER, CENTER);\n var gameOverText = \"GAME OVER\\n\";\n gameOverText += \"you ded.\"\n text(gameOverText, width / 2, 50);\n}", "function HeightSystem(me, they) {\n var a;\n if (me.Height > they.Height) {\n if (me.Height * 0.95 < they.Height) {\n a = \"Your opponent is almost as tall as you.\";\n } else if (me.Height * 0.9 < they.Height) {\n a = \"You are a head taller than your opponent.\";\n } else if (me.Height * 0.8 < they.Height) {\n a = \"You are taller than your opponent.\"\n } else if (me.Height * 0.7 < they.Height) {\n a = \"You are taller than your opponent.\"\n } else if (me.Height * 0.6 < they.Height) {\n a = \"You are taller than your opponent.\"\n } else if (me.Height * 0.5 < they.Height) {\n a = \"You are taller than your opponent.\"\n } else if (me.Height * 0.4 < they.Height) {\n a = \"Your opponent is short enough for their head to be almost be in level with your groin, how convenient.\";\n } else if (me.Height * 0.3 < they.Height) {\n a = \"Looking down at your opponent you see that they are almost tall enough to reach your groin.\";\n } else if (me.Height * 0.2 < they.Height) {\n a = \"Looking down at your opponent you see that they are just tall enough to reach over your knees.\";\n } else if (me.Height * 0.1 < they.Height) {\n a = \"Your opponent is so short, that they can't reach over your knees!\";\n } else {\n a = \"Your opponent is so small than you could hold them in one hand.\"\n }\n } else if (me.Height == they.Height) {\n a = \"You and your opponent exact same height! What are the odds?\"\n } else {\n if (they.Height * 0.95 < me.Height) {\n a = \"You are almost as tall as your opponent.\"\n } else if (they.Height * 0.9 < me.Height) {\n a = \"You are a head shorter than your opponent.\"\n } else {\n a = \"Your opponent is taller than you.\"\n }\n }\n return a;\n }", "function countAllDeath() {\n let deathNumber = document.getElementById(\"death-number\");\n deathNumber.innerHTML = `${deathAll} drowned`;\n }", "function startGame() {\n\n selectedWord = nbaTeams[Math.floor(Math.random() * nbaTeams.length)];\n lettersInWord = selectedWord.split(\"\");\n numBlanks = lettersInWord.length;\n\n numOfTries = 12;\n wrongLetters = [];\n blankAndSuccesses = [];\n\n for(var i = 0; i < numBlanks; i++) {\n blankAndSuccesses.push(\"_\");\n };\n\n document.getElementById(\"underscore\").innerHTML = blankAndSuccesses.join(\" \");\n document.getElementById(\"attempts\").innerHTML = numOfTries;\n document.getElementById(\"wins\").innerHTML = winCount;\n document.getElementById(\"losses\").innerHTML = loseCount;\n}", "function checkWin() {\n\tconst header = document.querySelector('#overlay h2')\n\n\tif (show.length == letter.length) {\n\t\toverlay.style.display = 'flex';\n\t\toverlay.className = 'win';\n\t\theader.textContent = 'Congratulations, you won.'\n\t\tgameButton.textContent = 'Play again'\n\t\treset();\n\n\t} else if (missed >= 5) {\n\t\toverlay.style.display = 'flex';\n\t\toverlay.className = 'lose';\n\t\theader.textContent = 'Game over.';\n\t\tgameButton.textContent = 'Play again';\n\t\treset();\n\t}\n}", "function checkWin() {\n const letterSum = document.getElementsByClassName('letter');\n const showSum = document.getElementsByClassName('show');\n const endGameMessage = document.querySelector('h2.title');\n if(letterSum.length === showSum.length) {\n endGameMessage.textContent = \"You've Won!!!\";\n overlay.style.display = 'flex';\n overlay.classList.add('win');\n //if the number of incorrect letter guesses is above 4, the lose overlay displays\n } else if(missed > 4) {\n endGameMessage.textContent = \"You've Lost\";\n overlay.style.display = 'flex';\n overlay.classList.add('lose');\n }\n}", "function winCondition() {\n var ctx = hangmanGame.canvas.getContext(\"2d\");\n\n if (counter < 3) {\n ctx.font = ctx.font = \"125px Rock Salt\";\n ctx.textAlign = \"center\";\n ctx.fillStyle = \"#f2042c\";\n ctx.fillText(`YOU WIN!`, 400, 250);\n } else {\n resetAll();\n }\n\n if (hangmanGame.frameCount === 50) {\n counter++;\n }\n}", "function genPrizeCode(typeGame, sol) {\n\n if (typeGame === 1) {\n if (validateColor(sol, getKey()) === true) {\n genMsg('prize', '#gameWord', \"\");\n } else {\n $('.blocks').html('');\n count = 0;\n userColorInput = '';\n if (lifes != 1) {\n $('.lifes li:eq(' + lifes + ')').hide(\"slow\");\n lifes -= 1;\n $('#gameColors').effect(\"shake\");\n\n } else {\n $('.lifes li:eq(1)').hide(\"slide\");\n $('#check').attr('disabled', 'disabled');\n genMsg(\"fail\", '#gameColors', \"fail!!!!!\");\n\n }\n\n }\n } else {\n\n if (getWord().toLowerCase() != sol) {\n if (lifes != 1) {\n $('.lifes li:eq(' + lifes + ')').hide();\n lifes -= 1;\n genMsg(\"\", '#gameWord', \"Thats not the correct word!!!\");\n\n } else {\n $('.lifes li:eq(1)').hide();\n $('#genWord').attr('disabled', 'disabled');\n genMsg(\"fail\", '#gameWord', \"fail!!!!!\");\n\n }\n\n } else {\n genMsg(\"prize\", '#gameWord', \"\");\n }\n\n }\n\n}", "function checkWin() {\r\n if(wordGuessed.indexOf(\"_\") === -1) {\r\n document.getElementById(\"youwin-image\").style.cssText = \"display: block\";\r\n document.getElementById(\"pressKeyTryAgain\").style.cssText= \"display: block\";\r\n wins++;\r\n finishedGame = true;\r\n }\r\n}", "function palestra_de_literatura_caption(N_evento)\n{\n var caption = '';\n\n switch (N_evento) {\n \n case 1:\n caption = \"Palestra de literatura (1/2)\";\n break;\n\n case 2:\n caption = \"Palestra de literatura (2/2)\";\n break; \n \n }\n\n return(caption);\n}", "function checkWin() {\n const letter = document.getElementsByClassName('letter');\n const show = document.getElementsByClassName('show');\n function changeHTML(result) {\n setOverlayDisplay('flex');\n if (result === 'win') {\n startBtn.innerHTML = 'Play Again';\n startOverlay.className = 'win';\n p.innerHTML = \"Well done, you guessed the phrase correctly\";\n } else if (result === 'lose') {\n startBtn.innerHTML = 'Try Again';\n startOverlay.className = 'lose';\n p.innerHTML = \"Unlucky, you did not guess the phrase\";\n }\n }\n if (letter.length === show.length) {\n changeHTML('win');\n resetGame();\n } else if (missed === 5) {\n changeHTML('lose');\n resetGame();\n }\n}", "function title() {\n //Intro title 1\n if (introState === 0) {\n displayIntroTitle();\n }\n else if(introState === 1) {\n image(imgIntro1, 0, 0,1360,840); //Introduction story image 1\n //Play background music in a loop when loaded\n if (bgMusic.isPlaying() === false) {\n bgMusic.loop();\n }\n }\n else if(introState === 2) {\n image(imgIntro2, 0, 0,1360,840); //Introduction story image 2\n if (bgMusic.isPlaying() === false) {\n bgMusic.loop();\n }\n }\n else if(introState === 3) {\n image(imgIntro3, 0, 0,1360,840); //Introduction story image 3\n if (bgMusic.isPlaying() === false) {\n bgMusic.loop();\n }\n }\n else if(introState === 4) {\n push();\n imageMode(CENTER);\n image(imgIntro4, width/2, height/2+200,250,140); //Introduction story image 4\n pop();\n //Instructions screen\n fill(255); //white\n displayText(`Use the arrow keys to move Antonio!\n 1. Avoid the grey rocks\n 2. Gather 500 points before time runs out!`);\n if (bgMusic.isPlaying() === false) {\n bgMusic.loop();\n }\n }\n else {\n state =`simulation`;\n }\n}", "function racialTraits() {\n let racialTraitsVar;\n if (race === \"Human\") {\n racialTraitsVar =\n `\n <h3>Racial Traits</h3>\n <p>+1 to All Ability Scores</p>\n <p class=\"underline\">Languages</p>\n <p>You can speak, read, and write Common and one extra language.</p>\n <ul>\n <li>${extraLang}</li>\n </ul>\n `;\n }\n if (race === \"Elf\") {\n racialTraitsVar =\n `\n <h3>Racial Traits</h3>\n <p>+2 Dexterity</p>\n <p class=\"underline\">Darkvision</p>\n <p>Accustomed to twilit forests and the night sky, you have superior vision in dark and dim conditions</p>\n <p class=\"underline\">Keen Senses</p>\n <p>You have proficiency in the Perception skill.</p>\n <p class=\"underline\">Fey Ancestry</p>\n <p>You have advantage on saving throws against being charmed, and magic can’t put you to sleep.</p>\n <p class=\"underline\">Trance</p>\n <p>Elves don’t need to sleep. Instead, they meditate deeply, remaining semiconscious, for 4 hours a day.</p>\n <p class=\"underline\">Cantrip</p>\n <p>You know one cantrip of your choice from the wizard spell list. Intelligence is your spellcasting ability for it.</p>\n <ul>\n <li>${cantrip}</li>\n </ul>\n <p>You can speak, read, and write one extra language of your choice.</p>\n <ul>\n <li>${extraLang}</li>\n </ul>\n `;\n }\n if (race === \"Halfling\") {\n racialTraitsVar =\n `\n <h3>Racial Traits</h3>\n <p>+2 Dexterity</p>\n <p class=\"underline\">Lucky</p>\n <p>When you roll a 1 on the d20 for an attack roll, ability check, or saving throw, you can reroll the die and must use the new roll.</p>\n <p class=\"underline\">Brave</p>\n <p>You have advantage on saving throws against being frightened.</p>\n <p class=\"underline\">Halfling Nimbleness</p>\n <p>You can move through the space of any creature that is of a size larger than yours.</p>\n `;\n }\n if (race === \"Dwarf\") {\n racialTraitsVar =\n `\n <h3>Racial Traits</h3>\n <p>+2 Constitution</p>\n <p class=\"underline\">Darkvision</p>\n <p>Accustomed to life underground, you have superior vision in dark and dim conditions.</p>\n <p class=\"underline\">Dwarven Resilience</p>\n <p>You have advantage on saving throws against poison, and you have resistance against poison damage</p>\n <p class=\"underline\">Tool Proficiency</p>\n <p>You gain proficiency with the artisan’s tools of your choice: smith’s tools, brewer’s supplies, or mason’s tools.</p>\n <ul>\n <li>${toolProf}</li>\n </ul>\n <p class=\"underline\">Dwarven Combat Training</p>\n <p>You have proficiency with the battleaxe, handaxe, light hammer, and warhammer.</p>\n <p class=\"underline\">Stonecunning</p>\n <p>\n Whenever you make an Intelligence (History) check related to the origin of stonework, \n you are considered proficient in the History skill and add double your proficiency bonus to the check, \n instead of your normal proficiency bonus.\n </p>\n `;\n }\n return racialTraitsVar;\n}", "function gameOver() {\n // Set timer display to empty string.\n timer.textContent = \"\";\n // hide question element and answer buttons.\n questionText.classList.add(\"hide\");\n for (i=0; i<4; i++) {\n answerButtons[i].classList.add(\"hide\")\n }\n // Display how many correct answers user selected.\n if (userScore == 1) {\n gameScoreEl.textContent = \"You got \" + userScore + \" question correct.\"\n }\n else{\n gameScoreEl.textContent = \"You got \" + userScore + \" questions correct.\"\n }\n startButton.classList.remove(\"hide\");\n}", "function showResult(){\n let titles = [\"Master\",\"Champion\",\"Average\",\"Bad\"]; \n let nrOfCorrects = document.getElementById(\"nrOfCorrectAnswers\");\n let showTitle = document.getElementById(\"title\");\n let username = document.getElementById(\"username\");\n nrOfCorrects.innerHTML = \"You scored \" + \"<span>\" + quiz.correctAnswers + \"</span>\" + \" of\" + \" <span>\" + quiz.maxScore + \"</span>\" + \" points right!\";\n username.innerHTML = quiz.username;\n if(quiz.correctAnswers == quiz.maxScore){\n showTitle.innerHTML = titles[0];\n }\n else if(quiz.correctAnswers > 3){\n showTitle.innerHTML = titles[1];\n }\n else if(quiz.correctAnswers >= 2){\n showTitle.innerHTML = titles[2];\n }\n else if(quiz.correctAnswers < 2){\n showTitle.innerHTML = titles[3];\n }\n}", "function checkWin() {\n \n if (liveMafia > (getAll().length - liveMafia))\n\treturn \"Mafia\";\n else if (liveMafia == 0) \n\treturn \"Villagers\";\n else\n\treturn null;\n}", "function counters() {\n\tdocument.getElementById('wordDiv').innerHTML = output.join(' ')\n\tdocument.getElementById('guessesDiv').innerHTML = guesses\n\tdocument.getElementById('wrongDiv').innerHTML = wrong\n//win when letters string === output string\n\tif(letters.toString() === output.toString()) {\n\t\tplayAudioWinner()\n\t\twins++\n\t\twrong = []\n\t\tdocument.getElementById('wrongDiv').innerHTML = wrong\n\t\tdocument.getElementById('winDiv').innerHTML = wins\n\t\tdocument.getElementById('wordDiv').innerHTML = word\n\t\tsetTimeout (function(){beginGame();},3000);\n\t\t// beginGame()\n//lose if user has no more guesses\n\t} else if (guesses === 0) {\n\t\tplayAudioLoser()\n\t\tlosses++\n\t\twrong = []\n\t\tdocument.getElementById('wrongDiv').innerHTML = wrong\n\t\tdocument.getElementById('loseDiv').innerHTML = losses\n\t\tbeginGame()\n\t}\n}", "function gameOver() {\n losses++;\n spanLosses.innerHTML = losses;\n changeGameStatus.innerHTML = \"THE SECRET PHRASE WAS \" + secretPhrase + \".\";\n}", "function checkState() {\n if (hangmanGame.guesses > 6 && hangmanGame.guesses <= 8) {\n theme = \"lighter\";\n fontColor = \"#000000\";\n } else if (hangmanGame.guesses > 4 && hangmanGame.guesses <= 6) {\n if (theme === \"light\") {\n } else {\n theme = \"light\";\n fontColor = \"#000000\";\n gameBackground = new Component(800, 500, `./assets/images/${theme}/background.png`, 0, 0);\n backgroundGlow = new Component(800, 500, `./assets/images/${theme}/glow.png`, 0, 0);\n character = new AnimatedItem(400, 400, `./assets/images/character/${theme}.png`, 0, 0);\n }\n } else if (hangmanGame.guesses > 2 && hangmanGame.guesses <= 4) {\n if (theme === \"dark\") {\n } else {\n theme = \"dark\";\n fontColor = \"#490e06\";\n gameBackground = new Component(800, 500, `./assets/images/${theme}/background.png`, 0, 0);\n backgroundGlow = new Component(800, 500, `./assets/images/${theme}/glow.png`, 0, 0);\n character = new AnimatedItem(400, 400, `./assets/images/character/${theme}.png`, 0, 0);\n }\n } else if (hangmanGame.guesses > 0 && hangmanGame.guesses <= 2) {\n if (theme === \"darker\") {\n } else {\n theme = \"darker\";\n fontColor = \"#871000\";\n gameBackground = new Component(800, 500, `./assets/images/${theme}/background.png`, 0, 0);\n backgroundGlow = new Component(800, 500, `./assets/images/${theme}/glow.png`, 0, 0);\n character = new AnimatedItem(400, 400, `./assets/images/character/${theme}.png`, 0, 0);\n }\n }\n}", "function C012_AfterClass_Amanda_AmandaSpankPlayer() {\n\tC012_AfterClass_Amanda_SpankCount++;\n\tif (C012_AfterClass_Amanda_SpankCount > C012_AfterClass_Amanda_SpankMaxCount) {\n\t\tC012_AfterClass_Amanda_CurrentStage = 3933;\n\t\tOverridenIntroText = \"\";\n\t\tOverridenIntroImage = \"\";\n\t} else {\n\t\tOverridenIntroText = GetText(\"SpankPlayer\" + C012_AfterClass_Amanda_SpankCount.toString());\n\t\tvar Img = (C012_AfterClass_Amanda_SpankCount % 2).toString();\n\t\tif ((C012_AfterClass_Amanda_SpankCount < 5) && !Common_PlayerChaste) OverridenIntroImage = \"AmandaSpankPlayer\" + Img + \".jpg\";\n\t\tif ((C012_AfterClass_Amanda_SpankCount >= 5) && !Common_PlayerChaste) OverridenIntroImage = \"AmandaSpankPlayerRedButt\" + Img + \".jpg\";\n\t\tif ((C012_AfterClass_Amanda_SpankCount < 5) && Common_PlayerChaste) OverridenIntroImage = \"AmandaSpankPlayerChastity\" + Img + \".jpg\";\n\t\tif ((C012_AfterClass_Amanda_SpankCount >= 5) && Common_PlayerChaste) OverridenIntroImage = \"AmandaSpankPlayerChastityRedButt\" + Img + \".jpg\";\n\t}\n}", "function gameStatus() {\n // position of the last item in player sequence\n var lastPosition = playerSequence.length - 1; \n if (playerSequence[lastPosition] == simonSequence[lastPosition] && \n playerSequence.length < simonSequence.length) {\n status.html(`<p>Well done!</p>`);\n }\n else if (playerSequence[lastPosition] == simonSequence[lastPosition] \n && playerSequence.length == simonSequence.length) {\n status.html(`<p>Next play! Get ready!</p>`);\n disableColorButtons();\n setTimeout(function() {\n newGame = false; // To avoid score and simon sequence reset\n retry = false;\n notEndGame = false;\n play();\n }, 2000);\n }\n else {\n incorrectSound.play(); // 'Razz' sound plays when player makes mistake\n if (hard.is(\":checked\")) {\n status.html(\n `<div class=\"font\">Game Over </div>\n <p>Oops! That's not right!<br>\n You scored <span class=\"red\"> ${scores} </span><br> \n ${playAgain}.</p>`);\n enableModeButton();\n enableStartButton();\n disableExitButton();\n }\n else {\n status.html(\n `<div class=\"font\"> Oops! Not quite right!</div>\n <p>Let's have another try! </p>`);\n retry = true;\n newGame = false;\n setTimeout(play, 4000);\n disableExitButton();\n }\n }\n }", "function showGameOver() {\n textSize(32);\n textAlign(CENTER,CENTER);\n fill(0);\n\nif (preyEaten > 0) {\nvar gameOverText = \"GAME OVER\\n\";\nfill(random(255))\ngameOverText += \"You ate \" + preyEaten + \" innocent circles,\\n\";\ngameOverText += \"you monster.\\n\";\ntext(gameOverText,width/2,height/2);\n}\nelse {\nvar gameOverText = \"WINNER\\n\";\nfill(255,255,0);\ngameOverText += \"You ate \" + preyEaten + \" innocent circles,\\n\";\ngameOverText += \"you considerate soul.\\n\";\ntext(gameOverText,width/2,height/2);\n}\n}", "function checkWin() {\n let letters = document.querySelectorAll(\".letter\");\n let correct = document.querySelectorAll(\".show\");\n if (letters.length == correct.length) {\n overlay.className = \"win\";\n overlay.firstElementChild.textContent = \"You Win!!\";\n overlay.style.display = \"flex\";\n startBtn.textContent = \"Play Again\";\n reset();\n } else if (missed > 4) {\n overlay.className = \"lose\";\n overlay.firstElementChild.textContent = \"Better luck next time :(\";\n overlay.style.display = \"flex\";\n startBtn.textContent = \"Play Again\";\n reset();\n }\n}", "function updateGameOverMessage(x) {\n var message;\n \n switch (x) {\n case 1:\n message = \"Just because the Internet said it, does not make it true.<br>BWAHAHAHA!!!!!\";\n break;\n default:\n message = \"\";\n }\n var html = \"<h1 class=\\\"game_over\\\">\" + message + \"<h1>\" +\n \"<h2>Push reload to try again</h2>\";\n return html;\n}", "function checkWin() {\n const guessableLetters = document.querySelectorAll(\".letter\");\n const guessedLetters = document.querySelectorAll(\".show\");\n const overlay = document.getElementById('overlay');\n const overlayText = document.querySelector('.title');\n if (guessedLetters.length === guessableLetters.length){\n overlay.className = \"win\";\n overlayText.textContent = 'That was stupendous! The message was \"' + message + '\".';\n startButton.textContent = \"Play again?\";\n $(overlay).fadeIn(2500);\n } else if (missed === 5) {\n overlay.className = \"lose\";\n overlayText.innerHTML = '<p>Sorry bro, but that was awful. It should have said: \"' + message + '.\" <br><br>Redeem yourself?</You>';\n startButton.textContent = \"Giving up was never an option.\";\n $(overlay).fadeIn(2000);\n }\n }", "function gameOver (){\n $(\"#correct-answers\").html(\"Correct answers: \" + correctAns);\n $(\"#wrong-answers\").html(\"Wrong answers: \" + wrongAns);\n $(\"#skipped-questions\").html(\"Skipped questions: \" + skippedQuestions);\n \n }", "function checkWin() { \n let lettersWithLetters = document.getElementsByClassName('letter');\n let lettersWithShow = document.getElementsByClassName('show');\n\n if (lettersWithShow.length == lettersWithLetters.length) {\n sectionOverlay.className = 'win';\n sectionOverlay.style.display = '';\n pageTitle.textContent = 'You won! Play again?';\n startButton.textContent = ' Play again! ';\n }\n}", "function oneround(player, computer){\n\n var jugador = player;\n var computadora = computer; \n var j = document.getElementById('jugador');\n var c = document.getElementById('computadora');\n var g = document.getElementById('ganador');\n\n j.textContent = 'Jugador: ' + jugador;\n c.textContent = 'Computadora: ' + computadora;\n\n if(jugador === computadora){\n g.textContent = 'Es un empate';\n }else if(jugador == 'piedra' && computadora == 'tijera' || jugador == 'papel' && computadora == 'piedra' || jugador == 'tijera' && computadora == 'papel'){\n g.textContent = 'Has ganado';\n return 'j';\n }else{\n g.textContent = 'Ha ganado la computadora';\n return 'c';\n }\n}", "renderMainHeading(isShaked){\n\t\tconst title = document.querySelector(\".buttons h1\");\n\t\ttitle.innerHTML = \"C'mon, show them who is the BOSS\";\n\t\ttitle.classList.remove(\"winner\");\n\n\t\tif(isShaked === true){\n\t\t\tif(this.winners.length === 1){\n\t\t\t\tsetTimeout(()=>{\n\t\t\t\t\ttitle.innerHTML = `Player ${this.winners[0]} wins!`;\n\t\t\t\t\ttitle.classList.add(\"winner\");\n\t\t\t\t}, 1000);\n\t\t\t} else{\n\t\t\t\tthis.winners.sort((a,b) => a-b);\n\t\t\t\tsetTimeout(()=>{\n\t\t\t\t\ttitle.innerHTML = `Draw! Players ${this.winners.slice(0, this.winners.length-1).join(\", \")} and ${this.winners[this.winners.length-1]} go again!`;\n\t\t\t\t\ttitle.classList.add(\"winner\");\n\t\t\t\t}, 1000);\n\t\t\t};\n\t\t}\n\t}", "function wordGame(){\n\n questions=['Famoso barrio electronico de Tokio','Provincia de catalunya','Se usa en la pesca','Mamifero marino con aspecto amigable','Arma comun usada en la epoca medieval',\n 'Pais del sudeste asiatico','Felino de cuatro patas','Lugar donde pasar la noche','Causa fiebre','Mamifero comun en Africa','Ataque suicida de los pilotos japoneses','Satelite de la tierra',\n 'Planeta cercano al sol del sitema solar','Que hace daño o es perjudicial.','Se usa pra hacer fuego','Mamifero nativo de Malasia e Indonesia','Monumento del antiguo Egypto','Se elabora a partir de leche quajada',\n 'Lectura de composiciones poeticas','Tambien conocida como Russia Asiatica','Herramienta electrica usada en tareas de bricolaje','Criatura mitologica con forma de caballo blanco',\n 'Contiene lava','Reproductor de audio portatil','Instrumento musical de percusion','Web dedicada a compartir videos','Ciencia que estudia los animales']\n \n anwsers=['akihabara','barcelona','cebo','delfin','espada','filipinas','gepardo','hotel','Infeccion','jirafa','kamikaze','luna','Mercurio','nocivo','leña','oranguntan','piramide','queso','recital',\n 'siberia','taladro','unicornio','Volcan','walkman','xilofono','youtube','zoologia']\n \n letters=[\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"Ñ\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\"]\n\n for(let i=0;i<letters.length;i++){//asi se restarura el color de cada letra asi como su fundo azul\n document.getElementById(letters[i]).style.background=\"#014B94\";\n document.getElementById(letters[i]).style.color=\"white\";\n }\n\n document.getElementById(\"showPregunta\").innerHTML=\"\";\n document.getElementById(\"Respuesta\").innerHTML=\"\";\n document.getElementById(\"nombreJugador\").innerHTML=\"\";\n document.getElementById(\"aciertos\").innerHTML=\"\";\n document.getElementById(\"fallos\").innerHTML=\"\";\n document.getElementById(\"showValue\").innerHTML=\"\";\n failed=0;\n correct=0;\n questionsNav=0;\n totalQuestions=27;//nos sirve para saber cuando no quedan preguntas y se ha acabado el juego;\n \n\n playerName = prompt('Cual es tu nombre ?')\n document.getElementById(\"nombreJugador\").innerHTML=playerName\n alert(\"Empezamos!\")\n questionShow();\n}", "function C101_KinbakuClub_RopeGroup_WouldYourSister() {\n\tif (ActorGetValue(ActorName) == \"Lucy\") OverridenIntroText = GetText(\"WouldYourSisterNod\");\n\tif (ActorGetValue(ActorName) == \"Heather\") OverridenIntroText = GetText(\"WouldYourSisterShake\");\n}", "function gameOverDisplay() {\n if (correctGuesses === questions.length) {\n var endMessage = \"Perfection! Might want to go outside more tho\";\n var bottomText = \"#nerdalert!\";\n }\n else if (correctGuesses > incorrectGuesses) {\n var endMessage = \"Good work! But do better you can...\";\n var bottomText = \"We think you may possibly be the chosen 'one'\";\n }\n else {\n var endMessage = \"You seem to have taken an arrow to the knee\";\n var bottomText = \"#scrub\";\n }\n $(\"#QuizArea\").html(\"<p>\" + endMessage + \"</p>\" + \"<p><strong>Your Score: \" + correctGuesses + \" / \" + incorrectGuesses + \"</strong> </p>\");\n $(\"#QuizArea\").append(\"<h1 id='start'>Play Again?</h1>\");\n $(\"#bottomText\").html(bottomText);\n gameReset();\n $(\"#start\").click(nextQuestion);\n }", "checkForWin() {\n const phraseList = document.querySelector('#phrase').firstElementChild.children;\n let correctGuesses = 0;\n for (let i=0; i<phraseList.length; i++) {\n if (phraseList[i].className === 'show') {\n correctGuesses += 0;\n } else if (phraseList[i].className === 'hide space') {\n correctGuesses += 0;\n } else {\n correctGuesses -= 1;\n }\n }\n if (correctGuesses === 0) {\n this.gameOver('win');\n }\n }", "function checkWin() {\n\n\t\t//get_hearts.length = 5\n\n if (missed === get_hearts.length) {\n\n \t\tconsole.log(get_hearts.length);\n overlay.className = \"lose\";\n titleText.textContent = \"Oh no!! ... You Lost!\";\n btn_star.textContent = \"Try Again!\";\n set_flex(overlay);\n reset_game(button_startGame);\n\n }\n \n let get_letters = document.querySelectorAll('.letter');\n let get_shows \t= document.querySelectorAll('.show');\n \n if (get_shows.length == get_letters.length) {\n \n overlay.className = \"win\";\n titleText.textContent = \"Hey! You Won!!!\";\n btn_star.textContent = \"Play Again!\"\n set_flex(overlay);\n reset_game(button_startGame);\n\n }\n}", "function C010_Revenge_Outro_Run() {\n\t\n\t// Paints the background\n\tDrawRect(0, 0, 800, 600, \"black\");\n\t\n\t// Sets the correct text to fetch\n\tvar OutroText = \"\";\n\tif (GameLogQuery(\"C007_LunchBreak\", \"Amanda\", \"Stranded\") || GameLogQuery(\"C007_LunchBreak\", \"Sarah\", \"Stranded\")) OutroText = \"AmandaSarah\";\n\tif (GameLogQuery(\"C007_LunchBreak\", \"Sidney\", \"Stranded\") || GameLogQuery(\"C007_LunchBreak\", \"Jennifer\", \"Stranded\")) OutroText = \"SidneyJennifer\";\n\n\t// Draw the background image\n\tif (TextPhase >= 2) DrawImage(CurrentChapter + \"/\" + CurrentScreen + \"/Bell.jpg\", 800, 0);\n if (TextPhase < 2) DrawImage(CurrentChapter + \"/\" + CurrentScreen + \"/\" + OutroText + \".jpg\", 800, 0);\n\t\n\t// Shows the text\n\tif (C010_Revenge_Outro_GoodEnding) OutroText = OutroText + \"Good\";\n\tDrawText(GetText(OutroText + \"1\"), 400, 150, \"White\");\n\tif (TextPhase >= 1) DrawText(GetText(OutroText + \"2\"), 400, 300, \"White\");\n\tif (TextPhase >= 2) DrawText(GetText(OutroText + \"3\"), 400, 450, \"White\");\n\n}", "function checkWin(missed) {\n let guessed = document.getElementsByClassName('show');\n let all = document.getElementsByClassName('letter');\n let title = overlay.firstElementChild;\n if (guessed.length >= all.length || missed >= 5) {\n overlay.style.display = 'flex';\n button.textContent = 'Play Again';\n if (guessed.length >= all.length) {\n overlay.className = 'win';\n title.textContent = 'Congratulations. You Won!';\n } else if (missed >= 5) {\n overlay.className = 'lose';\n title.textContent = 'Sorry. You Lost!';\n };\n };\n}", "function mostrarResultado() {\r\n resultado=\"\";\r\n \r\n if (totalEncuestas == 1) {\r\n resultado+=\"<h3>Has realizado \"+totalEncuestas+\" vez esta encuesta.</h3>\";\r\n }else{\r\n if (totalEncuestas >= 2) {\r\n resultado+=\"<h3>Has realizado \"+totalEncuestas+\" veces esta encuesta.</h3>\";\r\n }\r\n if(totalEncuestas > 3){\r\n resultado+=\"<h3>Ha superado la cantidad máxima de 3 intentos.</h3>\";\r\n\r\n }\r\n }\r\n\r\n for(var i=1;i<=totalPreguntas;i++) { \r\n resultado+=\"<div>Puntaje en pregunta \"+i+\" : \"+resultadoEncuesta[\"p\"+i+\"-alt\"][0]+\"</div>\";\r\n \r\n }\r\n resultado+=\"<div>Puntaje total obtenido: \"+resultadoEncuesta+[i][0]+ \"</div>\";\r\n document.getElementById(\"resultado\").innerHTML=resultado;\r\n}", "function drawTitle(ICH_num) {\n var words = _translationsDomains__WEBPACK_IMPORTED_MODULE_6__[\"default\"][language].main;\n var offset = -30;\n ctx_nodes.textAlign = 'center';\n ctx_nodes.fillStyle = 'black';\n ctx_nodes.font = 'normal normal 400 22px ' + font_family;\n ctx_nodes.fillText(ICH_num + ' ' + words[0], 0, offset - 170);\n ctx_nodes.fillStyle = 'rgb(150,150,150)';\n ctx_nodes.font = 'normal normal 300 24px ' + font_family;\n ctx_nodes.fillText(words[1], 0, offset - 50);\n ctx_nodes.fillStyle = 'black';\n ctx_nodes.font = 'normal normal 200 52px ' + font_family;\n ctx_nodes.fillText(words[2], 0, offset);\n ctx_nodes.fillStyle = 'rgb(150,150,150)';\n ctx_nodes.font = 'normal normal 300 20px ' + font_family;\n offset += 80;\n ctx_nodes.fillText(words[3], 0, offset);\n ctx_nodes.fillStyle = 'black';\n ctx_nodes.font = 'normal normal 200 44px ' + font_family;\n offset += 70;\n ctx_nodes.fillText(words[4], 0, offset);\n ctx_nodes.fillStyle = 'rgb(150,150,150)';\n ctx_nodes.font = 'normal normal 300 20px ' + font_family;\n offset += 45;\n ctx_nodes.fillText(words[5], 0, offset);\n } //function drawTitle", "function horseOne() {\n if (hrs1 < finish) {\n hrs1 += getRandomNum();\n horse1.style.marginLeft = hrs1 + \"px\";\n } // if end\n else {\n if (!flag) {\n flag = true;\n alert.textContent = \"Horse 1 won the race!\";\n alert.classList.add(\"alert-active\");\n } // if end\n clearInterval(raceInterval);\n } // else end\n}", "function declareWinner(who) {\r\n document.querySelector(\" .endgame\").style.display = \"block\";\r\n document.querySelector(\" .endgame .text\").innerText = who;\r\n}", "function drawLabel() {\n p.text(`Trials: ${p.props.playedGames}/${p.props.countOfGames}`, 20, p.wrapper.offsetHeight-20);\n }", "function announceWinner(who) {\r\n document.querySelector(\".finishGame\").style.display = \"inline-block\";\r\n document.querySelector(\".finishGame .text\").innerText = who;\r\n\r\n}", "function bugTimer() {\nfood = false;\n\nvar wordz = \"YOU HAVE EATEN \" + hungry.full + \" BUGS\" ;\n\nif (hungry.full >=10) {\n wordz+=\"\\n YOU WIN\";\n\n} else {\n wordz+=\"\\n YOU LOSE\";\n}\n words = wordz;\n}", "function gameOver() {\n document.querySelector('.header').style.display = \"none\";\n hr.style.display = 'none';\n comeback.style.display = 'none';\n removeLi();\n h1.style.display = \"block\";\n h1.innerHTML = \"Game Over! The timer ran out.\"\n h2.innerHTML = \"Please try again later after you've had some coffee.\"\n}", "function $populateSchool(){\n if ($nicknamesIndex <= ($nicknames.length - 1)){\n $(\"#college\").text($currentSchool);\n }\n else {\n $(\"#any-key\").text(\"Game Over!\");\n $(\"#score\").text(\"Final Score: \" + $score + \" out of \" + $nicknames.length);\n }\n}", "gameOver(){\n this.activePhrase.letters.forEach(letter => letter.style.display = 'none'); \n const keysArray = [].slice.call(keys);\n keysArray.forEach(key => {\n if(key.classList.contains('chosen')){\n key.classList.remove('chosen');\n } else if(key.classList.contains('wrong')){\n key.classList.remove('wrong');\n }\n });\n overlay.style.display = '';\n if(this.missed === 5){\n for (let heart of hearts){\n heart.style.display = 'none';\n }\n keyboard.style.display = 'none';\n overlay.classList.remove('start');\n overlay.classList.add('lose');\n document.getElementById('game-over-message').textContent = 'Sorry, you ran out of lives...'; \n \n } else {\n for (let heart of hearts){\n heart.style.display = 'none';\n }\n keyboard.style.display = 'none';\n overlay.classList.remove('start');\n overlay.classList.add('win');\n document.getElementById('game-over-message').textContent = 'You won!';\n const winningPhrase = document.createElement('h4');\n winningPhrase.setAttribute('id', 'winning-phrase-over-screen');\n overlay.insertBefore(winningPhrase, document.getElementById('btn__reset'));\n winningPhrase.innerHTML = `The phrase was: \"${this.activePhrase.phrase}\"`; \n } \n }", "function gameOverMessage(win) {\n if (win) {\n $(\"#instructions-1\").html(\"You are Win!!!! May the force be with you\");\n } else {\n $(\"#instructions-1\").html(\"You are dead - Game Over\");\n }\n $(\"#instructions-2\").html(\"\");\n $(\"#instructions-3\").html(\"\");\n $(\"#section-2\").html(\"\");\n $(\"#section-3\").html(\"\");\n $(\"#game-info\").html(\"\");\n\n isGameActive = false;\n\n}", "function newGame (endGameMessage) {\n guessesToWin = 0;\n playerGuessesLeft = 15;\n correctGuesses = 0;\n playerWrongLetters = []; \n playeRightLetters = [];\n playerStatus = [];\n randomWord = listOfWords[Math.floor(Math.random() * listOfWords.length)];\n goalWord = randomWord.toUpperCase(); \n document.getElementById(\"guessed_letters\").innerHTML = playerWrongLetters.join();\n document.getElementById(\"win_or_lose\").innerHTML = endGameMessage;\n document.getElementById(\"wins_tag\").innerHTML = \"Wins: \" + playerWins;\n document.getElementById(\"losses_tag\").innerHTML = \"Losses: \" + playerLosses;\n \n for (i=0; i < goalWord.length; i++) { \n playerStatus[i] = \"_\";\n guessesToWin++;\n } \n\n document.getElementById(\"word_underscores\").innerHTML = playerStatus.join(\" \");\n\n console.log(goalWord); // for troubleshooting\n }", "function bazar_bem_possivel_caption(N_evento)\n{\n var caption = '';\n\n switch (N_evento) {\n \n case 1:\n caption = \"Bazar do bem possível (1/3)\";\n break;\n\n case 2:\n caption = \"Bazar do bem possível (2/3)\";\n break; \n \n case 3:\n caption = \"Bazar do bem possível (3/3)\";\n break; \n \n }\n\n return(caption);\n}", "function done () {\n\n //winner -- informs player, plays video, shows definition, and initiates for next try\n if (SlangLetters.toString() == FilledAndEmpty.toString()) {\n NumWins++;\n\n\n document.getElementById(\"Word_And_Defn\").innerHTML = SelectedSlang + \": \" + MatchingDefinition;\n \n document.getElementById(\"Current-Image\").innerHTML = \".Shoots-Scores\";\n \n ReInitiate()\n\n document.getElementById(\"Words-Correct\").innerHTML = \" \" + NumWins;\n }\n\n //hoser (aka loser) inform player and initiates for next try\n else if (RemainingTrys === 0) {\n NumLosses++;\n\n document.getElementById(\"Word_And_Defn\").innerHTML = \"Word and Definition Appear Here After Correct Guess\"\n ReInitiate()\n document.getElementById(\"Words-Missed\").innerHTML = \" \" + NumLosses;\n }\n\n document.getElementById(\"Word-Up\").innerHTML = \" \" + FilledAndEmpty.join(\" \");//Updates display of letters and blanks for the slang term being guessed currently\n\n document.getElementById(\"Guesses-Remaining\").innerHTML = \" \" + RemainingTrys;//Updates display of guesses left for current word\n}", "function spell(){ \n if(count == 1 ) return ' вопрос';\n if(count == 2 || count == 3 || count == 4 ) { \n return ' вопроса';\n } else {\n return ' вопросов'\n }\n }", "function goToNextGenusPresentation() {\n\n try\n {\n // check if program can forward to next presentation\n if (!canForward) {\n// show hint text for few seconds\n $(\"#messageHint2\").html(\"Bitte wählen Sie eine Kategorie aus!\");\n setTimeout(function() {$(\"#messageHint2\").html(\"\"); }, 2000);\n// alert(\"Bitte wählen Sie einen Oberbegriff aus!\");\n return;\n }\n\n else\n {\n\n switch (genusPresentationCnt) {\n\n case 1:\n// set the first letter\n $('#firstLetter').html(\"N\");\n // set genus words \n $('#genus1').html(\"Tier\");\n $('#genus2').html(\"Gemüse\");\n $('#genus3').html(\"Kleidungsstück\");\n // increment counter\n genusPresentationCnt++;\n break;\n\n case 2:\n// set the first letter\n $('#firstLetter').html(\"Z\");\n // set genus words \n $('#genus1').html(\"Tier\");\n $('#genus2').html(\"Möbelstück\");\n $('#genus3').html(\"Gemüse\");\n // increment counter\n genusPresentationCnt++;\n break;\n\n case 3:\n// set the first letter\n $('#firstLetter').html(\"R\");\n // set genus words \n $('#genus1').html(\"Kleidungsstück\");\n $('#genus2').html(\"Möbelstück\");\n $('#genus3').html(\"Tier\");\n // increment counter\n genusPresentationCnt++;\n break;\n\n case 4:\n// set the first letter\n $('#firstLetter').html(\"B\");\n // set genus words \n $('#genus1').html(\"Tier\");\n $('#genus2').html(\"Möbelstück\");\n $('#genus3').html(\"Kleidungsstück\");\n // increment counter\n genusPresentationCnt++;\n break;\n\n case 5:\n// set the first letter\n $('#firstLetter').html(\"P\");\n // set genus words \n $('#genus1').html(\"Gemüse\");\n $('#genus2').html(\"Tier\");\n $('#genus3').html(\"Kleidungsstück\");\n // increment counter\n genusPresentationCnt++;\n break;\n\n case 6:\n// set the first letter\n $('#firstLetter').html(\"J\");\n // set genus words \n $('#genus1').html(\"Kleidungsstück\");\n $('#genus2').html(\"Gemüse\");\n $('#genus3').html(\"Tier\");\n // increment counter\n genusPresentationCnt++;\n break;\n\n case 7:\n// set the first letter\n $('#firstLetter').html(\"K\");\n // set genus words \n $('#genus1').html(\"Möbelstück\");\n $('#genus2').html(\"Tier\");\n $('#genus3').html(\"Gemüse\");\n // increment counter\n genusPresentationCnt++;\n break;\n\n case 8:\n// set the first letter\n $('#firstLetter').html(\"I\");\n // set genus words \n $('#genus1').html(\"Möbelstück\");\n $('#genus2').html(\"Gemüse\");\n $('#genus3').html(\"Tier\");\n // increment counter\n genusPresentationCnt++;\n break;\n\n case 9:\n// set the first letter\n $('#firstLetter').html(\"G\");\n // set genus words \n $('#genus1').html(\"Kleidungsstück\");\n $('#genus2').html(\"Gemüse\");\n $('#genus3').html(\"Möbelstück\");\n // increment counter\n genusPresentationCnt++;\n break;\n\n case 10:\n// set the first letter\n $('#firstLetter').html(\"D\");\n // set genus words \n $('#genus1').html(\"Möbelstück\");\n $('#genus2').html(\"Tier\");\n $('#genus3').html(\"Kleidungsstück\");\n // increment counter\n genusPresentationCnt++;\n break;\n\n case 11:\n// set the first letter\n $('#firstLetter').html(\"S\");\n // set genus words \n $('#genus1').html(\"Gemüse\");\n $('#genus2').html(\"Möbelstück\");\n $('#genus3').html(\"Kleidungsstück\");\n // increment counter\n genusPresentationCnt++;\n break;\n\n case 12:\n\n // show next instruction of the third iteration\n $.mobile.changePage('#wortlisteInstruct4', {transition: \"flip\"});\n break;\n\n }\n\n // switch back variable \n if (canForward)\n canForward = false;\n\n // reset bg of genus buttons\n var allGenusBtns = document.querySelectorAll(\"[data-group='genusBtn']\");\n for (var i = 0; i < allGenusBtns.length; i++) {\n var tempElem = allGenusBtns[i];\n var tempId = tempElem.id;\n\n $('#' + tempId).css(\"background\", \"-webkit-gradient(linear, 0% 0%, 0% 100%, from(#8ADF8A), to(#4CB24C))\");\n\n }\n\n }\n }\n\n catch (error) {\n console.log(\"An error has been occured! \" + error);\n }\n\n}", "function checkwinner(){\n winner = 0;\n for (check = 0; check < winning.length;check++){\n a = winning[check][0];\n b = winning[check][1];\n c = winning[check][2];\n if ((board[a] == board[b]) &&\n (board[b] == board[c]) &&\n (board[a] != EMPTY)){\n winner = board[a];\n $(\"hr\").removeClass();\n $(\"hr\").addClass(winning[check][3]);\n $('.lines').hide().fadeIn('fast');\n\n\n if (winner == me){$('.winner2').html('I won !Play again?');}\n else {$('.winner2').html('Congratulations! You Won Play again?');}\n $('.winner').hide().fadeIn(3000);\n $('.yesno').hide().fadeIn('fast');\n }\n\n }\n if ((choices.length==0) && (winner ==0)){\n $('hr').removeClass();\n $('.winner').hide().fadeIn(1000);\n $('.yesno').hide().fadeIn('slow');\n $('.winner2').html('It was a draw Play again?');\n }\n }", "function newGame(){\n i = 0, hits = 0, failures = 0\n questions = [\n { letter: \"a\", answer: \"abducir\", status: 0, question: \"CON LA A. Dicho de una supuesta criatura extraterrestre: Apoderarse de alguien\" },\n \n { letter: \"b\", answer: \"bingo\", status: 0, question: \"CON LA B. Juego que ha sacado de quicio a todos los 'Skylabers' en las sesiones de precurso\" },\n \n { letter: \"c\", answer: \"churumbel\", status: 0, question: \"CON LA C. Niño, crío, bebé\" },\n \n { letter: \"d\", answer: \"diarrea\", status: 0, question: \"CON LA D. Anormalidad en la función del aparato digestivo caracterizada por frecuentes evacuaciones y su consistencia líquida\" },\n \n { letter: \"e\", answer: \"ectoplasma\", status: 0, question: \"CON LA E. Gelatinoso y se encuentra debajo de la membrana plasmática. Los cazafantasmas medían su radiación\" },\n \n { letter: \"f\", answer: \"facil\", status: 0, question: \"CON LA F. Que no requiere gran esfuerzo, capacidad o dificultad\" },\n \n { letter: \"g\", answer: \"galaxia\", status: 0, question: \"CON LA G. Conjunto enorme de estrellas, polvo interestelar, gases y partículas\" },\n \n { letter: \"h\", answer: \"harakiri\", status: 0, question: \"CON LA H. Suicidio ritual japonés por desentrañamiento\" },\n \n { letter: \"i\", answer: \"iglesia\", status: 0, question: \"CON LA I. Templo cristiano\" },\n \n { letter: \"j\", answer: \"jabali\", status: 0, question: \"CON LA J. Variedad salvaje del cerdo que sale en la película 'El Rey León', de nombre Pumba\" },\n \n { letter: \"k\", answer: \"kamikaze\", status: 0, question: \"CON LA K. Persona que se juega la vida realizando una acción temeraria\" },\n \n { letter: \"l\", answer: \"licantropo\", status: 0, question: \"CON LA L. Hombre lobo\" },\n \n { letter: \"m\", answer: \"misantropo\", status: 0, question: \"CON LA M. Persona que huye del trato con otras personas o siente gran aversión hacia ellas\" },\n \n { letter: \"n\", answer: \"necedad\", status: 0, question: \"CON LA N. Demostración de poca inteligencia\" },\n \n { letter: \"ñ\", answer: \"señal\", status: 0, question: \"CONTIENE LA Ñ. Indicio que permite deducir algo de lo que no se tiene un conocimiento directo.\" },\n \n { letter: \"o\", answer: \"orco\", status: 0, question: \"CON LA O. Humanoide fantástico de apariencia terrible y bestial, piel de color verde creada por el escritor Tolkien\" },\n \n { letter: \"p\", answer: \"protoss\", status: 0, question: \"CON LA P. Raza ancestral tecnológicamente avanzada que se caracteriza por sus grandes poderes psíonicos del videojuego StarCraft\" },\n \n { letter: \"q\", answer: \"queso\", status: 0, question: \"CON LA Q. Producto obtenido por la maduración de la cuajada de la leche\" },\n \n { letter: \"r\", answer: \"raton\", status: 0, question: \"CON LA R. Roedor\" },\n \n { letter: \"s\", answer: \"stackoverflow\", status: 0, question: \"CON LA S. Comunidad salvadora de todo desarrollador informático\" },\n \n { letter: \"t\", answer: \"terminator\", status: 0, question: \"CON LA T. Película del director James Cameron que consolidó a Arnold Schwarzenegger como actor en 1984\" },\n \n { letter: \"u\", answer: \"unamuno\", status: 0, question: \"CON LA U. Escritor y filósofo español de la generación del 98 autor del libro 'Niebla' en 1914\" },\n \n { letter: \"v\", answer: \"vikingos\", status: 0, question: \"CON LA V. Nombre dado a los miembros de los pueblos nórdicos originarios de Escandinavia, famosos por sus incursiones y pillajes en Europa\" },\n \n { letter: \"w\", answer: \"sandwich\", status: 0, question: \"CONTIENE LA W. Emparedado hecho con dos rebanadas de pan entre las cuales se coloca jamón y queso\" },\n \n { letter: \"x\", answer: \"botox\", status: 0, question: \"CONTIENE LA X. Toxina bacteriana utilizada en cirujía estética\" },\n \n { letter: \"y\", answer: \"peyote\", status: 0, question: \"CONTIENE LA Y. Pequeño cáctus conocido por sus alcaloides psicoactivos utilizado de forma ritual y medicinal por indígenas americanos\" },\n \n { letter: \"z\", answer: \"zen\", status: 0, question: \"CON LA Z. Escuela de budismo que busca la experiencia de la sabiduría más allá del discurso racional\" },\n ];\n\n document.getElementById (\"newgame\").style.display = \"none\";\n document.getElementById(\"rank\").style.display = \"none\";\n document.getElementById(\"name\").style.display = \"block\";\n document.getElementById(\"timer\").innerHTML = \"\";\n\n document.getElementById(\"info\").innerHTML = \"¿Cual es tu nombre?\";\n\n for(var j = 0; j < questions.length; j++){\n document.getElementById(questions[j].letter).style.color = \"white\";\n }\n}", "function checkWin() {\n let letter = document.getElementsByClassName('letter');\n let show = document.getElementsByClassName('show');\n const title = document.querySelector('.title');\n // if the number of letters with class “show” is equal to the number of letters with class “letters”\n if (show.length === letter.length) {\n //headline for win\n title.innerHTML = 'Fantastic!';\n overlay.className = 'win';\n overlay.style.display = \"flex\";\n \n //add reset button\n btn__reset.textContent = \"Play again?\";\n } \n // when missed = 5\n else if (missed == 5) {\n //headline for lose\n title.innerHTML = 'Lady Luck smiles not upon you...';\n overlay.className ='lose';\n overlay.style.display = \"flex\";\n //add reset button\n btn__reset.textContent = \"Try again?\";\n }\n}", "gameOver(gameWon) {\n let overlayElement = document.getElementById('overlay');\n overlayElement.style.display = \"block\";\n let gameOverMessageElement = document.getElementById('game-over-message');\n overlayElement.classList.remove('start');\n if (gameWon) {\n gameOverMessageElement.textContent = \"Great Job!\";\n document.getElementsByClassName('title')[0].classList.remove('infinite','bounce');\n document.getElementsByClassName('title')[0].classList.add('tada');\n overlayElement.classList.remove('lose');\n overlayElement.classList.add('win');\n } else {\n gameOverMessageElement.textContent = \"Sorry, better luck next time!\";\n document.getElementsByClassName('title')[0].classList.remove('infinite','bounce');\n document.getElementsByClassName('title')[0].classList.add('hinge');\n overlayElement.classList.remove('win');\n overlayElement.classList.add('lose');\n }\n }", "getRandomGame() {\n let randomIndex = Math.floor(Math.random() * this.players.length);\n let team = 'PSG';\n let opponent = this.games[randomIndex].opponent;\n let teamGoals = this.games[randomIndex].teamGoals;\n let opponentGoals = this.games[randomIndex].opponentGoals;\n return `The game was ${team} ${teamGoals} x ${opponentGoals} ${opponent}.`\n }", "function nombreIndexPanier() {\r\n let indexPanier = document.getElementById(\"indexPanier\");\r\n indexPanier.textContent = panier.length;\r\n}", "function countGuessesLeft() {\n\tdocument.querySelector(\"#guessesLeft\").innerHTML = \"Guesses Left: \" + guessesLeft;\n}" ]
[ "0.6552751", "0.64257985", "0.62428916", "0.62267506", "0.61771446", "0.6094532", "0.60944855", "0.5944768", "0.58738154", "0.58538824", "0.5852371", "0.5849951", "0.5848075", "0.5835283", "0.58303726", "0.5829311", "0.5828837", "0.58192426", "0.5818933", "0.57931954", "0.57757425", "0.57749045", "0.57718295", "0.576987", "0.5766996", "0.5746298", "0.5740914", "0.57389814", "0.5728258", "0.57281756", "0.5710682", "0.5706283", "0.57011044", "0.56931484", "0.56905365", "0.5683199", "0.567344", "0.5662913", "0.5657375", "0.5655796", "0.56536335", "0.565094", "0.56490505", "0.5646509", "0.5642633", "0.5638824", "0.5637519", "0.5636238", "0.5635714", "0.56262165", "0.56259006", "0.56238335", "0.56171346", "0.56120074", "0.56097853", "0.5609235", "0.56050146", "0.56047034", "0.56016713", "0.56014043", "0.559669", "0.55930215", "0.5582567", "0.5580174", "0.5575286", "0.5573203", "0.5573199", "0.55727905", "0.55682516", "0.5566725", "0.55656886", "0.5553852", "0.55521417", "0.5551367", "0.55511194", "0.55509967", "0.55476844", "0.554751", "0.55429184", "0.55420285", "0.554066", "0.5538024", "0.55378336", "0.55369884", "0.55367815", "0.5535278", "0.5531907", "0.55268604", "0.55267423", "0.55234313", "0.5522413", "0.55204046", "0.55203235", "0.5515559", "0.55113125", "0.55080825", "0.5507675", "0.5506085", "0.55036193", "0.55016613", "0.5501646" ]
0.0
-1
Could use `inherits` module, but don't want to move from single file architecture yet.
function inherits (ctor, superCtor) { ctor.super_ = superCtor; var TempCtor = function () {}; TempCtor.prototype = superCtor.prototype; ctor.prototype = new TempCtor(); ctor.prototype.constructor = ctor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inherit(){}", "function SuperclassBare() {}", "function SuperclassBare() {}", "function inherited() { }", "function inheritsFrom(child, parent){\nchild.prototype = Object.create(parent.prototype);\n}", "function inheritFrom(subfn,superfn) {\n\tvar r = function () {}\n\tr.prototype = superfn.prototype;\n\tsubfn.prototype = new r();\n}", "function Base() {}", "function inherts(child , parent) {\n child.prototype = Object.create(parent.prototype);\n child.prototype.constructor = child;\n}", "function Super () {}", "function Super () {}", "function BaseClass() {}", "function BaseClass() {}", "function inherit(o1, o2){\n\t\to1.prototype = new o2(); //Object.create(o2.prototype);//ie 8 falls over on create\n\t\to1.prototype.constructor = o1;\n\t}", "function Derived() {} // private", "function inherits( obj, name ) {\n return ENV.$Class.Inherits( obj, name );\n }", "function superClass(...args) {}", "__previnit(){}", "function inherit(o){\n if(o === null || (typeof o !== 'object' && typeof o !== 'function')){throw TypeError();}\n if(Object.create) {\n return Object.create(o);\n }else {\n function f(){};\n f.prototype = o;\n return new f();\n }\n}", "function Base() {\n}", "function Child() {}", "function Child() {}", "static inherit(p) {\n if (p == null) throw TypeError('p must be a non-null object'); // p must be a non-null object\n if (Object.create) // If Object.create() is defined...\n return Object.create(p); // then just use it.\n let t = typeof p; // Otherwise do some more type checking\n if (t !== \"object\" && t !== \"function\") throw TypeError('p must be object or function');\n function f() {}; // Define a dummy constructor function.\n f.prototype = p; // Set its prototype property to p.\n return new f(); // Use f() to create an \"heir\" of p.\n }", "function Mixin() {}", "function inherit(sub, base) {\n function Inheriter() { }\n Inheriter.prototype = base.prototype;\n sub.prototype = new Inheriter();\n }", "_init() {\n throw new Error('_init not implemented in child class');\n }", "function inheritsFrom (child, parent) {\n child.prototype = Object.create(parent.prototype);\n //can be used for clone\n}", "function inherits(o) {\n function F() {}\n F.prototype = o;\n return new F();\n}", "function Mixin() {\n\t}", "function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) {\n Object.setPrototypeOf\n ? Object.setPrototypeOf(subClass, superClass)\n : subClass.__proto__ = superClass;\n }\n}", "function inheritsFrom(child, parent) {\n child.prototype = Object.create(parent.prototype);\n}", "function PrototypeBasedClass () {\n}", "function inherit(targ, src) {\n var f = function() {\n if (this.__super__ == f) {\n // add __super__ of parent to front of lookup chain\n // so parent class constructor can call its parent using this.__super__\n this.__super__ = src.prototype.__super__;\n // call parent constructor function. this.__super__ now points to parent-of-parent\n src.apply(this, arguments);\n // remove temp __super__, expose targ.prototype.__super__ again\n delete this.__super__;\n }\n };\n\n f.prototype = src.prototype || src; // added || src to allow inheriting from objects as well as functions\n // Extend targ prototype instead of wiping it out --\n // in case inherit() is called after targ.prototype = {stuff}; statement\n targ.prototype = extend$1(new f(), targ.prototype); //\n targ.prototype.constructor = targ;\n targ.prototype.__super__ = f;\n }", "function inherit(childClass, parentClass) {\r\n childClass.prototype = Object.create(parentClass.prototype);\r\n childClass.prototype.constructor = childClass;\r\n}", "constructor () { super() }", "function peg$subclass(child,parent){function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor}", "function inherit(parent, child) {\n const obj = Object.create(child.prototype)\n child.prototype = Object.assign({}, parent.prototype, obj)\n parent.constructor = child\n}", "function peg$subclass(child,parent){function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor();}", "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "constructor() { super() }", "function derive(newclass, base) {\n function xxx() {}\n xxx.prototype = base.prototype;\n newclass.prototype = new xxx();\n}", "function inherbit( fn1, fn2 ){\n var prototype = Object.create( fn1.prototype );\n prototype.constructor = fn2;\n fn2.prototype = prototype;\n }", "function $inherits(child, parent) {\n if (child.prototype.__proto__) {\n child.prototype.__proto__ = parent.prototype;\n } else {\n function tmp() {};\n tmp.prototype = parent.prototype;\n child.prototype = new tmp();\n child.prototype.constructor = child;\n }\n}", "function _inherits(SubClass, SuperClass) {\n\tif (typeof SuperClass !== \"function\" && SuperClass !== null) {\n\t\tthrow new TypeError(\"Super expression must either be null or a function, not \" + typeof SuperClass);\n\t}\n\tSubClass.prototype = new SuperClass();\n}", "function _inherits(SubClass, SuperClass) {\n\tif (typeof SuperClass !== \"function\" && SuperClass !== null) {\n\t\tthrow new TypeError(\"Super expression must either be null or a function, not \" + typeof SuperClass);\n\t}\n\tSubClass.prototype = new SuperClass();\n}", "function inherit_protoLess(_class, _base, _extends, original) {\n\t\t\t if (_base != null) {\n\t\t\t var tmp = function () { };\n\t\t\t tmp.prototype = _base.prototype;\n\t\t\t _class.prototype = new tmp();\n\t\t\t _class.prototype.constructor = _class;\n\t\t\t }\n\t\t\t if (_extends != null) {\n\t\t\t arr_each(_extends, function (x) {\n\t\t\t delete x.constructor;\n\t\t\t proto_extend(_class, x);\n\t\t\t });\n\t\t\t }\n\t\t\t proto_extend(_class, original);\n\t\t\t}", "function inherits(childConstructor, parentConstructor) {\n\t var F = function() {}\n\t F.prototype = parentConstructor.prototype\n\t childConstructor.prototype = new F()\n\t childConstructor.prototype.constructor = childConstructor\n\t return childConstructor\n\t}", "async browse() {\n throw new Error('This needs to be overwritten in subclass!');\n }", "constructor(){ super('python') }", "constructor(){ super('python') }", "function extend(parent, child){\n child.prototype= Object.create(parent.prototype)\n child.prototype.constructor=child\n }", "function e(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function classicalInher() {\n // Shape - superclass\n function Shape() {\n this.x = 0;\n this.y = 0;\n }\n\n // superclass method\n Shape.prototype.move = (x, y) => {\n this.x += x;\n this.y += y;\n console.info('Shape moved to ' + x + ', ' + y);\n }\n\n // Rectangle - subclass\n function Rectangle() {\n console.log(this);\n Shape.call(this); // call super constructor\n }\n\n // subclass extends superclass\n Rectangle.prototype = Object.create(Shape.prototype);\n Rectangle.prototype.constructor = Rectangle;\n\n var rect = new Rectangle();\n\n console.log('Is rect an instance of Rectangle?',\n rect instanceof Rectangle); // true\n console.log('Is rect an instance of Shape?',\n rect instanceof Shape); // true\n rect.move(1, 1); // Outputs, 'Shape moved.'\n}", "function inherit (base, from) {\n for (var a in from) {\n if (typeof base[a] === 'undefined') {\n base[a] = from[a];\n }\n }\n }", "function Common() {}", "initialize() {\n // Needs to be implemented by derived classes.\n }", "function Base() {\n }", "function uf(e,t){function i(){this.constructor=e}Af(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}", "function inherit(C, P) {\n function F() {};\n F.prototype = P.prototype;\n C.prototype = new F();\n C.uber = P.prototype;\n C.constructor.prototype = C;\n}", "function inherits(childClass, parentClass) {\n function Surrogate () {}\n Surrogate.prototype = parentClass.prototype;\n childClass.prototype = new Surrogate();\n childClass.prototype.constructor = childClass;\n}", "function UHRBase() {\n\n}", "function UHRBase() {\n\n}", "function inherit(p) {\n\n if (p == null)\n throw TypeError(); // p must be a non-null object\n\n if (Object.create)\n return Object.create(p);\n\n var t = typeof p;\n if (t != \"object\" && t != \"function\")\n throw TypeError();\n\n function f() {} // Define a dummy constructor function.\n f.prototype = p;\n return new f();\n}", "function inherit(p) {\r\n\tif (p == null)\r\n\t\tthrow TypeError(); // p must be a non-null object\r\n\tif (Object.create) // If Object.create() is defined...\r\n\t\treturn Object.create(p); // then just use it.\r\n\tvar t = typeof p; // Otherwise do some more type checking\r\n\tif (t !== \"object\" && t !== \"function\")\r\n\t\tthrow TypeError();\r\n\tfunction f() {\r\n\t}\r\n\t; // Define a dummy constructor function.\r\n\tf.prototype = p; // Set its prototype property to p.\r\n\treturn new f(); // Use f() to create an \"heir\" of p.\r\n}", "function inherit(p) {\n\n if (p == null)\n throw TypeError(); // p must be a non-null object\n if (Object.create)\n return Object.create(p);\n\n var t = typeof p;\n if (t != \"object\" && t != \"function\")\n throw TypeError();\n\n function f() {} // Define a dummy constructor function.\n f.prototype = p;\n return new f();\n}", "function inherit(p) {\n if (p == null) throw TypeError();\n if (Object.create) {\n return Object.create(p);\n }\n let t = typeof p;\n if (t!== \"object\" && t !== \"function\") throw TypeError();\n function f() {};\n f.prototype = p;\n return new f();\n}", "function __extends(e,t){function __(){this.constructor=e}ke(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}", "function Common(){}", "constructor () {\n // Run super\n super();\n }", "constructor () {\n // Run super\n super();\n }", "function superclasses(classNames) { }", "function CNodeBase() {\n\n}", "function ParentWithStatic() { }", "function inherit(original) {\n\t\t\t\tfunction Inherited() {}\n\t\t\t\t\n\t\t\t\tInherited.prototype = original;\n\t\t\t\treturn new Inherited();\n\t\t\t}", "function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}", "function __() { this.constructor = subClass; }", "function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}", "function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}", "function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}", "configure () {\n // this can be extended in children classes to avoid using the constructor\n }", "function i(e,t){function i(){}i.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new i,e.prototype.constructor=e}", "function inheritsFrom(obj, allegedParent) {\n if (null === obj) { return false; }\n if (void 0 === obj) { return false; }\n if (typeOf(obj) === 'function') { return false; }\n if (typeOf(allegedParent) !== 'object') { return false; }\n if (null === allegedParent) { return false; }\n function F() {}\n F.prototype = allegedParent;\n return Object(obj) instanceof F;\n }", "function inherit(C, P) {\n\tvar F = function () {};\n\tF.prototype = P.prototype;\n\tC.prototype = new F();\n\tC.uber = P.prototype; // KEEP A REFERENCE LINK TO THE PARENT'S PROTOTYPE DIRECTLY\n}", "function inheritPrototype(A, B) {\n var F = function () {};\n F.prototype = B.prototype;\n A.prototype = new F();\n A.prototype.constructor = A;\n }", "function inheritPrototype(childObject, parentObject) {\n var copyOfParent = Object.create(parentObject.prototype); //ECMA5 compatible\n copyOfParent.constructor = childObject;\n childObject.prototype = copyOfParent;\n}", "function a(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "constructor() {\n   if (this.constructor.name === 'relationshipBrowser')\n   throw new Error('relationshipBrowser is abstract!')\n }", "function ParentConstructor() {\n}", "function CNodeBase() {\r\n\r\n}", "function FooBar() {\n // TODO: implement this module\n}", "function u(e){switch(e){case\"class\":case\"enum\":case\"export\":case\"extends\":case\"import\":case\"super\":return!0;default:return!1}}", "function _classCallCheck(n,e){if(!(n instanceof e))throw new TypeError(\"Cannot call a class as a function\")}", "function _classCallCheck(n,e){if(!(n instanceof e))throw new TypeError(\"Cannot call a class as a function\")}", "constructor() {\n super(...arguments);\n var prototype = Object.getPrototypeOf(this);\n }", "constructor() {\n super(...arguments);\n var prototype = Object.getPrototypeOf(this);\n }", "function BaseElement() {\n }", "function i(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}", "function o(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}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "function _____SHARED_functions_____(){}", "function Subclass(derivedConstructor, baseConstructor)\n{\n protoConstructor.prototype = baseConstructor.prototype;\n protoConstructor.prototype.constructor = baseConstructor;\n function protoConstructor()\n {\n }\n \n derivedConstructor.prototype = new protoConstructor();\n derivedConstructor.prototype.constructor = derivedConstructor;\n}" ]
[ "0.7400138", "0.7260489", "0.7260489", "0.69331414", "0.6617391", "0.6483997", "0.64602226", "0.6353279", "0.6344644", "0.6344644", "0.63239115", "0.63239115", "0.61245894", "0.6122224", "0.6098067", "0.6075326", "0.6070057", "0.606857", "0.6066822", "0.6063841", "0.6063841", "0.60615015", "0.6040635", "0.603046", "0.6021007", "0.6011369", "0.59993523", "0.5991869", "0.5979222", "0.5967176", "0.59616196", "0.5927172", "0.5875021", "0.5861756", "0.5857838", "0.5844531", "0.58322406", "0.58299977", "0.58299977", "0.58299977", "0.58234775", "0.5799641", "0.57965285", "0.577001", "0.57606757", "0.57606757", "0.57544386", "0.5748695", "0.5747268", "0.5744064", "0.5744064", "0.5742478", "0.5741423", "0.57391644", "0.57390386", "0.5728584", "0.57195085", "0.5715365", "0.57056785", "0.5703979", "0.57036656", "0.56992126", "0.56992126", "0.5698508", "0.56936896", "0.5685126", "0.5675204", "0.56662184", "0.56580406", "0.56524426", "0.56524426", "0.56505847", "0.56372994", "0.563577", "0.5634492", "0.5631383", "0.5625273", "0.56155676", "0.56155676", "0.56155676", "0.5612519", "0.5610424", "0.55974793", "0.5597166", "0.559318", "0.55665064", "0.5562273", "0.5560238", "0.5559629", "0.55560935", "0.55524784", "0.5546355", "0.5537568", "0.5537568", "0.5535288", "0.5535288", "0.5534458", "0.5532195", "0.55316436", "0.55291116", "0.5522017" ]
0.0
-1
CooleyTukey algorithm for FFT slightly revisited to rely on looping instead of recursion
function FFTM (x, y) { this.x = x; this.y = y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FFTNayuki(n) {\n \n this.n = n;\n this.levels = -1;\n\n for (var i = 0; i < 32; i++) {\n if (1 << i == n) {\n this.levels = i; // Equal to log2(n)\n }\n }\n if (this.levels == -1) {\n throw \"Length is not a power of 2\";\n }\n\n this.cosTable = new Array(n / 2);\n this.sinTable = new Array(n / 2);\n for (var i = 0; i < n / 2; i++) {\n this.cosTable[i] = Math.cos(2 * Math.PI * i / n);\n this.sinTable[i] = Math.sin(2 * Math.PI * i / n);\n }\n\n /* \n * Computes the discrete Fourier transform (DFT) of the given complex vector, storing the result back into the vector.\n * The vector's length must be equal to the size n that was passed to the object constructor, and this must be a power of 2. Uses the Cooley-Tukey decimation-in-time radix-2 algorithm.\n */\n this.forward = function(real, imag) {\n\n var n = this.n;\n \n // Bit-reversed addressing permutation\n for (var i = 0; i < n; i++) {\n var j = reverseBits(i, this.levels);\n if (j > i) {\n var temp = real[i];\n real[i] = real[j];\n real[j] = temp;\n temp = imag[i];\n imag[i] = imag[j];\n imag[j] = temp;\n }\n }\n \n // Cooley-Tukey decimation-in-time radix-2 FFT\n for (var size = 2; size <= n; size *= 2) {\n var halfsize = size / 2;\n var tablestep = n / size;\n for (var i = 0; i < n; i += size) {\n for (var j = i, k = 0; j < i + halfsize; j++, k += tablestep) {\n var tpre = real[j+halfsize] * this.cosTable[k] +\n imag[j+halfsize] * this.sinTable[k];\n var tpim = -real[j+halfsize] * this.sinTable[k] +\n imag[j+halfsize] * this.cosTable[k];\n real[j + halfsize] = real[j] - tpre;\n imag[j + halfsize] = imag[j] - tpim;\n real[j] += tpre;\n imag[j] += tpim;\n }\n }\n }\n \n // Returns the integer whose value is the reverse of the lowest 'bits' bits of the integer 'x'.\n function reverseBits(x, bits) {\n var y = 0;\n for (var i = 0; i < bits; i++) {\n y = (y << 1) | (x & 1);\n x >>>= 1;\n }\n return y;\n }\n }\n\n /* \n * Computes the inverse discrete Fourier transform (IDFT) of the given complex vector, storing the result back into the vector.\n * The vector's length must be equal to the size n that was passed to the object constructor, and this must be a power of 2. This is a wrapper function. This transform does not perform scaling, so the inverse is not a true inverse.\n */\n this.inverse = function(real, imag) {\n forward(imag, real);\n }\n}", "function realFft(input, output) {\n\n var n = input.length,\n x = output, \n TWO_PI = 2*Math.PI,\n sqrt = Math.sqrt,\n n2, n4, n8, nn, \n t1, t2, t3, t4, \n i1, i2, i3, i4, i5, i6, i7, i8, \n st1, cc1, ss1, cc3, ss3,\n e, \n a,\n rval, ival, mag; \n\n _reverseBinPermute(output, input);\n\n for (var ix = 0, id = 4; ix < n; id *= 4) {\n for (var i0 = ix; i0 < n; i0 += id) {\n //sumdiff(x[i0], x[i0+1]); // {a, b} <--| {a+b, a-b}\n st1 = x[i0] - x[i0+1];\n x[i0] += x[i0+1];\n x[i0+1] = st1;\n } \n ix = 2*(id-1);\n }\n\n n2 = 2;\n nn = n >>> 1;\n\n while((nn = nn >>> 1)) {\n ix = 0;\n n2 = n2 << 1;\n id = n2 << 1;\n n4 = n2 >>> 2;\n n8 = n2 >>> 3;\n do {\n if(n4 !== 1) {\n for(i0 = ix; i0 < n; i0 += id) {\n i1 = i0;\n i2 = i1 + n4;\n i3 = i2 + n4;\n i4 = i3 + n4;\n \n //diffsum3_r(x[i3], x[i4], t1); // {a, b, s} <--| {a, b-a, a+b}\n t1 = x[i3] + x[i4];\n x[i4] -= x[i3];\n //sumdiff3(x[i1], t1, x[i3]); // {a, b, d} <--| {a+b, b, a-b}\n x[i3] = x[i1] - t1; \n x[i1] += t1;\n \n i1 += n8;\n i2 += n8;\n i3 += n8;\n i4 += n8;\n \n //sumdiff(x[i3], x[i4], t1, t2); // {s, d} <--| {a+b, a-b}\n t1 = x[i3] + x[i4];\n t2 = x[i3] - x[i4];\n \n t1 = -t1 * Math.SQRT1_2;\n t2 *= Math.SQRT1_2;\n \n // sumdiff(t1, x[i2], x[i4], x[i3]); // {s, d} <--| {a+b, a-b}\n st1 = x[i2];\n x[i4] = t1 + st1; \n x[i3] = t1 - st1;\n \n //sumdiff3(x[i1], t2, x[i2]); // {a, b, d} <--| {a+b, b, a-b}\n x[i2] = x[i1] - t2;\n x[i1] += t2;\n }\n } else {\n for(i0 = ix; i0 < n; i0 += id) {\n i1 = i0;\n i2 = i1 + n4;\n i3 = i2 + n4;\n i4 = i3 + n4;\n \n //diffsum3_r(x[i3], x[i4], t1); // {a, b, s} <--| {a, b-a, a+b}\n t1 = x[i3] + x[i4]; \n x[i4] -= x[i3];\n \n //sumdiff3(x[i1], t1, x[i3]); // {a, b, d} <--| {a+b, b, a-b}\n x[i3] = x[i1] - t1; \n x[i1] += t1;\n }\n }\n \n ix = (id << 1) - n2;\n id = id << 2;\n } while (ix < n);\n \n e = TWO_PI / n2;\n\n for (var j = 1; j < n8; j++) {\n a = j * e;\n ss1 = Math.sin(a);\n cc1 = Math.cos(a);\n\n //ss3 = sin(3*a); cc3 = cos(3*a);\n cc3 = 4*cc1*(cc1*cc1-0.75);\n ss3 = 4*ss1*(0.75-ss1*ss1);\n \n ix = 0; id = n2 << 1;\n do {\n for (i0 = ix; i0 < n; i0 += id) {\n i1 = i0 + j;\n i2 = i1 + n4;\n i3 = i2 + n4;\n i4 = i3 + n4;\n \n i5 = i0 + n4 - j;\n i6 = i5 + n4;\n i7 = i6 + n4;\n i8 = i7 + n4;\n \n //cmult(c, s, x, y, &u, &v)\n //cmult(cc1, ss1, x[i7], x[i3], t2, t1); // {u,v} <--| {x*c-y*s, x*s+y*c}\n t2 = x[i7]*cc1 - x[i3]*ss1; \n t1 = x[i7]*ss1 + x[i3]*cc1;\n \n //cmult(cc3, ss3, x[i8], x[i4], t4, t3);\n t4 = x[i8]*cc3 - x[i4]*ss3; \n t3 = x[i8]*ss3 + x[i4]*cc3;\n \n //sumdiff(t2, t4); // {a, b} <--| {a+b, a-b}\n st1 = t2 - t4;\n t2 += t4;\n t4 = st1;\n \n //sumdiff(t2, x[i6], x[i8], x[i3]); // {s, d} <--| {a+b, a-b}\n //st1 = x[i6]; x[i8] = t2 + st1; x[i3] = t2 - st1;\n x[i8] = t2 + x[i6]; \n x[i3] = t2 - x[i6];\n \n //sumdiff_r(t1, t3); // {a, b} <--| {a+b, b-a}\n st1 = t3 - t1;\n t1 += t3;\n t3 = st1;\n \n //sumdiff(t3, x[i2], x[i4], x[i7]); // {s, d} <--| {a+b, a-b}\n //st1 = x[i2]; x[i4] = t3 + st1; x[i7] = t3 - st1;\n x[i4] = t3 + x[i2]; \n x[i7] = t3 - x[i2];\n \n //sumdiff3(x[i1], t1, x[i6]); // {a, b, d} <--| {a+b, b, a-b}\n x[i6] = x[i1] - t1; \n x[i1] += t1;\n \n //diffsum3_r(t4, x[i5], x[i2]); // {a, b, s} <--| {a, b-a, a+b}\n x[i2] = t4 + x[i5]; \n x[i5] -= t4;\n }\n \n ix = (id << 1) - n2;\n id = id << 2;\n \n } while (ix < n);\n }\n }\n \n /* Scale output to have same norm as input. */\n var f = 1 / sqrt(n);\n for (var i = 0; i < n; i++)\n\t x[i] *= f;\n\n}", "function FFT$1(){var _n=0,// order\n_bitrev=null,// bit reversal table\n_cstb=null;// sin/cos table\nvar _tre,_tim;this.init=function(n){if(n!==0&&(n&n-1)===0){_n=n;_setVariables();_makeBitReversal();_makeCosSinTable();}else{throw new Error('init: radix-2 required');}};// 1D-FFT\nthis.fft1d=function(re,im){fft(re,im,1);};// 1D-IFFT\nthis.ifft1d=function(re,im){var n=1/_n;fft(re,im,-1);for(var i=0;i<_n;i++){re[i]*=n;im[i]*=n;}};// 2D-FFT\nthis.fft2d=function(re,im){var i=0;// x-axis\nfor(var y=0;y<_n;y++){i=y*_n;for(var x1=0;x1<_n;x1++){_tre[x1]=re[x1+i];_tim[x1]=im[x1+i];}this.fft1d(_tre,_tim);for(var x2=0;x2<_n;x2++){re[x2+i]=_tre[x2];im[x2+i]=_tim[x2];}}// y-axis\nfor(var x=0;x<_n;x++){for(var y1=0;y1<_n;y1++){i=x+y1*_n;_tre[y1]=re[i];_tim[y1]=im[i];}this.fft1d(_tre,_tim);for(var y2=0;y2<_n;y2++){i=x+y2*_n;re[i]=_tre[y2];im[i]=_tim[y2];}}};// 2D-IFFT\nthis.ifft2d=function(re,im){var i=0;// x-axis\nfor(var y=0;y<_n;y++){i=y*_n;for(var x1=0;x1<_n;x1++){_tre[x1]=re[x1+i];_tim[x1]=im[x1+i];}this.ifft1d(_tre,_tim);for(var x2=0;x2<_n;x2++){re[x2+i]=_tre[x2];im[x2+i]=_tim[x2];}}// y-axis\nfor(var x=0;x<_n;x++){for(var y1=0;y1<_n;y1++){i=x+y1*_n;_tre[y1]=re[i];_tim[y1]=im[i];}this.ifft1d(_tre,_tim);for(var y2=0;y2<_n;y2++){i=x+y2*_n;re[i]=_tre[y2];im[i]=_tim[y2];}}};// 2D-IFFT, real-valued\n// only outputs the real valued part\nthis.real_ifft2d=function(re,im){var i2;var i=0;// x-axis\nfor(var y=0;y<_n;y++){i=y*_n;for(var x1=0;x1<_n;x1++){_tre[x1]=re[x1+i];_tim[x1]=im[x1+i];}this.ifft1d(_tre,_tim);for(var x2=0;x2<_n;x2++){re[x2+i]=_tre[x2];im[x2+i]=_tim[x2];}}// y-axis\nvar halfn=_n/2;var rowIdx=0;for(var x=0;x<_n;x+=2){//untangle\ni=x;i2=x+1;_tre[0]=re[0+i];_tim[0]=re[0+i2];_tre[_n/2]=re[halfn*_n+i];_tim[_n/2]=re[halfn*_n+i2];for(var x2=1;x2<halfn;x2++){rowIdx=x2*_n;_tre[x2]=re[rowIdx+i]-im[rowIdx+i2];_tre[_n-x2]=re[rowIdx+i]+im[rowIdx+i2];_tim[x2]=im[rowIdx+i]+re[rowIdx+i2];_tim[_n-x2]=re[rowIdx+i2]-im[rowIdx+i];}this.ifft1d(_tre,_tim);for(var y2=0;y2<_n;y2++){i=x+y2*_n;i2=x+1+y2*_n;re[i]=_tre[y2];re[i2]=_tim[y2];}}};// 2D-FFT, real-valued only\n// ignores the imaginary input\n// see:\n// http://www.inf.fu-berlin.de/lehre/SS12/SP-Par/download/fft1.pdf\n// http://cnx.org/content/m12021/latest/\n// http://images.apple.com/acg/pdf/g4fft.pdf\n// http://www.ti.com/lit/an/spra291/spra291.pdf\nthis.real_fft2d=function(re,im){var i=0,i2=0;// x-axis\nfor(var y=0;y<_n;y+=2){i=y*_n;i2=(y+1)*_n;// tangle\nfor(var x1=0;x1<_n;x1++){_tre[x1]=re[x1+i];_tim[x1]=re[x1+i2];}this.fft1d(_tre,_tim);// untangle\nre[0+i]=_tre[0];re[0+i2]=_tim[0];im[0+i]=0;im[0+i2]=0;re[_n/2+i]=_tre[_n/2];re[_n/2+i2]=_tim[_n/2];im[_n/2+i]=0;im[_n/2+i2]=0;for(var x2=1;x2<_n/2;x2++){re[x2+i]=0.5*(_tre[x2]+_tre[_n-x2]);im[x2+i]=0.5*(_tim[x2]-_tim[_n-x2]);re[x2+i2]=0.5*(_tim[x2]+_tim[_n-x2]);im[x2+i2]=-0.5*(_tre[x2]-_tre[_n-x2]);re[_n-x2+i]=re[x2+i];im[_n-x2+i]=-im[x2+i];re[_n-x2+i2]=re[x2+i2];im[_n-x2+i2]=-im[x2+i2];}}// y-axis\nfor(var x=0;x<_n;x++){for(var y1=0;y1<_n;y1++){i=x+y1*_n;_tre[y1]=re[i];_tim[y1]=im[i];}this.fft1d(_tre,_tim);for(var y2=0;y2<_n;y2++){i=x+y2*_n;re[i]=_tre[y2];im[i]=_tim[y2];}}};// core operation of FFT\nfunction fft(re,im,inv){var d,h,ik,m,tmp,wr,wi,xr,xi,n4=_n>>2;// bit reversal\nfor(var l=0;l<_n;l++){m=_bitrev[l];if(l<m){tmp=re[l];re[l]=re[m];re[m]=tmp;tmp=im[l];im[l]=im[m];im[m]=tmp;}}// butterfly operation\n//butfly(re,im,inv,n4);\nfor(var k=1;k<_n;k<<=1){h=0;d=_n/(k<<1);for(var j=0;j<k;j++){wr=_cstb[h+n4];wi=inv*_cstb[h];for(var i=j;i<_n;i+=k<<1){ik=i+k;xr=wr*re[ik]+wi*im[ik];xi=wr*im[ik]-wi*re[ik];re[ik]=re[i]-xr;re[i]+=xr;im[ik]=im[i]-xi;im[i]+=xi;}h+=d;}}}function _setVariables(){if(typeof Uint8Array!=='undefined'){_bitrev=new Uint8Array(_n);}else{_bitrev=new Array(_n);}if(typeof Float64Array!=='undefined'){_cstb=new Float64Array(_n*1.25);_tre=new Float64Array(_n);_tim=new Float64Array(_n);}else{_cstb=new Array(_n*1.25);_tre=new Array(_n);_tim=new Array(_n);}}// make bit reversal table\nfunction _makeBitReversal(){var i=0,j=0,k=0;_bitrev[0]=0;while(++i<_n){k=_n>>1;while(k<=j){j-=k;k>>=1;}j+=k;_bitrev[i]=j;}}// make trigonometric function table\nfunction _makeCosSinTable(){var n2=_n>>1,n4=_n>>2,n8=_n>>3,n2p4=n2+n4,t=Math.sin(Math.PI/_n),dc=2*t*t,ds=Math.sqrt(dc*(2-dc)),c=_cstb[n4]=1,s=_cstb[0]=0;t=2*dc;for(var i=1;i<n8;i++){c-=dc;dc+=t*c;s+=ds;ds-=t*s;_cstb[i]=s;_cstb[n4-i]=c;}if(n8!==0){_cstb[n8]=Math.sqrt(0.5);}for(var j=0;j<n4;j++){_cstb[n2-j]=_cstb[j];}for(var k=0;k<n2p4;k++){_cstb[k+n2]=-_cstb[k];}}}", "function FFT(){var _n=0,// order\n_bitrev=null,// bit reversal table\n_cstb=null;// sin/cos table\nvar _tre,_tim;this.init=function(n){if(n!==0&&(n&n-1)===0){_n=n;_setVariables();_makeBitReversal();_makeCosSinTable();}else{throw new Error(\"init: radix-2 required\");}};// 1D-FFT\nthis.fft1d=function(re,im){fft(re,im,1);};// 1D-IFFT\nthis.ifft1d=function(re,im){var n=1/_n;fft(re,im,-1);for(var i=0;i<_n;i++){re[i]*=n;im[i]*=n;}};// 2D-FFT\nthis.fft2d=function(re,im){var i=0;// x-axis\nfor(var y=0;y<_n;y++){i=y*_n;for(var x1=0;x1<_n;x1++){_tre[x1]=re[x1+i];_tim[x1]=im[x1+i];}this.fft1d(_tre,_tim);for(var x2=0;x2<_n;x2++){re[x2+i]=_tre[x2];im[x2+i]=_tim[x2];}}// y-axis\nfor(var x=0;x<_n;x++){for(var y1=0;y1<_n;y1++){i=x+y1*_n;_tre[y1]=re[i];_tim[y1]=im[i];}this.fft1d(_tre,_tim);for(var y2=0;y2<_n;y2++){i=x+y2*_n;re[i]=_tre[y2];im[i]=_tim[y2];}}};// 2D-IFFT\nthis.ifft2d=function(re,im){var i=0;// x-axis\nfor(var y=0;y<_n;y++){i=y*_n;for(var x1=0;x1<_n;x1++){_tre[x1]=re[x1+i];_tim[x1]=im[x1+i];}this.ifft1d(_tre,_tim);for(var x2=0;x2<_n;x2++){re[x2+i]=_tre[x2];im[x2+i]=_tim[x2];}}// y-axis\nfor(var x=0;x<_n;x++){for(var y1=0;y1<_n;y1++){i=x+y1*_n;_tre[y1]=re[i];_tim[y1]=im[i];}this.ifft1d(_tre,_tim);for(var y2=0;y2<_n;y2++){i=x+y2*_n;re[i]=_tre[y2];im[i]=_tim[y2];}}};// core operation of FFT\nfunction fft(re,im,inv){var d,h,ik,m,tmp,wr,wi,xr,xi,n4=_n>>2;// bit reversal\nfor(var l=0;l<_n;l++){m=_bitrev[l];if(l<m){tmp=re[l];re[l]=re[m];re[m]=tmp;tmp=im[l];im[l]=im[m];im[m]=tmp;}}// butterfly operation\nfor(var k=1;k<_n;k<<=1){h=0;d=_n/(k<<1);for(var j=0;j<k;j++){wr=_cstb[h+n4];wi=inv*_cstb[h];for(var i=j;i<_n;i+=k<<1){ik=i+k;xr=wr*re[ik]+wi*im[ik];xi=wr*im[ik]-wi*re[ik];re[ik]=re[i]-xr;re[i]+=xr;im[ik]=im[i]-xi;im[i]+=xi;}h+=d;}}}// set variables\nfunction _setVariables(){if(typeof Uint8Array!=='undefined'){_bitrev=new Uint8Array(_n);}else{_bitrev=new Array(_n);}if(typeof Float64Array!=='undefined'){_cstb=new Float64Array(_n*1.25);_tre=new Float64Array(_n*_n);_tim=new Float64Array(_n*_n);}else{_cstb=new Array(_n*1.25);_tre=new Array(_n*_n);_tim=new Array(_n*_n);}}// make bit reversal table\nfunction _makeBitReversal(){var i=0,j=0,k=0;_bitrev[0]=0;while(++i<_n){k=_n>>1;while(k<=j){j-=k;k>>=1;}j+=k;_bitrev[i]=j;}}// make trigonometric function table\nfunction _makeCosSinTable(){var n2=_n>>1,n4=_n>>2,n8=_n>>3,n2p4=n2+n4,t=Math.sin(Math.PI/_n),dc=2*t*t,ds=Math.sqrt(dc*(2-dc)),c=_cstb[n4]=1,s=_cstb[0]=0;t=2*dc;for(var i=1;i<n8;i++){c-=dc;dc+=t*c;s+=ds;ds-=t*s;_cstb[i]=s;_cstb[n4-i]=c;}if(n8!==0){_cstb[n8]=Math.sqrt(0.5);}for(var j=0;j<n4;j++){_cstb[n2-j]=_cstb[j];}for(var k=0;k<n2p4;k++){_cstb[k+n2]=-_cstb[k];}}}", "function fft(re,im,inv){var d,h,ik,m,tmp,wr,wi,xr,xi,n4=_n>>2;// bit reversal\nfor(var l=0;l<_n;l++){m=_bitrev[l];if(l<m){tmp=re[l];re[l]=re[m];re[m]=tmp;tmp=im[l];im[l]=im[m];im[m]=tmp;}}// butterfly operation\nfor(var k=1;k<_n;k<<=1){h=0;d=_n/(k<<1);for(var j=0;j<k;j++){wr=_cstb[h+n4];wi=inv*_cstb[h];for(var i=j;i<_n;i+=k<<1){ik=i+k;xr=wr*re[ik]+wi*im[ik];xi=wr*im[ik]-wi*re[ik];re[ik]=re[i]-xr;re[i]+=xr;im[ik]=im[i]-xi;im[i]+=xi;}h+=d;}}}// set variables", "function ACFFT( NumSamples,\n InverseTransform,\n RealIn, ImagIn, RealOut, ImagOut)\n{\n var NumBits; /* Number of bits needed to store indices */\n var i, j, k, n;\n var BlockSize, BlockEnd;\n\n var angle_numerator = 2.0 * Math.PI;\n var tr, ti; /* temp real, temp imaginary */\n\n if (!IsPowerOfTwo(NumSamples)) {\n console.log(NumSamples + \" is not a power of two\");\n return 1;\n }\n\n if (!gFFTBitTable)\n ACInitFFT();\n\n if (!InverseTransform)\n angle_numerator = -angle_numerator;\n\n NumBits = NumberOfBitsNeeded(NumSamples);\n\n /*\n ** Do simultaneous data copy and bit-reversal ordering into outputs...\n */\n\n for (var i = 0; i < NumSamples; i++) {\n j = FastReverseBits(i, NumBits);\n RealOut[j] = RealIn[i];\n ImagOut[j] = (ImagIn === undefined) ? 0.0 : ImagIn[i];\n }\n\n /*\n ** Do the FFT itself...\n */\n\n BlockEnd = 1;\n for (BlockSize = 2; BlockSize <= NumSamples; BlockSize <<= 1) {\n\n var delta_angle = angle_numerator / BlockSize;\n\n var sm2 = Math.sin(-2 * delta_angle);\n var sm1 = Math.sin(-delta_angle);\n var cm2 = Math.cos(-2 * delta_angle);\n var cm1 = Math.cos(-delta_angle);\n var w = 2 * cm1;\n var ar0, ar1, ar2, ai0, ai1, ai2;\n\n for (var i = 0; i < NumSamples; i += BlockSize) {\n ar2 = cm2;\n ar1 = cm1;\n\n ai2 = sm2;\n ai1 = sm1;\n\n for (var j = i, n = 0; n < BlockEnd; j++, n++) {\n ar0 = w * ar1 - ar2;\n ar2 = ar1;\n ar1 = ar0;\n\n ai0 = w * ai1 - ai2;\n ai2 = ai1;\n ai1 = ai0;\n\n k = j + BlockEnd;\n tr = ar0 * RealOut[k] - ai0 * ImagOut[k];\n ti = ar0 * ImagOut[k] + ai0 * RealOut[k];\n\n RealOut[k] = RealOut[j] - tr;\n ImagOut[k] = ImagOut[j] - ti;\n\n RealOut[j] += tr;\n ImagOut[j] += ti;\n }\n }\n\n BlockEnd = BlockSize;\n }\n\n /*\n ** Need to normalize if inverse transform...\n */\n\n if (InverseTransform) {\n var denom = NumSamples;\n\n for (var i = 0; i < NumSamples; i++) {\n RealOut[i] /= denom;\n ImagOut[i] /= denom;\n }\n }\n}", "function RealFFT( NumSamples, RealIn, RealOut, ImagOut)\n{\n\n var Half = NumSamples / 2;\n var i;\n\n var theta = Math.PI / Half;\n\n var tmpReal = new Float32Array(Half);\n var tmpImag = new Float32Array(Half);\n\n for (var i = 0; i < Half; i++) {\n tmpReal[i] = RealIn[2 * i];\n tmpImag[i] = RealIn[2 * i + 1];\n }\n\n ACFFT(Half, 0, tmpReal, tmpImag, RealOut, ImagOut);\n\n var wtemp = (Math.sin(0.5 * theta));\n\n var wpr = -2.0 * wtemp * wtemp;\n var wpi = -1.0 * (Math.sin(theta));\n var wr = 1.0 + wpr;\n var wi = wpi;\n\n var i3;\n\n var h1r, h1i, h2r, h2i;\n\n for (var i = 1; i < Half / 2; i++) {\n\n i3 = Half - i;\n\n h1r = 0.5 * (RealOut[i] + RealOut[i3]);\n h1i = 0.5 * (ImagOut[i] - ImagOut[i3]);\n h2r = 0.5 * (ImagOut[i] + ImagOut[i3]);\n h2i = -0.5 * (RealOut[i] - RealOut[i3]);\n\n RealOut[i] = h1r + wr * h2r - wi * h2i;\n ImagOut[i] = h1i + wr * h2i + wi * h2r;\n RealOut[i3] = h1r - wr * h2r + wi * h2i;\n ImagOut[i3] = -h1i + wr * h2i + wi * h2r;\n\n wr = (wtemp = wr) * wpr - wi * wpi + wr;\n wi = wi * wpr + wtemp * wpi + wi;\n }\n\n RealOut[0] = (h1r = RealOut[0]) + ImagOut[0];\n ImagOut[0] = h1r - ImagOut[0];\n}", "function fft(re,im,inv){var d,h,ik,m,tmp,wr,wi,xr,xi,n4=_n>>2;// bit reversal\nfor(var l=0;l<_n;l++){m=_bitrev[l];if(l<m){tmp=re[l];re[l]=re[m];re[m]=tmp;tmp=im[l];im[l]=im[m];im[m]=tmp;}}// butterfly operation\n//butfly(re,im,inv,n4);\nfor(var k=1;k<_n;k<<=1){h=0;d=_n/(k<<1);for(var j=0;j<k;j++){wr=_cstb[h+n4];wi=inv*_cstb[h];for(var i=j;i<_n;i+=k<<1){ik=i+k;xr=wr*re[ik]+wi*im[ik];xi=wr*im[ik]-wi*re[ik];re[ik]=re[i]-xr;re[i]+=xr;im[ik]=im[i]-xi;im[i]+=xi;}h+=d;}}}", "function fftRadix2(dir, nrows, ncols, buffer, x_ptr, y_ptr) {\n dir |= 0\n nrows |= 0\n ncols |= 0\n x_ptr |= 0\n y_ptr |= 0\n var nn,m,i,i1,j,k,i2,l,l1,l2\n var c1,c2,t,t1,t2,u1,u2,z,row,a,b,c,d,k1,k2,k3\n \n // Calculate the number of points\n nn = ncols\n m = bits.log2(nn)\n \n for(row=0; row<nrows; ++row) { \n // Do the bit reversal\n i2 = nn >> 1;\n j = 0;\n for(i=0;i<nn-1;i++) {\n if(i < j) {\n t = buffer[x_ptr+i]\n buffer[x_ptr+i] = buffer[x_ptr+j]\n buffer[x_ptr+j] = t\n t = buffer[y_ptr+i]\n buffer[y_ptr+i] = buffer[y_ptr+j]\n buffer[y_ptr+j] = t\n }\n k = i2\n while(k <= j) {\n j -= k\n k >>= 1\n }\n j += k\n }\n \n // Compute the FFT\n c1 = -1.0\n c2 = 0.0\n l2 = 1\n for(l=0;l<m;l++) {\n l1 = l2\n l2 <<= 1\n u1 = 1.0\n u2 = 0.0\n for(j=0;j<l1;j++) {\n for(i=j;i<nn;i+=l2) {\n i1 = i + l1\n a = buffer[x_ptr+i1]\n b = buffer[y_ptr+i1]\n c = buffer[x_ptr+i]\n d = buffer[y_ptr+i]\n k1 = u1 * (a + b)\n k2 = a * (u2 - u1)\n k3 = b * (u1 + u2)\n t1 = k1 - k3\n t2 = k1 + k2\n buffer[x_ptr+i1] = c - t1\n buffer[y_ptr+i1] = d - t2\n buffer[x_ptr+i] += t1\n buffer[y_ptr+i] += t2\n }\n k1 = c1 * (u1 + u2)\n k2 = u1 * (c2 - c1)\n k3 = u2 * (c1 + c2)\n u1 = k1 - k3\n u2 = k1 + k2\n }\n c2 = Math.sqrt((1.0 - c1) / 2.0)\n if(dir < 0) {\n c2 = -c2\n }\n c1 = Math.sqrt((1.0 + c1) / 2.0)\n }\n \n // Scaling for inverse transform\n if(dir < 0) {\n var scale_f = 1.0 / nn\n for(i=0;i<nn;i++) {\n buffer[x_ptr+i] *= scale_f\n buffer[y_ptr+i] *= scale_f\n }\n }\n \n // Advance pointers\n x_ptr += ncols\n y_ptr += ncols\n }\n}", "function processingVideoGenKompFFTOneHz() {\n\tvar TPquant = parseFloat(document.getElementById(\"In1\").value);\n\tvar HPquant = parseFloat(document.getElementById(\"In2\").value);\n\tvar splitFreq = parseFloat(document.getElementById(\"In3\").value);\n\tvar Round =0;\n\tsetFreqQuantMatrix(QuantMatrix,TPquant,HPquant,splitFreq);\n\t// Process chain begin ---// Loop through the pixels, turning them in-RGB-Out\n\t\tGRAYtoRGB(imgArrayIn2, oneHz); \t\n \tsetFFT(swepFFT,imgArrayIn2);\n\t\tFFT1.spec=swepFFT.spec.slice(0,swepFFT.spec.length);\n\t\tswapFFTfor(swepFFT)\n\t\tsetQuantFFT(quantFFT,swepFFT,QuantMatrix,Round);\n\t\t\n\t\tsetInvQuantFFT(iswepFFT,quantFFT,QuantMatrix);\n\t\tiquantFFT.spec=iswepFFT.spec.slice(0,iswepFFT.spec.length);\n\t\tswapFFTback(iswepFFT)\t\t\t\t\n\t\tsetIFFT(imgArrayOut, iswepFFT);\t\n\t\tRGBtoGRAY(iFFTspec,imgArrayOut); \n\t\t\n\t// Process chain end ------------------------------------\n\twriteCanvas(iImageOut);\n\t\t\n\tanalyseError(ErrorLog,iFFTspec, oneHz,255) \n\tLogArray = [\"imgArrayIn2\",\"oneHz\",\"FFT1.spec\",\"swepFFT.spec\",\"QuantMatrix\", \"quantFFT.spec\",\"iquantFFT.spec\",\"iswepFFT.spec\",\"iFFTspec\",\"imgArrayOut\",\"ErrorLog\"];\n}", "forward(buffer) {\n var n = this.bufferSize,\n spectrum = this.spectrum,\n x = this.trans,\n TWO_PI = 2 * Math.PI,\n sqrt = Math.sqrt,\n i = n >>> 1,\n bSi = 2 / n,\n n2, n4, n8, nn,\n t1, t2, t3, t4,\n i1, i2, i3, i4, i5, i6, i7, i8,\n st1, cc1, ss1, cc3, ss3,\n e,\n a,\n rval, ival, mag;\n\n this.reverseBinPermute(x, buffer);\n\n for (var ix = 0, id = 4; ix < n; id *= 4) {\n for (var i0 = ix; i0 < n; i0 += id) {\n //sumdiff(x[i0], x[i0+1]); // {a, b} <--| {a+b, a-b}\n st1 = x[i0] - x[i0 + 1];\n x[i0] += x[i0 + 1];\n x[i0 + 1] = st1;\n }\n ix = 2 * (id - 1);\n }\n\n n2 = 2;\n nn = n >>> 1;\n\n while ((nn = nn >>> 1)) {\n ix = 0;\n n2 = n2 << 1;\n id = n2 << 1;\n n4 = n2 >>> 2;\n n8 = n2 >>> 3;\n do {\n if (n4 !== 1) {\n for (i0 = ix; i0 < n; i0 += id) {\n i1 = i0;\n i2 = i1 + n4;\n i3 = i2 + n4;\n i4 = i3 + n4;\n\n //diffsum3_r(x[i3], x[i4], t1); // {a, b, s} <--| {a, b-a, a+b}\n t1 = x[i3] + x[i4];\n x[i4] -= x[i3];\n //sumdiff3(x[i1], t1, x[i3]); // {a, b, d} <--| {a+b, b, a-b}\n x[i3] = x[i1] - t1;\n x[i1] += t1;\n\n i1 += n8;\n i2 += n8;\n i3 += n8;\n i4 += n8;\n\n //sumdiff(x[i3], x[i4], t1, t2); // {s, d} <--| {a+b, a-b}\n t1 = x[i3] + x[i4];\n t2 = x[i3] - x[i4];\n\n t1 = -t1 * Math.SQRT1_2;\n t2 *= Math.SQRT1_2;\n\n // sumdiff(t1, x[i2], x[i4], x[i3]); // {s, d} <--| {a+b, a-b}\n st1 = x[i2];\n x[i4] = t1 + st1;\n x[i3] = t1 - st1;\n\n //sumdiff3(x[i1], t2, x[i2]); // {a, b, d} <--| {a+b, b, a-b}\n x[i2] = x[i1] - t2;\n x[i1] += t2;\n }\n } else {\n for (i0 = ix; i0 < n; i0 += id) {\n i1 = i0;\n i2 = i1 + n4;\n i3 = i2 + n4;\n i4 = i3 + n4;\n\n //diffsum3_r(x[i3], x[i4], t1); // {a, b, s} <--| {a, b-a, a+b}\n t1 = x[i3] + x[i4];\n x[i4] -= x[i3];\n\n //sumdiff3(x[i1], t1, x[i3]); // {a, b, d} <--| {a+b, b, a-b}\n x[i3] = x[i1] - t1;\n x[i1] += t1;\n }\n }\n\n ix = (id << 1) - n2;\n id = id << 2;\n } while (ix < n);\n\n e = TWO_PI / n2;\n\n for (var j = 1; j < n8; j++) {\n a = j * e;\n ss1 = Math.sin(a);\n cc1 = Math.cos(a);\n\n //ss3 = sin(3*a); cc3 = cos(3*a);\n cc3 = 4 * cc1 * (cc1 * cc1 - 0.75);\n ss3 = 4 * ss1 * (0.75 - ss1 * ss1);\n\n ix = 0; id = n2 << 1;\n do {\n for (i0 = ix; i0 < n; i0 += id) {\n i1 = i0 + j;\n i2 = i1 + n4;\n i3 = i2 + n4;\n i4 = i3 + n4;\n\n i5 = i0 + n4 - j;\n i6 = i5 + n4;\n i7 = i6 + n4;\n i8 = i7 + n4;\n\n //cmult(c, s, x, y, &u, &v)\n //cmult(cc1, ss1, x[i7], x[i3], t2, t1); // {u,v} <--| {x*c-y*s, x*s+y*c}\n t2 = x[i7] * cc1 - x[i3] * ss1;\n t1 = x[i7] * ss1 + x[i3] * cc1;\n\n //cmult(cc3, ss3, x[i8], x[i4], t4, t3);\n t4 = x[i8] * cc3 - x[i4] * ss3;\n t3 = x[i8] * ss3 + x[i4] * cc3;\n\n //sumdiff(t2, t4); // {a, b} <--| {a+b, a-b}\n st1 = t2 - t4;\n t2 += t4;\n t4 = st1;\n\n //sumdiff(t2, x[i6], x[i8], x[i3]); // {s, d} <--| {a+b, a-b}\n //st1 = x[i6]; x[i8] = t2 + st1; x[i3] = t2 - st1;\n x[i8] = t2 + x[i6];\n x[i3] = t2 - x[i6];\n\n //sumdiff_r(t1, t3); // {a, b} <--| {a+b, b-a}\n st1 = t3 - t1;\n t1 += t3;\n t3 = st1;\n\n //sumdiff(t3, x[i2], x[i4], x[i7]); // {s, d} <--| {a+b, a-b}\n //st1 = x[i2]; x[i4] = t3 + st1; x[i7] = t3 - st1;\n x[i4] = t3 + x[i2];\n x[i7] = t3 - x[i2];\n\n //sumdiff3(x[i1], t1, x[i6]); // {a, b, d} <--| {a+b, b, a-b}\n x[i6] = x[i1] - t1;\n x[i1] += t1;\n\n //diffsum3_r(t4, x[i5], x[i2]); // {a, b, s} <--| {a, b-a, a+b}\n x[i2] = t4 + x[i5];\n x[i5] -= t4;\n }\n\n ix = (id << 1) - n2;\n id = id << 2;\n\n } while (ix < n);\n }\n }\n\n while (--i) {\n rval = x[i];\n ival = x[n - i - 1];\n mag = bSi * sqrt(rval * rval + ival * ival);\n\n if (mag > this.peak) {\n this.peakBand = i;\n this.peak = mag;\n }\n\n spectrum[i] = mag;\n }\n\n spectrum[0] = bSi * x[0];\n\n return spectrum;\n }", "function fftBluestein(dir, nrows, ncols, buffer, x_ptr, y_ptr, scratch_ptr) {\n dir |= 0\n nrows |= 0\n ncols |= 0\n x_ptr |= 0\n y_ptr |= 0\n scratch_ptr |= 0\n\n // Initialize tables\n var m = bits.nextPow2(2 * ncols + 1)\n , cos_ptr = scratch_ptr\n , sin_ptr = cos_ptr + ncols\n , xs_ptr = sin_ptr + ncols\n , ys_ptr = xs_ptr + m\n , cft_ptr = ys_ptr + m\n , sft_ptr = cft_ptr + m\n , w = -dir * Math.PI / ncols\n , row, a, b, c, d, k1, k2, k3\n , i\n for(i=0; i<ncols; ++i) {\n a = w * ((i * i) % (ncols * 2))\n c = Math.cos(a)\n d = Math.sin(a)\n buffer[cft_ptr+(m-i)] = buffer[cft_ptr+i] = buffer[cos_ptr+i] = c\n buffer[sft_ptr+(m-i)] = buffer[sft_ptr+i] = buffer[sin_ptr+i] = d\n }\n for(i=ncols; i<=m-ncols; ++i) {\n buffer[cft_ptr+i] = 0.0\n }\n for(i=ncols; i<=m-ncols; ++i) {\n buffer[sft_ptr+i] = 0.0\n }\n\n fftRadix2(1, 1, m, buffer, cft_ptr, sft_ptr)\n \n //Compute scale factor\n if(dir < 0) {\n w = 1.0 / ncols\n } else {\n w = 1.0\n }\n \n //Handle direction\n for(row=0; row<nrows; ++row) {\n \n // Copy row into scratch memory, multiply weights\n for(i=0; i<ncols; ++i) {\n a = buffer[x_ptr+i]\n b = buffer[y_ptr+i]\n c = buffer[cos_ptr+i]\n d = -buffer[sin_ptr+i]\n k1 = c * (a + b)\n k2 = a * (d - c)\n k3 = b * (c + d)\n buffer[xs_ptr+i] = k1 - k3\n buffer[ys_ptr+i] = k1 + k2\n }\n //Zero out the rest\n for(i=ncols; i<m; ++i) {\n buffer[xs_ptr+i] = 0.0\n }\n for(i=ncols; i<m; ++i) {\n buffer[ys_ptr+i] = 0.0\n }\n \n // FFT buffer\n fftRadix2(1, 1, m, buffer, xs_ptr, ys_ptr)\n \n // Apply multiplier\n for(i=0; i<m; ++i) {\n a = buffer[xs_ptr+i]\n b = buffer[ys_ptr+i]\n c = buffer[cft_ptr+i]\n d = buffer[sft_ptr+i]\n k1 = c * (a + b)\n k2 = a * (d - c)\n k3 = b * (c + d)\n buffer[xs_ptr+i] = k1 - k3\n buffer[ys_ptr+i] = k1 + k2\n }\n \n // Inverse FFT buffer\n fftRadix2(-1, 1, m, buffer, xs_ptr, ys_ptr)\n \n // Copy result back into x/y\n for(i=0; i<ncols; ++i) {\n a = buffer[xs_ptr+i]\n b = buffer[ys_ptr+i]\n c = buffer[cos_ptr+i]\n d = -buffer[sin_ptr+i]\n k1 = c * (a + b)\n k2 = a * (d - c)\n k3 = b * (c + d)\n buffer[x_ptr+i] = w * (k1 - k3)\n buffer[y_ptr+i] = w * (k1 + k2)\n }\n \n x_ptr += ncols\n y_ptr += ncols\n }\n}", "function updateFFT() {\n if (analyser == null) return;\n updateAudio(); \n analizerdata = analyser.getFrequencyData();\n for (var p = 0; p < fftSize-fftsizeCute; p++) {\n particles[p].position.y = (bgstartPos.y - 6) +\n (analizerdata[p] / 25)\n\n particlesBase[p].position.y =\n particles[p].position.y - 7.5;\n }\n var freq = analyser.getAverageFrequency();\n var newbloom = (freq / 300);\n if (newbloom > maxBLOOM) newbloom = maxBLOOM;\n //POST.CHANGEBLOON(newbloom);\n LASTBLOON = window.POST.CHANGEBLOON(newbloom);\n ckeckBPM(freq);\n}", "function Poll_FFT_MONOTONE()\r\n{\r\n //44100 / 1024 = 43,06 Hz saltos 21,533203125 Hz\r\n try\r\n {\r\n let spectrum = gb_fft.analyze();\r\n let row= -1;\r\n let col= -1; \r\n \r\n if (gb_use_ntsc_arduino) //63.55 microsegundos\r\n {\r\n //Para belial\r\n if (spectrum[32] > 230){row = 0;}\r\n else{\r\n if (spectrum[35] > 230){row = 1;} //4 770 /21,533203125 = 35,75873015873015873015873015873\r\n else{\r\n if (spectrum[39] > 230){row = 2;}\r\n else{\r\n if (spectrum[18] > 230){row = 3;} //* 393,3910306845 /21,533203125 = 18,269043783262040816326530612245\r\n\t }\r\n }\r\n } \r\n \r\n if (spectrum[14] > 230){col = 0;} //2 302,60848514192 /21,533203125 = 14\r\n else{ \r\n if (spectrum[62] > 230){col = 1;}\r\n else{ \r\n \t if (spectrum[26] > 230){col = 2;} //# 561,98718669215 /21,533203125 = 26,09863397608896145124716553288\r\n else{\r\n if (spectrum[76] > 230){col = 3;}\r\n \t }\r\n }\r\n } \t \r\n }\r\n else\r\n {\r\n //if (spectrum[31] > 250){row = 0;}\r\n if (spectrum[32] > 230){row = 0;}\r\n else{\r\n if (spectrum[35] > 230){row = 1;}\r\n else{\r\n if (spectrum[39] > 230){row = 2;}\r\n else{\r\n if (spectrum[43] > 230){row = 3;}\r\n\t }\r\n }\r\n }\r\n \r\n //if (spectrum[55] > 250){col = 0;}\r\n if (spectrum[56] > 230){col = 0;}\r\n else{\r\n //if (spectrum[61] > 250){col = 1;}\r\n if (spectrum[62] > 230){col = 1;}\r\n else{\r\n //if (spectrum[67] > 250){col = 2;}\r\n\t if (spectrum[68] > 230){col = 2;}\r\n else{\r\n if (spectrum[76] > 230){col = 3;}\r\n\t }\r\n }\r\n } \t \r\n }\r\n\r\n \r\n //let cadLog = '67:'+spectrum[67].toString()+' 68:'+spectrum[68].toString()+' 69:'+spectrum[69].toString();\r\n //let cadLog = '31:'+spectrum[31].toString()+' 32:'+spectrum[32].toString()+' 33:'+spectrum[33].toString();\r\n //let cadLog = '61:'+spectrum[61].toString()+' 62:'+spectrum[62].toString()+' 63:'+spectrum[63].toString();\r\n //console.log (cadLog);\r\n \t\t\r\n if ((row>-1)||(col>-1))\r\n { \r\n gb_fft_dtmf = RowColToMonotone(row,col);\r\n gb_cadDTMF = gb_fft_dtmf;\r\n if (gb_fft_dtmf_antes != gb_fft_dtmf)\r\n {\t \r\n gb_fft_dtmf_antes = gb_fft_dtmf;\t\r\n \r\n\tcad_areaRX += gb_fft_dtmf;\t\r\n\tgb_buf_rcv_dtmf += gb_fft_dtmf;\r\n\tgb_event_new_data_dtmf = true;\r\n\t\r\n\tif (gb_use_fast === true)\r\n\t{ //Si es fast solo recibe un tono \r\n\t gb_fft_dtmf_two_monotone += gb_fft_dtmf;\r\n\t if (gb_fft_dtmf_two_monotone.length > 1)\r\n\t {\t \t \r\n\t gb_buf_rcv_dtmf = '#' + gb_fft_dtmf_two_monotone + '*';\t \r\n\t gb_fft_dtmf_two_monotone = '';\t \r\n\t }\r\n\t gb_begin_sms = false; \r\n\t gb_end_sms = true;\r\n\t contIniAsteriscos = 1;\t\r\n\t}\r\n\telse\r\n\t{\r\n\t switch (gb_fft_dtmf)\r\n\t {\r\n\t case '#':\r\n\t gb_buf_rcv_dtmf = '#';\r\n\t gb_begin_sms = true; \r\n\t gb_end_sms = false;\r\n\t //gb_begin_sync_dtmf= true;\t \r\n\t break;\r\n\t case '*':\t \r\n\t contIniAsteriscos ++;\r\n\t gb_begin_sms = false; \r\n\t gb_end_sms = true;\r\n\t break;\r\n\t default:\t \r\n\t contIniAsteriscos = 0;\t \t \r\n\t break;\r\n\t }\r\n\t}\r\n\t\t\r\n gb_forceDraw = true;\r\n }\r\n //playSoundTrack(gb_fft_dtmf);//Reproduce el Track\r\n }\r\n else\r\n {\r\n gb_fft_dtmf= gb_fft_dtmf_antes= '';\r\n } \r\n }\r\n catch(err)\r\n {\r\n DebugLog(err.message.toString());\r\n }\r\n}", "function fft(input) {\n var\n n = input.length,\n nHalf,\n even,\n odd,\n output = [],\n wnkMultiplied,\n wnk,\n k,\n r;\n\n if (n === 1) {\n return input;\n }\n\n // even and odd parts\n even = fft(getListHalf(input, 0));\n odd = fft(getListHalf(input, 1));\n\n // combine\n output.length = n;\n nHalf = n / 2;\n for (k = 0; k < nHalf; k++) {\n r = -2 * Math.PI * k / n;\n wnk = getComplexFromRadians(r);\n wnkMultiplied = complexMultiply(wnk, odd[k]);\n output[k] = complexAdd(even[k], wnkMultiplied);\n output[nHalf + k] = complexSubtract(even[k], wnkMultiplied);\n }\n\n return output;\n}", "function Poll_FFT_DTMF()\r\n{\r\n //44100 / 1024 = 43,06 Hz saltos 21,533203125 Hz\r\n try\r\n {\r\n if (gb_use_mic_dtmf === false)\r\n {\r\n return;\r\n }\r\n\t \r\n let spectrum = gb_fft.analyze();\r\n let row= -1;\r\n let col= -1; \r\n \r\n //if (spectrum[31] > 250){row = 0;}\r\n if (spectrum[32] > 230){row = 0;}\r\n else{\r\n if (spectrum[35] > 230){row = 1;}\r\n else{\r\n if (spectrum[39] > 230){row = 2;}\r\n else{\r\n if (spectrum[43] > 230){row = 3;}\r\n\t}\r\n }\r\n }\r\n \r\n //if (spectrum[55] > 250){col = 0;}\r\n if (spectrum[56] > 230){col = 0;}\r\n else{\r\n //if (spectrum[61] > 250){col = 1;}\r\n if (spectrum[62] > 230){col = 1;} \r\n else{\r\n //if (spectrum[67] > 250){col = 2;}\r\n\tif (spectrum[68] > 230){col = 2;}\r\n else{\r\n if (spectrum[76] > 230){col = 3;}\r\n\t}\r\n }\r\n }\r\n \r\n //console.log('55:'+spectrum[55].toString()+' 56:'+spectrum[56].toString()+' 57:'+spectrum[57].toString());\r\n \t\r\n if ((row>-1) && (col>-1))\r\n { \r\n gb_fft_dtmf = RowColToDtmf(row,col);\r\n gb_cadDTMF = gb_fft_dtmf;\r\n if (gb_fft_dtmf_antes != gb_fft_dtmf){\t\r\n gb_fft_dtmf_antes = gb_fft_dtmf;\r\n cad_areaRX += gb_fft_dtmf;\t\r\n\tgb_buf_rcv_dtmf += gb_fft_dtmf;\r\n\tgb_event_new_data_dtmf = true;\r\n\tif (gb_fft_dtmf === '#'){\r\n\t gb_begin_sync_dtmf= true;\r\n }\r\n\r\n if (gb_use_fast === true)\r\n\t{ //Si es fast solo recibe un tono\r\n\t gb_buf_rcv_dtmf = '#' + DTMFStringToDoubleNumber(gb_fft_dtmf) + '*';\t \r\n\t gb_begin_sms = false; \r\n\t gb_end_sms = true;\r\n\t contIniAsteriscos = 1;\r\n\t}\r\n\telse\r\n\t{\r\n\t switch (gb_fft_dtmf)\r\n\t {\r\n \t case '#':\r\n\t gb_buf_rcv_dtmf = '#';\r\n\t gb_begin_sms = true; \r\n\t gb_end_sms = false;\r\n\t //gb_begin_sync_dtmf= true;\t \r\n\t break;\r\n\t case '*':\t \r\n\t contIniAsteriscos ++;\r\n\t gb_begin_sms = false; \r\n\t gb_end_sms = true;\r\n\t break;\r\n\t default:\t \r\n\t contIniAsteriscos = 0;\t \t \r\n\t break;\r\n\t }\t\r\n\t}\r\n\t\r\n\t\r\n gb_forceDraw = true;\r\n } \r\n }\r\n else\r\n {\r\n gb_fft_dtmf= gb_fft_dtmf_antes= '';\r\n } \r\n }\r\n catch(err)\r\n {\r\n DebugLog(err.message.toString());\r\n }\r\n}", "function transformRadix2(real, imag) {\n // Initialization\n if (real.length != imag.length)\n throw \"Mismatched lengths\";\n var n = real.length;\n if (n == 1)\n // Trivial transform\n return;\n var levels = -1;\n for (var i = 0; i < 32; i++) {\n if (1 << i == n)\n levels = i;\n // Equal to log2(n)\n }\n if (levels == -1)\n throw \"Length is not a power of 2\";\n var cosTable = new Array(n / 2);\n var sinTable = new Array(n / 2);\n for (var i = 0; i < n / 2; i++) {\n cosTable[i] = Math.cos(2 * Math.PI * i / n);\n sinTable[i] = Math.sin(2 * Math.PI * i / n);\n }\n\n // Bit-reversed addressing permutation\n for (var i = 0; i < n; i++) {\n var j = reverseBits(i, levels);\n if (j > i) {\n var temp = real[i];\n real[i] = real[j];\n real[j] = temp;\n temp = imag[i];\n imag[i] = imag[j];\n imag[j] = temp;\n }\n }\n\n // Cooley-Tukey decimation-in-time radix-2 FFT\n for (var size = 2; size <= n; size *= 2) {\n var halfsize = size / 2;\n var tablestep = n / size;\n for (var i = 0; i < n; i += size) {\n for (var j = i, k = 0; j < i + halfsize; j++,\n k += tablestep) {\n var tpre = real[j + halfsize] * cosTable[k] + imag[j + halfsize] * sinTable[k];\n var tpim = -real[j + halfsize] * sinTable[k] + imag[j + halfsize] * cosTable[k];\n real[j + halfsize] = real[j] - tpre;\n imag[j + halfsize] = imag[j] - tpim;\n real[j] += tpre;\n imag[j] += tpim;\n }\n }\n }\n\n // Returns the integer whose value is the reverse of the lowest 'bits' bits of the integer 'x'.\n function reverseBits(x, bits) {\n var y = 0;\n for (var i = 0; i < bits; i++) {\n y = (y << 1) | (x & 1);\n x >>>= 1;\n }\n return y;\n }\n}", "function naiveDft(inreal, inimag, outreal, outimag, inverse) {\n if (inreal.length != inimag.length || inreal.length != outreal.length || outreal.length != outimag.length)\n throw \"Mismatched lengths\";\n\n var n = inreal.length;\n var coef = (inverse ? 2 : -2) * Math.PI;\n for (var k = 0; k < n; k++) { // For each output element\n var sumreal = 0;\n var sumimag = 0;\n for (var t = 0; t < n; t++) { // For each input element\n var angle = coef * (t * k % n) / n; // This is more accurate than t * k\n sumreal += inreal[t]*Math.cos(angle) - inimag[t]*Math.sin(angle);\n sumimag += inreal[t]*Math.sin(angle) + inimag[t]*Math.cos(angle);\n }\n outreal[k] = sumreal;\n outimag[k] = sumimag;\n }\n \n \n // compute the average of the intervals of outreal array\n // peak saves the time index of all peaks\n var peak = [0];\n for(i = 1; i < outreal.length-1; i++){\n if(outreal[i] > outreal[i-1] && outreal[i] > outreal[i+1]){\n peak.push(i);\n }\n }\n // interval saves the interval of all values in peak\n var interval = [];\n for(i = 0; i < peak.length-1; i++){\n interval.push(peak[i+1] - peak[i]);\n }\n // compute the mean value in interval array\n var sum = 0;\n for(i = 0; i < interval.length; i++){\n sum += interval[i];\n }\n var mean = Number((sum/interval.length).toFixed(3));\n // the scan rate is the inverse of mean interval\n var scanrate = Number((1000/mean).toFixed(2)); \n document.getElementById(\"scanrate\").innerHTML = \"<br />\" + scanrate + \"Hz\" \n + \"<br />\" + \"It means your keyboard refreshes every \" + mean + \"ms\" \n + \"<br /><br /><br /><br />\" + \"The computing approach is to look in to the pressing time that your keyboard is able to recognize. More data lies around specific time points, the interval of them is right the refreshing period of your keyboard.\";\n }", "function fftRadix2(realVals, imagVals, size, inverse, cpuBackend) {\n if (size === 1) {\n return { real: realVals, imag: imagVals };\n }\n const data = _tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__[\"backend_util\"].mergeRealAndImagArrays(realVals, imagVals);\n const half = size / 2;\n const evenComplex = _tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__[\"backend_util\"].complexWithEvenIndex(data);\n const evenRealVals = evenComplex.real;\n const evenImagVals = evenComplex.imag;\n const evenShape = [evenRealVals.length];\n const evenRealInfo = cpuBackend.makeTensorInfo(evenShape, 'float32', evenRealVals);\n const evenImagInfo = cpuBackend.makeTensorInfo(evenShape, 'float32', evenImagVals);\n const evenTensorInfo = Object(_kernels_Complex__WEBPACK_IMPORTED_MODULE_2__[\"complex\"])({ inputs: { real: evenRealInfo, imag: evenImagInfo }, backend: cpuBackend });\n const oddComplex = _tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__[\"backend_util\"].complexWithOddIndex(data);\n const oddRealVals = oddComplex.real;\n const oddImagVals = oddComplex.imag;\n const oddShape = [oddRealVals.length];\n const oddRealInfo = cpuBackend.makeTensorInfo(oddShape, 'float32', oddRealVals);\n const oddImagInfo = cpuBackend.makeTensorInfo(oddShape, 'float32', oddImagVals);\n const oddTensorInfo = Object(_kernels_Complex__WEBPACK_IMPORTED_MODULE_2__[\"complex\"])({ inputs: { real: oddRealInfo, imag: oddImagInfo }, backend: cpuBackend });\n // Recursive call for half part of original input.\n const $evenComplex = fftRadix2(evenRealVals, evenImagVals, half, inverse, cpuBackend);\n const $evenRealVals = $evenComplex.real;\n const $evenImagVals = $evenComplex.imag;\n const $evenShape = [$evenRealVals.length];\n const $evenRealInfo = cpuBackend.makeTensorInfo($evenShape, 'float32', $evenRealVals);\n const $evenImagInfo = cpuBackend.makeTensorInfo($evenShape, 'float32', $evenImagVals);\n const $evenTensorInfo = Object(_kernels_Complex__WEBPACK_IMPORTED_MODULE_2__[\"complex\"])({\n inputs: { real: $evenRealInfo, imag: $evenImagInfo },\n backend: cpuBackend\n });\n const $oddComplex = fftRadix2(oddRealVals, oddImagVals, half, inverse, cpuBackend);\n const $oddRealVals = $oddComplex.real;\n const $oddImagVals = $oddComplex.imag;\n const $oddShape = [$oddRealVals.length];\n const $oddRealInfo = cpuBackend.makeTensorInfo($oddShape, 'float32', $oddRealVals);\n const $oddImagInfo = cpuBackend.makeTensorInfo($oddShape, 'float32', $oddImagVals);\n const $oddTensorInfo = Object(_kernels_Complex__WEBPACK_IMPORTED_MODULE_2__[\"complex\"])({ inputs: { real: $oddRealInfo, imag: $oddImagInfo }, backend: cpuBackend });\n const e = _tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__[\"backend_util\"].exponents(size, inverse);\n const eShape = [e.real.length];\n const eRealInfo = cpuBackend.makeTensorInfo(eShape, 'float32', e.real);\n const eImagInfo = cpuBackend.makeTensorInfo(eShape, 'float32', e.imag);\n const complexInfo = Object(_kernels_Complex__WEBPACK_IMPORTED_MODULE_2__[\"complex\"])({ inputs: { real: eRealInfo, imag: eImagInfo }, backend: cpuBackend });\n const exponentInfo = Object(_kernels_Multiply__WEBPACK_IMPORTED_MODULE_6__[\"multiply\"])({ inputs: { a: complexInfo, b: $oddTensorInfo }, backend: cpuBackend });\n const addPart = Object(_kernels_Add__WEBPACK_IMPORTED_MODULE_1__[\"add\"])({\n inputs: { a: $evenTensorInfo, b: exponentInfo },\n backend: cpuBackend\n });\n const subPart = Object(_kernels_Sub__WEBPACK_IMPORTED_MODULE_10__[\"sub\"])({\n inputs: { a: $evenTensorInfo, b: exponentInfo },\n backend: cpuBackend\n });\n const addPartReal = Object(_kernels_Real__WEBPACK_IMPORTED_MODULE_7__[\"real\"])({ inputs: { input: addPart }, backend: cpuBackend });\n const subPartReal = Object(_kernels_Real__WEBPACK_IMPORTED_MODULE_7__[\"real\"])({ inputs: { input: subPart }, backend: cpuBackend });\n const addPartImag = Object(_kernels_Imag__WEBPACK_IMPORTED_MODULE_5__[\"imag\"])({ inputs: { input: addPart }, backend: cpuBackend });\n const subPartImag = Object(_kernels_Imag__WEBPACK_IMPORTED_MODULE_5__[\"imag\"])({ inputs: { input: subPart }, backend: cpuBackend });\n const $real = Object(_kernels_Concat__WEBPACK_IMPORTED_MODULE_3__[\"concat\"])({\n inputs: [addPartReal, subPartReal],\n backend: cpuBackend,\n attrs: { axis: 0 }\n });\n const $imag = Object(_kernels_Concat__WEBPACK_IMPORTED_MODULE_3__[\"concat\"])({\n inputs: [addPartImag, subPartImag],\n backend: cpuBackend,\n attrs: { axis: 0 }\n });\n const $realVals = cpuBackend.data.get($real.dataId).values;\n const $imagVals = cpuBackend.data.get($imag.dataId).values;\n cpuBackend.disposeIntermediateTensorInfo(evenRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(evenImagInfo);\n cpuBackend.disposeIntermediateTensorInfo(evenTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo(oddRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(oddImagInfo);\n cpuBackend.disposeIntermediateTensorInfo(oddTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo($evenRealInfo);\n cpuBackend.disposeIntermediateTensorInfo($evenImagInfo);\n cpuBackend.disposeIntermediateTensorInfo($evenTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo($oddRealInfo);\n cpuBackend.disposeIntermediateTensorInfo($oddImagInfo);\n cpuBackend.disposeIntermediateTensorInfo($oddTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo(eRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(eImagInfo);\n cpuBackend.disposeIntermediateTensorInfo(complexInfo);\n cpuBackend.disposeIntermediateTensorInfo(exponentInfo);\n cpuBackend.disposeIntermediateTensorInfo(addPart);\n cpuBackend.disposeIntermediateTensorInfo(subPart);\n cpuBackend.disposeIntermediateTensorInfo(addPartReal);\n cpuBackend.disposeIntermediateTensorInfo(addPartImag);\n cpuBackend.disposeIntermediateTensorInfo(subPartReal);\n cpuBackend.disposeIntermediateTensorInfo(subPartImag);\n cpuBackend.disposeIntermediateTensorInfo($real);\n cpuBackend.disposeIntermediateTensorInfo($imag);\n return { real: $realVals, imag: $imagVals };\n}", "function FFTDrawer(canvas, channel) {\n var canvasContext = canvas.getContext('2d');\n var curveColor = 'rgb(255,160,122)';\n var binCount = FFT_SIZE / 2;\n var data = new Float32Array(binCount);\n\n function drawCurve() {\n var width = canvas.width;\n var height = canvas.height;\n var pixelsPerDb = height / 96.0;\n\n canvasContext.clearRect(0, 0, width, height);\n\n /* Get the proper analyzer from the audio graph */\n var analyzer = (channel == 0) ? analyzer_left : analyzer_right;\n if (!analyzer || !get_global('enable_fft')) {\n requestAnimationFrame(drawCurve);\n return;\n }\n\n /* Draw decibel scale. */\n for (var db = -96.0; db <= 0; db += 12) {\n var y = height - (db + 96) * pixelsPerDb;\n canvasContext.strokeStyle = curveColor;\n canvasContext.strokeText(db.toFixed(0) + 'dB', 10, y);\n }\n\n /* Draw FFT */\n analyzer.getFloatFrequencyData(data);\n canvasContext.beginPath();\n canvasContext.lineWidth = 1;\n canvasContext.strokeStyle = curveColor;\n canvasContext.moveTo(0, height);\n\n var frequencyHz = new Float32Array(width);\n for (var i = 0; i < binCount; ++i) {\n var f = i / binCount;\n\n /* Convert to log frequency scale (octaves). */\n var noctaves = 10;\n f = 1 + Math.log(f) / (noctaves * Math.LN2);\n\n /* Draw the magnitude */\n var x = f * width;\n var y = height - (data[i] + 96) * pixelsPerDb;\n\n canvasContext.lineTo(x, y);\n }\n\n canvasContext.stroke();\n requestAnimationFrame(drawCurve);\n }\n\n function init() {\n requestAnimationFrame(drawCurve);\n }\n\n this.init = init;\n}", "function fft(x) {\n return fftComplexDirection(x,false);\n}", "function transformRadix2(real, imag) {\n // Initialization\n var i, j, k;\n if (real.length !== imag.length)\n throw \"Mismatched lengths\";\n var n = real.length;\n if (n === 1) // Trivial transform\n return;\n var levels = -1;\n for (i = 0; i < 32; i++) {\n if (1 << i === n)\n levels = i; // Equal to log2(n)\n }\n if (levels === -1)\n throw \"Length is not a power of 2\";\n var cosTable = new Array(n / 2);\n var sinTable = new Array(n / 2);\n for (i = 0; i < n / 2; i++) {\n cosTable[i] = Math.cos(2 * Math.PI * i / n);\n sinTable[i] = Math.sin(2 * Math.PI * i / n);\n }\n\n // Bit-reversed addressing permutation\n for (i = 0; i < n; i++) {\n j = reverseBits(i, levels);\n if (j > i) {\n var temp = real[i];\n real[i] = real[j];\n real[j] = temp;\n temp = imag[i];\n imag[i] = imag[j];\n imag[j] = temp;\n }\n }\n\n // Cooley-Tukey decimation-in-time radix-2 FFT\n for (var size = 2; size <= n; size *= 2) {\n var halfsize = size / 2;\n var tablestep = n / size;\n for (i = 0; i < n; i += size) {\n for (j = i, k = 0; j < i + halfsize; j++, k += tablestep) {\n var tpre = real[j + halfsize] * cosTable[k] + imag[j + halfsize] * sinTable[k];\n var tpim = -real[j + halfsize] * sinTable[k] + imag[j + halfsize] * cosTable[k];\n real[j + halfsize] = real[j] - tpre;\n imag[j + halfsize] = imag[j] - tpim;\n real[j] += tpre;\n imag[j] += tpim;\n }\n }\n }\n\n // Returns the integer whose value is the reverse of the lowest 'bits' bits of the integer 'x'.\n function reverseBits(x, bits) {\n var y = 0;\n for (var i = 0; i < bits; i++) {\n y = (y << 1) | (x & 1);\n x >>>= 1;\n }\n return y;\n }\n}", "function naiveDft(inreal, inimag, outreal, outimag, inverse) {\n\tconst n = inreal.length;\n\tif (n != inimag.length || n != outreal.length || n != outimag.length)\n\t\tthrow new RangeError(\"Mismatched lengths\");\n\t\n\tconst coef = (inverse ? 2 : -2) * Math.PI;\n\tfor (let k = 0; k < n; k++) { // For each output element\n\t\tlet sumreal = 0;\n\t\tlet sumimag = 0;\n\t\tfor (let t = 0; t < n; t++) { // For each input element\n\t\t\tconst angle = coef * (t * k % n) / n; // This is more accurate than t * k\n\t\t\tsumreal += inreal[t] * Math.cos(angle) - inimag[t] * Math.sin(angle);\n\t\t\tsumimag += inreal[t] * Math.sin(angle) + inimag[t] * Math.cos(angle);\n\t\t}\n\t\toutreal[k] = sumreal;\n\t\toutimag[k] = sumimag;\n\t}\n}", "_transform(chunk,encoding,cb) {\n\n const uint8_view = new Uint8Array(chunk, 0, chunk.length);\n var dataView = new DataView(uint8_view.buffer);\n\n let iFloat = Array(this.sz*2);\n let asComplex = Array(this.sz);\n\n\n // for(let i = 0; i < this.sz*2; i+=1) {\n // iFloat[i] = dataView.getFloat64(i*8, true);\n // }\n\n for(let i = 0; i < this.sz*2; i+=2) {\n let re = dataView.getFloat64(i*8, true);\n let im = dataView.getFloat64((i*8)+8, true);\n\n asComplex[i/2] = mt.complex(re,im);\n\n iFloat[i] = re;\n iFloat[i+1] = im;\n\n // if( i < 16 ) {\n // console.log(re);\n // }\n\n }\n\n let iShort = mutil.IFloatToIShortMulti(iFloat);\n\n if( this.onFrameIShort !== null ) {\n this.onFrameIShort(iShort);\n }\n\n // console.log(\"iFloat length \" + iFloat.length);\n // console.log(iFloat.slice(0,16));\n\n // console.log(\"iShort length \" + iShort.length);\n // console.log(iShort.slice(0,16));\n\n\n this.handleDefaultStream(iFloat,iShort,asComplex);\n this.handleFineSync(iFloat,iShort,asComplex);\n this.handleAllSubcarriers(iFloat,iShort,asComplex);\n this.handleDemodData(iFloat,iShort,asComplex);\n\n\n // for(x of iFloat) {\n // console.log(x);\n // }\n\n\n this.uint.frame_track_counter++;\n cb();\n }", "function PowerSpectrum( NumSamples, In, Out)\n{\n var Half = NumSamples / 2;\n var i;\n\n var theta = Math.PI / Half;\n\n var tmpReal = new Float32Array(Half);\n var tmpImag = new Float32Array(Half);\n var RealOut = new Float32Array(Half);\n var ImagOut = new Float32Array(Half);\n\n for (var i = 0; i < Half; i++) {\n tmpReal[i] = In[2 * i];\n tmpImag[i] = In[2 * i + 1];\n }\n\n ACFFT(Half, 0, tmpReal, tmpImag, RealOut, ImagOut);\n\n var wtemp = (Math.sin(0.5 * theta));\n\n var wpr = -2.0 * wtemp * wtemp;\n var wpi = -1.0 * (Math.sin(theta));\n var wr = 1.0 + wpr;\n var wi = wpi;\n\n var i3;\n\n var h1r, h1i, h2r, h2i, rt, it;\n\n for (var i = 1; i < Half / 2; i++) {\n\n i3 = Half - i;\n\n h1r = 0.5 * (RealOut[i] + RealOut[i3]);\n h1i = 0.5 * (ImagOut[i] - ImagOut[i3]);\n h2r = 0.5 * (ImagOut[i] + ImagOut[i3]);\n h2i = -0.5 * (RealOut[i] - RealOut[i3]);\n\n rt = h1r + wr * h2r - wi * h2i;\n it = h1i + wr * h2i + wi * h2r;\n\n Out[i] = rt * rt + it * it;\n\n rt = h1r - wr * h2r + wi * h2i;\n it = -h1i + wr * h2i + wi * h2r;\n\n Out[i3] = rt * rt + it * it;\n\n wr = (wtemp = wr) * wpr - wi * wpi + wr;\n wi = wi * wpr + wtemp * wpi + wi;\n }\n\n rt = (h1r = RealOut[0]) + ImagOut[0];\n it = h1r - ImagOut[0];\n Out[0] = rt * rt + it * it;\n\n rt = RealOut[Half / 2];\n it = ImagOut[Half / 2];\n Out[Half / 2] = rt * rt + it * it;\n}", "pow22523(z) {\r\n const t0 = new FieldElement();\r\n const t1 = new FieldElement();\r\n const t2 = new FieldElement();\r\n let i;\r\n t0.square(z);\r\n // for (i = 1; i < 1; i++) {\r\n // t0.square(t0);\r\n // }\r\n t1.square(t0);\r\n for (i = 1; i < 2; i++) {\r\n t1.square(t1);\r\n }\r\n t1.mul(z, t1);\r\n t0.mul(t0, t1);\r\n t0.square(t0);\r\n // for (i = 1; i < 1; i++) {\r\n // t0.square(t0);\r\n // }\r\n t0.mul(t1, t0);\r\n t1.square(t0);\r\n for (i = 1; i < 5; i++) {\r\n t1.square(t1);\r\n }\r\n t0.mul(t1, t0);\r\n t1.square(t0);\r\n for (i = 1; i < 10; i++) {\r\n t1.square(t1);\r\n }\r\n t1.mul(t1, t0);\r\n t2.square(t1);\r\n for (i = 1; i < 20; i++) {\r\n t2.square(t2);\r\n }\r\n t1.mul(t2, t1);\r\n t1.square(t1);\r\n for (i = 1; i < 10; i++) {\r\n t1.square(t1);\r\n }\r\n t0.mul(t1, t0);\r\n t1.square(t0);\r\n for (i = 1; i < 50; i++) {\r\n t1.square(t1);\r\n }\r\n t1.mul(t1, t0);\r\n t2.square(t1);\r\n for (i = 1; i < 100; i++) {\r\n t2.square(t2);\r\n }\r\n t1.mul(t2, t1);\r\n t1.square(t1);\r\n for (i = 1; i < 50; i++) {\r\n t1.square(t1);\r\n }\r\n t0.mul(t1, t0);\r\n t0.square(t0);\r\n for (i = 1; i < 2; i++) {\r\n t0.square(t0);\r\n }\r\n this.mul(t0, z);\r\n }", "function calculateNext(data){\n \n var AM, BM, TAU_M, AH, BH, TAU_H, AJ, BJ, TAU_J, axr1, bxr1, TAU_Xr1,\n axr2, bxr2, TAU_Xr2, Axs, Bxs, TAU_Xs, TAU_R, TAU_S, Ad, Bd, Cd, TAU_D, \n Af, Bf, Cf, TAU_F, Af2, Bf2, Cf2, TAU_F2, temp, temp2, Ak1, Bk1,\n Ek, Ena, Eks, Eca, FCaSS_INF, exptaufcass, kCaSR, k1, k2, dRR,\n CaCSQN, dCaSR, bjsr, cjsr, CaSSBuf, dCaSS, bcss, ccss, CaBuf, dCai, bc, cc,\n dNai, dKi, sOO; \n\n var minft_t, exptaumt_t, hinft_t, exptauht_t, jinft_t, exptaujt_t, xr1inft_t,\n exptauxr1t_t, xr2inft_t, exptauxr2t_t, xsinft_t, exptauxst_t, rinft_t , sinft_t,\n exptaurt_t, exptaust_t, dinft_t, exptaudt_t, finft_t, exptauft_t, f2inft_t, \n exptauf2t_t, inakcoefft_t, ipkcoefft_t, ical1t_t, ical2t_t, inaca1t_t, inaca2t_t,\n ik1coefft_t, fcassinft_t, exptaufcasst_t; \n\n\n sOO = ( cS[iType] === 'epi') ? 8.958e-8 : ( cS[iType] === 'endo' ) ? 8.848e-8 : 1.142e-7; // (cS.itype === 'M')\n \n\n //table setup starts\n AM = 1.0/(1.+ Math.exp((-60.-cS.v)/5.));\n BM = 0.1/(1.+ Math.exp((cS.v+35.)/5.))+0.10/(1.+Math.exp((cS.v-50.)/200.));\n minft_t = 1.0/((1.+Math.exp((-56.86-cS.v)/9.03))*(1.+Math.exp((-56.86-cS.v)/9.03)));\n TAU_M = AM*BM;\n exptaumt_t = Math.exp(-cS.timestep/TAU_M);\n\n hinft_t = 1.0/((1.+Math.exp((cS.v+71.55)/7.43))*(1.+Math.exp((cS.v+71.55)/7.43)));\n \n AH = (cS.v > -40) ? 0. : (0.057*Math.exp(-(cS.v+80.)/6.8));\n BH = (cS.v > -40) ? (0.77/(0.13*(1.+Math.exp(-(cS.v+10.66)/11.1)))) \n : (2.7*Math.exp(0.079*cS.v)+(3.1e5)*Math.exp(0.3485*cS.v));\n TAU_H = 1.0/(AH+BH);\n exptauht_t = Math.exp(-cS.timestep/TAU_H);\n\n AJ = (cS.v > -40) ? 0. : (((-2.5428e4)*Math.exp(0.2444*cS.v)-(6.948e-6)*Math.exp(-0.04391*cS.v))*(cS.v+37.78)/(1.+Math.exp(0.311*(cS.v+79.23))));\n BJ = (cS.v > -40) ? (0.6*Math.exp((0.057)*cS.v)/(1.+Math.exp(-0.1*(cS.v+32.))))\n : (0.02424*Math.exp(-0.01052*cS.v)/(1.+Math.exp(-0.1378*(cS.v+40.14))));\n TAU_J = 1.0/(AJ+BJ);\n exptaujt_t = Math.exp(-cS.timestep/TAU_J);\n\n jinft_t = hinft_t;\n\n xr1inft_t = 1.0/(1.+Math.exp((-26.-cS.v)/7.));\n\n axr1 = 450.0/(1.+Math.exp((-45.-cS.v)/10.));\n bxr1 = 6.0/(1.+Math.exp((cS.v-(-30.))/11.5));\n TAU_Xr1 = axr1*bxr1;\n exptauxr1t_t = Math.exp(-cS.timestep/TAU_Xr1);\n\n\n xr2inft_t = 1.0/(1.+Math.exp((cS.v-(-88.))/24.));\n \n axr2 = 3.0/(1.+Math.exp((-60.-cS.v)/20.));\n bxr2 = 1.12/(1.+Math.exp((cS.v-60.)/20.));\n TAU_Xr2 = axr2*bxr2;\n exptauxr2t_t = Math.exp(-cS.timestep/TAU_Xr2);\n\n xsinft_t = 1.0/(1.+ Math.exp((-5.-cS.v)/14.));\n\n Axs = (1400.0/(Math.sqrt(1.+Math.exp((5.-cS.v)/6.))));\n Bxs = (1.0/(1.+ Math.exp((cS.v-35.)/15.)));\n TAU_Xs = Axs*Bxs+80.;\n exptauxst_t = Math.exp(-cS.timestep/TAU_Xs);\n\n rinft_t = ( cS.itype === 'epi') ? 1.0/(1.+ Math.exp((20.- cS.v)/6.)) \n : ( cS.itype === 'endo' ) ? 1.0/(1.+Math.exp((20.-cS.v)/6.))\n : 1.0/(1.+ Math.exp((20.-cS.v)/6.)) ; // (cS.itype === 'M')\n\n sinft_t = ( cS.itype === 'epi') ? 1.0/(1.+Math.exp((cS.v+20.)/5.))\n : ( cS.itype === 'endo' ) ? 1.0/(1.+ Math.exp((cS.v+28.)/5.))\n : 1.0/(1.+ Math.exp((cS.v+20.)/5.)); // (cS.itype === 'M')\n\n TAU_R = ( cS.itype === 'epi') ? 9.5* Math.exp(-(cS.v+40.)*(cS.v+40.)/1800.)+0.8\n : ( cS.itype === 'endo' ) ? 9.5* Math.exp(-(cS.v+40.)*(cS.v+40.)/1800.)+0.8\n : 9.5* Math.exp(-(cS.v+40.)*(cS.v+40.)/1800.)+0.8; // (cS.itype === 'M')\n\n TAU_S = ( cS.itype === 'epi') ? 85.* Math.exp(-(cS.v+45.)*(cS.v+45.)/320.) +5.0/(1.+Math.exp((cS.v-20.)/5.))+3. \n : ( cS.itype === 'endo' ) ? 1000.*Math.exp(-(cS.v+67.)*(cS.v+67.)/1000.)+8.\n : 85.*Math.exp(-(cS.v+45.)*(cS.v+45.)/320.)+5.0/(1.+Math.exp((cS.v-20.)/5.))+3.; // (cS.itype === 'M')\n \n exptaurt_t = Math.exp(-cS.timestep/TAU_R);\n exptaust_t = Math.exp(-cS.timestep/TAU_S);\n \n dinft_t = 1.0/(1.+Math.exp((-8.-cS.v)/7.5));\n \n Ad = 1.4/(1.+Math.exp((-35.-cS.v)/13.))+0.25;\n Bd = 1.4/(1.+Math.exp((cS.v+5.)/5.));\n Cd = 1.0/(1.+Math.exp((50.-cS.v)/20.));\n TAU_D = Ad*Bd+Cd;\n exptaudt_t = Math.exp(-cS.timestep/TAU_D);\n\n finft_t = 1.0/(1.+Math.exp((cS.v+20.)/7.));\n\n Af = 1102.5*Math.exp(-(cS.v+27.)*(cS.v+27.)/225.);\n Bf = 200.0/(1.+Math.exp((13.-cS.v)/10.));\n Cf = (180.0/(1.+Math.exp((cS.v+30.)/10.)))+20.;\n TAU_F = Af+Bf+Cf;\n exptauft_t = Math.exp(-cS.timestep/TAU_F);\n\n f2inft_t = 0.67/(1.+Math.exp((cS.v+35.)/7.))+0.33;\n\n //original code had the following, but paper uses denom of 170**2, not 7**2\n\n Af2 = 600.*Math.exp(-(cS.v+25.)*(cS.v+25.)/49.);\n\n // paper value for Af2 is INCORRECT to match the figure\n //Af2=600.*exp(-(vv+25.)*(vv+25.)/(170.*170.))\n \n Bf2 = 31.0/(1.+Math.exp((25.-cS.v)/10.));\n Cf2 = 16.0/(1.+Math.exp((cS.v+30.)/10.));\n TAU_F2 = Af2+Bf2+Cf2\n exptauf2t_t = Math.exp(-cS.timestep/TAU_F2);\n\n inakcoefft_t = (1.0/(1.+0.1245*Math.exp(-0.1*cS.v*cC.fort)+0.0353*Math.exp(-cS.v*cC.fort)))*cS.knak*(cS.Ko/(cS.Ko+cS.KmK)); \n ipkcoefft_t = cS.GpK/(1.+Math.exp((25.-cS.v)/5.98)); \n temp = Math.exp(2*(cS.v-15)*cC.fort);\n\n if(!(Math.abs(cS.v-15.) < 1e-4)){\n // need implemented\n ical1t_t = cS.GCaL*4.*(cS.v-15.)*(cS.FF*cC.fort)* (0.25*temp)/(temp-1.);\n ical2t_t = cS.GCaL*4.*(cS.v-15.)*(cS.FF*cC.fort)*cS.Cao/(temp-1.);\n }\n \n temp = Math.exp((cS.n-1.)*cS.v*cC.fort);\n temp2 = cS.knaca/((cC.KmNai3+cC.Nao3)*(cS.KmCa+cS.Cao)*(1.+cS.ksat*temp));\n inaca1t_t = temp2*Math.exp(cS.n*cS.v*cC.fort)*cS.Cao;\n inaca2t_t = temp2*temp*cC.Nao3*cS.alphanaca; \n\n\n //reversal potentials\n Ek = cC.rtof*(Math.log((cS.Ko/cS.ki)));\n Ena = cC.rtof*(Math.log((cS.Nao/cS.nai)));\n Eks = cC.rtof*(Math.log((cS.Ko+cS.pKNa*cS.Nao)/(cS.ki+cS.pKNa*cS.nai)));\n Eca = 0.5*cC.rtof*(Math.log((cS.Cao/cS.cai)));\n \n // need to figure out vmek is (cS.v - Ek) \n Ak1 = 0.1/(1.+Math.exp(0.06*((cS.v - Ek)-200.)));\n Bk1 = (3.*Math.exp(0.0002*((cS.v - Ek)+100.))+Math.exp(0.1*((cS.v - Ek)-10.)))/(1.+Math.exp(-0.5*((cS.v - Ek)))); \n ik1coefft_t = cS.GK1*Ak1/(Ak1+Bk1); \n \n fcassinft_t = 0.6/(1+(cS.cass/0.05)*(cS.cass/0.05))+0.4;\n temp = 80.0/(1+(cS.cass/0.05)*(cS.cass/0.05))+2.;\n exptaufcasst_t = Math.exp(-cS.timestep/temp); \n\n //stimulus\n\n cS.Istim = _s1s2Stimulus(count, settings);\n \n //Compute currents\n\n cS.sm = minft_t - (minft_t-cS.sm)*exptaumt_t;\n cS.sh = hinft_t - (hinft_t-cS.sh)*exptauht_t;\n cS.sj = jinft_t - (jinft_t-cS.sj)*exptaujt_t;\n cS.ina = cS.GNa*cS.sm *cS.sm *cS.sm *cS.sh*cS.sj*(cS.v-Ena); \n\n cS.sxr1 = xr1inft_t-(xr1inft_t - cS.sxr1) * exptauxr1t_t;\n\n \n cS.sxr2 = xr2inft_t-(xr2inft_t - cS.sxr2) * exptauxr2t_t;\n \n cS.ikr = cS.Gkr*cC.Gkrfactor*cS.sxr1*cS.sxr2*(cS.v-Ek); \n \n cS.sxs = xsinft_t-(xsinft_t-cS.sxs)*exptauxst_t;\n\n cS.iks = cS.Gks*cS.sxs*cS.sxs*(cS.v-Eks);\n\n cS.sr = rinft_t-(rinft_t-cS.sr)*exptaurt_t;\n\n cS.ss = sinft_t-(sinft_t-cS.ss)*exptaust_t;\n\n cS.ito = cS.Gto*cS.sr*cS.ss*(cS.v-Ek);\n\n cS.sd = dinft_t-(dinft_t-cS.sd)*exptaudt_t;\n\n cS.sf = finft_t-(finft_t-cS.sf)*exptauft_t;\n\n cS.sf2 = f2inft_t-(f2inft_t-cS.sf2)*exptauf2t_t; \n\n FCaSS_INF = (cS.cass > cS.casshi) ? 0.4 : fcassinft_t ;\n\n exptaufcass = (cS.cass > cS.casshi) ? cC.exptaufcassinf : exptaufcasst_t;\n\n cS.sfcass = FCaSS_INF-(FCaSS_INF- cS.sfcass)*exptaufcass;\n\n cS.ical = cS.sd*cS.sf*cS.sf2*cS.sfcass*(ical1t_t* cS.cass - ical2t_t);\n\n cS.ik1 = ik1coefft_t*(cS.v-Ek);\n\n cS.ipk = ipkcoefft_t*(cS.v-Ek);\n\n cS.inaca = inaca1t_t*cS.nai*cS.nai*cS.nai-inaca2t_t*cS.cai;\n\n cS.inak = inakcoefft_t*(cS.nai/(cS.nai+cS.KmNa));\n\n cS.ipca = cS.GpCa*cS.cai/(cS.KpCa+cS.cai);\n\n cS.ibna = cS.GbNa*(cS.v-Ena);\n\n cS.ibca = cS.GbCa*(cS.v-Eca);\n\n //total current\n cS.sItot = cS.ikr+ cS.iks+ cS.ik1+ cS.ito+ cS.ina+ cS.ibna+ cS.ical+ cS.ibca+ cS.inak+ cS.inaca+ cS.ipca+ cS.ipk+ cS.Istim;\n\n //console.log(cS.ikr, cS.iks, cS.ik1, cS.ito, cS.ina, cS.ibna, cS.ical, cS.ibca, cS.inak, cS.inaca, cS.ipca, cS.ipk, cS.Istim);\n\n //update concentrations\n\n kCaSR = cS.maxsr-((cS.maxsr-cS.minsr)/(1+(cS.EC/cS.casr*(cS.EC/cS.casr))));\n k1 = cS.k1prime/kCaSR;\n k2 = cS.k2prime*kCaSR;\n dRR = cS.k4*(1.-cS.srr)-k2*cS.cass*cS.srr;\n cS.srr = cS.srr+cS.timestep*dRR;\n sOO = k1*cS.cass*cS.cass*cS.srr/(cS.k3+k1*cS.cass*cS.cass);\n\n //intracellular calcium currents\n\n cS.Irel = cS.Vrel*sOO*(cS.casr- cS.cass);\n cS.Ileak = cS.Vleak*(cS.casr-cS.cai);\n cS.Iup = cS.Vmaxup/(1.+((cS.Kup*cS.Kup)/(cS.cai*cS.cai)));\n cS.Ixfer = cS.Vxfer*(cS.cass - cS.cai);\n\n\n CaCSQN = cS.Bufsr*cS.casr/(cS.casr+cS.Kbufsr);\n dCaSR = cS.timestep*(cS.Iup-cS.Irel-cS.Ileak);\n bjsr = cS.Bufsr-CaCSQN-dCaSR-cS.casr+cS.Kbufsr;\n cjsr = cS.Kbufsr*(CaCSQN+dCaSR+cS.casr);\n cS.casr = (Math.sqrt(bjsr*bjsr+4.*cjsr)-bjsr)/2.;\n\n CaSSBuf = cS.Bufss * cS.cass/(cS.cass+cS.Kbufss);\n dCaSS = cS.timestep * (-cS.Ixfer*(cS.Vc/cS.Vss)+cS.Irel*(cS.Vsr/cS.Vss)+(-cS.ical*cC.inversevssF2*cS.CAPACITANCE)); \n bcss = cS.Bufss - CaSSBuf - dCaSS - cS.cass+cS.Kbufss;\n ccss = cS.Kbufss*(CaSSBuf+dCaSS+cS.cass);\n cS.cass = (Math.sqrt(bcss*bcss+4.*ccss)-bcss)/2.;\n\n CaBuf = cS.Bufc*cS.cai/(cS.cai+cS.Kbufc);\n dCai = cS.timestep *((-(cS.ibca+cS.ipca-2*cS.inaca)*cC.inverseVcF2*cS.CAPACITANCE)-(cS.Iup-cS.Ileak)*(cS.Vsr/cS.Vc)+cS.Ixfer); \n bc = cS.Bufc-CaBuf-dCai-cS.cai+cS.Kbufc;\n cc = cS.Kbufc*(CaBuf+dCai+cS.cai);\n cS.cai = (Math.sqrt(bc*bc+4.*cc)-bc)/2.;\n\n dNai = -(cS.ina+cS.ibna+3.*cS.inak+3.*cS.inaca)*cC.inverseVcF*cS.CAPACITANCE;\n cS.nai = cS.nai+cS.timestep*dNai;\n\n dKi = -(cS.Istim+cS.ik1+cS.ito+cS.ikr+cS.iks-2.*cS.inak+cS.ipk)*cC.inverseVcF*cS.CAPACITANCE; \n cS.ki = cS.ki+cS.timestep*dKi;\n cS.v = cS.v - cS.sItot * cS.timestep ;\n \n\n //cal ends\n // sets voltage variables after calculations\n utils.copySpecific(data.calculationSettings, cS, data.calculationSettings.voltageVariables);\n \n // sets current variables after calculations\n utils.copySpecific(data.calculationSettings, cS, data.calculationSettings.currentVariables);\n \n // iterate the count\n count++;\n\n return data; \n }", "function calculateNext(data) {\n \n\t\tvar yinft_t, exptauyt_t, xinft_t, exptauxt_t, ikcoefft_t, rinft_t, exptaurt_t, itoterm1t_t, itoterm2t_t, itoterm3t_t,\n\t\tinacaterm1t_t, inacaterm2t_t, minft_t, exptaumt_t, hinft_t, exptauht_t, dinft_t, exptaudt_t, finft_t, exptauft_t,\n\t\tisicaterm1t_t, isikterm1t_t, isikterm2t_t, pinft_t, exptaupt_t, ik1term1t_t, \n\n\t\tadum, bdum, ena, ek, emh, eca, vmek, yinf, exptauy, ikc, inac, ionc, xinf, exptaux, ikcoeff, ik1term1, rinf, exptaur,\n\t\titoterm1, itoterm2, itoterm3, icac, inacaterm1, inacaterm2, nai3, dum2, dum3, dum4, minf, exptaum, hinf, exptauh, \n\t\tdinf, exptaud, finf, exptauf, tvar, inf, isicaterm1, isikterm1, isikterm2, imk, imna, imca, iion,\n\t\tfactor, derv, pinf, exptaup, iup, itr, irel, dcaup, dcarel, dcai, dna, dk ;\n\n\t\tadum = 0.05 * Math.exp(-0.067 * (cS.v + 42.));\n bdum = (Math.abs(cS.v + 42.) <= 1e-6) ? 2.5 : (cS.v + 42.) / (1.- Math.exp(-0.2 * (cS.v + 42.)));\n cS.tau = adum + bdum;\n yinft_t = adum / cS.tau;\n exptauyt_t = Math.exp(-cS.timestep * cS.tau);\n adum = 0.5 * Math.exp(0.0826 * (cS.v + 50.)) / (1.0 + Math.exp(0.057 * (cS.v + 50.)));\n bdum = 1.3 * Math.exp(-0.06 * (cS.v + 20.)) / (1. + Math.exp(-0.04 * (cS.v + 20.)));\n cS.tau = adum + bdum;\n xinft_t = adum / cS.tau;\n exptauxt_t = Math.exp(-cS.timestep * cS.tau);\n ikcoefft_t = Math.exp(-cS.v * cC.fort);\n adum = 0.033 * Math.exp(-cS.v / 17.);\n bdum = 33. / (1. + Math.exp(-(cS.v + 10.) / 8.));\n cS.tau = adum + bdum;\n rinft_t = adum / cS.tau;\n exptaurt_t = Math.exp(-cS.timestep * cS.tau);\n itoterm1t_t = (Math.abs(cS.v + 10.) <= (10e-6)) ? 5. : (cS.v + 10.) / (1.-Math.exp(-2. * (cS.v + 10.)));\n itoterm2t_t = Math.exp(.02 * cS.v);\n itoterm3t_t = Math.exp(-.02 * cS.v);\n inacaterm1t_t = Math.exp(cS.gamma * cS.v * cC.fort);\n inacaterm2t_t = Math.exp((cS.gamma - 1.) * cS.v * cC.fort);\n adum = (Math.abs(cS.v + 41.) <= 1e-6) ? 2000 : 200. * (cS.v + 41.) / (1.-Math.exp(-0.1 * (cS.v + 41.)));\n bdum = 8000. * Math.exp(-0.056 * (cS.v + 66.));\n cS.tau = adum + bdum;\n minft_t = adum / cS.tau;\n exptaumt_t = Math.exp(-cS.timestep * cS.tau);\n adum = 20. * Math.exp(-0.125 * (cS.v + 75.));\n bdum = 2000. / (1. + 320. * Math.exp(-0.1 * (cS.v + 75.)));\n cS.tau = adum + bdum;\n hinft_t = adum / cS.tau;\n exptauht_t = Math.exp(-cS.timestep * cS.tau);\n if(Math.abs(cS.v + 19.) <= 1e-6){\n adum = 120.;\n bdum = 120.;\n }\n else{\n adum = 30. * (cS.v + 19.) / (1.-Math.exp(-(cS.v + 19.) / 4.));\n bdum = 12. * (cS.v + 19.) / (Math.exp((cS.v + 19.) / 10.)-1.);\n }\n cS.tau = adum + bdum;\n dinft_t = adum / cS.tau;\n exptaudt_t = Math.exp(-cS.timestep * cS.tau);\n adum = (Math.abs((cS.v + 34.)) <= 1e-6) ? 25. : 6.25 * (cS.v + 34.) / (Math.exp((cS.v + 34.) / 4.)-1.);\n bdum = 50. / (1. + Math.exp(-(cS.v + 34.) / 4.));\n cS.tau = adum + bdum;\n finft_t = adum / cS.tau;\n exptauft_t = Math.exp(-cS.timestep * cS.tau);\n isicaterm1t_t = Math.exp(-2. * (cS.v - 50.) * cC.fort);\n isikterm1t_t = (1.- Math.exp(-(cS.v - 50.) * cC.fort));\n isikterm2t_t = Math.exp((50. - cS.v) * cC.fort);\n adum = (Math.abs((cS.v + 34.)) <= 1e-6) ? 2.5 : .625 * (cS.v + 34.) / (Math.exp((cS.v + 34.) / 4.)-1.);\n bdum = 5.0 / (1. + Math.exp(-(cS.v + 34.) / 4.));\n cS.tau = adum + bdum;\n pinft_t = adum / cS.tau;\n exptaupt_t = Math.exp(-cS.timestep * cS.tau);\n\n // compute equilibrium potentials\n\t\t\n\t\tena = cC.rtof * Math.log(cS.nao / cS.nai);\n ek = cC.rtof * Math.log(cS.kc / cS.ki);\n emh = cC.rtof * Math.log((cS.nao + 0.12 * cS.kc) / (cS.nai + 0.12 * cS.ki));\n eca = 0.5 * cC.rtof * Math.log(cS.cao / cS.cai);\n \n vmek = cS.v - ek;\n ik1term1t_t = cS.gk1 * (vmek) / (1. + Math.exp(2. * (vmek + 10.) * cC.fort));\n\t\t\n\t\t// hyperpolarizing-activated current\n yinf = yinft_t;\n exptauy = exptauyt_t;\n cS.y = yinf - (yinf - cS.y) * exptauy;\n\n cS.ifk = cS.y * (cS.kc / (cS.kc + cS.kmf)) * cS.gfk * (cS.v - ek);\n cS.ifna = cS.y * (cS.kc / (cS.kc + cS.kmf)) * cS.gfna * (cS.v - ena);\n// cS.ifk = 0.0\n// cS.ifna = 0.0\n ikc = cS.ifk;\n inac = cS.ifna;\n ionc = cS.ifk + cS.ifna;\n\n// time-dependent (delayed K + current)\n xinf = xinft_t;\n exptaux = exptauxt_t;\n cS.x = xinf - (xinf - cS.x) * exptaux;\n\n ikcoeff = ikcoefft_t;\n cS.ik = cS.x * cS.ikmax * (cS.ki - cS.kc * ikcoeff) / 140.;\n ikc = ikc + cS.ik;\n ionc = ionc + cS.ik;\n\n// time-independent (background) K + current\n ik1term1 = ik1term1t_t;\n cS.ik1 = (cS.kc / (cS.kc + cS.km1)) * ik1term1;\n ikc = ikc + cS.ik1;\n ionc = ionc + cS.ik1;\n\n\t\t// transient outward current\n rinf = rinft_t;\n exptaur = exptaurt_t;\n cS.r = rinf - (rinf - cS.r) * exptaur;\n\n itoterm1 = itoterm1t_t;\n itoterm2 = itoterm2t_t;\n itoterm3 = itoterm3t_t;\n cS.ito = (cS.r * cS.gto * (0.2 + (cS.kc / (cS.kc + cS.kmt))) * (cS.cai / \n (cS.kact + cS.cai)) * itoterm1) * (cS.ki * itoterm2-cS.kc * itoterm3); // gto = 0.28\n ikc = ikc + cS.ito;\n ionc = ionc + cS.ito;\n\t\t \n// background sodium current\n cS.ibna = cS.gbna * (cS.v - ena);\n inac = inac + cS.ibna;\n ionc = ionc + cS.ibna;\n\n// background calcium current\n cS.ibca = cS.gbca * (cS.v - eca);\n icac = cS.ibca;\n ionc = ionc + cS.ibca;\n\n// na-k pump exchange current\n cS.inak = cS.ipmax * (cS.kc / (cS.kmk + cS.kc)) * (cS.nai / (cS.kmna + cS.nai));\n ikc = ikc - 2. * cS.inak;\n inac = inac + 3. * cS.inak;\n ionc = ionc + cS.inak;\n\n// na-ca pump exchange current\n inacaterm1 = inacaterm1t_t;\n inacaterm2 = inacaterm2t_t;\n nai3 = cS.nai * cS.nai * cS.nai;\n dum2 = nai3 * cS.cao * inacaterm1;\n dum3 = cC.nao3 * (cS.cai) * inacaterm2;\n dum4 = 1. + cS.dnaca * ((cS.cai) * cC.nao3 + cS.cao * nai3);\n cS.inaca = cS.knaca * (dum2 - dum3) / dum4;\n inac = inac + 3 * cS.inaca;\n icac = icac - 2. * cS.inaca;\n ionc = ionc + cS.inaca;\n\n// fast sodium current\n minf = minft_t;\n exptaum = exptaumt_t;\n cS.m = minf - (minf - cS.m) * exptaum;\n\n hinf = hinft_t;\n exptauh = exptauht_t;\n cS.h = hinf - (hinf - cS.h) * exptauh;\n\n cS.ina = cS.m * cS.m * cS.m * cS.h * cS.gna * (cS.v - emh);\n inac = inac + cS.ina;\n ionc = ionc + cS.ina; \n\n// fast second inward current (calcium)\n dinf = dinft_t;\n exptaud = exptaudt_t;\n cS.d = dinf - (dinf - cS.d) * exptaud;\n\n finf = finft_t;\n exptauf = exptauft_t;\n cS.f = finf - (finf - cS.f) * exptauf;\n\n adum = 5.;\n bdum = cS.cai * adum / cS.kmf2;\n tvar = adum + bdum;\n inf = adum / (adum + bdum);\n cS.f2 = inf - (inf - cS.f2) * Math.exp(-cS.timestep * tvar);\n\n dum2 = cS.d * cS.f * cS.f2 * (4. * cS.psi * (cS.v - 50.) * cC.fort);\n isicaterm1 = isicaterm1t_t;\n dum3 = (1. - isicaterm1);\n dum4 = cS.cai * cC.exp100fort - cS.cao * isicaterm1;\n cS.isica = dum2 * dum4 / dum3;\n icac = icac + cS.isica;\n ionc = ionc + cS.isica;\n\n// more fast inward current\n isikterm1 = isikterm1t_t;\n isikterm2 = isikterm2t_t;\n dum3 = isikterm1;\n dum4 = cS.ki * cC.exp50fort - cS.kc * isikterm2;\n cS.isik = dum2 * dum4 / (400. * dum3);\n ikc = ikc + cS.isik;\n ionc = ionc + cS.isik;\n\n// total currents used to update each ion concentration\n imk = ikc;\n imna = inac;\n imca = icac;\n\n// convert from nanoamperes to microampers per square cm\n\n// iion = 0.015 * ionc\n\n// derv = -1000. * iion / cm\n\n imna = cS.ifna + cS.ina + 3. * cS.inaca + 3. * cS.inak + cS.ibna;\n imk = cS.ifk + cS.ik + cS.ik1 + cS.ito + cS.isik - 2. * cS.inak;\n imca = cS.isica - 2. * cS.inaca + cS.ibca;\n iion = imna + imk + imca;\n\n\n// stimulus\n// if(ttim * 1000.0.le.1.0) then\n// if(mod(it,icycle).le.istimdur) then\n// if(ttim * 1000.0.le.1.0.or.\n// & (ttim * 1000.0.gt.500.0.and.ttim * 1000.0.le.501.0)) then\n// ionc = ionc-10000.0\n// endif\n// 1750 works, 1800 does not so use 1750 as diast. thresh, 3500 = 2 * \n // if(mod(ntime,icycle).le.istimdur) then\n factor = _s1s2Stimulus(count,data);\n iion = iion - factor;\n imk = imk - factor;\n \n derv = iion / cS.cm;\n\n \n// change in intracellular sodium \n dna = (-imna / (cC.vi * cS.fcon)) * cS.timestep;\n cS.nai = cS.nai + dna;\n\n// change in extracellular potassium\n dk = (-cS.prate * (cS.kc - cS.kb) + imk / (cC.ve * cS.fcon)) * cS.timestep;\n cS.kc = cS.kc + dk;\n\n// change in intracellular potassium\n dk = (-imk / (cC.vi * cS.fcon)) * cS.timestep;\n cS.ki = cS.ki + dk;\n\t\t\n// intracellular calcium handling\n pinf = pinft_t;\n exptaup = exptaupt_t;\n cS.p = pinf - (pinf - cS.p) * exptaup;\n\n iup = cC.aup * cS.cai * (cS.cabarup - cS.caup);\n itr = cC.atr * cS.p * (cS.caup - cS.carel);\n irel = cC.arel * cS.carel * (((cS.cai) * cS.cai) / ((cS.cai) * cS.cai + cS.kmca * cS.kmca));\n\n dcaup = ((iup - itr) / (2. * cC.vup * cS.fcon)) * cS.timestep;\n cS.caup = cS.caup + dcaup;\n\n dcarel = ((itr - irel) / (2. * cC.vrel * cS.fcon)) * cS.timestep;\n cS.carel = cS.carel + dcarel;\n\n dcai = (-(imca + iup - irel) / (2. * cC.vi * cS.fcon)) * cS.timestep;\n cS.cai = cS.cai + dcai;\n\n// update voltage\n cS.v = cS.v - cS.timestep * derv;\n\t\t\n // sets voltage variables after calculations\n utils.copySpecific(data.calculationSettings, cS, data.calculationSettings.voltageVariables);\n \n // sets current variables after calculations\n utils.copySpecific(data.calculationSettings, cS, data.calculationSettings.currentVariables);\n \n // iterate the count\n count++;\n return data; \n }", "function dft_direct (re, im) {\n let N = re.length;\n // is this necessary? should be able to do DFT with any N\n //if (N.toString(2) % 10) return; // check that N is a power of 2\n\n // array containing N evenly spaced points around the unit circle\n let W = discrete_circle(N);\n\n // debugger;\n // initialize imaginary values to zero if not provided\n im = im || re.map( a => 0 );\n\n // sum (x * W) over N points (0 to N-1), for all frequencies k in N\n return re.map( (_, k) =>\n re.map( (_, n) => cpx_mult([re[n], im[n]], W[n * k % N]) )\n .reduce( (a, b) => cpx_add(a, b) ));\n}", "function fftRadix2(realVals, imagVals, size, inverse, cpuBackend) {\n if (size === 1) {\n return { real: realVals, imag: imagVals };\n }\n const data = backend_util.mergeRealAndImagArrays(realVals, imagVals);\n const half = size / 2;\n const evenComplex = backend_util.complexWithEvenIndex(data);\n const evenRealVals = evenComplex.real;\n const evenImagVals = evenComplex.imag;\n const evenShape = [evenRealVals.length];\n const evenRealInfo = cpuBackend.makeTensorInfo(evenShape, 'float32', evenRealVals);\n const evenImagInfo = cpuBackend.makeTensorInfo(evenShape, 'float32', evenImagVals);\n const evenTensorInfo = complex({ inputs: { real: evenRealInfo, imag: evenImagInfo }, backend: cpuBackend });\n const oddComplex = backend_util.complexWithOddIndex(data);\n const oddRealVals = oddComplex.real;\n const oddImagVals = oddComplex.imag;\n const oddShape = [oddRealVals.length];\n const oddRealInfo = cpuBackend.makeTensorInfo(oddShape, 'float32', oddRealVals);\n const oddImagInfo = cpuBackend.makeTensorInfo(oddShape, 'float32', oddImagVals);\n const oddTensorInfo = complex({ inputs: { real: oddRealInfo, imag: oddImagInfo }, backend: cpuBackend });\n // Recursive call for half part of original input.\n const $evenComplex = fftRadix2(evenRealVals, evenImagVals, half, inverse, cpuBackend);\n const $evenRealVals = $evenComplex.real;\n const $evenImagVals = $evenComplex.imag;\n const $evenShape = [$evenRealVals.length];\n const $evenRealInfo = cpuBackend.makeTensorInfo($evenShape, 'float32', $evenRealVals);\n const $evenImagInfo = cpuBackend.makeTensorInfo($evenShape, 'float32', $evenImagVals);\n const $evenTensorInfo = complex({\n inputs: { real: $evenRealInfo, imag: $evenImagInfo },\n backend: cpuBackend\n });\n const $oddComplex = fftRadix2(oddRealVals, oddImagVals, half, inverse, cpuBackend);\n const $oddRealVals = $oddComplex.real;\n const $oddImagVals = $oddComplex.imag;\n const $oddShape = [$oddRealVals.length];\n const $oddRealInfo = cpuBackend.makeTensorInfo($oddShape, 'float32', $oddRealVals);\n const $oddImagInfo = cpuBackend.makeTensorInfo($oddShape, 'float32', $oddImagVals);\n const $oddTensorInfo = complex({ inputs: { real: $oddRealInfo, imag: $oddImagInfo }, backend: cpuBackend });\n const e = backend_util.exponents(size, inverse);\n const eShape = [e.real.length];\n const eRealInfo = cpuBackend.makeTensorInfo(eShape, 'float32', e.real);\n const eImagInfo = cpuBackend.makeTensorInfo(eShape, 'float32', e.imag);\n const complexInfo = complex({ inputs: { real: eRealInfo, imag: eImagInfo }, backend: cpuBackend });\n const exponentInfo = multiply({ inputs: { a: complexInfo, b: $oddTensorInfo }, backend: cpuBackend });\n const addPart = add({\n inputs: { a: $evenTensorInfo, b: exponentInfo },\n backend: cpuBackend\n });\n const subPart = sub({\n inputs: { a: $evenTensorInfo, b: exponentInfo },\n backend: cpuBackend\n });\n const addPartReal = real({ inputs: { input: addPart }, backend: cpuBackend });\n const subPartReal = real({ inputs: { input: subPart }, backend: cpuBackend });\n const addPartImag = imag({ inputs: { input: addPart }, backend: cpuBackend });\n const subPartImag = imag({ inputs: { input: subPart }, backend: cpuBackend });\n const $real = concat({\n inputs: [addPartReal, subPartReal],\n backend: cpuBackend,\n attrs: { axis: 0 }\n });\n const $imag = concat({\n inputs: [addPartImag, subPartImag],\n backend: cpuBackend,\n attrs: { axis: 0 }\n });\n const $realVals = cpuBackend.data.get($real.dataId).values;\n const $imagVals = cpuBackend.data.get($imag.dataId).values;\n cpuBackend.disposeIntermediateTensorInfo(evenRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(evenImagInfo);\n cpuBackend.disposeIntermediateTensorInfo(evenTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo(oddRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(oddImagInfo);\n cpuBackend.disposeIntermediateTensorInfo(oddTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo($evenRealInfo);\n cpuBackend.disposeIntermediateTensorInfo($evenImagInfo);\n cpuBackend.disposeIntermediateTensorInfo($evenTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo($oddRealInfo);\n cpuBackend.disposeIntermediateTensorInfo($oddImagInfo);\n cpuBackend.disposeIntermediateTensorInfo($oddTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo(eRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(eImagInfo);\n cpuBackend.disposeIntermediateTensorInfo(complexInfo);\n cpuBackend.disposeIntermediateTensorInfo(exponentInfo);\n cpuBackend.disposeIntermediateTensorInfo(addPart);\n cpuBackend.disposeIntermediateTensorInfo(subPart);\n cpuBackend.disposeIntermediateTensorInfo(addPartReal);\n cpuBackend.disposeIntermediateTensorInfo(addPartImag);\n cpuBackend.disposeIntermediateTensorInfo(subPartReal);\n cpuBackend.disposeIntermediateTensorInfo(subPartImag);\n cpuBackend.disposeIntermediateTensorInfo($real);\n cpuBackend.disposeIntermediateTensorInfo($imag);\n return { real: $realVals, imag: $imagVals };\n}", "function doFFT(values) {\n\tvar data = new complex_array.ComplexArray(values.length);\n\tdata.real = new Float32Array(values);\n\tvar frequencies = data.FFT();\n\n\treturn frequencies;\n}", "calculateLoudness(buffer) {\n\n // first call or after resetMemory\n if (this.copybuffer == undefined) {\n // how long should the copybuffer be at least? \n // --> at least maxT should fit in and length shall be an integer fraction of buffer length\n let length = Math.floor(this.sampleRate * this.loudnessprops.maxT / buffer.length + 1) * buffer.length;\n this.copybuffer = new CircularAudioBuffer(context, this.nChannels, length, this.sampleRate);\n }\n\n //accumulate buffer to previous call\n this.copybuffer.concat(buffer);\n\n // must be gt nSamplesPerInterval\n // or: wait at least one interval time T to be able to calculate loudness\n if (this.copybuffer.getLength() < this.nSamplesPerInterval) {\n console.log('buffer too small ... have to eat more data');\n return NaN;\n }\n\n // get array of meansquares from buffer of overlapping intervals\n let meanSquares = this.getBufferMeanSquares(this.copybuffer, this.nSamplesPerInterval, this.nStepsize);\n\n // first stage filter\n this.filterBlocks(meanSquares, this.gamma_a);\n\n // second stage filter\n let gamma_r = 0.;\n for (let chIdx = 0; chIdx < this.nChannels; chIdx++) {\n let mean = 0.;\n for (let idx = 0; idx < meanSquares[chIdx].length; idx++) {\n mean += meanSquares[chIdx][idx];\n }\n mean /= meanSquares[chIdx].length;\n gamma_r += (this.channelWeight[chIdx] * mean);\n }\n gamma_r = -0.691 + 10.0 * Math.log10(gamma_r) - 10.;\n\n this.filterBlocks(meanSquares, gamma_r);\n\n // gated loudness from filtered blocks\n let gatedLoudness = 0.;\n for (let chIdx = 0; chIdx < this.nChannels; chIdx++) {\n let mean = 0.;\n for (let idx = 0; idx < meanSquares[chIdx].length; idx++) {\n mean += meanSquares[chIdx][idx];\n }\n mean /= meanSquares[chIdx].length;\n\n gatedLoudness += (this.channelWeight[chIdx] * mean);\n }\n gatedLoudness = -0.691 + 10.0 * Math.log10(gatedLoudness);\n\n //console.log(this.id, '- gatedLoudness:', gatedLoudness);\n\n return gatedLoudness;\n }", "function yt(t){var S,k,_,A,e,u=Math.floor,I=new Array(64),C=new Array(64),T=new Array(64),F=new Array(64),w=new Array(65535),y=new Array(65535),Q=new Array(64),v=new Array(64),P=[],E=0,q=7,O=new Array(64),B=new Array(64),R=new Array(64),n=new Array(256),j=new Array(2048),b=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],D=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],M=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],N=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],z=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function r(t,e){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=t[o];a++)i[e[r]]=[],i[e[r]][0]=n,i[e[r]][1]=o,r++,n++;n*=2}return i}function G(t){for(var e=t[0],n=t[1]-1;0<=n;)e&1<<n&&(E|=1<<q),n--,--q<0&&(255==E?(V(255),V(0)):V(E),q=7,E=0)}function V(t){P.push(t)}function Y(t){V(t>>8&255),V(255&t)}function X(t,e,n,r,i){for(var o,a=i[0],s=i[240],h=function(t,e){var n,r,i,o,a,s,h,c,l,u,f=0;for(l=0;l<8;++l){n=t[f],r=t[f+1],i=t[f+2],o=t[f+3],a=t[f+4],s=t[f+5],h=t[f+6];var d=n+(c=t[f+7]),p=n-c,g=r+h,m=r-h,w=i+s,y=i-s,v=o+a,b=o-a,x=d+v,S=d-v,k=g+w,_=g-w;t[f]=x+k,t[f+4]=x-k;var A=.707106781*(_+S);t[f+2]=S+A,t[f+6]=S-A;var I=.382683433*((x=b+y)-(_=m+p)),C=.5411961*x+I,T=1.306562965*_+I,F=.707106781*(k=y+m),P=p+F,E=p-F;t[f+5]=E+C,t[f+3]=E-C,t[f+1]=P+T,t[f+7]=P-T,f+=8}for(l=f=0;l<8;++l){n=t[f],r=t[f+8],i=t[f+16],o=t[f+24],a=t[f+32],s=t[f+40],h=t[f+48];var q=n+(c=t[f+56]),O=n-c,B=r+h,R=r-h,j=i+s,D=i-s,M=o+a,U=o-a,N=q+M,z=q-M,L=B+j,H=B-j;t[f]=N+L,t[f+32]=N-L;var W=.707106781*(H+z);t[f+16]=z+W,t[f+48]=z-W;var G=.382683433*((N=U+D)-(H=R+O)),V=.5411961*N+G,Y=1.306562965*H+G,X=.707106781*(L=D+R),J=O+X,K=O-X;t[f+40]=K+V,t[f+24]=K-V,t[f+8]=J+Y,t[f+56]=J-Y,f++}for(l=0;l<64;++l)u=t[l]*e[l],Q[l]=0<u?u+.5|0:u-.5|0;return Q}(t,e),c=0;c<64;++c)v[b[c]]=h[c];var l=v[0]-n;n=v[0],0==l?G(r[0]):(G(r[y[o=32767+l]]),G(w[o]));for(var u=63;0<u&&0==v[u];u--);if(0==u)return G(a),n;for(var f,d=1;d<=u;){for(var p=d;0==v[d]&&d<=u;++d);var g=d-p;if(16<=g){f=g>>4;for(var m=1;m<=f;++m)G(s);g&=15}o=32767+v[d],G(i[(g<<4)+y[o]]),G(w[o]),d++}return 63!=u&&G(a),n}function J(t){if(t<=0&&(t=1),100<t&&(t=100),e!=t){(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=u((e[n]*t+50)/100);r<1?r=1:255<r&&(r=255),I[b[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var a=u((i[o]*t+50)/100);a<1?a=1:255<a&&(a=255),C[b[o]]=a}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],h=0,c=0;c<8;c++)for(var l=0;l<8;l++)T[h]=1/(I[b[h]]*s[c]*s[l]*8),F[h]=1/(C[b[h]]*s[c]*s[l]*8),h++})(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),e=t}}this.encode=function(t,e){var n,r;(new Date).getTime();e&&J(e),P=new Array,E=0,q=7,Y(65496),Y(65504),Y(16),V(74),V(70),V(73),V(70),V(0),V(1),V(1),V(0),Y(1),Y(1),V(0),V(0),function(){Y(65499),Y(132),V(0);for(var t=0;t<64;t++)V(I[t]);V(1);for(var e=0;e<64;e++)V(C[e])}(),n=t.width,r=t.height,Y(65472),Y(17),V(8),Y(r),Y(n),V(3),V(1),V(17),V(0),V(2),V(17),V(1),V(3),V(17),V(1),function(){Y(65476),Y(418),V(0);for(var t=0;t<16;t++)V(D[t+1]);for(var e=0;e<=11;e++)V(M[e]);V(16);for(var n=0;n<16;n++)V(U[n+1]);for(var r=0;r<=161;r++)V(N[r]);V(1);for(var i=0;i<16;i++)V(z[i+1]);for(var o=0;o<=11;o++)V(L[o]);V(17);for(var a=0;a<16;a++)V(H[a+1]);for(var s=0;s<=161;s++)V(W[s])}(),Y(65498),Y(12),V(3),V(1),V(0),V(2),V(17),V(3),V(17),V(0),V(63),V(0);var i=0,o=0,a=0;E=0,q=7,this.encode.displayName=\"_encode_\";for(var s,h,c,l,u,f,d,p,g,m=t.data,w=t.width,y=t.height,v=4*w,b=0;b<y;){for(s=0;s<v;){for(f=u=v*b+s,d=-1,g=p=0;g<64;g++)f=u+(p=g>>3)*v+(d=4*(7&g)),y<=b+p&&(f-=v*(b+1+p-y)),v<=s+d&&(f-=s+d-v+4),h=m[f++],c=m[f++],l=m[f++],O[g]=(j[h]+j[c+256>>0]+j[l+512>>0]>>16)-128,B[g]=(j[h+768>>0]+j[c+1024>>0]+j[l+1280>>0]>>16)-128,R[g]=(j[h+1280>>0]+j[c+1536>>0]+j[l+1792>>0]>>16)-128;i=X(O,T,i,S,_),o=X(B,F,o,k,A),a=X(R,F,a,k,A),s+=32}b+=8}if(0<=q){var x=[];x[1]=q+1,x[0]=(1<<q+1)-1,G(x)}return Y(65497),new Uint8Array(P)},function(){(new Date).getTime();t||(t=50),function(){for(var t=String.fromCharCode,e=0;e<256;e++)n[e]=t(e)}(),S=r(D,M),k=r(z,L),_=r(U,N),A=r(H,W),function(){for(var t=1,e=2,n=1;n<=15;n++){for(var r=t;r<e;r++)y[32767+r]=n,w[32767+r]=[],w[32767+r][1]=n,w[32767+r][0]=r;for(var i=-(e-1);i<=-t;i++)y[32767+i]=n,w[32767+i]=[],w[32767+i][1]=n,w[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)j[t]=19595*t,j[t+256>>0]=38470*t,j[t+512>>0]=7471*t+32768,j[t+768>>0]=-11059*t,j[t+1024>>0]=-21709*t,j[t+1280>>0]=32768*t+8421375,j[t+1536>>0]=-27439*t,j[t+1792>>0]=-5329*t}(),J(t),(new Date).getTime()}()}", "function _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 = [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],\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 = [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],\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 = [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];\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 n *= 2;\n }\n\n return i;\n }\n\n function V(t) {\n 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);\n }\n\n function G(t) {\n I.push(t);\n }\n\n function Y(t) {\n G(t >> 8 & 255), G(255 & t);\n }\n\n function J(t, e, n, r, i) {\n for (var o, a = i[0], s = i[240], 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\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 = .707106781 * (A + N);\n t[f + 2] = N + S, t[f + 6] = N - S;\n\n var _ = .382683433 * ((x = b + v) - (A = m + d)),\n F = .5411961 * x + _,\n P = 1.306562965 * A + _,\n k = .707106781 * (L = v + m),\n I = d + k,\n C = d - k;\n\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\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 = .707106781 * (H + U);\n t[f + 16] = U + W, t[f + 48] = U - W;\n var V = .382683433 * ((D = R + q) - (H = M + j)),\n G = .5411961 * D + V,\n Y = 1.306562965 * H + V,\n J = .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\n for (u = 0; u < 64; ++u) c = t[u] * e[u], Z[u] = 0 < c ? c + .5 | 0 : c - .5 | 0;\n\n return Z;\n }(t, e), h = 0; h < 64; ++h) w[b[h]] = l[h];\n\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\n for (var c = 63; 0 < c && 0 == w[c]; c--);\n\n if (0 == c) return V(a), n;\n\n for (var f, p = 1; p <= c;) {\n for (var d = p; 0 == w[p] && p <= c; ++p);\n\n var g = p - d;\n\n if (16 <= g) {\n f = g >> 4;\n\n for (var m = 1; m <= f; ++m) V(s);\n\n g &= 15;\n }\n\n o = 32767 + w[p], V(i[(g << 4) + v[o]]), V(y[o]), p++;\n }\n\n return 63 != c && V(a), n;\n }\n\n function X(t) {\n if (t <= 0 && (t = 1), 100 < t && (t = 100), e != t) {\n (function (t) {\n 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++) {\n var r = c((e[n] * t + 50) / 100);\n r < 1 ? r = 1 : 255 < r && (r = 255), _[b[n]] = r;\n }\n\n 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++) {\n var a = c((i[o] * t + 50) / 100);\n a < 1 ? a = 1 : 255 < a && (a = 255), F[b[o]] = a;\n }\n\n 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++;\n })(t < 50 ? Math.floor(5e3 / t) : Math.floor(200 - 2 * t)), e = t;\n }\n }\n\n this.encode = function (t, e) {\n var n, r;\n new Date().getTime();\n 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 () {\n Y(65499), Y(132), G(0);\n\n for (var t = 0; t < 64; t++) G(_[t]);\n\n G(1);\n\n for (var e = 0; e < 64; e++) G(F[e]);\n }(), 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 () {\n Y(65476), Y(418), G(0);\n\n for (var t = 0; t < 16; t++) G(q[t + 1]);\n\n for (var e = 0; e <= 11; e++) G(T[e]);\n\n G(16);\n\n for (var n = 0; n < 16; n++) G(R[n + 1]);\n\n for (var r = 0; r <= 161; r++) G(D[r]);\n\n G(1);\n\n for (var i = 0; i < 16; i++) G(U[i + 1]);\n\n for (var o = 0; o <= 11; o++) G(z[o]);\n\n G(17);\n\n for (var a = 0; a < 16; a++) G(H[a + 1]);\n\n for (var s = 0; s <= 161; s++) G(W[s]);\n }(), Y(65498), Y(12), G(3), G(1), G(0), G(2), G(17), G(3), G(17), G(0), G(63), G(0);\n var i = 0,\n o = 0,\n a = 0;\n C = 0, B = 7, this.encode.displayName = \"_encode_\";\n\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++) 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;\n\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\n b += 8;\n }\n\n if (0 <= B) {\n var x = [];\n x[1] = B + 1, x[0] = (1 << B + 1) - 1, V(x);\n }\n\n return Y(65497), new Uint8Array(I);\n }, function () {\n new Date().getTime();\n t || (t = 50), function () {\n for (var t = String.fromCharCode, e = 0; e < 256; e++) n[e] = t(e);\n }(), N = r(q, T), L = r(U, z), A = r(R, D), S = r(H, W), function () {\n for (var t = 1, e = 2, n = 1; n <= 15; n++) {\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;\n\n 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;\n\n t <<= 1, e <<= 1;\n }\n }(), function () {\n 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;\n }(), X(t), new Date().getTime();\n }();\n }", "twistMU() {\n this.fourCycle(this.edgeLoc, 1, 4, 7, 10, this.edgeOrient, 1, 1, 1, 1, 2);\n this.fourCycle(this.sideLoc, 3, 2, 0, 5, this.sideOrient, 2, 1, 2, 3, 4);\n }", "function draw() {\n\t background(0);\n\t var spectrum = fft.analyze();// run the FFT analysis\n\n/*\nLocal Variable, fft.getEnergy maps the different \nfrequencies of the audio and returns values between 0 and 255\n*/\n var bass = fft.getEnergy( \"bass\" );\n var treble = fft.getEnergy( \"treble\" );\n var highMid = fft.getEnergy( \"highMid\" ); \n\n/* \nLocal variable which assigns values to the mapped frequencies\n*/\n var mapMid = map( highMid, 0, 255, -50, 255 );\n var mapTreble = map( treble, 0, 255, -140, 200 );\n\n var pieces = 60;//Local variable for the number of lines in the shape\n var radius = 350\n \t translate (width/2, height/2);// Moves origin to the centre of the canvas\n \t stroke (0);\n \tstrokeWeight(3);\n for( i = 0; i < pieces; i++ ) { // draws a shape of each piece\n \t\n stroke(219, 162, 188);\n rotate(frameCount * 0.0001);\n line(mapMid, mapMid, 10, bass ); \n stroke(17, 218, 211);\n point(mapTreble, 480);\n point(mapMid, 670);\n \n /* \n Push() adds a new item at the end of the array.\n Pop() removes the last item of an array\n */\n push();\n rotate(-frameCount * 0.01);\n stroke(17, 218, 211);\n point(120, bass) ;\n fill(17, 218, 211);\n point(bass,300) ;\n pop();\n \n push();\n rotate(-frameCount * 0.01);//negative framecount allows points to spin counter clockwise\n stroke(219, 162, 188);\n point(550, bass) ;\n point(430, mapTreble) ;\n line( bass, 740, mouseY, 740 );\n pop();\n\n }\n}", "function FFTM(x,y){this.x=x;this.y=y;}", "function FFTM(x,y){this.x=x;this.y=y;}", "function initFourierImage() {\r\n //event listeners\r\n function loadImage(loc) {\r\n var start = +new Date();\r\n\r\n //placed in a callback so the UI has a chance to update\r\n disableButtons(function() {\r\n //draw the initial image\r\n var img = new Image();\r\n img.addEventListener('load', function() {\r\n //make each canvas the image's exact size\r\n dims[0] = img.width;\r\n dims[1] = img.height;\r\n for (var ai = 0; ai < 4; ai++) {\r\n canvases[ai] = $s('#canvas'+ai);\r\n canvases[ai].width = dims[0], canvases[ai].height = dims[1];\r\n ctxs[ai] = canvases[ai].getContext('2d');\r\n }\r\n\r\n //draw the image to the canvas\r\n ctxs[0].drawImage(img, 0, 0, img.width, img.height);\r\n\r\n //grab the pixels\r\n var imageData = ctxs[0].getImageData(0, 0, dims[0], dims[1]);\r\n var h_es = []; //the h values\r\n for (var ai = 0; ai < imageData.data.length; ai+=4) {\r\n //greyscale, so you only need every 4th value\r\n h_es.push(imageData.data[ai]);\r\n }\r\n\r\n //initialize the h values\r\n h = function(n, m) {\r\n if (arguments.length === 0) return h_es;\r\n\r\n var idx = n*dims[0] + m;\r\n return h_es[idx];\r\n }; //create it in function form to make the code match the math\r\n\r\n enableButtons();\r\n\r\n var duration = +new Date() - start;\r\n console.log('It took '+duration+'ms to draw the image.');\r\n });\r\n img.src = loc;\r\n });\r\n }\r\n $s('#draw-cs-btn').addEventListener('click', function() {\r\n loadImage('cs.png');\r\n });\r\n $s('#draw-circle-btn').addEventListener('click', function() {\r\n loadImage('circle.png');\r\n });\r\n $s('#draw-grace-btn').addEventListener('click', function() {\r\n loadImage('grace.png');\r\n });\r\n\r\n $s('#transform-btn').addEventListener('click', function() {\r\n var start = +new Date();\r\n\r\n if (!h()) return alert('You need to draw an image to canvas 1 first.');\r\n\r\n //placed in a callback so the UI has a chance to update\r\n disableButtons(function() {\r\n //compute the h hat values\r\n var h_hats = [];\r\n FFT(h_hats, h());\r\n h_hats = shiftFFT(h_hats);\r\n\r\n //get the largest magnitude\r\n var maxMagnitude = 0;\r\n for (var ai = 0; ai < h_hats.length; ai++) {\r\n var mag = h_hats[ai].magnitude();\r\n if (mag > maxMagnitude) {\r\n maxMagnitude = mag;\r\n }\r\n }\r\n\r\n //apply a low or high pass filter\r\n var lpr = parseInt($s('#low-freq-radius').value); //low pass radius\r\n var hpr = parseInt($s('#high-freq-radius').value); //high \" \"\r\n var N = dims[1], M = dims[0];\r\n for (var k = 0; k < N; k++) {\r\n for (var l = 0; l < M; l++) {\r\n var idx = k*M + l;\r\n var dist = Math.pow(k-M/2, 2) + Math.pow(l-N/2, 2);\r\n if (dist > lpr*lpr && isNaN(hpr) ||\r\n dist < hpr*hpr && isNaN(lpr) ||\r\n dist < lpr*lpr && !isNaN(lpr) && !isNaN(hpr) ||\r\n dist > hpr*hpr && !isNaN(lpr) && !isNaN(hpr)) {\r\n h_hats[idx] = new Complex(0, 0);\r\n }\r\n }\r\n }\r\n\r\n //store them in a nice function to match the math\r\n $h = function(k, l) {\r\n if (arguments.length === 0) return h_hats;\r\n \r\n var idx = k*dims[0] + l;\r\n return h_hats[idx];\r\n };\r\n\r\n //draw the pixels\r\n var currImageData = ctxs[1].getImageData(0, 0, dims[0], dims[1]);\r\n var logOfMaxMag = Math.log(cc*maxMagnitude+1);\r\n for (var k = 0; k < dims[1]; k++) {\r\n for (var l = 0; l < dims[0]; l++) {\r\n var idxInPixels = 4*(dims[0]*k + l);\r\n currImageData.data[idxInPixels+3] = 255; //full alpha\r\n var color = Math.log(cc*$h(k, l).magnitude()+1);\r\n color = Math.round(255*(color/logOfMaxMag));\r\n for (var c = 0; c < 3; c++) { //RGB are the same, lol c++\r\n currImageData.data[idxInPixels+c] = color;\r\n }\r\n }\r\n }\r\n ctxs[1].putImageData(currImageData, 0, 0);\r\n\r\n enableButtons();\r\n\r\n var duration = +new Date() - start;\r\n console.log('It took '+duration+'ms to compute the FT.');\r\n });\r\n });\r\n\r\n $s('#reconstruct-btn').addEventListener('click', function() {\r\n var start = +new Date();\r\n\r\n if (!$h()) {\r\n return alert('You first need to compute the Fourier transform.');\r\n }\r\n\r\n //placed in a callback so the UI has a chance to update\r\n disableButtons(function() {\r\n //compute the h prime values\r\n var h_primes = [];\r\n var h_hats = $h();\r\n h_hats = unshiftFFT(h_hats);\r\n invFFT(h_primes, h_hats);\r\n\r\n //store them in a nice function to match the math\r\n h_ = function(n, m) {\r\n if (arguments.length === 0) return h_primes;\r\n\r\n var idx = n*dims[0] + m;\r\n return round(h_primes[idx], 2);\r\n };\r\n\r\n //draw the pixels\r\n var currImageData = ctxs[2].getImageData(0, 0, dims[0], dims[1]);\r\n for (var n = 0; n < dims[1]; n++) {\r\n for (var m = 0; m < dims[0]; m++) {\r\n var idxInPixels = 4*(dims[0]*n + m);\r\n currImageData.data[idxInPixels+3] = 255; //full alpha\r\n for (var c = 0; c < 3; c++) { //RGB are the same, lol c++\r\n currImageData.data[idxInPixels+c] = h_(n, m);\r\n }\r\n }\r\n }\r\n ctxs[2].putImageData(currImageData, 0, 0);\r\n\r\n enableButtons();\r\n\r\n var duration = +new Date() - start;\r\n console.log('It took '+duration+'ms to reconstruct the image.');\r\n });\r\n });\r\n\r\n $s('#difference-btn').addEventListener('click', function() {\r\n var start = +new Date();\r\n\r\n if (!h_()) {\r\n return alert('You haven\\'t reconstructed an image yet.');\r\n }\r\n\r\n //placed in a callback so the UI has a chance to update\r\n disableButtons(function() {\r\n //find the range of the errors\r\n var minError = Infinity;\r\n var maxError = 0;\r\n for (var n = 0; n < dims[1]; n++) {\r\n for (var m = 0; m < dims[0]; m++) {\r\n var error = h_(n, m) - h(n, m);\r\n if (error < minError) minError = error;\r\n if (error > maxError) maxError = error;\r\n }\r\n }\r\n\r\n //draw the pixels\r\n var currImageData = ctxs[3].getImageData(0, 0, dims[0], dims[1]);\r\n for (var n = 0; n < dims[1]; n++) {\r\n for (var m = 0; m < dims[0]; m++) {\r\n var idxInPixels = 4*(dims[0]*n + m); //idx in the pixels array\r\n var error = h_(n, m) - h(n, m);\r\n var color = getCoolColor(error, [minError, maxError]);\r\n for (var c = 0; c < 3; c++) {\r\n currImageData.data[idxInPixels+c] = color[c];\r\n }\r\n currImageData.data[idxInPixels+3] = 255; // fullalpha\t\t\r\n }\r\n }\r\n ctxs[3].putImageData(currImageData, 0, 0);\r\n\r\n enableButtons();\r\n\r\n var duration = +new Date() - start;\r\n console.log('It took '+duration+'ms to compute the difference.');\r\n });\r\n });\r\n\r\n //initialize the working variables\r\n canvases = [], ctxs = [];\r\n h = $h = h_ = function() { return false; };\r\n}", "function fDCTQuant(data, fdtbl)\n {\n var d0, d1, d2, d3, d4, d5, d6, d7;\n /* Pass 1: process rows. */\n var dataOff=0;\n var i;\n var I8 = 8;\n var I64 = 64;\n for (i=0; i<I8; ++i)\n {\n d0 = data[dataOff];\n d1 = data[dataOff+1];\n d2 = data[dataOff+2];\n d3 = data[dataOff+3];\n d4 = data[dataOff+4];\n d5 = data[dataOff+5];\n d6 = data[dataOff+6];\n d7 = data[dataOff+7];\n \n var tmp0 = d0 + d7;\n var tmp7 = d0 - d7;\n var tmp1 = d1 + d6;\n var tmp6 = d1 - d6;\n var tmp2 = d2 + d5;\n var tmp5 = d2 - d5;\n var tmp3 = d3 + d4;\n var tmp4 = d3 - d4;\n \n /* Even part */\n var tmp10 = tmp0 + tmp3; /* phase 2 */\n var tmp13 = tmp0 - tmp3;\n var tmp11 = tmp1 + tmp2;\n var tmp12 = tmp1 - tmp2;\n \n data[dataOff] = tmp10 + tmp11; /* phase 3 */\n data[dataOff+4] = tmp10 - tmp11;\n \n var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n data[dataOff+2] = tmp13 + z1; /* phase 5 */\n data[dataOff+6] = tmp13 - z1;\n \n /* Odd part */\n tmp10 = tmp4 + tmp5; /* phase 2 */\n tmp11 = tmp5 + tmp6;\n tmp12 = tmp6 + tmp7;\n \n /* The rotator is modified from fig 4-8 to avoid extra negations. */\n var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n var z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n var z3 = tmp11 * 0.707106781; /* c4 */\n \n var z11 = tmp7 + z3; /* phase 5 */\n var z13 = tmp7 - z3;\n \n data[dataOff+5] = z13 + z2; /* phase 6 */\n data[dataOff+3] = z13 - z2;\n data[dataOff+1] = z11 + z4;\n data[dataOff+7] = z11 - z4;\n \n dataOff += 8; /* advance pointer to next row */\n }\n \n /* Pass 2: process columns. */\n dataOff = 0;\n for (i=0; i<I8; ++i)\n {\n d0 = data[dataOff];\n d1 = data[dataOff + 8];\n d2 = data[dataOff + 16];\n d3 = data[dataOff + 24];\n d4 = data[dataOff + 32];\n d5 = data[dataOff + 40];\n d6 = data[dataOff + 48];\n d7 = data[dataOff + 56];\n \n var tmp0p2 = d0 + d7;\n var tmp7p2 = d0 - d7;\n var tmp1p2 = d1 + d6;\n var tmp6p2 = d1 - d6;\n var tmp2p2 = d2 + d5;\n var tmp5p2 = d2 - d5;\n var tmp3p2 = d3 + d4;\n var tmp4p2 = d3 - d4;\n \n /* Even part */\n var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */\n var tmp13p2 = tmp0p2 - tmp3p2;\n var tmp11p2 = tmp1p2 + tmp2p2;\n var tmp12p2 = tmp1p2 - tmp2p2;\n \n data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n data[dataOff+32] = tmp10p2 - tmp11p2;\n \n var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n data[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n data[dataOff+48] = tmp13p2 - z1p2;\n \n /* Odd part */\n tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n tmp11p2 = tmp5p2 + tmp6p2;\n tmp12p2 = tmp6p2 + tmp7p2;\n \n /* The rotator is modified from fig 4-8 to avoid extra negations. */\n var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n var z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n \n var z11p2 = tmp7p2 + z3p2; /* phase 5 */\n var z13p2 = tmp7p2 - z3p2;\n \n data[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n data[dataOff+24] = z13p2 - z2p2;\n data[dataOff+ 8] = z11p2 + z4p2;\n data[dataOff+56] = z11p2 - z4p2;\n \n dataOff++; /* advance pointer to next column */\n }\n \n // Quantize/descale the coefficients\n var fDCTQuant;\n for (i=0; i<I64; ++i)\n {\n // Apply the quantization and scaling factor & Round to nearest integer\n fDCTQuant = data[i]*fdtbl[i];\n outputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n //outputfDCTQuant[i] = fround(fDCTQuant);\n \n }\n return outputfDCTQuant;\n }", "function transformRadix2(real, imag) {\n\t // Initialization\n\t if (real.length != imag.length) throw \"Mismatched lengths\";\n\t var n = real.length;\n\t if (n == 1) // Trivial transform\n\t return;\n\t var levels = -1;\n\t for (var i = 0; i < 32; i++) {\n\t if (1 << i == n) levels = i; // Equal to log2(n)\n\t }\n\t if (levels == -1) throw \"Length is not a power of 2\";\n\t var cosTable = new Array(n / 2);\n\t var sinTable = new Array(n / 2);\n\t for (var i = 0; i < n / 2; i++) {\n\t cosTable[i] = Math.cos(2 * Math.PI * i / n);\n\t sinTable[i] = Math.sin(2 * Math.PI * i / n);\n\t }\n\n\t // Bit-reversed addressing permutation\n\t for (var i = 0; i < n; i++) {\n\t var j = reverseBits(i, levels);\n\t if (j > i) {\n\t var temp = real[i];\n\t real[i] = real[j];\n\t real[j] = temp;\n\t temp = imag[i];\n\t imag[i] = imag[j];\n\t imag[j] = temp;\n\t }\n\t }\n\n\t // Cooley-Tukey decimation-in-time radix-2 FFT\n\t for (var size = 2; size <= n; size *= 2) {\n\t var halfsize = size / 2;\n\t var tablestep = n / size;\n\t for (var i = 0; i < n; i += size) {\n\t for (var j = i, k = 0; j < i + halfsize; j++, k += tablestep) {\n\t var tpre = real[j + halfsize] * cosTable[k] + imag[j + halfsize] * sinTable[k];\n\t var tpim = -real[j + halfsize] * sinTable[k] + imag[j + halfsize] * cosTable[k];\n\t real[j + halfsize] = real[j] - tpre;\n\t imag[j + halfsize] = imag[j] - tpim;\n\t real[j] += tpre;\n\t imag[j] += tpim;\n\t }\n\t }\n\t }\n\n\t // Returns the integer whose value is the reverse of the lowest 'bits' bits of the integer 'x'.\n\t function reverseBits(x, bits) {\n\t var y = 0;\n\t for (var i = 0; i < bits; i++) {\n\t y = y << 1 | x & 1;\n\t x >>>= 1;\n\t }\n\t return y;\n\t }\n\t}", "function calculateNext(data) {\n \n var hthv, hthw, hthso, hthsi, hthvm, htho, hthvinf, hthwinf,\n tvm, ts, to, twp, twm, tso, tsi, vinf, winf, dv, dw, ds;\n \n cS.istim = _s1s2Stimulus(count,data);\n\n // Step functions\n hthv = (cS.u >= cS.thv);\n hthw = (cS.u >= cS.thw);\n hthso = (cS.u >= cS.thw);\n hthsi = (cS.u >= cS.thw);\n hthvm = (cS.u >= cS.thvm);\n htho = (cS.u >= cS.tho);\n hthvinf = (cS.u >= cS.thvm);\n hthwinf = (cS.u >= cS.tho); //thwinf = tho.\n\n // Multi-part terms\n tvm = (1 - hthvm) * cS.tv1m + hthvm * cS.tv2m;\n ts = (1 - hthw) * cS.ts1 + hthw * cS.ts2;\n to = (1 - htho) * cS.to1 + htho * cS.to2;\n twp = cS.tw1p + (cS.tw2p - cS.tw1p) * (1 + Math.tanh((cS.w - cS.wcp) * cS.kwp)) / 2;\n twm = cS.tw1m + (cS.tw2m - cS.tw1m) * (1 + Math.tanh((cS.u - cS.uwm) * cS.kwm)) / 2;\n tso = cS.tso1 + (cS.tso2 - cS.tso1) * (1 + Math.tanh((cS.u - cS.uso) * cS.kso)) / 2;\n tsi = cS.tsi1 + (cS.tsi1 - cS.tsi1) * (1 + Math.tanh((cS.s - cS.sc) * cS.ksi)) / 2;\n vinf = 1 - hthvinf;\n winf = (1 - hthwinf) * (1 - cS.u / cS.twinf) + hthwinf * cS.winfstar;\n\n // Gate evolution\n dv = (1 - hthv) * (vinf - cS.v) / tvm - hthv * cS.v / cS.tvp;\n dw = (1 - hthw) * (winf - cS.w) / twm - hthw * cS.w / twp;\n ds = ((1 + Math.tanh((cS.u - cS.us) * cS.ks)) / 2 - cS.s) / ts;\n cS.v = cS.v + cS.timestep * dv;\n cS.w = cS.w + cS.timestep * dw;\n cS.s = cS.s + cS.timestep * ds;\n \n // Currents\n cS.xfi = -cS.v * hthv * (cS.u - cS.thv) * (cS.uu - cS.u) / cS.tfi;\n cS.xso = (cS.u - cS.uo) * (1 - hthso) / to + hthso / tso;\n cS.xsi = -hthsi * cS.w * cS.s / tsi;\n \n // update u using forward Euler\n cS.u = cS.u - cS.timestep * (cS.xfi + cS.xso + cS.xsi - cS.istim);\n \n // sets voltage variables after calculations\n utils.copySpecific(data.calculationSettings, cS, data.calculationSettings.voltageVariables);\n \n // sets current variables after calculations\n utils.copySpecific(data.calculationSettings, cS, data.calculationSettings.currentVariables);\n \n // iterate the count\n count++;\n \n return data; \n }", "function fDCTQuant(data, fdtbl)\n\t {\n\t var d0, d1, d2, d3, d4, d5, d6, d7;\n\t /* Pass 1: process rows. */\n\t var dataOff=0;\n\t var i;\n\t var I8 = 8;\n\t var I64 = 64;\n\t for (i=0; i<I8; ++i)\n\t {\n\t d0 = data[dataOff];\n\t d1 = data[dataOff+1];\n\t d2 = data[dataOff+2];\n\t d3 = data[dataOff+3];\n\t d4 = data[dataOff+4];\n\t d5 = data[dataOff+5];\n\t d6 = data[dataOff+6];\n\t d7 = data[dataOff+7];\n\t \n\t var tmp0 = d0 + d7;\n\t var tmp7 = d0 - d7;\n\t var tmp1 = d1 + d6;\n\t var tmp6 = d1 - d6;\n\t var tmp2 = d2 + d5;\n\t var tmp5 = d2 - d5;\n\t var tmp3 = d3 + d4;\n\t var tmp4 = d3 - d4;\n\t \n\t /* Even part */\n\t var tmp10 = tmp0 + tmp3; /* phase 2 */\n\t var tmp13 = tmp0 - tmp3;\n\t var tmp11 = tmp1 + tmp2;\n\t var tmp12 = tmp1 - tmp2;\n\t \n\t data[dataOff] = tmp10 + tmp11; /* phase 3 */\n\t data[dataOff+4] = tmp10 - tmp11;\n\t \n\t var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n\t data[dataOff+2] = tmp13 + z1; /* phase 5 */\n\t data[dataOff+6] = tmp13 - z1;\n\t \n\t /* Odd part */\n\t tmp10 = tmp4 + tmp5; /* phase 2 */\n\t tmp11 = tmp5 + tmp6;\n\t tmp12 = tmp6 + tmp7;\n\t \n\t /* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n\t var z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n\t var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n\t var z3 = tmp11 * 0.707106781; /* c4 */\n\t \n\t var z11 = tmp7 + z3; /* phase 5 */\n\t var z13 = tmp7 - z3;\n\t \n\t data[dataOff+5] = z13 + z2; /* phase 6 */\n\t data[dataOff+3] = z13 - z2;\n\t data[dataOff+1] = z11 + z4;\n\t data[dataOff+7] = z11 - z4;\n\t \n\t dataOff += 8; /* advance pointer to next row */\n\t }\n\t \n\t /* Pass 2: process columns. */\n\t dataOff = 0;\n\t for (i=0; i<I8; ++i)\n\t {\n\t d0 = data[dataOff];\n\t d1 = data[dataOff + 8];\n\t d2 = data[dataOff + 16];\n\t d3 = data[dataOff + 24];\n\t d4 = data[dataOff + 32];\n\t d5 = data[dataOff + 40];\n\t d6 = data[dataOff + 48];\n\t d7 = data[dataOff + 56];\n\t \n\t var tmp0p2 = d0 + d7;\n\t var tmp7p2 = d0 - d7;\n\t var tmp1p2 = d1 + d6;\n\t var tmp6p2 = d1 - d6;\n\t var tmp2p2 = d2 + d5;\n\t var tmp5p2 = d2 - d5;\n\t var tmp3p2 = d3 + d4;\n\t var tmp4p2 = d3 - d4;\n\t \n\t /* Even part */\n\t var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */\n\t var tmp13p2 = tmp0p2 - tmp3p2;\n\t var tmp11p2 = tmp1p2 + tmp2p2;\n\t var tmp12p2 = tmp1p2 - tmp2p2;\n\t \n\t data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n\t data[dataOff+32] = tmp10p2 - tmp11p2;\n\t \n\t var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n\t data[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n\t data[dataOff+48] = tmp13p2 - z1p2;\n\t \n\t /* Odd part */\n\t tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n\t tmp11p2 = tmp5p2 + tmp6p2;\n\t tmp12p2 = tmp6p2 + tmp7p2;\n\t \n\t /* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n\t var z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n\t var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n\t var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\t \n\t var z11p2 = tmp7p2 + z3p2; /* phase 5 */\n\t var z13p2 = tmp7p2 - z3p2;\n\t \n\t data[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n\t data[dataOff+24] = z13p2 - z2p2;\n\t data[dataOff+ 8] = z11p2 + z4p2;\n\t data[dataOff+56] = z11p2 - z4p2;\n\t \n\t dataOff++; /* advance pointer to next column */\n\t }\n\t \n\t // Quantize/descale the coefficients\n\t var fDCTQuant;\n\t for (i=0; i<I64; ++i)\n\t {\n\t // Apply the quantization and scaling factor & Round to nearest integer\n\t fDCTQuant = data[i]*fdtbl[i];\n\t outputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n\t //outputfDCTQuant[i] = fround(fDCTQuant);\n\t \n\t }\n\t return outputfDCTQuant;\n\t }", "function Poll_FFT_DTMF()\r\n{\r\n //44100 / 1024 = 43,06 Hz saltos 21,533203125 Hz\r\n try\r\n {\r\n if (gb_use_mic_dtmf === true)\r\n { \r\n if ((typeof gb_mic === 'undefined') || (typeof gb_fft === 'undefined'))\r\n {\r\n\treturn;\r\n }\r\n\t \r\n let spectrum = gb_fft.analyze();\r\n let row= -1;\r\n let col= -1; \r\n \r\n if (spectrum[31] > 250){row = 0;}\r\n else{\r\n if (spectrum[35] > 250){row = 1;}\r\n else{\r\n if (spectrum[39] > 250){row = 2;}\r\n else{\r\n if (spectrum[43] > 250){row = 3;}\r\n\t }\r\n }\r\n }\r\n \r\n if (spectrum[55] > 250){col = 0;}\r\n else{\r\n if (spectrum[61] > 250){col = 1;}\r\n else{\r\n if (spectrum[67] > 250){col = 2;}\r\n else{\r\n if (spectrum[76] > 250){col = 3;}\r\n\t }\r\n }\r\n }\r\n \t\t\r\n if ((row>-1) && (col>-1))\r\n {\r\n gb_fft_dtmf = RowColToDtmf(row,col);\r\n gb_cadDTMF = gb_fft_dtmf;\r\n if (gb_fft_dtmf_antes != gb_fft_dtmf)\r\n\t{\t\r\n gb_fft_dtmf_antes = gb_fft_dtmf;\r\n gb_cad_areaRX += gb_fft_dtmf;\t\r\n\t gb_buf_rcv_dtmf += gb_fft_dtmf;\r\n\t gb_event_new_data_dtmf = true;\r\n\t if (gb_fft_dtmf === '#')\r\n\t {\r\n\t gb_begin_sync_dtmf= true;\r\n }\r\n\t switch (gb_fft_dtmf)\r\n\t {\r\n\t case '#': gb_begin_sms = true; gb_end_sms = false; break;\r\n\t case '*': gb_end_sms = true; gb_begin_sms = false; break;\t \r\n\t }\r\n\t if (gb_fft_dtmf === '*')\r\n\t {\r\n\t \r\n\t }\r\n gb_forceDraw = true;\r\n }\r\n }\r\n else\r\n {\r\n gb_fft_dtmf= gb_fft_dtmf_antes= '';\r\n }\r\n }\r\n }\r\n catch(err)\r\n {\r\n DebugLog(err.message.toString());\r\n } \r\n}", "function tone(hh, peak) {\n let spectrum = junco_fft.analyze();\n let hh_value = spectrum[hh]; //TODO:ersetzten durch eigenes highhead value \n debugValues += hh_value.toString()\n debugValues += \" - \"\n if (lastHHval > hh_value) { //vergleichen und schauen in welche Richtung der Track läuft \n if (direction_hh > 0 && lastHHval > peak) { //TODO: anderer Wert\n if (hh === 131) { \n if (spacer < 2 && timer < 5) {\n let step = new Step(hh * 6, Math.floor(peak * 0.5));\n stair.push(step);\n spacer++;\n if (spacer === 1) {\n timer = 10;\n } else if (spacer === 2) {\n timer = 10;\n }\n } else {\n return;\n }\n }\n }\n if (hh === 104) {\n if (spacer < 1 && timer === 0) {\n let step = new Step(hh * 6, Math.floor(peak * 0.5));\n stair.push(step);\n spacer++;\n console.log(spacer)\n timer = 15;\n } else {\n return;\n }\n }\n if (hh === 87) {\n if (spacer < 1 && timer === 0) {\n let step = new Step(hh * 6, Math.floor(peak * 0.4));\n stair.push(step);\n spacer++;\n console.log(spacer)\n timer = 15;\n } else {\n return;\n }\n }\n if (hh === 65) {\n if (spacer < 2 && timer < 5) {\n let step = new Step(hh * 6, Math.floor(peak));\n stair.push(step);\n spacer++;\n if (spacer === 1) {\n timer = 10;\n } else if (spacer === 2) {\n timer = 20;\n }\n } else {\n return;\n }\n }\n direction_hh = -1; //man schaut auf welcher Seite des Ausschlags man ist\n } else {\n direction_hh = 1;\n }\n lastHHval = hh_value;\n}", "function workerThreadFn() {\n\n let that = {};\n\n that.n = 1024;\n that.inverse = true;\n\n that.fft = new FFT.complex(that.n, that.inverse);\n\n parentPort.on('message', (payloadIn)=>{\n // let a = msg.bufferInput;\n // console.log(msg);\n\n let chunkCopy = payloadIn.chunk;\n\n const ffttype = 'complex';\n\n const width = 8*2;\n\n // how many uint32's (how many samples) did we get\n const sz = 1024;\n\n\n var dataView = new DataView(chunkCopy);\n\n\n // it's possible that a proxy may be faster here instead of building bufferInput/fftInput\n // https://ponyfoo.com/articles/es6-proxies-in-depth\n \n let bufferInput = new ArrayBuffer(sz*width); // in bytes\n let bufferOutput = new ArrayBuffer(sz*width); // in bytes\n\n // this.w.postMessage(bufferInput,[bufferInput]);\n\n\n let fftInput = new Float64Array(bufferInput);\n let fftOutput = new Float64Array(bufferOutput);\n // let uint8_out_view = new Uint8Array(bufferOutput);\n\n\n // in place modify of the copy\n for(let i = 0; i < sz*2; i+=2) {\n let re = dataView.getFloat64(i*8, true);// * this.gain;\n let im = dataView.getFloat64((i*8)+8, true);// * this.gain;\n // console.log('re: ' + re + ' im: ' + im);\n fftInput[i] = re;\n fftInput[i+1] = im;\n }\n\n that.fft.simple(fftOutput, fftInput, ffttype);\n\n const payloadOut = {id:payloadIn.id, bufferOutput:bufferOutput};\n\n parentPort.postMessage(payloadOut, [payloadOut.bufferOutput]);\n // console.log('finished');\n\n\n });\n}", "function fDCTQuant(data, fdtbl)\n {\n var d0, d1, d2, d3, d4, d5, d6, d7;\n /* Pass 1: process rows. */\n var dataOff=0;\n var i;\n var I8 = 8;\n var I64 = 64;\n for (i=0; i<I8; ++i)\n {\n d0 = data[dataOff];\n d1 = data[dataOff+1];\n d2 = data[dataOff+2];\n d3 = data[dataOff+3];\n d4 = data[dataOff+4];\n d5 = data[dataOff+5];\n d6 = data[dataOff+6];\n d7 = data[dataOff+7];\n\n var tmp0 = d0 + d7;\n var tmp7 = d0 - d7;\n var tmp1 = d1 + d6;\n var tmp6 = d1 - d6;\n var tmp2 = d2 + d5;\n var tmp5 = d2 - d5;\n var tmp3 = d3 + d4;\n var tmp4 = d3 - d4;\n\n /* Even part */\n var tmp10 = tmp0 + tmp3; /* phase 2 */\n var tmp13 = tmp0 - tmp3;\n var tmp11 = tmp1 + tmp2;\n var tmp12 = tmp1 - tmp2;\n\n data[dataOff] = tmp10 + tmp11; /* phase 3 */\n data[dataOff+4] = tmp10 - tmp11;\n\n var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n data[dataOff+2] = tmp13 + z1; /* phase 5 */\n data[dataOff+6] = tmp13 - z1;\n\n /* Odd part */\n tmp10 = tmp4 + tmp5; /* phase 2 */\n tmp11 = tmp5 + tmp6;\n tmp12 = tmp6 + tmp7;\n\n /* The rotator is modified from fig 4-8 to avoid extra negations. */\n var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n var z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n var z3 = tmp11 * 0.707106781; /* c4 */\n\n var z11 = tmp7 + z3; /* phase 5 */\n var z13 = tmp7 - z3;\n\n data[dataOff+5] = z13 + z2; /* phase 6 */\n data[dataOff+3] = z13 - z2;\n data[dataOff+1] = z11 + z4;\n data[dataOff+7] = z11 - z4;\n\n dataOff += 8; /* advance pointer to next row */\n }\n\n /* Pass 2: process columns. */\n dataOff = 0;\n for (i=0; i<I8; ++i)\n {\n d0 = data[dataOff];\n d1 = data[dataOff + 8];\n d2 = data[dataOff + 16];\n d3 = data[dataOff + 24];\n d4 = data[dataOff + 32];\n d5 = data[dataOff + 40];\n d6 = data[dataOff + 48];\n d7 = data[dataOff + 56];\n\n var tmp0p2 = d0 + d7;\n var tmp7p2 = d0 - d7;\n var tmp1p2 = d1 + d6;\n var tmp6p2 = d1 - d6;\n var tmp2p2 = d2 + d5;\n var tmp5p2 = d2 - d5;\n var tmp3p2 = d3 + d4;\n var tmp4p2 = d3 - d4;\n\n /* Even part */\n var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */\n var tmp13p2 = tmp0p2 - tmp3p2;\n var tmp11p2 = tmp1p2 + tmp2p2;\n var tmp12p2 = tmp1p2 - tmp2p2;\n\n data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n data[dataOff+32] = tmp10p2 - tmp11p2;\n\n var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n data[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n data[dataOff+48] = tmp13p2 - z1p2;\n\n /* Odd part */\n tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n tmp11p2 = tmp5p2 + tmp6p2;\n tmp12p2 = tmp6p2 + tmp7p2;\n\n /* The rotator is modified from fig 4-8 to avoid extra negations. */\n var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n var z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\n var z11p2 = tmp7p2 + z3p2; /* phase 5 */\n var z13p2 = tmp7p2 - z3p2;\n\n data[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n data[dataOff+24] = z13p2 - z2p2;\n data[dataOff+ 8] = z11p2 + z4p2;\n data[dataOff+56] = z11p2 - z4p2;\n\n dataOff++; /* advance pointer to next column */\n }\n\n // Quantize/descale the coefficients\n var fDCTQuant;\n for (i=0; i<I64; ++i)\n {\n // Apply the quantization and scaling factor & Round to nearest integer\n fDCTQuant = data[i]*fdtbl[i];\n outputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n //outputfDCTQuant[i] = fround(fDCTQuant);\n\n }\n return outputfDCTQuant;\n }", "function TMhs(htma,sol,T_BaseFrame){\n var T0 = [];\n for(var i=0;i<n;i=i+1){\n var RPY = RPYangles(htma[i]); //get old roll angle (RPYangles() returns [[roll],[pitch],[yaw]])\n var phiB = RPY[0][0]; //roll\n var Tb = htma[i]; //transform beform the update\n var Tz = trotz(sol[15][i][0] + -1.0*phiB);\n var T = hlao.matrix_multiplication(Tz,Tb);\n //console.log(T);\n \n if(i == 0){\n var T0n = [\n [T[0][0], T[0][1], T[0][2], T[0][3]],\n [T[1][0], T[1][1], T[1][2], T[1][3]],\n [T[2][0], T[2][1], T[2][2], T[2][3]],\n [T[3][0], T[3][1], T[3][2], T[3][3]]\n ];\n T0[i] = hlao.matrix_multiplication(T_BaseFrame,T0n); //note: T_BaseFrame defined in Tu.js\n } else {\n T0n = hlao.matrix_multiplication(T0n,T);\n T0[i] = hlao.matrix_multiplication(T0[i-1],T);\n }\n }\n \n return [T0, T0n];\n}", "function mt(t){var S,I,k,_,e,u=Math.floor,C=new Array(64),A=new Array(64),T=new Array(64),F=new Array(64),y=new Array(65535),w=new Array(65535),Q=new Array(64),v=new Array(64),P=[],O=0,E=7,q=new Array(64),B=new Array(64),D=new Array(64),n=new Array(256),U=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],j=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],M=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],N=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],z=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function r(t,e){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var s=1;s<=t[o];s++)i[e[r]]=[],i[e[r]][0]=n,i[e[r]][1]=o,r++,n++;n*=2}return i}function G(t){for(var e=t[0],n=t[1]-1;0<=n;)e&1<<n&&(O|=1<<E),n--,--E<0&&(255==O?(V(255),V(0)):V(O),E=7,O=0)}function V(t){P.push(t)}function Y(t){V(t>>8&255),V(255&t)}function X(t,e,n,r,i){for(var o,s=i[0],a=i[240],h=function(t,e){var n,r,i,o,s,a,h,c,l,u,f=0;for(l=0;l<8;++l){n=t[f],r=t[f+1],i=t[f+2],o=t[f+3],s=t[f+4],a=t[f+5],h=t[f+6];var d=n+(c=t[f+7]),p=n-c,g=r+h,m=r-h,y=i+a,w=i-a,v=o+s,b=o-s,x=d+v,S=d-v,I=g+y,k=g-y;t[f]=x+I,t[f+4]=x-I;var _=.707106781*(k+S);t[f+2]=S+_,t[f+6]=S-_;var C=.382683433*((x=b+w)-(k=m+p)),A=.5411961*x+C,T=1.306562965*k+C,F=.707106781*(I=w+m),P=p+F,O=p-F;t[f+5]=O+A,t[f+3]=O-A,t[f+1]=P+T,t[f+7]=P-T,f+=8}for(l=f=0;l<8;++l){n=t[f],r=t[f+8],i=t[f+16],o=t[f+24],s=t[f+32],a=t[f+40],h=t[f+48];var E=n+(c=t[f+56]),q=n-c,B=r+h,D=r-h,U=i+a,j=i-a,R=o+s,M=o-s,N=E+R,z=E-R,L=B+U,H=B-U;t[f]=N+L,t[f+32]=N-L;var W=.707106781*(H+z);t[f+16]=z+W,t[f+48]=z-W;var G=.382683433*((N=M+j)-(H=D+q)),V=.5411961*N+G,Y=1.306562965*H+G,X=.707106781*(L=j+D),K=q+X,J=q-X;t[f+40]=J+V,t[f+24]=J-V,t[f+8]=K+Y,t[f+56]=K-Y,f++}for(l=0;l<64;++l)u=t[l]*e[l],Q[l]=0<u?u+.5|0:u-.5|0;return Q}(t,e),c=0;c<64;++c)v[b[c]]=h[c];var l=v[0]-n;n=v[0],0==l?G(r[0]):(G(r[w[o=32767+l]]),G(y[o]));for(var u=63;0<u&&0==v[u];u--);if(0==u)return G(s),n;for(var f,d=1;d<=u;){for(var p=d;0==v[d]&&d<=u;++d);var g=d-p;if(16<=g){f=g>>4;for(var m=1;m<=f;++m)G(a);g&=15}o=32767+v[d],G(i[(g<<4)+w[o]]),G(y[o]),d++}return 63!=u&&G(s),n}function K(t){if(t<=0&&(t=1),100<t&&(t=100),e!=t){(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=u((e[n]*t+50)/100);r<1?r=1:255<r&&(r=255),C[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 s=u((i[o]*t+50)/100);s<1?s=1:255<s&&(s=255),A[b[o]]=s}for(var a=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],h=0,c=0;c<8;c++)for(var l=0;l<8;l++)T[h]=1/(C[b[h]]*a[c]*a[l]*8),F[h]=1/(A[b[h]]*a[c]*a[l]*8),h++})(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),e=t}}this.encode=function(t,e){var n,r;(new Date).getTime();e&&K(e),P=new Array,O=0,E=7,Y(65496),Y(65504),Y(16),V(74),V(70),V(73),V(70),V(0),V(1),V(1),V(0),Y(1),Y(1),V(0),V(0),function(){Y(65499),Y(132),V(0);for(var t=0;t<64;t++)V(C[t]);V(1);for(var e=0;e<64;e++)V(A[e])}(),n=t.width,r=t.height,Y(65472),Y(17),V(8),Y(r),Y(n),V(3),V(1),V(17),V(0),V(2),V(17),V(1),V(3),V(17),V(1),function(){Y(65476),Y(418),V(0);for(var t=0;t<16;t++)V(j[t+1]);for(var e=0;e<=11;e++)V(R[e]);V(16);for(var n=0;n<16;n++)V(M[n+1]);for(var r=0;r<=161;r++)V(N[r]);V(1);for(var i=0;i<16;i++)V(z[i+1]);for(var o=0;o<=11;o++)V(L[o]);V(17);for(var s=0;s<16;s++)V(H[s+1]);for(var a=0;a<=161;a++)V(W[a])}(),Y(65498),Y(12),V(3),V(1),V(0),V(2),V(17),V(3),V(17),V(0),V(63),V(0);var i=0,o=0,s=0;O=0,E=7,this.encode.displayName=\"_encode_\";for(var a,h,c,l,u,f,d,p,g,m=t.data,y=t.width,w=t.height,v=4*y,b=0;b<w;){for(a=0;a<v;){for(f=u=v*b+a,d=-1,g=p=0;g<64;g++)f=u+(p=g>>3)*v+(d=4*(7&g)),w<=b+p&&(f-=v*(b+1+p-w)),v<=a+d&&(f-=a+d-v+4),h=m[f++],c=m[f++],l=m[f++],q[g]=(U[h]+U[c+256>>0]+U[l+512>>0]>>16)-128,B[g]=(U[h+768>>0]+U[c+1024>>0]+U[l+1280>>0]>>16)-128,D[g]=(U[h+1280>>0]+U[c+1536>>0]+U[l+1792>>0]>>16)-128;i=X(q,T,i,S,k),o=X(B,F,o,I,_),s=X(D,F,s,I,_),a+=32}b+=8}if(0<=E){var x=[];x[1]=E+1,x[0]=(1<<E+1)-1,G(x)}return Y(65497),new Uint8Array(P)},function(){(new Date).getTime();t||(t=50),function(){for(var t=String.fromCharCode,e=0;e<256;e++)n[e]=t(e)}(),S=r(j,R),I=r(z,L),k=r(M,N),_=r(H,W),function(){for(var t=1,e=2,n=1;n<=15;n++){for(var r=t;r<e;r++)w[32767+r]=n,y[32767+r]=[],y[32767+r][1]=n,y[32767+r][0]=r;for(var i=-(e-1);i<=-t;i++)w[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++)U[t]=19595*t,U[t+256>>0]=38470*t,U[t+512>>0]=7471*t+32768,U[t+768>>0]=-11059*t,U[t+1024>>0]=-21709*t,U[t+1280>>0]=32768*t+8421375,U[t+1536>>0]=-27439*t,U[t+1792>>0]=-5329*t}(),K(t),(new Date).getTime()}()}", "calculateTCUs (initial_directions, initial_PCEs) {\r\n // Ensure that the TCU volumes are up to date. Here we are assuming the user movement volumes have already been converted to their PCE.\r\n if (initial_directions == -1) {\r\n var direction_array = PROJECT.getIntersectionByID(this._intersection_ID).getZoneByIndex(this._zone_ID - 1).getDirectionArray();\r\n var PCE_table = PROJECT.getIntersectionByID(this._intersection_ID).getZoneByIndex(this._zone_ID - 1).getZonePCEs().getPCEArray();\r\n } else {\r\n var direction_array = initial_directions;\r\n var PCE_table = initial_PCEs.getPCEArray();\r\n console.log(direction_array);\r\n console.log(PCE_table);\r\n }\r\n \r\n for (var direction = 0; direction < 4; direction++) {\r\n \r\n var right_vol = PCE_table[direction].getRight();\r\n var through_vol = PCE_table[direction].getThrough();\r\n var left_vol = PCE_table[direction].getLeft();\r\n \r\n var right_turn_lanes = direction_array[direction].getRightTurn();\r\n var through_lanes = direction_array[direction].getThrough();\r\n var left_turn_lanes = direction_array[direction].getLeftTurn();\r\n var shared_right = direction_array[direction].getSharedRight();\r\n var shared_left = direction_array[direction].getSharedLeft();\r\n var chan_right = direction_array[direction].getChannelizedRight();\r\n \r\n // Gets the direction exactly 2 away from 'direction'; masking by three returns only the 1s and 2s bits (0 - 3)\r\n var opposing_throughs_vol = PCE_table[(direction + 2) & 3].getThrough();\r\n var opposing_right_vol = PCE_table[(direction + 2) & 3].getRight();\r\n var opposing_through_lanes = direction_array[(direction + 2) & 3].getThrough();\r\n var opposing_right_lanes = direction_array[(direction + 2) & 3].getRightTurn();\r\n var opposing_chan_right = direction_array[(direction + 2) & 3].getChannelizedRight();\r\n var opposing_left_lanes = direction_array[(direction + 2) & 3].getLeftTurn();\r\n var opposing_shared_left = direction_array[(direction + 2) & 3].getSharedLeft();\r\n \r\n var this_phase_split;\r\n \r\n if (direction % 2 === 0 && !this._north_south_split_override) {\r\n this._north_south_split_phase = (left_turn_lanes > 0 && shared_left) ? true : \r\n (opposing_left_lanes > 0 && opposing_shared_left) ? true : false;\r\n this_phase_split = this._north_south_split_phase;\r\n } else if (!this._east_west_split_override) {\r\n this._east_west_split_phase = (left_turn_lanes > 0 && shared_left) ? true : \r\n (opposing_left_lanes > 0 && opposing_shared_left) ? true : false;\r\n this_phase_split = this._east_west_split_phase;\r\n }\r\n \r\n if (this_phase_split) {\r\n this._protected_lefts[direction] = false;\r\n } else {\r\n this._protected_lefts[direction] = left_turn_lanes > 1 ? true : \r\n (left_vol >= 240 && left_turn_lanes == 1) ? true : \r\n (opposing_through_lanes == 1 && (left_vol * ( opposing_throughs_vol + opposing_right_vol * (1 - opposing_chan_right) ) ) > 50000) ? true :\r\n (opposing_through_lanes == 2 && (left_vol * ( opposing_throughs_vol + opposing_right_vol * (1 - opposing_chan_right) ) ) > 90000) ? true :\r\n (opposing_through_lanes == 3 && (left_vol * ( opposing_throughs_vol + opposing_right_vol * (1 - opposing_chan_right) ) ) > 110000) ? true :\r\n (opposing_through_lanes > 3 && left_turn_lanes > 0) ? true:\r\n false;\r\n }\r\n \r\n var throughs = through_vol;\r\n var rights = 0;\r\n var lefts = 0;\r\n \r\n if (!chan_right) {\r\n // Calculates % of right-turn volume in exclusive right-turn lanes and shared through-right\r\n var right_vol_splitfrac = ( (1 + (right_turn_lanes - shared_right)) / (right_turn_lanes + 1) );\r\n\r\n // Add shared rights to through volume\r\n throughs = Math.round(throughs + ((right_vol / UNIVERSAL_RIGHT_TURN_ADJUSTMENT_FACTOR ) * (1 - right_vol_splitfrac) ) );\r\n\r\n // Will be zero if no exclusive lanes; = right_vol if no shared right; something between 0 and right_vol if shared and exclusive rights exist for this approach\r\n rights = Math.round(right_vol * right_vol_splitfrac / right_turn_lanes) * (1 - chan_right);\r\n // Old version of this line; allows rights to be channelized AND shared. Probably an unnecessary case\r\n // rights = Math.round(right_vol * (right_vol_splitfrac * (1 - chan_right)) / right_turn_lanes);\r\n }\r\n \r\n // This needs to be adjusted for phase effect.\r\n var left_turn_factor = 5;\r\n var left_vol_splitfrac = (1 + (left_turn_lanes - shared_left)) / (left_turn_lanes + 1);\r\n \r\n throughs = throughs + (((left_vol * left_turn_factor) / UNIVERSAL_LEFT_TURN_ADJUSTMENT_FACTOR ) * (1 - left_vol_splitfrac) );\r\n var lefts = Math.round(left_vol * left_vol_splitfrac / left_turn_lanes);\r\n \r\n // Convert through volume to a flow rate\r\n throughs = Math.round(throughs / through_lanes);\r\n \r\n /////// NOW SET THE VOLUMES IN this._TCUs\r\n this._TCUs.getDirectionByIndex(direction).setLeft(lefts);\r\n this._TCUs.getDirectionByIndex(direction).setThrough(throughs);\r\n this._TCUs.getDirectionByIndex(direction).setRight(rights);\r\n \r\n console.log(this);\r\n } \r\n this.calculateCapacities();\r\n }", "function draw() {\n background(0, 0, 0, 0.031);\n translate(posX ? posX : 0, posY ? posY : 0)\n stroke(78, 255, 255)\n rect(0.9 * width, 0, 10, accumulator);\n// fill(0,255,0,0.05)\n // fft.smooth();\n // fft.log\n // noise.start();\n spectrum = fft.analyze();\n chunkSize = Math.floor(spectrum.length / population);\n reducedSpectrum = arrayChunk(spectrum, chunkSize);\n // con\n reducedSpectrum.map((cluster, index) => {\n let sum = cluster.reduce((accum, element) => {\n return accum + element;\n });\n // then((sum) => {\n let val = sum / cluster.length;\n // console.log(val)\n if (index < population) {\n var comp = map(index, 0, population, 360, 0);\n stroke(comp, 255, 255);\n var r = map(val, 0, 255, 0.1, 125);\n x = map(index, 0, population, 0, width);\n y = map(index, 0, population, height, 0);\n ellipse(width / 2 + ants[index].dist, y , r);\n random(1) < 0.13 ? ants[index].move() : null;\n } else {\n accumulator += val;\n }\n // })\n // })\n })\n\n // for (i = 0; i < spectrum.length; i++) {\n // if (i < population) {\n // var comp = map(i, 0, population, 360, 0);\n // stroke(comp, 255, 255);\n // var r = map(spectrum[i], 0, 255, 0.1, 125);\n // x = map(i, 0, population, 0, width);\n // y = map(i, 0, population, height, 0);\n // ellipse(width / 2 + ants[i].dist, y, r);\n // ants[i].move();\n // } else {\n // accumulator += spectrum[i];\n // }\n // }\n}", "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()}()}", "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()}()}", "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()}()}", "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()}()}", "twistU() {\n this.fourCycle(this.cornerLoc, 0, 2, 4, 6, this.cornerOrient, 0, 0, 0, 0, 3);\n this.fourCycle(this.edgeLoc, 0, 3, 6, 9, this.edgeOrient, 1, 1, 1, 1, 2);\n this.sideOrient[1] = (this.sideOrient[1] + 3) % 4;\n }", "function fDCTQuant(data, fdtbl)\n\t\t{\n\t\t\tvar d0, d1, d2, d3, d4, d5, d6, d7;\n\t\t\t/* Pass 1: process rows. */\n\t\t\tvar dataOff=0;\n\t\t\tvar i;\n\t\t\tvar I8 = 8;\n\t\t\tvar I64 = 64;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff+1];\n\t\t\t\td2 = data[dataOff+2];\n\t\t\t\td3 = data[dataOff+3];\n\t\t\t\td4 = data[dataOff+4];\n\t\t\t\td5 = data[dataOff+5];\n\t\t\t\td6 = data[dataOff+6];\n\t\t\t\td7 = data[dataOff+7];\n\t\t\t\t\n\t\t\t\tvar tmp0 = d0 + d7;\n\t\t\t\tvar tmp7 = d0 - d7;\n\t\t\t\tvar tmp1 = d1 + d6;\n\t\t\t\tvar tmp6 = d1 - d6;\n\t\t\t\tvar tmp2 = d2 + d5;\n\t\t\t\tvar tmp5 = d2 - d5;\n\t\t\t\tvar tmp3 = d3 + d4;\n\t\t\t\tvar tmp4 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10 = tmp0 + tmp3;\t/* phase 2 */\n\t\t\t\tvar tmp13 = tmp0 - tmp3;\n\t\t\t\tvar tmp11 = tmp1 + tmp2;\n\t\t\t\tvar tmp12 = tmp1 - tmp2;\n\t\n\t\t\t\tdata[dataOff] = tmp10 + tmp11; /* phase 3 */\n\t\t\t\tdata[dataOff+4] = tmp10 - tmp11;\n\t\n\t\t\t\tvar z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+2] = tmp13 + z1; /* phase 5 */\n\t\t\t\tdata[dataOff+6] = tmp13 - z1;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10 = tmp4 + tmp5; /* phase 2 */\n\t\t\t\ttmp11 = tmp5 + tmp6;\n\t\t\t\ttmp12 = tmp6 + tmp7;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n\t\t\t\tvar z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n\t\t\t\tvar z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n\t\t\t\tvar z3 = tmp11 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11 = tmp7 + z3;\t/* phase 5 */\n\t\t\t\tvar z13 = tmp7 - z3;\n\t\n\t\t\t\tdata[dataOff+5] = z13 + z2;\t/* phase 6 */\n\t\t\t\tdata[dataOff+3] = z13 - z2;\n\t\t\t\tdata[dataOff+1] = z11 + z4;\n\t\t\t\tdata[dataOff+7] = z11 - z4;\n\t\n\t\t\t\tdataOff += 8; /* advance pointer to next row */\n\t\t\t}\n\t\n\t\t\t/* Pass 2: process columns. */\n\t\t\tdataOff = 0;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff + 8];\n\t\t\t\td2 = data[dataOff + 16];\n\t\t\t\td3 = data[dataOff + 24];\n\t\t\t\td4 = data[dataOff + 32];\n\t\t\t\td5 = data[dataOff + 40];\n\t\t\t\td6 = data[dataOff + 48];\n\t\t\t\td7 = data[dataOff + 56];\n\t\t\t\t\n\t\t\t\tvar tmp0p2 = d0 + d7;\n\t\t\t\tvar tmp7p2 = d0 - d7;\n\t\t\t\tvar tmp1p2 = d1 + d6;\n\t\t\t\tvar tmp6p2 = d1 - d6;\n\t\t\t\tvar tmp2p2 = d2 + d5;\n\t\t\t\tvar tmp5p2 = d2 - d5;\n\t\t\t\tvar tmp3p2 = d3 + d4;\n\t\t\t\tvar tmp4p2 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10p2 = tmp0p2 + tmp3p2;\t/* phase 2 */\n\t\t\t\tvar tmp13p2 = tmp0p2 - tmp3p2;\n\t\t\t\tvar tmp11p2 = tmp1p2 + tmp2p2;\n\t\t\t\tvar tmp12p2 = tmp1p2 - tmp2p2;\n\t\n\t\t\t\tdata[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n\t\t\t\tdata[dataOff+32] = tmp10p2 - tmp11p2;\n\t\n\t\t\t\tvar z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n\t\t\t\tdata[dataOff+48] = tmp13p2 - z1p2;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n\t\t\t\ttmp11p2 = tmp5p2 + tmp6p2;\n\t\t\t\ttmp12p2 = tmp6p2 + tmp7p2;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n\t\t\t\tvar z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n\t\t\t\tvar z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n\t\t\t\tvar z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11p2 = tmp7p2 + z3p2;\t/* phase 5 */\n\t\t\t\tvar z13p2 = tmp7p2 - z3p2;\n\t\n\t\t\t\tdata[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n\t\t\t\tdata[dataOff+24] = z13p2 - z2p2;\n\t\t\t\tdata[dataOff+ 8] = z11p2 + z4p2;\n\t\t\t\tdata[dataOff+56] = z11p2 - z4p2;\n\t\n\t\t\t\tdataOff++; /* advance pointer to next column */\n\t\t\t}\n\t\n\t\t\t// Quantize/descale the coefficients\n\t\t\tvar fDCTQuant;\n\t\t\tfor (i=0; i<I64; ++i)\n\t\t\t{\n\t\t\t\t// Apply the quantization and scaling factor & Round to nearest integer\n\t\t\t\tfDCTQuant = data[i]*fdtbl[i];\n\t\t\t\toutputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n\t\t\t\t//outputfDCTQuant[i] = fround(fDCTQuant);\n\n\t\t\t}\n\t\t\treturn outputfDCTQuant;\n\t\t}", "function fDCTQuant(data, fdtbl)\n\t\t{\n\t\t\tvar d0, d1, d2, d3, d4, d5, d6, d7;\n\t\t\t/* Pass 1: process rows. */\n\t\t\tvar dataOff=0;\n\t\t\tvar i;\n\t\t\tvar I8 = 8;\n\t\t\tvar I64 = 64;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff+1];\n\t\t\t\td2 = data[dataOff+2];\n\t\t\t\td3 = data[dataOff+3];\n\t\t\t\td4 = data[dataOff+4];\n\t\t\t\td5 = data[dataOff+5];\n\t\t\t\td6 = data[dataOff+6];\n\t\t\t\td7 = data[dataOff+7];\n\t\t\t\t\n\t\t\t\tvar tmp0 = d0 + d7;\n\t\t\t\tvar tmp7 = d0 - d7;\n\t\t\t\tvar tmp1 = d1 + d6;\n\t\t\t\tvar tmp6 = d1 - d6;\n\t\t\t\tvar tmp2 = d2 + d5;\n\t\t\t\tvar tmp5 = d2 - d5;\n\t\t\t\tvar tmp3 = d3 + d4;\n\t\t\t\tvar tmp4 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10 = tmp0 + tmp3;\t/* phase 2 */\n\t\t\t\tvar tmp13 = tmp0 - tmp3;\n\t\t\t\tvar tmp11 = tmp1 + tmp2;\n\t\t\t\tvar tmp12 = tmp1 - tmp2;\n\t\n\t\t\t\tdata[dataOff] = tmp10 + tmp11; /* phase 3 */\n\t\t\t\tdata[dataOff+4] = tmp10 - tmp11;\n\t\n\t\t\t\tvar z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+2] = tmp13 + z1; /* phase 5 */\n\t\t\t\tdata[dataOff+6] = tmp13 - z1;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10 = tmp4 + tmp5; /* phase 2 */\n\t\t\t\ttmp11 = tmp5 + tmp6;\n\t\t\t\ttmp12 = tmp6 + tmp7;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n\t\t\t\tvar z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n\t\t\t\tvar z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n\t\t\t\tvar z3 = tmp11 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11 = tmp7 + z3;\t/* phase 5 */\n\t\t\t\tvar z13 = tmp7 - z3;\n\t\n\t\t\t\tdata[dataOff+5] = z13 + z2;\t/* phase 6 */\n\t\t\t\tdata[dataOff+3] = z13 - z2;\n\t\t\t\tdata[dataOff+1] = z11 + z4;\n\t\t\t\tdata[dataOff+7] = z11 - z4;\n\t\n\t\t\t\tdataOff += 8; /* advance pointer to next row */\n\t\t\t}\n\t\n\t\t\t/* Pass 2: process columns. */\n\t\t\tdataOff = 0;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff + 8];\n\t\t\t\td2 = data[dataOff + 16];\n\t\t\t\td3 = data[dataOff + 24];\n\t\t\t\td4 = data[dataOff + 32];\n\t\t\t\td5 = data[dataOff + 40];\n\t\t\t\td6 = data[dataOff + 48];\n\t\t\t\td7 = data[dataOff + 56];\n\t\t\t\t\n\t\t\t\tvar tmp0p2 = d0 + d7;\n\t\t\t\tvar tmp7p2 = d0 - d7;\n\t\t\t\tvar tmp1p2 = d1 + d6;\n\t\t\t\tvar tmp6p2 = d1 - d6;\n\t\t\t\tvar tmp2p2 = d2 + d5;\n\t\t\t\tvar tmp5p2 = d2 - d5;\n\t\t\t\tvar tmp3p2 = d3 + d4;\n\t\t\t\tvar tmp4p2 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10p2 = tmp0p2 + tmp3p2;\t/* phase 2 */\n\t\t\t\tvar tmp13p2 = tmp0p2 - tmp3p2;\n\t\t\t\tvar tmp11p2 = tmp1p2 + tmp2p2;\n\t\t\t\tvar tmp12p2 = tmp1p2 - tmp2p2;\n\t\n\t\t\t\tdata[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n\t\t\t\tdata[dataOff+32] = tmp10p2 - tmp11p2;\n\t\n\t\t\t\tvar z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n\t\t\t\tdata[dataOff+48] = tmp13p2 - z1p2;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n\t\t\t\ttmp11p2 = tmp5p2 + tmp6p2;\n\t\t\t\ttmp12p2 = tmp6p2 + tmp7p2;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n\t\t\t\tvar z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n\t\t\t\tvar z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n\t\t\t\tvar z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11p2 = tmp7p2 + z3p2;\t/* phase 5 */\n\t\t\t\tvar z13p2 = tmp7p2 - z3p2;\n\t\n\t\t\t\tdata[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n\t\t\t\tdata[dataOff+24] = z13p2 - z2p2;\n\t\t\t\tdata[dataOff+ 8] = z11p2 + z4p2;\n\t\t\t\tdata[dataOff+56] = z11p2 - z4p2;\n\t\n\t\t\t\tdataOff++; /* advance pointer to next column */\n\t\t\t}\n\t\n\t\t\t// Quantize/descale the coefficients\n\t\t\tvar fDCTQuant;\n\t\t\tfor (i=0; i<I64; ++i)\n\t\t\t{\n\t\t\t\t// Apply the quantization and scaling factor & Round to nearest integer\n\t\t\t\tfDCTQuant = data[i]*fdtbl[i];\n\t\t\t\toutputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n\t\t\t\t//outputfDCTQuant[i] = fround(fDCTQuant);\n\n\t\t\t}\n\t\t\treturn outputfDCTQuant;\n\t\t}", "function fft_rx2 (re, im) {\n let N = re.length;\n if (N.toString(2) % 10) // return immediately if N is not power of 2\n return;\n else if (N <= 32) // if N is sufficiently small, compute dft directly\n return dft_direct(re, im);\n\n let W = discrete_circle(N); // N evenly spaced points around the unit circle\n im = im || re.map( a => 0 ); // set imaginary values to zero if not provided\n\n // compute N/2-point DFT for even and odd samples of input array\n let S_1 = fft_rx2(...[re, im].map( a => a.filter( (_, i) => !(i % 2) ) ));\n let S_2 = fft_rx2(...[re, im].map( a => a.filter( (_, i) => i % 2 ) ));\n\n // mutiply by twiddle factor. later, exploit symmetry W[k+N/2] = -W[k]\n let G_2 = S_2.map( (a, k) => cpx_mult(a, W[k % N]) );\n\n // combine for all frequencies k in N/2-1\n let X = [];\n for (let k of xrange(N/2)) {\n X[k] = cpx_add(S_1[k], G_2[k]);\n X[k + N/2] = cpx_sub(S_1[k], G_2[k]);\n }\n\n return X;\n}", "function FluidField(canvas) {\r\n\r\n function lin_solve2(x, x0, y, y0, a, c)\r\n {\r\n if (a === 0 && c === 1) {\r\n for (var j=1 ; j <= height; j++) {\r\n var currentRow = j * rowSize;\r\n ++currentRow;\r\n for (var i = 0; i < width; i++) {\r\n x[currentRow] = x0[currentRow];\r\n y[currentRow] = y0[currentRow];\r\n ++currentRow;\r\n }\r\n }\r\n } else {\r\n var invC = 1/c;\r\n for (var k=0 ; k<iterations; k++) {\r\n for (var j=1 ; j <= height; j++) {\r\n var lastRow = (j - 1) * rowSize;\r\n var currentRow = j * rowSize;\r\n var nextRow = (j + 1) * rowSize;\r\n var lastX = x[currentRow];\r\n var lastY = y[currentRow];\r\n ++currentRow;\r\n for (var i = 1; i <= width; i++) {\r\n lastX = x[currentRow] = (x0[currentRow] + a * (lastX + x[currentRow] + x[lastRow] + x[nextRow])) * invC;\r\n lastY = y[currentRow] = (y0[currentRow] + a * (lastY + y[++currentRow] + y[++lastRow] + y[++nextRow])) * invC;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n this.update = function () {\r\n\tvar a = 0;\r\n lin_solve2(u, u_prev, v, v_prev, a, 1 + 4 * a);\r\n }\r\n\r\n var iterations = 1;\r\n var visc = 0.5;\r\n var dt = 0.1;\r\n var u;\r\n var u_prev;\r\n var v;\r\n var v_prev;\r\n var width;\r\n var height;\r\n var rowSize;\r\n var size;\r\n var displayFunc;\r\n function reset()\r\n {\r\n rowSize = width;\r\n size = (width)*(height);\r\n u = new Array(size);\r\n u_prev = new Array(size);\r\n v = new Array(size);\r\n v_prev = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n u_prev[i] = v_prev[i] = u[i] = v[i] = 0;\r\n }\r\n this.reset = reset;\r\n this.setResolution = function (hRes, wRes)\r\n {\r\n var res = wRes * hRes;\r\n if (res > 0 && res < 1000000 && (wRes != width || hRes != height)) {\r\n width = wRes;\r\n height = hRes;\r\n reset();\r\n return true;\r\n }\r\n return false;\r\n }\r\n this.setResolution(1, 1);\r\n}", "function fDCTQuant(data, fdtbl)\n\t\t{\n\t\t\tvar d0, d1, d2, d3, d4, d5, d6, d7;\n\t\t\t/* Pass 1: process rows. */\n\t\t\tvar dataOff=0;\n\t\t\tvar i;\n\t\t\tconst I8 = 8;\n\t\t\tconst I64 = 64;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff+1];\n\t\t\t\td2 = data[dataOff+2];\n\t\t\t\td3 = data[dataOff+3];\n\t\t\t\td4 = data[dataOff+4];\n\t\t\t\td5 = data[dataOff+5];\n\t\t\t\td6 = data[dataOff+6];\n\t\t\t\td7 = data[dataOff+7];\n\t\t\t\t\n\t\t\t\tvar tmp0 = d0 + d7;\n\t\t\t\tvar tmp7 = d0 - d7;\n\t\t\t\tvar tmp1 = d1 + d6;\n\t\t\t\tvar tmp6 = d1 - d6;\n\t\t\t\tvar tmp2 = d2 + d5;\n\t\t\t\tvar tmp5 = d2 - d5;\n\t\t\t\tvar tmp3 = d3 + d4;\n\t\t\t\tvar tmp4 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10 = tmp0 + tmp3;\t/* phase 2 */\n\t\t\t\tvar tmp13 = tmp0 - tmp3;\n\t\t\t\tvar tmp11 = tmp1 + tmp2;\n\t\t\t\tvar tmp12 = tmp1 - tmp2;\n\t\n\t\t\t\tdata[dataOff] = tmp10 + tmp11; /* phase 3 */\n\t\t\t\tdata[dataOff+4] = tmp10 - tmp11;\n\t\n\t\t\t\tvar z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+2] = tmp13 + z1; /* phase 5 */\n\t\t\t\tdata[dataOff+6] = tmp13 - z1;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10 = tmp4 + tmp5; /* phase 2 */\n\t\t\t\ttmp11 = tmp5 + tmp6;\n\t\t\t\ttmp12 = tmp6 + tmp7;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n\t\t\t\tvar z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n\t\t\t\tvar z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n\t\t\t\tvar z3 = tmp11 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11 = tmp7 + z3;\t/* phase 5 */\n\t\t\t\tvar z13 = tmp7 - z3;\n\t\n\t\t\t\tdata[dataOff+5] = z13 + z2;\t/* phase 6 */\n\t\t\t\tdata[dataOff+3] = z13 - z2;\n\t\t\t\tdata[dataOff+1] = z11 + z4;\n\t\t\t\tdata[dataOff+7] = z11 - z4;\n\t\n\t\t\t\tdataOff += 8; /* advance pointer to next row */\n\t\t\t}\n\t\n\t\t\t/* Pass 2: process columns. */\n\t\t\tdataOff = 0;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff + 8];\n\t\t\t\td2 = data[dataOff + 16];\n\t\t\t\td3 = data[dataOff + 24];\n\t\t\t\td4 = data[dataOff + 32];\n\t\t\t\td5 = data[dataOff + 40];\n\t\t\t\td6 = data[dataOff + 48];\n\t\t\t\td7 = data[dataOff + 56];\n\t\t\t\t\n\t\t\t\tvar tmp0p2 = d0 + d7;\n\t\t\t\tvar tmp7p2 = d0 - d7;\n\t\t\t\tvar tmp1p2 = d1 + d6;\n\t\t\t\tvar tmp6p2 = d1 - d6;\n\t\t\t\tvar tmp2p2 = d2 + d5;\n\t\t\t\tvar tmp5p2 = d2 - d5;\n\t\t\t\tvar tmp3p2 = d3 + d4;\n\t\t\t\tvar tmp4p2 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10p2 = tmp0p2 + tmp3p2;\t/* phase 2 */\n\t\t\t\tvar tmp13p2 = tmp0p2 - tmp3p2;\n\t\t\t\tvar tmp11p2 = tmp1p2 + tmp2p2;\n\t\t\t\tvar tmp12p2 = tmp1p2 - tmp2p2;\n\t\n\t\t\t\tdata[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n\t\t\t\tdata[dataOff+32] = tmp10p2 - tmp11p2;\n\t\n\t\t\t\tvar z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n\t\t\t\tdata[dataOff+48] = tmp13p2 - z1p2;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n\t\t\t\ttmp11p2 = tmp5p2 + tmp6p2;\n\t\t\t\ttmp12p2 = tmp6p2 + tmp7p2;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n\t\t\t\tvar z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n\t\t\t\tvar z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n\t\t\t\tvar z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11p2 = tmp7p2 + z3p2;\t/* phase 5 */\n\t\t\t\tvar z13p2 = tmp7p2 - z3p2;\n\t\n\t\t\t\tdata[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n\t\t\t\tdata[dataOff+24] = z13p2 - z2p2;\n\t\t\t\tdata[dataOff+ 8] = z11p2 + z4p2;\n\t\t\t\tdata[dataOff+56] = z11p2 - z4p2;\n\t\n\t\t\t\tdataOff++; /* advance pointer to next column */\n\t\t\t}\n\t\n\t\t\t// Quantize/descale the coefficients\n\t\t\tvar fDCTQuant;\n\t\t\tfor (i=0; i<I64; ++i)\n\t\t\t{\n\t\t\t\t// Apply the quantization and scaling factor & Round to nearest integer\n\t\t\t\tfDCTQuant = data[i]*fdtbl[i];\n\t\t\t\toutputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n\t\t\t\t//outputfDCTQuant[i] = fround(fDCTQuant);\n\n\t\t\t}\n\t\t\treturn outputfDCTQuant;\n\t\t}", "function fDCTQuant(data, fdtbl)\n\t\t{\n\t\t\tvar d0, d1, d2, d3, d4, d5, d6, d7;\n\t\t\t/* Pass 1: process rows. */\n\t\t\tvar dataOff=0;\n\t\t\tvar i;\n\t\t\tconst I8 = 8;\n\t\t\tconst I64 = 64;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff+1];\n\t\t\t\td2 = data[dataOff+2];\n\t\t\t\td3 = data[dataOff+3];\n\t\t\t\td4 = data[dataOff+4];\n\t\t\t\td5 = data[dataOff+5];\n\t\t\t\td6 = data[dataOff+6];\n\t\t\t\td7 = data[dataOff+7];\n\t\t\t\t\n\t\t\t\tvar tmp0 = d0 + d7;\n\t\t\t\tvar tmp7 = d0 - d7;\n\t\t\t\tvar tmp1 = d1 + d6;\n\t\t\t\tvar tmp6 = d1 - d6;\n\t\t\t\tvar tmp2 = d2 + d5;\n\t\t\t\tvar tmp5 = d2 - d5;\n\t\t\t\tvar tmp3 = d3 + d4;\n\t\t\t\tvar tmp4 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10 = tmp0 + tmp3;\t/* phase 2 */\n\t\t\t\tvar tmp13 = tmp0 - tmp3;\n\t\t\t\tvar tmp11 = tmp1 + tmp2;\n\t\t\t\tvar tmp12 = tmp1 - tmp2;\n\t\n\t\t\t\tdata[dataOff] = tmp10 + tmp11; /* phase 3 */\n\t\t\t\tdata[dataOff+4] = tmp10 - tmp11;\n\t\n\t\t\t\tvar z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+2] = tmp13 + z1; /* phase 5 */\n\t\t\t\tdata[dataOff+6] = tmp13 - z1;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10 = tmp4 + tmp5; /* phase 2 */\n\t\t\t\ttmp11 = tmp5 + tmp6;\n\t\t\t\ttmp12 = tmp6 + tmp7;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n\t\t\t\tvar z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n\t\t\t\tvar z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n\t\t\t\tvar z3 = tmp11 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11 = tmp7 + z3;\t/* phase 5 */\n\t\t\t\tvar z13 = tmp7 - z3;\n\t\n\t\t\t\tdata[dataOff+5] = z13 + z2;\t/* phase 6 */\n\t\t\t\tdata[dataOff+3] = z13 - z2;\n\t\t\t\tdata[dataOff+1] = z11 + z4;\n\t\t\t\tdata[dataOff+7] = z11 - z4;\n\t\n\t\t\t\tdataOff += 8; /* advance pointer to next row */\n\t\t\t}\n\t\n\t\t\t/* Pass 2: process columns. */\n\t\t\tdataOff = 0;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff + 8];\n\t\t\t\td2 = data[dataOff + 16];\n\t\t\t\td3 = data[dataOff + 24];\n\t\t\t\td4 = data[dataOff + 32];\n\t\t\t\td5 = data[dataOff + 40];\n\t\t\t\td6 = data[dataOff + 48];\n\t\t\t\td7 = data[dataOff + 56];\n\t\t\t\t\n\t\t\t\tvar tmp0p2 = d0 + d7;\n\t\t\t\tvar tmp7p2 = d0 - d7;\n\t\t\t\tvar tmp1p2 = d1 + d6;\n\t\t\t\tvar tmp6p2 = d1 - d6;\n\t\t\t\tvar tmp2p2 = d2 + d5;\n\t\t\t\tvar tmp5p2 = d2 - d5;\n\t\t\t\tvar tmp3p2 = d3 + d4;\n\t\t\t\tvar tmp4p2 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10p2 = tmp0p2 + tmp3p2;\t/* phase 2 */\n\t\t\t\tvar tmp13p2 = tmp0p2 - tmp3p2;\n\t\t\t\tvar tmp11p2 = tmp1p2 + tmp2p2;\n\t\t\t\tvar tmp12p2 = tmp1p2 - tmp2p2;\n\t\n\t\t\t\tdata[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n\t\t\t\tdata[dataOff+32] = tmp10p2 - tmp11p2;\n\t\n\t\t\t\tvar z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n\t\t\t\tdata[dataOff+48] = tmp13p2 - z1p2;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n\t\t\t\ttmp11p2 = tmp5p2 + tmp6p2;\n\t\t\t\ttmp12p2 = tmp6p2 + tmp7p2;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n\t\t\t\tvar z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n\t\t\t\tvar z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n\t\t\t\tvar z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11p2 = tmp7p2 + z3p2;\t/* phase 5 */\n\t\t\t\tvar z13p2 = tmp7p2 - z3p2;\n\t\n\t\t\t\tdata[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n\t\t\t\tdata[dataOff+24] = z13p2 - z2p2;\n\t\t\t\tdata[dataOff+ 8] = z11p2 + z4p2;\n\t\t\t\tdata[dataOff+56] = z11p2 - z4p2;\n\t\n\t\t\t\tdataOff++; /* advance pointer to next column */\n\t\t\t}\n\t\n\t\t\t// Quantize/descale the coefficients\n\t\t\tvar fDCTQuant;\n\t\t\tfor (i=0; i<I64; ++i)\n\t\t\t{\n\t\t\t\t// Apply the quantization and scaling factor & Round to nearest integer\n\t\t\t\tfDCTQuant = data[i]*fdtbl[i];\n\t\t\t\toutputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n\t\t\t\t//outputfDCTQuant[i] = fround(fDCTQuant);\n\n\t\t\t}\n\t\t\treturn outputfDCTQuant;\n\t\t}", "function fDCTQuant(data, fdtbl)\n\t\t{\n\t\t\tvar d0, d1, d2, d3, d4, d5, d6, d7;\n\t\t\t/* Pass 1: process rows. */\n\t\t\tvar dataOff=0;\n\t\t\tvar i;\n\t\t\tconst I8 = 8;\n\t\t\tconst I64 = 64;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff+1];\n\t\t\t\td2 = data[dataOff+2];\n\t\t\t\td3 = data[dataOff+3];\n\t\t\t\td4 = data[dataOff+4];\n\t\t\t\td5 = data[dataOff+5];\n\t\t\t\td6 = data[dataOff+6];\n\t\t\t\td7 = data[dataOff+7];\n\t\t\t\t\n\t\t\t\tvar tmp0 = d0 + d7;\n\t\t\t\tvar tmp7 = d0 - d7;\n\t\t\t\tvar tmp1 = d1 + d6;\n\t\t\t\tvar tmp6 = d1 - d6;\n\t\t\t\tvar tmp2 = d2 + d5;\n\t\t\t\tvar tmp5 = d2 - d5;\n\t\t\t\tvar tmp3 = d3 + d4;\n\t\t\t\tvar tmp4 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10 = tmp0 + tmp3;\t/* phase 2 */\n\t\t\t\tvar tmp13 = tmp0 - tmp3;\n\t\t\t\tvar tmp11 = tmp1 + tmp2;\n\t\t\t\tvar tmp12 = tmp1 - tmp2;\n\t\n\t\t\t\tdata[dataOff] = tmp10 + tmp11; /* phase 3 */\n\t\t\t\tdata[dataOff+4] = tmp10 - tmp11;\n\t\n\t\t\t\tvar z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+2] = tmp13 + z1; /* phase 5 */\n\t\t\t\tdata[dataOff+6] = tmp13 - z1;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10 = tmp4 + tmp5; /* phase 2 */\n\t\t\t\ttmp11 = tmp5 + tmp6;\n\t\t\t\ttmp12 = tmp6 + tmp7;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n\t\t\t\tvar z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n\t\t\t\tvar z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n\t\t\t\tvar z3 = tmp11 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11 = tmp7 + z3;\t/* phase 5 */\n\t\t\t\tvar z13 = tmp7 - z3;\n\t\n\t\t\t\tdata[dataOff+5] = z13 + z2;\t/* phase 6 */\n\t\t\t\tdata[dataOff+3] = z13 - z2;\n\t\t\t\tdata[dataOff+1] = z11 + z4;\n\t\t\t\tdata[dataOff+7] = z11 - z4;\n\t\n\t\t\t\tdataOff += 8; /* advance pointer to next row */\n\t\t\t}\n\t\n\t\t\t/* Pass 2: process columns. */\n\t\t\tdataOff = 0;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff + 8];\n\t\t\t\td2 = data[dataOff + 16];\n\t\t\t\td3 = data[dataOff + 24];\n\t\t\t\td4 = data[dataOff + 32];\n\t\t\t\td5 = data[dataOff + 40];\n\t\t\t\td6 = data[dataOff + 48];\n\t\t\t\td7 = data[dataOff + 56];\n\t\t\t\t\n\t\t\t\tvar tmp0p2 = d0 + d7;\n\t\t\t\tvar tmp7p2 = d0 - d7;\n\t\t\t\tvar tmp1p2 = d1 + d6;\n\t\t\t\tvar tmp6p2 = d1 - d6;\n\t\t\t\tvar tmp2p2 = d2 + d5;\n\t\t\t\tvar tmp5p2 = d2 - d5;\n\t\t\t\tvar tmp3p2 = d3 + d4;\n\t\t\t\tvar tmp4p2 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10p2 = tmp0p2 + tmp3p2;\t/* phase 2 */\n\t\t\t\tvar tmp13p2 = tmp0p2 - tmp3p2;\n\t\t\t\tvar tmp11p2 = tmp1p2 + tmp2p2;\n\t\t\t\tvar tmp12p2 = tmp1p2 - tmp2p2;\n\t\n\t\t\t\tdata[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n\t\t\t\tdata[dataOff+32] = tmp10p2 - tmp11p2;\n\t\n\t\t\t\tvar z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n\t\t\t\tdata[dataOff+48] = tmp13p2 - z1p2;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n\t\t\t\ttmp11p2 = tmp5p2 + tmp6p2;\n\t\t\t\ttmp12p2 = tmp6p2 + tmp7p2;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n\t\t\t\tvar z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n\t\t\t\tvar z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n\t\t\t\tvar z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11p2 = tmp7p2 + z3p2;\t/* phase 5 */\n\t\t\t\tvar z13p2 = tmp7p2 - z3p2;\n\t\n\t\t\t\tdata[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n\t\t\t\tdata[dataOff+24] = z13p2 - z2p2;\n\t\t\t\tdata[dataOff+ 8] = z11p2 + z4p2;\n\t\t\t\tdata[dataOff+56] = z11p2 - z4p2;\n\t\n\t\t\t\tdataOff++; /* advance pointer to next column */\n\t\t\t}\n\t\n\t\t\t// Quantize/descale the coefficients\n\t\t\tvar fDCTQuant;\n\t\t\tfor (i=0; i<I64; ++i)\n\t\t\t{\n\t\t\t\t// Apply the quantization and scaling factor & Round to nearest integer\n\t\t\t\tfDCTQuant = data[i]*fdtbl[i];\n\t\t\t\toutputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n\t\t\t\t//outputfDCTQuant[i] = fround(fDCTQuant);\n\n\t\t\t}\n\t\t\treturn outputfDCTQuant;\n\t\t}", "function fDCTQuant(data, fdtbl)\n\t\t{\n\t\t\tvar d0, d1, d2, d3, d4, d5, d6, d7;\n\t\t\t/* Pass 1: process rows. */\n\t\t\tvar dataOff=0;\n\t\t\tvar i;\n\t\t\tconst I8 = 8;\n\t\t\tconst I64 = 64;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff+1];\n\t\t\t\td2 = data[dataOff+2];\n\t\t\t\td3 = data[dataOff+3];\n\t\t\t\td4 = data[dataOff+4];\n\t\t\t\td5 = data[dataOff+5];\n\t\t\t\td6 = data[dataOff+6];\n\t\t\t\td7 = data[dataOff+7];\n\t\t\t\t\n\t\t\t\tvar tmp0 = d0 + d7;\n\t\t\t\tvar tmp7 = d0 - d7;\n\t\t\t\tvar tmp1 = d1 + d6;\n\t\t\t\tvar tmp6 = d1 - d6;\n\t\t\t\tvar tmp2 = d2 + d5;\n\t\t\t\tvar tmp5 = d2 - d5;\n\t\t\t\tvar tmp3 = d3 + d4;\n\t\t\t\tvar tmp4 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10 = tmp0 + tmp3;\t/* phase 2 */\n\t\t\t\tvar tmp13 = tmp0 - tmp3;\n\t\t\t\tvar tmp11 = tmp1 + tmp2;\n\t\t\t\tvar tmp12 = tmp1 - tmp2;\n\t\n\t\t\t\tdata[dataOff] = tmp10 + tmp11; /* phase 3 */\n\t\t\t\tdata[dataOff+4] = tmp10 - tmp11;\n\t\n\t\t\t\tvar z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+2] = tmp13 + z1; /* phase 5 */\n\t\t\t\tdata[dataOff+6] = tmp13 - z1;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10 = tmp4 + tmp5; /* phase 2 */\n\t\t\t\ttmp11 = tmp5 + tmp6;\n\t\t\t\ttmp12 = tmp6 + tmp7;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n\t\t\t\tvar z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n\t\t\t\tvar z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n\t\t\t\tvar z3 = tmp11 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11 = tmp7 + z3;\t/* phase 5 */\n\t\t\t\tvar z13 = tmp7 - z3;\n\t\n\t\t\t\tdata[dataOff+5] = z13 + z2;\t/* phase 6 */\n\t\t\t\tdata[dataOff+3] = z13 - z2;\n\t\t\t\tdata[dataOff+1] = z11 + z4;\n\t\t\t\tdata[dataOff+7] = z11 - z4;\n\t\n\t\t\t\tdataOff += 8; /* advance pointer to next row */\n\t\t\t}\n\t\n\t\t\t/* Pass 2: process columns. */\n\t\t\tdataOff = 0;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff + 8];\n\t\t\t\td2 = data[dataOff + 16];\n\t\t\t\td3 = data[dataOff + 24];\n\t\t\t\td4 = data[dataOff + 32];\n\t\t\t\td5 = data[dataOff + 40];\n\t\t\t\td6 = data[dataOff + 48];\n\t\t\t\td7 = data[dataOff + 56];\n\t\t\t\t\n\t\t\t\tvar tmp0p2 = d0 + d7;\n\t\t\t\tvar tmp7p2 = d0 - d7;\n\t\t\t\tvar tmp1p2 = d1 + d6;\n\t\t\t\tvar tmp6p2 = d1 - d6;\n\t\t\t\tvar tmp2p2 = d2 + d5;\n\t\t\t\tvar tmp5p2 = d2 - d5;\n\t\t\t\tvar tmp3p2 = d3 + d4;\n\t\t\t\tvar tmp4p2 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10p2 = tmp0p2 + tmp3p2;\t/* phase 2 */\n\t\t\t\tvar tmp13p2 = tmp0p2 - tmp3p2;\n\t\t\t\tvar tmp11p2 = tmp1p2 + tmp2p2;\n\t\t\t\tvar tmp12p2 = tmp1p2 - tmp2p2;\n\t\n\t\t\t\tdata[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n\t\t\t\tdata[dataOff+32] = tmp10p2 - tmp11p2;\n\t\n\t\t\t\tvar z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n\t\t\t\tdata[dataOff+48] = tmp13p2 - z1p2;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n\t\t\t\ttmp11p2 = tmp5p2 + tmp6p2;\n\t\t\t\ttmp12p2 = tmp6p2 + tmp7p2;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n\t\t\t\tvar z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n\t\t\t\tvar z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n\t\t\t\tvar z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11p2 = tmp7p2 + z3p2;\t/* phase 5 */\n\t\t\t\tvar z13p2 = tmp7p2 - z3p2;\n\t\n\t\t\t\tdata[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n\t\t\t\tdata[dataOff+24] = z13p2 - z2p2;\n\t\t\t\tdata[dataOff+ 8] = z11p2 + z4p2;\n\t\t\t\tdata[dataOff+56] = z11p2 - z4p2;\n\t\n\t\t\t\tdataOff++; /* advance pointer to next column */\n\t\t\t}\n\t\n\t\t\t// Quantize/descale the coefficients\n\t\t\tvar fDCTQuant;\n\t\t\tfor (i=0; i<I64; ++i)\n\t\t\t{\n\t\t\t\t// Apply the quantization and scaling factor & Round to nearest integer\n\t\t\t\tfDCTQuant = data[i]*fdtbl[i];\n\t\t\t\toutputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n\t\t\t\t//outputfDCTQuant[i] = fround(fDCTQuant);\n\n\t\t\t}\n\t\t\treturn outputfDCTQuant;\n\t\t}", "function fDCTQuant(data, fdtbl)\n\t\t{\n\t\t\tvar d0, d1, d2, d3, d4, d5, d6, d7;\n\t\t\t/* Pass 1: process rows. */\n\t\t\tvar dataOff=0;\n\t\t\tvar i;\n\t\t\tconst I8 = 8;\n\t\t\tconst I64 = 64;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff+1];\n\t\t\t\td2 = data[dataOff+2];\n\t\t\t\td3 = data[dataOff+3];\n\t\t\t\td4 = data[dataOff+4];\n\t\t\t\td5 = data[dataOff+5];\n\t\t\t\td6 = data[dataOff+6];\n\t\t\t\td7 = data[dataOff+7];\n\t\t\t\t\n\t\t\t\tvar tmp0 = d0 + d7;\n\t\t\t\tvar tmp7 = d0 - d7;\n\t\t\t\tvar tmp1 = d1 + d6;\n\t\t\t\tvar tmp6 = d1 - d6;\n\t\t\t\tvar tmp2 = d2 + d5;\n\t\t\t\tvar tmp5 = d2 - d5;\n\t\t\t\tvar tmp3 = d3 + d4;\n\t\t\t\tvar tmp4 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10 = tmp0 + tmp3;\t/* phase 2 */\n\t\t\t\tvar tmp13 = tmp0 - tmp3;\n\t\t\t\tvar tmp11 = tmp1 + tmp2;\n\t\t\t\tvar tmp12 = tmp1 - tmp2;\n\t\n\t\t\t\tdata[dataOff] = tmp10 + tmp11; /* phase 3 */\n\t\t\t\tdata[dataOff+4] = tmp10 - tmp11;\n\t\n\t\t\t\tvar z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+2] = tmp13 + z1; /* phase 5 */\n\t\t\t\tdata[dataOff+6] = tmp13 - z1;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10 = tmp4 + tmp5; /* phase 2 */\n\t\t\t\ttmp11 = tmp5 + tmp6;\n\t\t\t\ttmp12 = tmp6 + tmp7;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n\t\t\t\tvar z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n\t\t\t\tvar z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n\t\t\t\tvar z3 = tmp11 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11 = tmp7 + z3;\t/* phase 5 */\n\t\t\t\tvar z13 = tmp7 - z3;\n\t\n\t\t\t\tdata[dataOff+5] = z13 + z2;\t/* phase 6 */\n\t\t\t\tdata[dataOff+3] = z13 - z2;\n\t\t\t\tdata[dataOff+1] = z11 + z4;\n\t\t\t\tdata[dataOff+7] = z11 - z4;\n\t\n\t\t\t\tdataOff += 8; /* advance pointer to next row */\n\t\t\t}\n\t\n\t\t\t/* Pass 2: process columns. */\n\t\t\tdataOff = 0;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff + 8];\n\t\t\t\td2 = data[dataOff + 16];\n\t\t\t\td3 = data[dataOff + 24];\n\t\t\t\td4 = data[dataOff + 32];\n\t\t\t\td5 = data[dataOff + 40];\n\t\t\t\td6 = data[dataOff + 48];\n\t\t\t\td7 = data[dataOff + 56];\n\t\t\t\t\n\t\t\t\tvar tmp0p2 = d0 + d7;\n\t\t\t\tvar tmp7p2 = d0 - d7;\n\t\t\t\tvar tmp1p2 = d1 + d6;\n\t\t\t\tvar tmp6p2 = d1 - d6;\n\t\t\t\tvar tmp2p2 = d2 + d5;\n\t\t\t\tvar tmp5p2 = d2 - d5;\n\t\t\t\tvar tmp3p2 = d3 + d4;\n\t\t\t\tvar tmp4p2 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10p2 = tmp0p2 + tmp3p2;\t/* phase 2 */\n\t\t\t\tvar tmp13p2 = tmp0p2 - tmp3p2;\n\t\t\t\tvar tmp11p2 = tmp1p2 + tmp2p2;\n\t\t\t\tvar tmp12p2 = tmp1p2 - tmp2p2;\n\t\n\t\t\t\tdata[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n\t\t\t\tdata[dataOff+32] = tmp10p2 - tmp11p2;\n\t\n\t\t\t\tvar z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n\t\t\t\tdata[dataOff+48] = tmp13p2 - z1p2;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n\t\t\t\ttmp11p2 = tmp5p2 + tmp6p2;\n\t\t\t\ttmp12p2 = tmp6p2 + tmp7p2;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n\t\t\t\tvar z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n\t\t\t\tvar z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n\t\t\t\tvar z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11p2 = tmp7p2 + z3p2;\t/* phase 5 */\n\t\t\t\tvar z13p2 = tmp7p2 - z3p2;\n\t\n\t\t\t\tdata[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n\t\t\t\tdata[dataOff+24] = z13p2 - z2p2;\n\t\t\t\tdata[dataOff+ 8] = z11p2 + z4p2;\n\t\t\t\tdata[dataOff+56] = z11p2 - z4p2;\n\t\n\t\t\t\tdataOff++; /* advance pointer to next column */\n\t\t\t}\n\t\n\t\t\t// Quantize/descale the coefficients\n\t\t\tvar fDCTQuant;\n\t\t\tfor (i=0; i<I64; ++i)\n\t\t\t{\n\t\t\t\t// Apply the quantization and scaling factor & Round to nearest integer\n\t\t\t\tfDCTQuant = data[i]*fdtbl[i];\n\t\t\t\toutputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n\t\t\t\t//outputfDCTQuant[i] = fround(fDCTQuant);\n\n\t\t\t}\n\t\t\treturn outputfDCTQuant;\n\t\t}", "function createFFT(smoothing,bins){\n // remember to call this function in setup\n // creates new p5 FFT constructor\n fft = new p5.FFT(smoothing,bins);\n}", "function each( x, F, i0, i1 )\n{\n var len = x.length, argslen = arguments.length;\n if ( argslen < 4 ) i1 = len-1;\n if ( 0 > i1 ) i1 += len;\n if ( argslen < 3 ) i0 = 0;\n if ( i0 > i1 ) return x;\n var i, k, l=i1-i0+1, l1, lr, r, q;\n r=l&15; q=r&1;\n if ( q ) F(x[i0], i0, x);\n for (i=q; i<r; i+=2)\n { \n k = i0+i;\n F(x[ k], k, x);\n F(x[++k], k, x);\n }\n for (i=r; i<l; i+=16)\n {\n k = i0+i;\n F(x[ k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n F(x[++k], k, x);\n }\n return x;\n}", "function calculateNext(data) {\n \n var aK1, bK1, hlp, hlp2, hlp3, tau, fNaK, am, bm, ad, bd, Infi, af, bf, ar, br, ato, bto, Itot;\n //xlap;\n \n var vi_t, tauv_t, xi_t, taux_t, zIK1_t, zINaCa1_t, zINaCa2_t, zINaK_t, zINab_t, zICab_t,\n expm_t, mi_t, zINa_t, expv_t, zICa_t, expff_t, fi_t, zIto_t, expto_t, toi_t, expxx_t,\n zIK_t;\n \n \n /* tabulations */\n \n vi_t=.5*(1-((Math.exp(7.74+.12*cS.v)-Math.exp(-(7.74+.12*cS.v)))/(Math.exp(7.74+.12*cS.v)+Math.exp(-(7.74+.12*cS.v)))));\n tauv_t = .25+2.24*((1-(Math.exp(7.74+.12*cS.v)-Math.exp(-(7.74+.12*cS.v)))/(Math.exp(7.74+.12*cS.v)+Math.exp(-(7.74+.12*cS.v))))/(1-(Math.exp(0.07*(cS.v+92.4))-Math.exp(-(0.07*(cS.v+92.4))))/(Math.exp(0.07*(cS.v+92.4))+Math.exp(-(0.07*(cS.v+92.4))))));\n xi_t = 0.988/(1+Math.exp(-.861-0.062*cS.v));\n taux_t = 240*Math.exp(-((25.5+cS.v)*(25.5+cS.v))/156)+182*(1+(Math.exp(0.154+0.0116*cS.v)-Math.exp(-(0.154+0.0116*cS.v)))/(Math.exp(0.154+0.0116*cS.v)+Math.exp(-(0.154+0.0116*cS.v))))+40*(1+(Math.exp(160+2*cS.v)-Math.exp(-(160+2*cS.v)))/(Math.exp(160+2*cS.v)+Math.exp(-(160+2*cS.v))));\n \n /* Time-independent functions */\n aK1 = 0.1/(1.0+Math.exp(0.06*(cS.v-cC.ek1-200.0)));\n bK1=(3.0*Math.exp(0.0002*(cS.v-cC.ek1+100.0))+Math.exp(0.1*(cS.v-cC.ek1-10.0)))/(1.0+Math.exp(-0.5*(cS.v-cC.ek1)));\n hlp = aK1/(aK1+bK1);\n zIK1_t = cS.gK1*hlp*(cS.v-cC.ek1);\n \n hlp = cS.v/cC.RTonF;\n hlp2 = Math.exp(cS.eta*hlp);\n hlp3 = Math.exp((cS.eta-1.0)*hlp);\n hlp = cS.gNaCa/( (cS.KmNa*cS.KmNa*cS.KmNa+cS.Nae*cS.Nae*cS.Nae)*(cS.KmCa+cS.Cae)*(1.0+cS.ksat*hlp3));\n zINaCa1_t = hlp*hlp2*cS.Nai*cS.Nai*cS.Nai*cS.Cae;\n zINaCa2_t = hlp*hlp3*cS.Nae*cS.Nae*cS.Nae;\n \n hlp = cS.v/cC.RTonF;\n fNaK = 1.0/(1.0+0.1245*Math.exp(-0.1*hlp) + 0.0365*cC.sigma*Math.exp(-hlp));\n hlp = cS.KmNai/cS.Nai;\n hlp2 = 1.0/(1.0+Math.sqrt(hlp*hlp*hlp));\n hlp3 = cS.Ke/(cS.Ke+cS.KmKe);\n zINaK_t = cS.gNaK*fNaK*hlp2*hlp3;\n zINab_t = cS.gNab*(cS.v-cC.ena);\n zICab_t = cS.gCab*(cS.v-cC.eca);\n \n /* NA gating variables */\n am = ((Math.abs(cS.v+47.13)) > 0.001) ? 0.32*(cS.v+47.13)/(1.0 - Math.exp(-0.1*(cS.v+47.13)) ): 3.2;\n bm = 0.08*Math.exp(cS.v/(-11.0));\n hlp = am+bm;\n tau = 1.0/hlp;\n expm_t = Math.exp(-cS.timestep/tau);\n \n mi_t = am/hlp;\n zINa_t = cS.gNa*(cS.v - cC.ena);\n expv_t = Math.exp(-cS.timestep/tauv_t);\n \n \n /*CA gating variables */\n \n hlp = Math.sqrt(2.0*cC.pi);\n hlp2= (cS.v-22.36)/16.6813;\n ad = (14.9859/(16.6813*hlp))*Math.exp(-0.5*hlp2*hlp2);\n hlp2 = (cS.v-6.2744)/14.93;\n bd = 0.1471-((5.3/(14.93*hlp))*Math.exp(-0.5*hlp2*hlp2));\n hlp = ad+bd;\n Infi = ad/hlp;\n zICa_t = cS.gCa*cC.fCa*Infi*(cS.v-cC.eca);\n \n af = 0.006872/(1.0+Math.exp((cS.v-6.1546)/6.1223));\n hlp = 0.0687*Math.exp(-0.1081*(cS.v+9.8255)) + 0.0112;\n hlp2 = 1.0+Math.exp(-0.2779*(cS.v+9.8255));\n bf = hlp/hlp2 + 0.0005474;\n hlp = af+bf;\n tau = 1.0/hlp;\n expff_t = Math.exp(-cS.timestep/tau);\n fi_t = af/hlp;\n \n /*TO gating variables */\n hlp = cS.v-42.2912;\n hlp2 = 0.5266*Math.exp(-0.0166*hlp);\n hlp3 = 1.0 + Math.exp(-0.0943*hlp);\n ar = hlp2/hlp3;\n hlp = 0.5149*Math.exp(-0.1344*(cS.v-5.0027)) + 0.00005186*cS.v;\n hlp2 = 1.0 + Math.exp(-0.1348*(cS.v-0.00005186));\n br = hlp/hlp2;\n hlp = ar+br;\n Infi = ar/hlp;\n zIto_t= cS.gto*Infi*(cS.v-cC.eto);\n hlp = cS.v + 34.2531;\n hlp2 = 0.0721*Math.exp(-0.173*hlp)+0.00005612*cS.v;\n hlp3 = 1.0+Math.exp(-0.1732*hlp);\n ato = hlp2/hlp3;\n hlp = cS.v + 34.0235;\n hlp2 = 0.0767*Math.exp(-1.66E-9*hlp)+0.0001215*cS.v;\n hlp3 = 1.0+Math.exp(-0.1604*hlp);\n bto = hlp2/hlp3;\n hlp = ato+bto;\n tau = 1.0/hlp;\n expto_t = Math.exp(-cS.timestep/tau);\n toi_t = ato/hlp;\n \n /* IK gating variables */\n expxx_t= Math.exp(-cS.timestep/(taux_t+40.0*(1.0-(Math.exp(160.0+cS.v*2.0)- Math.exp(-(160.0+cS.v*2.0)))/(Math.exp(160.0+cS.v*2.0)+ Math.exp(-(160.0+cS.v*2.0)))) ));\n zIK_t = cS.gK*(cS.v- cC.ekr);\n \n cS.istim = _s1s2Stimulus(count, data);\n \n /* Gating variables */\n cS.m = mi_t + ( cS.m - mi_t ) * expm_t;\n cS.f = fi_t + ( cS.f - fi_t ) * expff_t;\n cS.xv = vi_t + ( cS.xv - vi_t ) * expv_t;\n cS.to = toi_t + ( cS.to - toi_t ) * expto_t;\n cS.xx = xi_t + ( cS.xx - xi_t ) * expxx_t;\n \n /* The membrane currents */\n cS.ica = cS.f*zICa_t;\n cS.icab= zICab_t;\n cS.ina = cS.gNa*cS.xv*cS.xv*cS.m*cS.m*cS.m*(cS.v - cC.ena);\n cS.inab= zINab_t;\n cS.ik = cS.xx*cS.xx*zIK_t;\n cS.ik1 = zIK1_t;\n cS.ito = cS.to*zIto_t;\n cS.inaca = zINaCa1_t - cS.Cai*zINaCa2_t;\n cS.inak = zINaK_t;\n Itot= cS.ica+cS.icab+cS.ik1+cS.ik+cS.ina+cS.inab+cS.inaca+cS.inak+cS.ito-cS.istim;\n \n // \n \n /*if(count == 1){\n xlap = cC.d_o_dx2*(2.0*v(i+1)-2.0*cS.v);\n }\n else if (count == 1){\n xlap = cC.d_o_dx2*(2.0*v(i-1)-2.0*cS.v)\n }\n else{\n xlap = cC.d_o_dx2*(v(i+1)-2.0*cS.v+v(i-1))\n }*/\n \n /* The membrane potential */\n \n //cS.v = cS.v - cS.timestep*Itot+xlap; \n cS.v = cS.v - cS.timestep*Itot;\n \n // sets voltage variables after calculations\n utils.copySpecific(data.calculationSettings, cS, data.calculationSettings.voltageVariables);\n \n // sets current variables after calculations\n utils.copySpecific(data.calculationSettings, cS, data.calculationSettings.currentVariables);\n \n // iterate the count\n count++;\n return data; \n }", "constructor({audioCtx, fftSize, carFreq, modAmpl, modFreq, visualCtx}) {\n this.audioCtx = audioCtx;\n this,fftSize = fftSize;\n this.carFreq = carFreq;\n this.modAmpl = modAmpl;\n this.modFreq = modFreq;\n this.visualCtx = visualCtx;\n this.play = false;\n\n\n this.animate;\n this.analyserNode = audioCtx.createAnalyser();\n this.analyserNode.smoothingTimeConstant = 0.0;\n this.analyserNode.fftSize = fftSize;\n\n // Create the array for the data values\n this.frequencyArray = new Uint8Array(this.analyserNode.frequencyBinCount);\n\n // Uses the chroma.js library by Gregor Aisch to create a color gradient\n // download from https://github.com/gka/chroma.js\n this.colorScale = new chroma.scale('Spectral').domain([1,0]);\n // Global Variables for Drawing\n this.column = 0;\n this.canvasWidth = 800;\n this.canvasHeight = 256;\n }", "function Ku(t) {\n for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];\n for (var r = 0, i = e; r < i.length; r++) {\n var o = i[r];\n t = o.Yf(t);\n }\n return t;\n}", "_precompute() {\n\t\t\tconst encTable = this._tables[0];\n\t\t\tconst decTable = this._tables[1];\n\t\t\tconst sbox = encTable[4];\n\t\t\tconst sboxInv = decTable[4];\n\t\t\tconst d = [];\n\t\t\tconst th = [];\n\t\t\tlet xInv, x2, x4, x8;\n\n\t\t\t// Compute double and third tables\n\t\t\tfor (let i = 0; i < 256; i++) {\n\t\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t\t}\n\n\t\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t\t// Compute sbox\n\t\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\t\tsbox[x] = s;\n\t\t\t\tsboxInv[s] = x;\n\n\t\t\t\t// Compute MixColumns\n\t\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Compactify. Considerable speedup on Firefox.\n\t\t\tfor (let i = 0; i < 5; i++) {\n\t\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t\t}\n\t\t}", "function setup() {\n createCanvas(700, 300);\n fft = new p5.FFT();\n \n basso=[50, 50, 45, 45, 47, 47, 43, 43, 44, 44, 38, 38, 44, 44, 46, 46, 50, 50, 45, 45, 47, 47, 43, 43, 44, 44, 38, 38, 44, 44, 46, 46, 50, 50, 45, 45, 47, 47, 43, 43, 44, 44, 38, 38, 44, 44, 46, 46, 50, 50, 45, 45, 47, 47, 43, 43, 44, 44, 38, 38, 44, 44, 46, 46]; // the Basso Continuo\n \n violino=[78, 78, 76, 76, 74, 74, 73, 73, 71, 71, 69, 69, 71, 71, 73, 73, 74, 74, 73, 73, 71, 71, 69, 69, 67, 67, 66, 66, 67, 67, 64, 64, 62, 66, 69, 67, 66, 62, 66, 64, 62, 61, 62, 69, 67, 71, 69, 67, 66, 62, 64, 73, 74, 78, 81, 69, 71, 67, 69, 66, 62, 74, 74, 74]; // the three violine voices are actually the same, just shifted by two bars.\n\ni=0;\ns=0;\nv=[];\nb=new Canon(basso,0); // the basso\n}", "process(fft) {\n var dct = new DCT()\n if (fft.length != this.fftSize) {\n throw Error('Passed in FFT bins were incorrect size. Expected ' + this.fftSize + ' but was ' + fft.length);\n }\n var melSpec = this.filterBank.filter(fft),\n melSpecLog = melSpec.map(log),\n melCoef = dct.process(melSpecLog).slice(0, 13)\n return melCoef;\n }", "function triangulate(){\n var tfs = arrTF.slice();\n for (var i = 0; i < tfs.length; i++) {\n var f = tfs[i];\n if(f.length <= 3)continue;\n while(f.length > 3){\n arrE.push([f[0],f[2]]);\n arrTF.push([f[0],f[1],f[2]]);\n f.splice(1, 1);\n }\n arrTF[i] = f;\n }\n}", "triggerFreqShifter() {\n this.freqShifterActive = this.freqShifterActive ? this.freqShifterActive = false : this.freqShifterActive = true;\n\n if (this.freqShifterActive) {\n this.player.connect(this.freqShifter);\n this.freqShifter.wet.rampTo(1, 0.1);\n this.volOut.volume.rampTo(-20, 0.5);\n this.shifterLoop = new Tone.Loop((time) => this.shifterLFO(), 0.01); // calls below function every 0.01 seconds\n this.shifterLoop.start();\n /*\n this.player.connect(this.freqShifter);\n this.freqShifter.wet.rampTo(1, 0.1);\n this.freqShifterLFO.start();\n */\n }\n\n else {\n this.freqShifter.wet.rampTo(0, 0.1);\n this.player.disconnect(this.freqShifter);\n this.volOut.volume.rampTo(-0, 0.5);\n this.shifterLoop.stop();\n this.freqShifterGoingDown = true;\n\n this.freqShifter.pitch = 0;\n\n this.freqShifterParamTrackActive = false;\n this.freqShifterParamTrackActive_Y = false;\n /*\n this.freqShifter.wet.rampTo(0, 0.1);\n this.player.disconnect(this.freqShifter);\n this.freqShifterParamTrack.wet.rampTo(0, 0.1);\n this.freqShifterParamTrackActive = false;\n this.freqShifterParamTrackActive_Y = false;\n */\n }\n }", "function xu(t) {\n t.Wh.forEach((function(t) {\n t.next();\n }));\n}", "function mdct_short(inout, inoutPos) {\n\t\tfor (var l = 0; l < 3; l++) {\n\t\t\tvar tc0, tc1, tc2, ts0, ts1, ts2;\n\n\t\t\tts0 = inout[inoutPos + 2 * 3] * win[Encoder.SHORT_TYPE][0]\n\t\t\t\t\t- inout[inoutPos + 5 * 3];\n\t\t\ttc0 = inout[inoutPos + 0 * 3] * win[Encoder.SHORT_TYPE][2]\n\t\t\t\t\t- inout[inoutPos + 3 * 3];\n\t\t\ttc1 = ts0 + tc0;\n\t\t\ttc2 = ts0 - tc0;\n\n\t\t\tts0 = inout[inoutPos + 5 * 3] * win[Encoder.SHORT_TYPE][0]\n\t\t\t\t\t+ inout[inoutPos + 2 * 3];\n\t\t\ttc0 = inout[inoutPos + 3 * 3] * win[Encoder.SHORT_TYPE][2]\n\t\t\t\t\t+ inout[inoutPos + 0 * 3];\n\t\t\tts1 = ts0 + tc0;\n\t\t\tts2 = -ts0 + tc0;\n\n\t\t\ttc0 = (inout[inoutPos + 1 * 3] * win[Encoder.SHORT_TYPE][1] - inout[inoutPos + 4 * 3]) * 2.069978111953089e-11;\n\t\t\t/*\n\t\t\t * tritab_s [ 1 ]\n\t\t\t */\n\t\t\tts0 = (inout[inoutPos + 4 * 3] * win[Encoder.SHORT_TYPE][1] + inout[inoutPos + 1 * 3]) * 2.069978111953089e-11;\n\t\t\t/*\n\t\t\t * tritab_s [ 1 ]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 0] = tc1 * 1.907525191737280e-11 + tc0;\n\t\t\t/*\n\t\t\t * tritab_s[ 2 ]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 5] = -ts1 * 1.907525191737280e-11 + ts0;\n\t\t\t/*\n\t\t\t * tritab_s[0 ]\n\t\t\t */\n\t\t\ttc2 = tc2 * 0.86602540378443870761 * 1.907525191737281e-11;\n\t\t\t/*\n\t\t\t * tritab_s[ 2]\n\t\t\t */\n\t\t\tts1 = ts1 * 0.5 * 1.907525191737281e-11 + ts0;\n\t\t\tinout[inoutPos + 3 * 1] = tc2 - ts1;\n\t\t\tinout[inoutPos + 3 * 2] = tc2 + ts1;\n\n\t\t\ttc1 = tc1 * 0.5 * 1.907525191737281e-11 - tc0;\n\t\t\tts2 = ts2 * 0.86602540378443870761 * 1.907525191737281e-11;\n\t\t\t/*\n\t\t\t * tritab_s[ 0]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 3] = tc1 + ts2;\n\t\t\tinout[inoutPos + 3 * 4] = tc1 - ts2;\n\n\t\t\tinoutPos++;\n\t\t}\n\t}", "function mdct_short(inout, inoutPos) {\n\t\tfor (var l = 0; l < 3; l++) {\n\t\t\tvar tc0, tc1, tc2, ts0, ts1, ts2;\n\n\t\t\tts0 = inout[inoutPos + 2 * 3] * win[Encoder.SHORT_TYPE][0]\n\t\t\t\t\t- inout[inoutPos + 5 * 3];\n\t\t\ttc0 = inout[inoutPos + 0 * 3] * win[Encoder.SHORT_TYPE][2]\n\t\t\t\t\t- inout[inoutPos + 3 * 3];\n\t\t\ttc1 = ts0 + tc0;\n\t\t\ttc2 = ts0 - tc0;\n\n\t\t\tts0 = inout[inoutPos + 5 * 3] * win[Encoder.SHORT_TYPE][0]\n\t\t\t\t\t+ inout[inoutPos + 2 * 3];\n\t\t\ttc0 = inout[inoutPos + 3 * 3] * win[Encoder.SHORT_TYPE][2]\n\t\t\t\t\t+ inout[inoutPos + 0 * 3];\n\t\t\tts1 = ts0 + tc0;\n\t\t\tts2 = -ts0 + tc0;\n\n\t\t\ttc0 = (inout[inoutPos + 1 * 3] * win[Encoder.SHORT_TYPE][1] - inout[inoutPos + 4 * 3]) * 2.069978111953089e-11;\n\t\t\t/*\n\t\t\t * tritab_s [ 1 ]\n\t\t\t */\n\t\t\tts0 = (inout[inoutPos + 4 * 3] * win[Encoder.SHORT_TYPE][1] + inout[inoutPos + 1 * 3]) * 2.069978111953089e-11;\n\t\t\t/*\n\t\t\t * tritab_s [ 1 ]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 0] = tc1 * 1.907525191737280e-11 + tc0;\n\t\t\t/*\n\t\t\t * tritab_s[ 2 ]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 5] = -ts1 * 1.907525191737280e-11 + ts0;\n\t\t\t/*\n\t\t\t * tritab_s[0 ]\n\t\t\t */\n\t\t\ttc2 = tc2 * 0.86602540378443870761 * 1.907525191737281e-11;\n\t\t\t/*\n\t\t\t * tritab_s[ 2]\n\t\t\t */\n\t\t\tts1 = ts1 * 0.5 * 1.907525191737281e-11 + ts0;\n\t\t\tinout[inoutPos + 3 * 1] = tc2 - ts1;\n\t\t\tinout[inoutPos + 3 * 2] = tc2 + ts1;\n\n\t\t\ttc1 = tc1 * 0.5 * 1.907525191737281e-11 - tc0;\n\t\t\tts2 = ts2 * 0.86602540378443870761 * 1.907525191737281e-11;\n\t\t\t/*\n\t\t\t * tritab_s[ 0]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 3] = tc1 + ts2;\n\t\t\tinout[inoutPos + 3 * 4] = tc1 - ts2;\n\n\t\t\tinoutPos++;\n\t\t}\n\t}", "stepThyratrons() {\n let X2bPtr = this.Xptr[1]-1;\n if (X2bPtr===0) X2bPtr = ROTOR_SIZES.X2;\n let S1bPtr = this.Sptr[0]-1;\n if (S1bPtr===0) S1bPtr = ROTOR_SIZES.S1;\n\n // Get Chi rotor 5 two back to calculate plaintext (Z+Chi+Psi=Plain)\n let X5bPtr=this.Xptr[4]-1;\n if (X5bPtr===0) X5bPtr=ROTOR_SIZES.X5;\n X5bPtr=X5bPtr-1;\n if (X5bPtr===0) X5bPtr=ROTOR_SIZES.X5;\n // Get Psi rotor 5 two back to calculate plaintext (Z+Chi+Psi=Plain)\n let S5bPtr=this.Sptr[4]-1;\n if (S5bPtr===0) S5bPtr=ROTOR_SIZES.S5;\n S5bPtr=S5bPtr-1;\n if (S5bPtr===0) S5bPtr=ROTOR_SIZES.S5;\n\n const x2sw = this.limitations.X2;\n const s1sw = this.limitations.S1;\n const p5sw = this.limitations.P5;\n\n // Limitation calculations\n let lim=1;\n if (x2sw) lim = this.rings.X[2][X2bPtr-1];\n if (s1sw) lim = lim ^ this.rings.S[1][S1bPtr-1];\n\n // P5\n if (p5sw) {\n let p5lim = this.P5Zbit[1];\n p5lim = p5lim ^ this.rings.X[5][X5bPtr-1];\n p5lim = p5lim ^ this.rings.S[5][S5bPtr-1];\n lim = lim ^ p5lim;\n }\n\n const basicmotor = this.rings.M[2][this.Mptr[0]-1];\n this.totalmotor = basicmotor;\n\n if (x2sw || s1sw) {\n if (basicmotor===0 && lim===1) {\n this.totalmotor = 0;\n } else {\n this.totalmotor = 1;\n }\n }\n\n // Step Chi rotors\n for (let r=0; r<5; r++) {\n this.Xptr[r]++;\n if (this.Xptr[r] > ROTOR_SIZES[\"X\"+(r+1)]) this.Xptr[r] = 1;\n }\n\n if (this.totalmotor) {\n // Step Psi rotors\n for (let r=0; r<5; r++) {\n this.Sptr[r]++;\n if (this.Sptr[r] > ROTOR_SIZES[\"S\"+(r+1)]) this.Sptr[r] = 1;\n }\n }\n\n // Move M37 rotor if M61 set\n if (this.rings.M[1][this.Mptr[1]-1]===1) this.Mptr[0]++;\n if (this.Mptr[0] > ROTOR_SIZES.M37) this.Mptr[0]=1;\n\n // Always move M61 rotor\n this.Mptr[1]++;\n if (this.Mptr[1] > ROTOR_SIZES.M61) this.Mptr[1]=1;\n }", "function ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}", "function frameLooper() {\n window.requestAnimationFrame(frameLooper); // recursive yaaay, for looping\n // fbc_array is our actual frequency/amplitude array\n // having access to this will be key to split up later\n fbc_array = new Uint8Array(analyser.frequencyBinCount);\n\n analyser.getByteFrequencyData(fbc_array);\n ctx.clearRect(0, 0, canvas.width, canvas.height); // clear the canvas every loop\n ctx.fillStyle = '#00CCFF'; // color of the bars. I chose sky blue\n bars = 128; // how many bars to render. 128 might make the most sense.\n // fbc_array.length == 1024, so each bar represents 8 frequencies\n\n for(var i = 0; i < bars; i++){\n bar_x = i * 2; // each bar is 3 units apart on the x axis\n bar_width = 1; // each bar is 2 units wide. 0-1 is a bar, 2 is not, 3-4 is a bar, etc. But this is based on the width of the canvas\n bar_height = -(fbc_array[i] / 2); // frequency data, of the current index. The amplitude\n\n // amps[0].text = fbc_array[0]; // not working\n\n // here I'm finding out stuff about the bar_height\n // barH.innerHTML = fbc_array; // this is a simple trick for now, but I want to make a 32x32 grid, and loop over it and fill the number (amp) into each of them\n // Doing this at every frame makes everything lag, so idk if I'll have to comment out the *BAR* visualization for testing purposes. Then I'll make a grid of the array, change the color of the text as it increases, and that'll be my new visualisation.\n\n // fillRect(x, y, width, height) // explanation of the parameters below\n ctx.fillRect(bar_x, canvas.height, bar_width, bar_height); // this draws the bars themselves\n }\n\n\n // Table visualization\n for(var j = 0; j < fbc_array.length; j++){\n amps[j].innerHTML = fbc_array[j];\n // styling is gonna be difficult\n // amps[j].css({\"background-color\":`rgb(0,${j}, ${j})`});\n }\n\n}", "_AMDF(buf, sampleRate) {\n var SIZE = buf.length; // set SIZE variable equal to buffer length 4096 => half a second\n var MAX_SAMPLES = Math.floor(SIZE / 2); // set MAX_SAMPLES = 4096/2 = 2048\n var best_offset = -1; // initialise best_offset to -1\n var best_correlation = 0; // initialise best_correlation to 0\n var rms = 0; // initialise rms to 0 (rms => root-mean-square)\n var foundGoodCorrelation = false; // initialise foundGoodCorrelation flag to false\n var correlations = new Array(MAX_SAMPLES); // create an array variable called correlations of size MAX_SAMPLES (2048)\n\n for (var i = 0; i < SIZE; i++) {\n var val = buf[i]; // val is equal to the (i)th value in the array\n rms += val * val; // rms is the summation of each value squared\n }\n rms = Math.sqrt(rms / SIZE); // set rms equal to the square root of rms/SIZE (square root of the average)\n if (rms < 0.01) // not enough signal\n return -1;\n\n var lastCorrelation = 1; // initialise lastCorrelation to 1 so that the first check won't be the best correlation\n for (var offset = 52; offset < 160; offset++) { // offset initialised to 52, goes through a for loop from 52 to 160, which will cover the notes that Singphony can render\n var correlation = 0; // re-set correlation to 0 at each offset value\n\n for (var i = 0; i < MAX_SAMPLES; i++) { // cycle through from 0 to 2048\n correlation += Math.abs((buf[i]) - (buf[i + offset])); // step through at each value and subtract the value at the offset from the value in the original buffer and keep adding that to the correlation value\n } // correlation will be a large enough positive float\n\n correlation = 1 - (correlation / MAX_SAMPLES); // set correlation to 1 - correlation/512\n correlations[offset] = correlation; // store it, for the tweaking we need to do below.\n if ((correlation > this.GOOD_ENOUGH_CORRELATION) && (correlation > lastCorrelation)) { // if the correlation value is higher than 0.9 and the previous correlation value\n foundGoodCorrelation = true; // set foundGoodCorrelation flag to true\n if (correlation > best_correlation) { //\n best_correlation = correlation; // update the best_correlation value to the latest correlation value\n best_offset = offset; // update best_offset to the latest offset value\n }\n } else if (foundGoodCorrelation) {\n // short-circuit - we found a good correlation, then a bad one, so we'd just be seeing copies from here.\n return sampleRate / best_offset;\n }\n lastCorrelation = correlation; // set lastCorrelation to latest correlation\n }\n return -1;\n }", "function sha1_ft(t, b, c, d)\r\n{\r\n if(t < 20) return (b & c) | ((~b) & d);\r\n if(t < 40) return b ^ c ^ d;\r\n if(t < 60) return (b & c) | (b & d) | (c & d);\r\n return b ^ c ^ d;\r\n}", "function calculateNext(data) {\n\n var alpham, betam, alphah, betah, alphaj, betaj, alphaoa,\n betaoa, alphaoi, betaoi, alphaua, betaua, alphaui, betaui, alphaxr, betaxr, alphaxs, betaxs,\n temp, xnaca11, xnaca21;\n\n var exptaum_t, xinfm_t, exptauh_t, xinfh_t, exptauj_t, xinfj_t, \n xk1t_t, exptauoa_t, xinfoa_t, exptauoi_t, xinfoi_t, exptauua_t, xinfua_t, exptauui_t, xinfui_t, xkurcoeff_t, xkrcoeff_t, \n exptaud_t, xinfd_t, exptauf_t, xinff_t, xnakt_t, xnaca1_t, \n xnaca2_t, exptauw_t, xinfw_t;\n\n /* moved to settings as previous value required \n exptauxr_t, xinfxr_t, exptauxs_t, xinfxs_t*/\n\n var xinffca_t , xpcat_t, ecat_t, xupt_t, carow2_t;\n\n var xinfut_t, exptauvt_t, xinfvt_t; \n\n var xstim, eca, xinfm1, exptaum1, xinfh1, exptauh1, xinfj1, exptauj1,\n xinfoa1, exptauoa1, xinfoi1, exptauoi1,\n xinfua1, exptauua1, xinfui1, exptauui1, xkurcoeff1,\n xinfxr1, exptauxr1, xkrcoeff1,\n xinfxs1, exptauxs1,\n xinfd1, exptaud1, xinff1, exptauf1, xinffca1,\n xinfu, exptauv, xinfv, xinfw1, exptauw1,\n xtr, xup, xupleak,\n di_ups, carow21; \n\n //calculations start\n //\n\n alpham = (Math.abs( cS.v + 47.13) < 1e-5) ? 3.2 : 0.32 * ( cS.v + 47.13 )/( 1.- Math.exp(-0.1*( cS.v + 47.13 ) ) );\n\n betam = 0.08 * Math.exp (- cS.v /11.);\n\n alphah = ( cS.v > -40.0 ) ? 0.0 : 0.135 * Math.exp(-( cS.v+80.0)/6.8); \n\n betah = ( cS.v > -40.0 ) ? 1.0/ (0.13 * (1.0 + Math.exp (-( cS.v + 10.66)/11.1))) \n : 3.56 * Math.exp ( 0.079 * cS.v ) + 3.1e5 * Math.exp(0.35 * cS.v); \n\n alphaj = ( cS.v > -40.0 ) ? 0.0 \n : (-127140 * Math.exp(0.2444 * cS.v)-3.474e-5 * Math.exp(-0.04391 * cS.v)) * ( cS.v + 37.78)/(1. + Math.exp (0.311 * ( cS.v + 79.23))); \n\n betaj = ( cS.v > -40.0 ) ? 0.3 * Math.exp(-2.535e-7 * cS.v)/(1.+Math.exp(-0.1 * ( cS.v+32.))) \n : 0.1212 * Math.exp(-0.01052 * cS.v)/(1.+Math.exp(-0.1378 * ( cS.v+40.14))); \n\n alphaoa = 0.65 / ( Math.exp ( - ( cS.v + 10. ) / 8.5 ) + Math.exp ( - ( cS.v-30. ) / 59. ) ); \n\n betaoa = 0.65 / ( 2.5 + Math.exp ( ( cS.v + 82. ) / 17. ) );\n\n alphaoi = 1.0 / ( 18.53 + Math.exp ( ( cS.v + 113.7 ) / 10.95 ) );\n\n betaoi = 1.0 / ( 35.56 + Math.exp ( - ( cS.v + 1.26 ) / 7.44 ) ); \n\n alphaua = 0.65 / ( Math.exp ( - ( cS.v + 10. ) / 8.5 ) + Math.exp ( - ( cS.v-30. ) / 59. ) ); \n\n betaua = 0.65 / ( 2.5 + Math.exp ( ( cS.v + 82. ) / 17. ) ); \n\n alphaui = 1.0 / ( 21. + Math.exp ( - ( cS.v-185. ) / 28. ) ) ; \n\n betaui = Math.exp ( ( cS.v-158. ) / 16. ); \n\n alphaxr = 0.0003* ( cS.v + 14.1 ) / ( 1.- Math.exp ( - ( cS.v + 14.1 ) / 5. ) ); \n\n betaxr = 7.3898e-5* ( cS.v-3.3328 ) / ( Math.exp ( ( cS.v-3.3328 ) / 5.1237 ) -1. ); \n\n alphaxs = 4e-5* ( cS.v-19.9 ) / ( 1.- Math.exp ( - ( cS.v-19.9 ) / 17. ) ); \n\n betaxs = 3.5e-5* ( cS.v-19.9 ) / ( Math.exp ( ( cS.v-19.9 ) / 9. ) -1. );\n\n //table variables depending on V\n\n exptaum_t = Math.exp(- cS.timestep*(alpham+betam));\n\n xinfm_t = alpham/(alpham+betam);\n\n exptauh_t = Math.exp(- cS.timestep*(alphah+betah));\n\n xinfh_t = alphah/(alphah+betah);\n\n exptauj_t = Math.exp(- cS.timestep*(alphaj+betaj));\n\n xinfj_t = alphaj/(alphaj+betaj);\n\n xk1t_t = cS.gk1*( cS.v- cC.ek)/(1.+Math.exp(0.07*( cS.v + 80.)));\n\n exptauoa_t = Math.exp(- cS.timestep*((alphaoa+betaoa)* cS.xkq10));\n\n xinfoa_t = 1.0/(1.+Math.exp(-( cS.v+20.47)/17.54));\n\n exptauoi_t = Math.exp(- cS.timestep*((alphaoi+betaoi)* cS.xkq10));\n\n xinfoi_t = 1.0/(1.+Math.exp(( cS.v+43.1)/5.3));\n\n exptauua_t = Math.exp(- cS.timestep*((alphaua+betaua)* cS.xkq10));\n\n xinfua_t = 1.0/(1.+Math.exp(-( cS.v+30.3)/9.6));\n\n exptauui_t = Math.exp(- cS.timestep*((alphaui+betaui)* cS.xkq10));\n\n xinfui_t = 1.0/(1.+Math.exp(( cS.v-99.45)/27.48));\n\n xkurcoeff_t = (0.005+0.05/(1.+Math.exp(-( cS.v-15.)/13.)))*( cS.v- cC.ek);\n\n\n if(!((Math.abs( cS.v+14.1) < 1e-5) || (Math.abs( cS.v-3.3328)<1e-5))){\n cS.exptauxr_t = Math.exp(- cS.timestep*(alphaxr+betaxr));\n cS.xinfxr_t = 1.0/(1.+Math.exp(-( cS.v+14.1)/6.5));\n }\n\n xkrcoeff_t = cS.gkr*( cS.v- cC.ek)/(1.+Math.exp(( cS.v+15.)/22.4));\n\n if(!(Math.abs( cS.v-19.9) < 1e-5)){\n cS.exptauxs_t = Math.exp(- cS.timestep/0.5*(alphaxs+betaxs));\n cS.xinfxs_t = 1.0/Math.sqrt(1.+Math.exp(-( cS.v-19.9)/12.7));\n }\n\n //temp varaible used for calculations\n temp = (1.0-Math.exp(-( cS.v+10.)/6.24))/(0.035*( cS.v+10.)* (1.+Math.exp(-( cS.v+10.)/6.24)));\n\n if(Math.abs( cS.v+10) < 1e-5){\n exptaud_t = 2.2894;\n exptauf_t = 0.9997795;\n }\n else{\n exptaud_t = Math.exp(- cS.timestep/temp); \n exptauf_t = Math.exp(- cS.timestep/9.*(0.0197*Math.exp(Math.pow(-(0.0337 *( cS.v+10.)), 2))+0.02));\n }\n\n xinfd_t = 1.0/(1.+Math.exp(-( cS.v+10.)/8.));\n\n xinff_t = 1.0/(1.+Math.exp(( cS.v+28.)/6.9));\n\n xnakt_t = (1.0/(1.+0.1245*Math.exp(-0.1* cS.v/ cC.rtof)+0.0365* cC.sigma*Math.exp(- cS.v/ cC.rtof)))* cS.xinakmax/(1.+(Math.pow(( cS.xkmnai/ cS.cnai),1.5)))*( cS.cko/( cS.cko+ cS.xkmko));\n\n xnaca1_t = cS.xinacamax*Math.exp( cS.gamma* cS.v/ cC.rtof)*(Math.pow( cS.cnai,3))* cS.ccao/((Math.pow( cS.xkmna,3)+ Math.pow( cS.cnao,3))*( cS.xkmca+ cS.ccao)*(1.+ cS.xksat*Math.exp(( cS.gamma-1.)* cS.v/ cC.rtof)));\n\n xnaca2_t = cS.xinacamax*Math.exp(( cS.gamma-1.)* cS.v/ cC.rtof)/((Math.pow( cS.xkmna,3) + Math.pow( cS.cnao,3))*( cS.xkmca+ cS.ccao)*(1.+ cS.xksat*Math.exp(( cS.gamma-1.)* cS.v/ cC.rtof))); \n\n temp = 6.0*(1.-Math.exp(-( cS.v-7.9)/5.))/((1.+0.3*Math.exp(-( cS.v-7.9)/5.))*( cS.v-7.9)); \n\n exptauw_t = Math.exp(- cS.timestep/temp);\n\n xinfw_t = 1.0-1.0/(1.+Math.exp(-( cS.v-40.)/17.));\n\n //table variables depending on ca\n\n xinffca_t = 1.0/(1.+ cS.ccai/0.00035);\n xpcat_t = cS.xipcamax* cS.ccai/(0.0005+ cS.ccai);\n ecat_t = cC.rtof*0.5*Math.log( cS.ccao/ cS.ccai);\n xupt_t = cS.xupmax/(1.+ cS.xkup/ cS.ccai);\n carow2_t = ( cS.trpnmax* cS.xkmtrpn/( cS.ccai+ cS.xkmtrpn)/( cS.ccai+ cS.xkmtrpn) + cS.cmdnmax* cS.xkmcmdn/( cS.ccai+ cS.xkmcmdn)/( cS.ccai+ cS.xkmcmdn)+1.)/ cC.c_b1c;\n\n //table variables depending on fn\n /* fnlo=-0.2,fnhi=2.3,nfnt=2500\n dfntable=(fnhi-fnlo)/float(nfnt)\n fn=fnlo+i*dfntable\n */\n xinfut_t = 1.0/(1.+ Math.exp(-( cS.fn/13.67e-4-250.0)));\n\n temp = 1.91+2.09/(1.+ Math.exp(-( cS.fn/13.67e-4-250.0)));\n\n exptauvt_t = Math.exp(- cS.timestep/temp);\n\n xinfvt_t = 1.-1.0/(1.+ Math.exp(-( cS.fn-6.835e-14)/13.67e-16));\n\n\n // table loop starts here\n\n xstim = _s1s2Stimulus(count, data);\n\n //c equilibrium potentials\n eca = ecat_t;\n\n //c fast sodium current\n xinfm1 = xinfm_t;\n exptaum1 = exptaum_t;\n xinfh1 = xinfh_t;\n exptauh1 = exptauh_t;\n xinfj1 = xinfj_t;\n exptauj1 = exptauj_t;\n\n cS.xm = xinfm1 + ( cS.xm - xinfm1) * exptaum1;\n cS.xh = xinfh1 + ( cS.xh - xinfh1) * exptauh1;\n cS.xj = xinfj1 + ( cS.xj - xinfj1) * exptauj1; \n cS.xna = cS.xm * cS.xm * cS.xm * cS.xh * cS.xj * cS.gna *( cS.v - cC.ena);\n\n //c time-independent k+ current\n cS.xk1 = xk1t_t;\n\n //c transient outward k+ current\n xinfoa1 = xinfoa_t;\n exptauoa1 = exptauoa_t;\n xinfoi1 = xinfoi_t;\n exptauoi1 = exptauoi_t;\n\n cS.xoa = xinfoa1+( cS.xoa-xinfoa1)*exptauoa1;\n cS.xoi = xinfoi1+( cS.xoi-xinfoi1)*exptauoi1;\n cS.xto = cS.xoa* cS.xoa* cS.xoa* cS.xoi* cS.gto*( cS.v - cC.ek);\n\n //c ultrarapid delayed rectifier k+ current\n xinfua1 = xinfua_t;\n exptauua1 = exptauua_t;\n xinfui1 = xinfui_t;\n exptauui1 = exptauui_t;\n xkurcoeff1= xkurcoeff_t;\n\n cS.xua = xinfua1+( cS.xua-xinfua1)*exptauua1;\n cS.xui = xinfui1+( cS.xui-xinfui1)*exptauui1;\n cS.xkur = cS.xua* cS.xua* cS.xua* cS.xui*xkurcoeff1;\n\n //c rapid delayed outward rectifier k+ current\n xinfxr1 = cS.xinfxr_t;\n exptauxr1 = cS.exptauxr_t;\n xkrcoeff1 = xkrcoeff_t;\n\n cS.xr = xinfxr1+( cS.xr-xinfxr1)*exptauxr1;\n cS.xkr = cS.xr*xkrcoeff1;\n\n //c slow delayed outward rectifier k+ current\n xinfxs1 = cS.xinfxs_t;\n exptauxs1 = cS.exptauxs_t;\n\n cS.xs = xinfxs1+( cS.xs-xinfxs1)*exptauxs1;\n cS.xks = cS.xs* cS.xs* cS.gks*( cS.v- cC.ek);\n\n //c L-tpe ca2+ current\n xinfd1 = xinfd_t;\n exptaud1 = exptaud_t;\n xinff1 = xinff_t;\n exptauf1 = exptauf_t;\n xinffca1 = xinffca_t;\n\n cS.xd = xinfd1+( cS.xd-xinfd1)*exptaud1;\n cS.xf = xinff1+( cS.xf-xinff1)*exptauf1;\n cS.xfca = xinffca1+( cS.xfca-xinffca1)* cC.exptaufca;\n cS.xcal = cS.xd* cS.xf* cS.xfca* cS.gcal*( cS.v-65.0);\n\n //xnak, xnaca, xbca, xbna, xpca; \n\n //cc na+/k+ pump current\n cS.xnak = xnakt_t;\n\n //c na+/ca2+ exchanger current\n xnaca11 = xnaca1_t;\n xnaca21 = xnaca2_t;\n cS.xnaca = xnaca11 - xnaca21* cC.cnao3* cS.ccai;\n\n //cc background currents\n cS.xbca = cS.gbca * ( cS.v - eca);\n\n cS.xbna = cS.gbna * ( cS.v - cC.ena);\n\n //c ca2+ pump current\n cS.xpca = xpcat_t;\n\n /*c ca2+ release current from JSR\n c correction: divide first fn term by cm, multiply second fn term by cm\n c then to ensure computational accuracy (no problems with tiny numbers),\n c divide fn by 1e-12 and adjust functions accordingly*/\n cS.xrel = cS.xkrel* cS.xu* cS.xu* cS.xv* cS.xw*( cS.ccarel- cS.ccai);\n\n cS.fn = cS.vrel/ cS.cm* cS.xrel-0.5 * cS.cm/ cS.xxf*(0.5* cS.xcal-0.2* cS.xnaca);\n\n xinfu = xinfut_t;\n exptauv = exptauvt_t;\n xinfv = xinfvt_t;\n\n cS.xu = xinfu+( cS.xu-xinfu)* cC.exptauu;\n cS.xv = xinfv+( cS.xv-xinfv)*exptauv;\n\n xinfw1 = xinfw_t;\n exptauw1 = exptauw_t;\n\n cS.xw = xinfw1+( cS.xw-xinfw1)*exptauw1;\n cS.xrel = cS.xkrel* cS.xu* cS.xu* cS.xv* cS.xw*( cS.ccarel - cS.ccai);\n\n // c transfer current from NSR to JSR\n xtr = ( cS.ccaup - cS.ccarel)/ cS.tautr;\n\n // c ca2+ uptake current by the NSR\n xup = xupt_t;\n\n // c ca2+ leak current by the NSR\n xupleak = cS.ccaup* cS.xupmax/ cS.ccaupmax;\n\n //c intracellular ion concentrations\n di_ups = xup-xupleak;\n carow21 = carow2_t;\n cS.ccai = cS.ccai + cS.timestep * ( cC.c_b1d*( cS.xnaca + cS.xnaca - cS.xpca - cS.xcal - cS.xbca)- cC.c_b1e* di_ups + cS.xrel) / carow21; \n cS.ccaup = cS.ccaup + cS.timestep * (xup - xupleak-xtr*( cS.vrel/ cS.vup));\n cS.ccarel = cS.ccarel + cS.timestep * ((xtr - cS.xrel)/ (1.+( cS.csqnmax* cS.xkmcsqn)/(Math.pow(( cS.ccarel+ cS.xkmcsqn),2))));\n\n //console.log( cS.xna , cS.xk1 , + cS.xkur + cS.xto , cS.xkur , cS.xkr , cS.xks , cS.xcal , cS.xpca , cS.xnak, cS.xnaca, cS.xbna, cS.xbca-xstim);\n \n cS.v = cS.v - cS.timestep * ( cS.xna + cS.xk1 + cS.xto + cS.xkur + cS.xkr + cS.xks + cS.xcal + cS.xpca + cS.xnak + cS.xnaca + cS.xbna + cS.xbca - xstim);\n\n // table loop ends\n\n //cal ends\n // sets voltage variables after calculations\n utils.copySpecific(data.calculationSettings, cS, data.calculationSettings.voltageVariables);\n \n // sets current variables after calculations\n utils.copySpecific(data.calculationSettings, cS, data.calculationSettings.currentVariables);\n\n // iterate the count\n count++;\n\n return data; \n }", "function makeSamples(groove, color, data){\n\n\tvar oneSecond = 44100;\n\tvar loop = false;\n\tvar repeats = 4;\n\tvar repeated = 0;\n\tvar PI = Math.PI;\n\n\tvar maxSamples = (groove.duration * oneSecond ) / 1000 ;\t\n var instrumentType = \"sin\";\n var delay = false;\n if (color == 0) {\n\tdelay = true;\n } \n else if (color == 1) {\n } \n else if (color == 2) {\n\tinstrumentType = \"sqr\";\n } \n else if (color == 3) {\n\tinstrumentType = \"sqr\";\n } \n else if (color == 4) {\n\tinstrumentType = \"sqr\";\n } \n else if (color == 5) {\n\tinstrumentType = \"sqr\";\n } \n else if (color == 6) {\n\tinstrumentType = \"sqr\";\n\tdelay = true;\n } \n else if (color == 7) {\n\tinstrumentType = \"saw\";\n } \n else if (color == 8) {\n\tinstrumentType = \"saw\";\n } \n else if (color == 9) {\n\tinstrumentType = \"saw\";\n } \n else if (color == 10) {\n\tinstrumentType = \"saw\";\n } \n\n var freqs = data[0];\n var times = data[1];\n\tdebugfreqs = freqs;\n \tdebugtimes = times;\n\n var samples = [];\n ii = 0;\n var tcounter = 0;\n for (var j = 0; j < freqs.length - 1; j++) {\n\t\tif (j == 0 && times[0] > groove.startLine){\n\t\t\tvar freqDur = times[j] / groove.lineLength;\n\t \n\t\t\tfreqDur = freqDur * groove.duration;\n\t\t\tfreqDur = freqDur * 44100;\n\t\t\tfreqDur = Math.floor(freqDur / 1000);\n\t \n\t \tfor (var i = 0; i < freqDur; i++) {\n\t \t var t = i / oneSecond; \n\t \t samples[ii] = 0;\n\t \t ii++;\n\t\t }\n\t\t}\n var frequency = freqs[j];\n//\tif (freqs.length > j + 1 && freqs[j + 1] == 0){\n//\t\tfrequency = 0;\n//\t}\n\n var freqDur = times[j + 1] / groove.lineLength;\n \n freqDur = freqDur * groove.duration;\n freqDur = freqDur * 44100;\n freqDur = Math.floor(freqDur / 1000);\n\n// \tfor (var i = 0; i < freqDur; i++){\n\t\tvar i = 0;\n while (true){\n var t = i / oneSecond; // time from 0 to 1\n if (frequency == 0){\n samples[ii] = 0;\n }\n\t\t else if (instrumentType == \"sin\"){\n\t\t samples[ii] = Math.sin(frequency * 2 * PI * t); // wave equation (between -1,+1)\n\t\t }\n else if (instrumentType == \"sqr\") {\n\t\t\t if (Math.sin(frequency * 2 * PI * t) > 0){\n\t\t\t\t\tsamples[ii] = 1; } else { samples[ii] = -1;\n\t\t\t\t}\n\t\t }\n else if (instrumentType == \"saw\") {\n \tsamples[ii] = 1 - ((frequency*t)%1);\n\t\t }\n samples[ii] = samples[ii] * 0.25;\n\n\t\t\tif (i >= freqDur){\n\t\t\t\tif (instrumentType == \"sin\"){\n\t\t\t\t\tif (samples[ii] == 0 || (samples[ii -1] < samples[ii] && samples[ii] < 0.01 && samples[ii] > -0.01)){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\t\t\n\t\t\t}\n ii++;\n if (maxSamples > 0 && ii >= maxSamples){\n\t\t\t\tbreak;\n\t\t }\n\t\t i++;\n }\n if (maxSamples > 0 && ii >= maxSamples){\n\t\t\tbreak;\n\t }\n }\n if (maxSamples == 0){\n\t\tmaxSamples = ii;\n }\n else {\n\t\twhile (ii < maxSamples){\n\t \t\tsamples[ii] = 0;\n\t \tii++;\n\t\t}\n }\n//\tdocument.write(ii);\n//\tdocument.write(\"<br/>\");\n// var delayLine = new Array;\n// var pointer = 0;\n// var delayLength = oneSecond / 2;\n// for (var ijj = 0; ijj < groove.lineLength; ijj++){\n//\t\tdelayLine[ijj] = 0;\n// }\n for (var repeat = 1 ; repeat < repeats; repeat++){\n for (var jj = 0 ; jj < ii ; jj++){\n samples[jj + ii * repeat] = samples[jj];\n\t if (delay){\n//\t\tsamples[jj + ii * repeat] = samples[jj + ii * repeat] - 0.5*delayLine[pointer];\n//\t\tdelayLine[pointer] = samples[jj + ii * repeat];\n//\t\tpointer = (pointer+1)%lineLength;\n }\n\t }\n\t}\n return samples;\n}", "function addEqualiser() {\n\n var gainDb = -40.0; // atenuation When it takes a positive value it is a real gain, when negative it is an attenuation. It is expressed in dB, has a default value of 0 and can take a value in a nominal range of -40 to 40.\n var bandSplit = [360, 3600];\n context_player = new AudioContext();\n\n for (var i = 0; i < 2; i++) {\n\n mediaElement_player.push(null);\n sourceNode_player.push(null);\n source_player.push(null);\n lGain_player.push(null);\n mGain_player.push(null);\n hGain_player.push(null);\n sum_player.push(null);\n volumeNodes.push(null);\n\n\n mediaElement_player[i] = document.getElementById('jp_audio_' + i);\n source_player[i] = context_player.createMediaElementSource(mediaElement_player[i]);\n\n initFrequencyQuality(i);\n\n // affects the ammount of treble in a sound - treble knob - atenuates the sounds below the 3600 frequencies\n var lBand_player = context_player.createBiquadFilter();\n lBand_player.type = \"lowshelf\";\n lBand_player.frequency.value = bandSplit[1];\n lBand_player.gain.value = gainDb;\n\n // affects the ammount of bass in a sound - bass knob - atenuates the sounds higher than 360 frequencies\n var hBand_player = context_player.createBiquadFilter();\n hBand_player.type = \"highshelf\";\n hBand_player.frequency.value = bandSplit[0];\n hBand_player.gain.value = gainDb;\n\n var hInvert_player = context_player.createGain();\n hInvert_player.gain.value = -1.0;\n\n //Subtract low and high frequencies (add invert) from the source for the mid frequencies\n var mBand_player = context_player.createGain();\n\n //or use picking\n //mBand_player = context_player.createBiquadFilter();\n //mBand_player.type = \"peaking\";\n //mBand_player.frequency.value = bandSplit[0];\n //mBand_player.gain.value = gainDb;\n\n var lInvert_player = context_player.createGain();\n lInvert_player.gain.value = -1.0;\n\n sourceNode_player[i].connect(lBand_player);\n sourceNode_player[i].connect(mBand_player);\n sourceNode_player[i].connect(hBand_player);\n\n hBand_player.connect(hInvert_player);\n lBand_player.connect(lInvert_player);\n\n hInvert_player.connect(mBand_player);\n lInvert_player.connect(mBand_player);\n\n\n lGain_player[i] = context_player.createGain();\n mGain_player[i] = context_player.createGain();\n hGain_player[i] = context_player.createGain();\n\n lBand_player.connect(lGain_player[i]);\n mBand_player.connect(mGain_player[i]);\n hBand_player.connect(hGain_player[i]);\n\n sum_player[i] = context_player.createGain();\n lGain_player[i].connect(sum_player[i]);\n mGain_player[i].connect(sum_player[i]);\n hGain_player[i].connect(sum_player[i]);\n\n lGain_player[i].gain.value = 1;\n mGain_player[i].gain.value = 1;\n hGain_player[i].gain.value = 1;\n\n volumeNodes[i] = context_player.createGain();\n sum_player[i].connect(volumeNodes[i]);\n volumeNodes[i].connect(context_player.destination);\n }\n\n //set volume\n var x = 50 / 100;\n // Use an equal-power crossfading curve:\n var gain1 = Math.cos(x * 0.5 * Math.PI);\n var gain2 = Math.cos((1.0 - x) * 0.5 * Math.PI);\n volumeNodes[0].gain.value = gain1;\n volumeNodes[1].gain.value = gain2;\n\n //create audio Recording node\n audioRecordNode = context_player.createGain();\n volumeNodes[0].connect(audioRecordNode);\n volumeNodes[1].connect(audioRecordNode);\n audioRecorder = new Recorder(audioRecordNode);\n}", "function sha1_ft(t, b, c, d) {\n if (t < 20) return (b & c) | ((~b) & d);\n if (t < 40) return b ^ c ^ d;\n if (t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}", "function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}", "function setupAudioNodes(audioContext, drawWaveformFunction, drawSpectrumFunction, drawSpectrogramFunction, htmlIds, colorScale)\n{\n // Setup a script node\n let scriptNode = audioContext.createScriptProcessor();\n // Connect to destination\n scriptNode.connect(audioContext.destination);\n \n // Setup an analyzer\n let analyser = audioContext.createAnalyser();\n analyser.smoothingTimeConstant = 0;\n // Higher FFT size means more bins. More bins mean more points to graph.\n // Also means each bin has a smaller range of frequencies so it's kind of like more precise.\n analyser.fftSize = 2048 * 2;\n \n // Create a buffer source node\n let sourceNode = audioContext.createBufferSource();\n sourceNode.connect(analyser);\n analyser.connect(scriptNode);\n \n sourceNode.connect(audioContext.destination);\n \n console.log(\"Sample rate: \" + audioContext.sampleRate + \" Hz\");\n console.log(\"FFT size: \" + analyser.fftSize);\n // FrequencyBinCount is half of FFT size\n console.log(\"FrequencyBinCount: \" + analyser.frequencyBinCount);\n \n let frequencyPerBin = (audioContext.sampleRate / 2) / analyser.frequencyBinCount;\n console.log(\"Each frequency bin represents \" + frequencyPerBin + \" Hz of range\");\n console.log(\"frequencyData[0]\" + \" is the strength of frequencies from \" + (0 * frequencyPerBin) + \" Hz to \" + ((0 + 1)*frequencyPerBin) + \" Hz\");\n console.log(\"frequencyData[1]\" + \" is the strength of frequencies from \" + (1 * frequencyPerBin) + \" Hz to \" + ((1 + 1)*frequencyPerBin) + \" Hz\");\n console.log(\"frequencyData[2]\" + \" is the strength of frequencies from \" + (2 * frequencyPerBin) + \" Hz to \" + ((2 + 1)*frequencyPerBin) + \" Hz\");\n console.log(\"frequencyData[\" + (analyser.frequencyBinCount - 1) + \"]\" + \" is the strength of frequencies from \" + (analyser.frequencyBinCount - 1) * frequencyPerBin + \" Hz to \" + (((analyser.frequencyBinCount - 1) + 1) * frequencyPerBin) + \" Hz\");\n \n // When the script node is called we use information from the analyzer node to draw\n scriptNode.onaudioprocess = function()\n {\n let frequencyData = new Uint8Array(analyser.frequencyBinCount);\n analyser.getByteFrequencyData(frequencyData);\n \n let timeDomainData = new Uint8Array(analyser.frequencyBinCount);\n analyser.getByteTimeDomainData(timeDomainData);\n \n if (sourceNode.buffer !== null)\n {\n //console.log(frequencyData);\n //console.log(timeDomainData);\n drawWaveformFunction(timeDomainData, htmlIds.waveformCanvas, colorScale);\n drawSpectrumFunction(frequencyData, htmlIds.spectrumCanvas, colorScale);\n drawSpectrogramFunction(frequencyData, htmlIds.spectrogramCanvas, colorScale);\n }\n }\n \n return sourceNode;\n}", "function draw(data)\n{\n var spectrum = []; // an array that will hold noise cancelled data\n var i, x, L=0, ldata=0, nBins=0, binNum=0, c=0; // uint8\n var minLvl, maxLvl; //uint\n var level, y, sum; //int\n var offsetIndex = 0;\n var FFT_N = 128; //data.length;\n\n samplePos = 0;\n // Remove noise and apply EQ levels\n for(x=0; x < FFT_N/2; x++ ) {\n L = noise[x];\n spectrum[x] = data[x+ offsetIndex];\n if ( spectrum[x] < L ) {\n spectrum[x] = 0;\n } else {\n spectrum[x] = ((spectrum[x] - L) * (256 - eq[x] >> peakHeight));\n }\n }\n //fill colors first, then we will erase idle sections.\n for(i=0; i < totalColumns; i++) {\n client.setPixelColor(i, LED_RED); // row 0, RED\n client.setPixelColor(8 + i, LED_BLUE); // Rwo 1, Blue\n client.setPixelColor(16+ i, LED_BLUE); // Row 2, Blue\n client.setPixelColor(24+ i, LED_GREEN); // Row 3, Green\n client.setPixelColor(32+ i, LED_GREEN); // Row 4, Green\n }\n\n for(x=0; x < totalColumns; x++ ) {\n ldata = colData[x];\n nBins = ldata[0] + 2;\n binNum = ldata[1];\n for(sum=0, i=2; i < nBins; i++ ) {\n sum += spectrum[binNum++] * ldata[i]; // Weighted\n colDiv[x] += data[x];\n }\n col[x][colCount] = sum / colDiv[x]; // Average\n minLvl = maxLvl = col[x][0];\n for(i=1; i < totalFrames; i++ ) {\n if(col[x][i] < minLvl) {\n minLvl = col[x][i];\n } else if( col[x][i] > maxLvl ) {\n maxLvl = col[x][i];\n }\n }\n // minLvl and maxLvl indicate the extents of the FFT output, used\n // for vertically scaling the output graph (so it looks interesting\n // regardless of volume level). If they're too close together though\n // (e.g. at very low volume levels) the graph becomes super coarse\n // and 'jumpy'...so keep some minimum distance between them (this\n // also lets the graph go to zero when no sound is playing):\n\n if( maxLvl-minLvl < peakHeight) {\n maxLvl = minLvl + peakHeight;\n }\n minLvAvg[x] = (minLvAvg[x] * 7 + minLvl) >> 3; // Dampen min/max levels\n maxLvAvg[x] = (maxLvAvg[x] * 7 + maxLvl) >> 3; // fake rolling average\n // Second fixed-point scale based on dynamic min/max levels\n level = 10 * (col[x][colCount] - minLvAvg[x]) / parseInt(maxLvAvg[x] - minLvAvg[x]);\n // clip output and convert to byte\n if( level < 0) { c = 0; }\n else if ( level > peakOffTop ) { c = peakOffTop; } // Allow dot to go a few pixels off the top\n else { c = parseInt(level); }\n\n if( c > peak[x] ) { peak[x] = c; } // keep dot on top\n if(peak[x] < 0 ) { // empty the column\n clearColumnLeds(x,peakHeight);\n //continue;\n } else if(c < peakHeight ) { // empty partial column\n clearColumnLeds(x, peakHeight - c);\n }\n // the peak dot color varies but doesn't necessarily match\n // the three screen regions.. yellow has a little more influence.\n y = peakHeight - peak[x];\n\n /******************** DO NOT DELETE **********************/\n /* Save this section for a high Peak Array of LEDs - It is not so useful for 5 pixel High\n if( y < 1 ) { setColumnRowPixelColor(x,y, LED_RED); }\n else if( y < 5 ) { setColumnRowPixelColor(x,y, LED_BLUE); }\n else { setColumnRowPixelColor(x,y, LED_GREEN); }\n */\n /******************** DO NOT DELETE **********************/\n\n }\n client.writePixels();\n\n /******************** Important **************************/\n // Every third frame, make the peak pixels drop by 1:\n if ( ++dotCount >= 3 ) {\n dotCount = 0;\n // reset Averages, col dividers and peaks\n for ( i = 0; i < totalColumns; i++ ) {\n minLvAvg[i] = 0;\n maxLvAvg[i] = 512;\n colDiv[i] = 0;\n //peak[i] = 0; // We are dropping the peaks below\n }\n for ( x = 0; x < peakHeight; x++ ) {\n peak[x] -= (peak[x] > 0) ? 1 : 0; // if peak is above 0, then subtract 1\n }\n // rotate hue over LEDs\n LED_RED = OPC.rotateColor(1, LED_RED);\n LED_BLUE = OPC.rotateColor(1, LED_BLUE);\n LED_GREEN = OPC.rotateColor(1, LED_GREEN);\n }\n // Adjust the Frame Count\n if ( ++colCount >= totalFrames ) {\n colCount = 0;\n }\n\n}", "function sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}", "function sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}", "function sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}", "function sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}", "function sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}", "function sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}", "function sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}", "function sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}", "function sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}", "function sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}", "function sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}" ]
[ "0.65954375", "0.6168972", "0.6044958", "0.6022759", "0.591924", "0.58853126", "0.5843347", "0.577806", "0.57772064", "0.5703021", "0.562801", "0.55890924", "0.5570078", "0.5464318", "0.54534", "0.5339202", "0.5326124", "0.5318228", "0.53027326", "0.52718914", "0.52644837", "0.5250019", "0.51002055", "0.5096984", "0.5089478", "0.5085867", "0.50818896", "0.5062489", "0.50592065", "0.5053552", "0.50457776", "0.50395507", "0.50318575", "0.49991494", "0.4997923", "0.49906737", "0.49865484", "0.49865484", "0.49596334", "0.49486697", "0.49455962", "0.49007112", "0.48839712", "0.48683113", "0.48617876", "0.48600242", "0.48516387", "0.48220733", "0.48169217", "0.4816723", "0.48098448", "0.48025116", "0.48025116", "0.48025116", "0.48025116", "0.47310892", "0.47233245", "0.47233245", "0.4707004", "0.47061676", "0.47017288", "0.47017288", "0.47017288", "0.47017288", "0.47017288", "0.4687284", "0.46807086", "0.46659926", "0.46513113", "0.46496043", "0.46476468", "0.46458715", "0.46238944", "0.46099308", "0.45991912", "0.45899886", "0.4589064", "0.4589064", "0.45789668", "0.4576599", "0.45682994", "0.45675915", "0.45629087", "0.45546445", "0.45448613", "0.45376247", "0.45360956", "0.45337763", "0.45290184", "0.45245162", "0.4517879", "0.4517879", "0.4517879", "0.4517879", "0.4517879", "0.4517879", "0.4517879", "0.4517879", "0.4517879", "0.4517879", "0.4517879" ]
0.0
-1
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected it returns a single octet. By augmenting the instances, we can avoid modifying the `Uint8Array` prototype.
function Buffer (arg) { if (!(this instanceof Buffer)) { // Avoid going through an ArgumentsAdaptorTrampoline in the common case. if (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. if (typeof arg === 'number') { return fromNumber(this, arg) } // Slightly less common case. if (typeof arg === 'string') { return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') } // Unusual. return fromObject(this, arg) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer(arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n\t return new Buffer(arg);\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0;\n\t this.parent = undefined;\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg);\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg);\n\t}", "function Buffer(arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n\t return new Buffer(arg);\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0;\n\t this.parent = undefined;\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg);\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg);\n\t}", "function Buffer(arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n\t return new Buffer(arg);\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0;\n\t this.parent = undefined;\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg);\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg);\n\t}", "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\n\tif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n }", "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1)\n return new Buffer(arg, arguments[1]);\n return new Buffer(arg);\n }\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0;\n this.parent = undefined;\n }\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg);\n }\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n }\n // Unusual.\n return fromObject(this, arg);\n }", "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n }", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function Buffer(arg){if(!(this instanceof Buffer)){ // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\nif(arguments.length>1)return new Buffer(arg,arguments[1]);return new Buffer(arg);}if(!Buffer.TYPED_ARRAY_SUPPORT){this.length=0;this.parent=undefined;} // Common case.\nif(typeof arg==='number'){return fromNumber(this,arg);} // Slightly less common case.\nif(typeof arg==='string'){return fromString(this,arg,arguments.length>1?arguments[1]:'utf8');} // Unusual.\nreturn fromObject(this,arg);}", "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n \n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n return new Buffer(arg);\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0;\n this.parent = undefined;\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg);\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n }\n\n // Unusual.\n return fromObject(this, arg);\n }", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "function Buffer (arg) {\n\t\t if (!(this instanceof Buffer)) {\n\t\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t\t return new Buffer(arg)\n\t\t }\n\t\t\n\t\t this.length = 0\n\t\t this.parent = undefined\n\t\t\n\t\t // Common case.\n\t\t if (typeof arg === 'number') {\n\t\t return fromNumber(this, arg)\n\t\t }\n\t\t\n\t\t // Slightly less common case.\n\t\t if (typeof arg === 'string') {\n\t\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t\t }\n\t\t\n\t\t // Unusual.\n\t\t return fromObject(this, arg)\n\t\t}", "function createByteContainer() {\n if (HAS_BUFFER)\n return new Buffer(0);\n\n return new Uint8Array();\n }", "function createByteContainer() {\n if (HAS_BUFFER)\n return new Buffer(0);\n\n return new Uint8Array();\n }", "function Buffer (subject, encoding, noZero) {\n if (!(this instanceof Buffer))\n return new Buffer(subject, encoding, noZero)\n\n var type = typeof subject\n\n // Find the length\n var length\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) { // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data))\n subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength)\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength.toString(16) + ' bytes')\n\n if (length < 0)\n length = 0\n else\n length >>>= 0 // Coerce to uint32.\n\n var self = this\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n /*eslint-disable consistent-this */\n self = Buffer._augment(new Uint8Array(length))\n /*eslint-enable consistent-this */\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++)\n self[i] = subject.readUInt8(i)\n } else {\n for (i = 0; i < length; i++)\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize)\n self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding, noZero) {\n if (!(this instanceof Buffer))\n return new Buffer(subject, encoding, noZero)\n\n var type = typeof subject\n\n // Find the length\n var length\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) { // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data))\n subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength)\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength.toString(16) + ' bytes')\n\n if (length < 0)\n length = 0\n else\n length >>>= 0 // Coerce to uint32.\n\n var self = this\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n /*eslint-disable consistent-this */\n self = Buffer._augment(new Uint8Array(length))\n /*eslint-enable consistent-this */\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++)\n self[i] = subject.readUInt8(i)\n } else {\n for (i = 0; i < length; i++)\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize)\n self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding, noZero) {\n if (!(this instanceof Buffer))\n return new Buffer(subject, encoding, noZero)\n\n var type = typeof subject\n\n // Find the length\n var length\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) { // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data))\n subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength)\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength.toString(16) + ' bytes')\n\n if (length < 0)\n length = 0\n else\n length >>>= 0 // Coerce to uint32.\n\n var self = this\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n /*eslint-disable consistent-this */\n self = Buffer._augment(new Uint8Array(length))\n /*eslint-enable consistent-this */\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++)\n self[i] = subject.readUInt8(i)\n } else {\n for (i = 0; i < length; i++)\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize)\n self.parent = rootParent\n\n return self\n}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t this.length = 0\n\t this.parent = undefined\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t this.length = 0\n\t this.parent = undefined\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t this.length = 0\n\t this.parent = undefined\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t this.length = 0\n\t this.parent = undefined\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t this.length = 0\n\t this.parent = undefined\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t this.length = 0\n\t this.parent = undefined\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}" ]
[ "0.7387608", "0.7387608", "0.7387608", "0.7387608", "0.7387608", "0.7387608", "0.7387608", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73838997", "0.73214823", "0.73214823", "0.73214823", "0.73214823", "0.73214823", "0.7310611", "0.7306889", "0.7306889", "0.7272222", "0.7244172", "0.7244172", "0.71993977", "0.71977997", "0.71967536", "0.71846634", "0.71846634", "0.71846634", "0.71846634", "0.71622974", "0.71517247", "0.71415156", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.7121521", "0.71168745", "0.71168745", "0.71168745", "0.7110093", "0.7100295", "0.7100295", "0.70932084", "0.70932084", "0.70932084", "0.7091139", "0.7091139", "0.7091139", "0.7091139", "0.7091139", "0.7091139", "0.70889336", "0.70889336" ]
0.71254957
65
Duplicate of fromArray() to keep fromArray() monomorphic.
function fromTypedArray (that, array) { var length = checked(array.length) | 0 that = allocate(that, length) // Truncating the elements is probably not what people expect from typed // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior // of the old Buffer constructor. for (var i = 0; i < length; i += 1) { that[i] = array[i] & 255 } return that }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fromArray(as) {\n // For some reason, TypeScript does not infer this type correctly\n var b = build;\n var f = as.reduce(b, []);\n return f;\n }", "function __spreadArray(to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n }", "function cloneArrFrom(arr) {\n let newArr = Array.from(arr);\n return newArr;\n}", "function fromTypedArray(that, array) {\n var length = checked(array.length) | 0;\n that = allocate(that, length);\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n return that;\n }", "function fromTypedArray(that, array) {\n var length = checked(array.length) | 0;\n that = allocate(that, length);\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n return that;\n }", "function fromTypedArray(that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n }", "function copyArray() {\n return new Array(...array);\n}", "function fromTypedArray(that, array) {\n\t var length = checked(array.length) | 0;\n\t that = allocate(that, length);\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255;\n\t }\n\t return that;\n\t}", "function fromTypedArray(that, array) {\n\t var length = checked(array.length) | 0;\n\t that = allocate(that, length);\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255;\n\t }\n\t return that;\n\t}", "function fromTypedArray(that, array) {\n\t var length = checked(array.length) | 0;\n\t that = allocate(that, length);\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255;\n\t }\n\t return that;\n\t}", "function fromTypedArray(that, array) {\n\t var length = checked(array.length) | 0;\n\t that = allocate(that, length);\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255;\n\t }\n\t return that;\n\t}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n }", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n }", "function fromArray(as) {\n return as.reduce(build, {});\n }", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "function fromTypedArray (that, array) {\n\t var length = checked(array.length) | 0\n\t that = allocate(that, length)\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}", "static fromArray(arr) {\n return Matrix.map(new Matrix(arr.length, 1), (_, i) => arr[i]);\n }", "function fromTypedArray (that, array) {\n\t\t var length = checked(array.length) | 0\n\t\t that = allocate(that, length)\n\t\t // Truncating the elements is probably not what people expect from typed\n\t\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t\t // of the old Buffer constructor.\n\t\t for (var i = 0; i < length; i += 1) {\n\t\t that[i] = array[i] & 255\n\t\t }\n\t\t return that\n\t\t}", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "copyArray(arr) {\n\t\treturn Array.from(arr).map((val, ind) => Array.from(arr[ind]));\n\t}", "function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}else return Array.from(arr)}", "function toObjectArray(origArray) {\n\n var newArray = [];\n for (var index = 1; index < origArray.length; index++) {\n newArray.push(_.zipObject(origArray[0], origArray[index]));\n }\n\n return newArray;\n\n}", "function h$fromArray(a) {\n var r = h$ghczmprimZCGHCziTypesziZMZN;\n for(var i=a.length-1;i>=0;i--) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (a[i])))), (r)));\n return a;\n}", "function h$fromArray(a) {\n var r = h$ghczmprimZCGHCziTypesziZMZN;\n for(var i=a.length-1;i>=0;i--) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (a[i])))), (r)));\n return a;\n}", "function h$fromArray(a) {\n var r = h$ghczmprimZCGHCziTypesziZMZN;\n for(var i=a.length-1;i>=0;i--) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (a[i])))), (r)));\n return a;\n}" ]
[ "0.65889376", "0.65335846", "0.6512674", "0.64970803", "0.6463127", "0.6455966", "0.644092", "0.63979745", "0.63979745", "0.63979745", "0.63979745", "0.63100034", "0.63100034", "0.62795615", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6261167", "0.6212621", "0.6197625", "0.61800444", "0.61800444", "0.61800444", "0.61800444", "0.61800444", "0.61800444", "0.61800444", "0.61800444", "0.61800444", "0.61800444", "0.6108512", "0.6101382", "0.6098474", "0.6090728", "0.6090728", "0.6090728" ]
0.62321496
78
Need to make sure that buffer isn't trying to write out of bounds.
function checkOffset (offset, ext, length) { if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeBuffer(buffer, pos, src) {\n src.copy(buffer, pos)\n return src.length\n}", "function writeBuffer(buffer, pos, src) {\n src.copy(buffer, pos)\n return src.length\n}", "ensure(n) {\n let minsize = this.pos + n;\n if (minsize > this.capacity) {\n let cap = this.capacity * 2;\n while (cap < minsize) cap *= 2;\n let newbuf = new Uint8Array(cap);\n newbuf.set(this.buffer);\n this.buffer = newbuf;\n this.capacity = cap;\n }\n }", "function bufferOutOfBounds(name = undefined) {\n if (name) {\n return `\"${name}\" is outside of buffer bounds`;\n }\n return 'Attempt to write outside buffer bounds';\n}", "writeBytes(value) {\n let start = 0;\n let valueLen = value.length;\n while (valueLen > 0) {\n const bytesLeft = this.numBytesLeft();\n if (bytesLeft === 0) {\n this._grow(this.pos + valueLen);\n }\n const bytesToWrite = Math.min(bytesLeft, valueLen);\n value.copy(this.buf, this.pos, start, start + bytesToWrite);\n this.pos += bytesToWrite;\n start += bytesToWrite;\n valueLen -= bytesToWrite;\n }\n }", "function checkLen(len){\n if(pos + len > buf.length)\n throw new Error('Broken data stream at pos ' + pos + ' (need ' + len + ' more bytes)');\n }", "oob() {\n return this.at > this.buffer.byteLength || this.at < 0;\n }", "_blockedWrite() {\n throw new Error('Cannot write because the writer has been closed.');\n }", "_blockedWrite() {\n throw new Error('Cannot write because the writer has been closed.');\n }", "function write() {\n\t// Bail if the write queue is invalid\n\tif (!check_queue_write()) return;\n\n\t// Create message from buffer\n\tlet buffer = proto.proto.create(intf.intf.queue_write[intf.intf.queue_write.length - 1]);\n\n\tif (typeof buffer === 'undefined' || buffer === null || buffer === '') return;\n\n\tintf.intf.port.write(buffer, (error) => {\n\t\t// Bail and retry if there was a write error\n\t\tif (error) {\n\t\t\terror_out('writing', error);\n\n\t\t\t// Re-kick it\n\t\t\tsetImmediate(write);\n\n\t\t\treturn;\n\t\t}\n\n\t\tintf.intf.port.drain(() => {\n\t\t\t// After a successful write and drain, remove the last element from the write queue\n\t\t\tintf.intf.queue_write.pop();\n\n\t\t\t// Re-kick it\n\t\t\t// setImmediate(write);\n\t\t\tprocess.nextTick(write);\n\t\t});\n\t});\n}", "write(sequence, offset) {\n offset = typeof offset === 'number' ? offset : this.position;\n // If the buffer is to small let's extend the buffer\n if (this.buffer.length < offset + sequence.length) {\n const buffer$1 = buffer__WEBPACK_IMPORTED_MODULE_0___default.a.Buffer.alloc(this.buffer.length + sequence.length);\n this.buffer.copy(buffer$1, 0, 0, this.buffer.length);\n // Assign the new buffer\n this.buffer = buffer$1;\n }\n if (ArrayBuffer.isView(sequence)) {\n this.buffer.set(ensure_buffer.ensureBuffer(sequence), offset);\n this.position =\n offset + sequence.byteLength > this.position ? offset + sequence.length : this.position;\n }\n else if (typeof sequence === 'string') {\n this.buffer.write(sequence, offset, sequence.length, 'binary');\n this.position =\n offset + sequence.length > this.position ? offset + sequence.length : this.position;\n }\n }", "function pushError(){assert.throws(function(){r.push(new Buffer(1))})}", "function writeBuffer()\n{\n fs.writeFile(outputFile, outputBuffer, 'utf8', function (error) {\n if (error)\n {\n console.log('Could not write the file', error);\n }\n\n exit();\n });\n}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0)\n\t throw new RangeError('offset is not uint')\n\t if (offset + ext > length)\n\t throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0)\n throw new RangeError('offset is not uint')\n if (offset + ext > length)\n throw new RangeError('Trying to access beyond buffer length')\n }", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function writeOrBuffer(stream, state, chunk, encoding, cb) {\n\t chunk = decodeChunk(state, chunk, encoding);\n\t if (util.isBuffer(chunk)) encoding = 'buffer';\n\t var len = state.objectMode ? 1 : chunk.length;\n\n\t state.length += len;\n\n\t var ret = state.length < state.highWaterMark;\n\t // we must ensure that previous needDrain will not be reset to false.\n\t if (!ret) state.needDrain = true;\n\n\t if (state.writing || state.corked) state.buffer.push(new WriteReq(chunk, encoding, cb));else doWrite(stream, state, false, len, chunk, encoding, cb);\n\n\t return ret;\n\t}", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "function checkOffset (offset, ext, length) {\n\t\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t\t}", "function writeLength(buffer, pos, length) {\n var digit = 0\n , origPos = pos\n\n do {\n digit = length % 128 | 0\n length = length / 128 | 0\n if (length > 0) {\n digit = digit | 0x80\n }\n buffer.writeUInt8(digit, pos++, true)\n } while (length > 0)\n\n return pos - origPos\n}", "function writeLength(buffer, pos, length) {\n var digit = 0\n , origPos = pos\n\n do {\n digit = length % 128 | 0\n length = length / 128 | 0\n if (length > 0) {\n digit = digit | 0x80\n }\n buffer.writeUInt8(digit, pos++, true)\n } while (length > 0)\n\n return pos - origPos\n}", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function checkOffset(offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function writeOrBuffer(stream, state, chunk, encoding, cb) {\n\t chunk = decodeChunk(state, chunk, encoding);\n\t if (Buffer.isBuffer(chunk))\n\t encoding = 'buffer';\n\t var len = state.objectMode ? 1 : chunk.length;\n\t\n\t state.length += len;\n\t\n\t var ret = state.length < state.highWaterMark;\n\t // we must ensure that previous needDrain will not be reset to false.\n\t if (!ret)\n\t state.needDrain = true;\n\t\n\t if (state.writing)\n\t state.buffer.push(new WriteReq(chunk, encoding, cb));\n\t else\n\t doWrite(stream, state, len, chunk, encoding, cb);\n\t\n\t return ret;\n\t}" ]
[ "0.66716176", "0.66716176", "0.66315866", "0.6520346", "0.63839465", "0.627423", "0.6253665", "0.62347245", "0.62347245", "0.6108547", "0.6036368", "0.6017906", "0.59830993", "0.59575397", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.59489954", "0.5946407", "0.5938225", "0.5938225", "0.5938225", "0.593551", "0.5929771", "0.5929771", "0.5923442", "0.59165347", "0.59165347", "0.59157187", "0.59137034", "0.5911989" ]
0.0
-1
Copyright Joyent, Inc. and other Node contributors. 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: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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. NOTE: These type checking functions intentionally don't use `instanceof` because it is fragile and can be easily faked with `Object.create()`.
function isArray(arg) { if (Array.isArray) { return Array.isArray(arg); } return objectToString(arg) === '[object Array]'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function t(e){return!!e.constructor&&'function'==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function n(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function t(n){return!!n.constructor&&typeof n.constructor.isBuffer==\"function\"&&n.constructor.isBuffer(n)}", "function t(n){return!!n.constructor&&typeof n.constructor.isBuffer==\"function\"&&n.constructor.isBuffer(n)}", "function t(n){return!!n.constructor&&typeof n.constructor.isBuffer==\"function\"&&n.constructor.isBuffer(n)}", "function o(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function F(t) {\n return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function Y(t) {\n return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n}", "function e(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function n(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function n(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function fe(t) {\n return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n}", "function an(t) {\n return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n}", "function n(r){return!!r.constructor&&typeof r.constructor.isBuffer==\"function\"&&r.constructor.isBuffer(r)}", "function u(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "function r(t){return t&&\"object\"===typeof t}", "function r(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function r(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function r(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function isPlainObject(input){return typeof input==='object'&&input!==null&&(Object.getPrototypeOf(input)===Object.prototype||Object.getPrototypeOf(input)===null);}", "function i(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "function builtinprototypesarenotinstances() {\n try {\n Boolean.prototype.valueOf(); return false;\n } catch(e) {}\n try {\n Number.prototype.valueOf(); return false;\n } catch(e) {}\n try {\n String.prototype.toString(); return false;\n } catch(e) {}\n try {\n RegExp.prototype.source; return false;\n } catch(e) {}\n try {\n Date.prototype.valueOf(); return false;\n } catch(e) {}\n return true;\n}", "function Ko(t) {\n return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n}", "function testcase() {\n var numProto = Object.getPrototypeOf(new Number(42));\n var s = Object.prototype.toString.call(numProto );\n return (s === '[object Object]') ;\n }", "function v11(v12,v13) {\n const v15 = v11(Object,Function);\n // v15 = .unknown\n const v16 = Object(v13,v8,0,v6);\n // v16 = .object()\n const v17 = 0;\n // v17 = .integer\n const v18 = 1;\n // v18 = .integer\n const v19 = 512;\n // v19 = .integer\n const v20 = \"-1024\";\n // v20 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v21 = isFinite;\n // v21 = .function([.anything] => .boolean)\n const v23 = [1337];\n // v23 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v24 = {};\n // v24 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v25 = v23;\n const v26 = -29897853;\n // v26 = .integer\n const v27 = \"replace\";\n // v27 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v28 = Boolean;\n // v28 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v30 = [13.37,13.37];\n // v30 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v31 = 1337;\n // v31 = .integer\n let v32 = 13.37;\n const v36 = [13.37,13.37,13.37];\n // v36 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v38 = [1337,1337];\n // v38 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v39 = [13.37,1337,v38,1337,\"-128\",13.37,\"-128\",\"-128\",2147483647,1337];\n // v39 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v40 = {__proto__:v36,length:v39};\n // v40 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"length\"])\n const v41 = \"0\";\n // v41 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v42 = -4130093409;\n // v42 = .integer\n const v44 = {b:2147483647,e:v38,valueOf:v36};\n // v44 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"b\", \"valueOf\", \"e\"])\n const v45 = \"k**baeaDif\";\n // v45 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v46 = 65536;\n // v46 = .integer\n const v47 = \"k**baeaDif\";\n // v47 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v48 = 13.37;\n // v48 = .float\n const v50 = [13.37,13.37];\n // v50 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v51 = ~v50;\n // v51 = .boolean\n const v53 = [13.37];\n // v53 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n let v54 = v53;\n const v55 = gc;\n // v55 = .function([] => .undefined)\n const v58 = [13.37,13.37,13.37,13.37];\n // v58 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v60 = [1337,1337,1337,1337];\n // v60 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v61 = [3697200800,v58,v60];\n // v61 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v62 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v61};\n // v62 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"length\", \"constructor\", \"toString\", \"valueOf\"])\n const v65 = [13.37,13.37,13.37,13.37];\n // v65 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v67 = [1337,1337,1337,1337];\n // v67 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v68 = [3697200800,v65,v67];\n // v68 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v69 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v68};\n // v69 = .object(ofGroup: Object, withProperties: [\"e\", \"constructor\", \"__proto__\", \"length\", \"toString\", \"valueOf\"])\n const v70 = Object;\n // v70 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n function v71(v72) {\n }\n const v74 = [13.37];\n // v74 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v75 = 1337;\n // v75 = .integer\n const v76 = v44 ** 13.37;\n // v76 = .integer | .float | .bigint\n function v77(v78,v79,v80,v81,v82) {\n }\n let v83 = v74;\n const v84 = \"2\";\n // v84 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v85 = \"2\";\n // v85 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v88 = [13.37,13.37,1337,13.37];\n // v88 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v89(v90,v91,v92) {\n }\n const v94 = [1337,1337,1337,1337];\n // v94 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v95 = [3697200800,v88,v94];\n // v95 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v96(v97,v98) {\n }\n const v99 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,d:v95};\n // v99 = .object(ofGroup: Object, withProperties: [\"toString\", \"length\", \"constructor\", \"__proto__\", \"e\", \"d\"])\n let v100 = 13.37;\n const v101 = typeof v74;\n // v101 = .string\n const v102 = \"symbol\";\n // v102 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v103 = 3697200800;\n // v103 = .integer\n const v104 = \"2\";\n // v104 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v105 = Boolean;\n // v105 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v106 = Function;\n // v106 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v107 = 13.37;\n // v107 = .float\n const v108 = 1337;\n // v108 = .integer\n const v109 = \"2\";\n // v109 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v110 = Function;\n // v110 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v112 = [13.37,13.37,13.37,13.37];\n // v112 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v113 = 1337;\n // v113 = .integer\n let v114 = 13.37;\n const v116 = {...3697200800,...3697200800};\n // v116 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n const v117 = Object;\n // v117 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v118 = Function;\n // v118 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v119 = {};\n // v119 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v120 = v119;\n const v121 = (3697200800).constructor;\n // v121 = .unknown\n function v122(v123,v124) {\n }\n const v125 = Promise;\n // v125 = .object(ofGroup: PromiseConstructor, withProperties: [\"prototype\"], withMethods: [\"race\", \"allSettled\", \"reject\", \"all\", \"resolve\"]) + .constructor([.function()] => .object(ofGroup: Promise, withProperties: [\"__proto__\"], withMethods: [\"finally\", \"then\", \"catch\"]))\n const v128 = 4;\n // v128 = .integer\n let v129 = 0;\n const v131 = [13.37,13.37,13.37,13.37];\n // v131 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v133 = [1337,1337,1337,1337];\n // v133 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v134 = [3697200800,v131,v133];\n // v134 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v135 = Object;\n // v135 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v136 = -944747134;\n // v136 = .integer\n const v139 = [13.37,13.37,13.37,13.37];\n // v139 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v141 = [1337,1337,1337,1337];\n // v141 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v142 = [3697200800,v139,v141];\n // v142 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v143 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v142};\n // v143 = .object(ofGroup: Object, withProperties: [\"toString\", \"constructor\", \"e\", \"__proto__\", \"valueOf\", \"length\"])\n let v144 = v143;\n const v145 = gc;\n // v145 = .function([] => .undefined)\n let v146 = 13.37;\n const v150 = [13.37,13.37,13.37,Function];\n // v150 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v152 = [1337,1337,1337,1337];\n // v152 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v153 = [3697200800,v150,v152];\n // v153 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v154 = v153 + 1;\n // v154 = .primitive\n let v155 = 0;\n const v156 = v155 + 1;\n // v156 = .primitive\n const v158 = \"2\";\n // v158 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v160 = [13.37,13.37,13.37,13.37];\n // v160 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v162 = 0;\n // v162 = .integer\n const v163 = [1337,1337,1337,1337];\n // v163 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v164 = [3697200800,1337,v163];\n // v164 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v166 = 1337;\n // v166 = .integer\n let v167 = 2594067260;\n const v169 = 4;\n // v169 = .integer\n let v170 = 0;\n const v171 = v167 + 1;\n // v171 = .primitive\n const v172 = {__proto__:3697200800,constructor:v163,e:3697200800,length:13.37,toString:3697200800,valueOf:v164};\n // v172 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"constructor\", \"valueOf\", \"length\", \"toString\"])\n const v173 = 0;\n // v173 = .integer\n const v174 = 5;\n // v174 = .integer\n const v175 = 2937513072;\n // v175 = .integer\n const v176 = Object;\n // v176 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v177 = v172.constructor;\n // v177 = .unknown\n const v178 = 0;\n // v178 = .integer\n const v179 = 1;\n // v179 = .integer\n try {\n } catch(v180) {\n const v182 = [13.37,13.37,13.37,13.37];\n // v182 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v183 = v182.__proto__;\n // v183 = .object()\n function v185(v186) {\n }\n const v187 = Object >>> v183;\n // v187 = .integer | .bigint\n }\n function v188(v189,v190,v191,v192,...v193) {\n }\n}", "function c(t){return!0===s(t)&&\"[object Object]\"===Object.prototype.toString.call(t)}", "function detecteInstanceOf (obj, origin) {\n return obj instanceof origin\n // return Object.getPrototypeOf(obj) === origin.prototype\n // return obj.__proto__ === origin.prototype\n}", "function V(e){if(null===e||\"[object Object]\"!==function(e){return Object.prototype.toString.call(e)}(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}", "function isObj$1(something) {\n return typeDetect(something) === 'Object';\n}", "testObjectAssertions() {\n var objConstructor = {}.constructor;\n\n this.assertIdentical({ a: 12 }.constructor, objConstructor);\n /* eslint-disable-next-line no-new-object */\n this.assertIdentical(new Object().constructor, objConstructor);\n\n var qxObj = new qx.core.Object();\n this.assertNotIdentical(qxObj.constructor, objConstructor);\n this.assertNotIdentical((1).constructor, objConstructor);\n this.assertNotIdentical(\"Juhu\".constructor, objConstructor);\n this.assertNotIdentical(/abc/.constructor, objConstructor);\n qxObj.dispose();\n }", "function U(e){return!0==(null!=(r=e)&&\"object\"==typeof r&&!1===Array.isArray(r))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar r}", "function Is(){return Is=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Is.apply(this,arguments)}", "function r(t){return\"[object Object]\"==={}.toString.call(t)}", "function r(t){return\"[object Object]\"==={}.toString.call(t)}", "function isInstanceOf(victim, constructor) {\n return victim instanceof constructor;\n}", "function isObject(input) {\n return typeof input === 'object';\n}", "function assert_event_type (obj, type, inheritsp) {\n if (typeof obj === 'object') {\n var type_str = \"[object \" + type + \"]\";\n inheritsp = (typeof inheritsp === 'boolean') ? inheritsp : false;\n while (obj) {\n if (obj.toString() === type_str || (obj.constructor && obj.constructor.name === type)) {\n return true;\n } else {\n obj = inheritsp ? Object.getPrototypeOf(obj) : null;\n }\n }\n }\n throw new TypeError();\n }", "function testcase() {\n function base() {}\n var b = new base();\n var prop = new Object();\n var d = Object.create(b);\n\n if (typeof d === 'object') {\n return true;\n }\n }", "function isInstanceOf(mixed, ctor) {\n return ((mixed instanceof ctor) &&\n (try_get_bigint_factory_function_1.isBigIntNativelySupported() ||\n !is_bigint_1.isBigInt(mixed)));\n}", "function b(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "#isPrimitive(value) {\n return value !== Object(value); \n }", "function is(obj) {\n return obj instanceof __WEBPACK_IMPORTED_MODULE_3__Range__[\"c\" /* default */];\n}", "function Ut(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function i(t){return null!==t&&\"object\"==typeof t}", "function is(v, t) { return typeof v === t; }", "function b(e) {\n return (\n !0 ==\n (null != (t = e) &&\n \"object\" == typeof t &&\n !1 === Array.isArray(t)) &&\n \"[object Object]\" === Object.prototype.toString.call(e)\n );\n /*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n var t;\n }", "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function o(e){return 1==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */var t}", "function mn(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function N(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function vo(t){return!0==(null!=(e=t)&&\"object\"==typeof e&&!1===Array.isArray(e))&&\"[object Object]\"===Object.prototype.toString.call(t);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar e}", "function _instanceof(left, right) { if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }", "function r(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function r(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function n(t){return\"[object Object]\"==={}.toString.call(t)}", "function of(value) {\n switch (typeof value) {\n case 'object':\n if (value === null) {\n return NULL;\n } else if (Array.isArray(value)) {\n return ARRAY;\n }\n return OBJECT;\n case 'string':\n return STRING;\n case 'boolean':\n return BOOLEAN;\n case 'number':\n return isFinite(value) ? NUMBER : MISSING;\n }\n // Covers undefined, function, etc\n return MISSING;\n}", "function n(t){return\"[object Object]\"===Object.prototype.toString.call(t)}", "function n(t){return\"[object Object]\"===Object.prototype.toString.call(t)}", "isPlainObject(obj) {\n return _toString.call(obj) === '[object Object]'\n }", "function d(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function d(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function isObject_(test) {\r\n return Object.prototype.toString.call(test) === '[object Object]';\r\n}", "function ro(t){return Object.prototype.toString.call(t)===\"[object Object]\"}", "function nt(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function c(e){return null!==e&&\"object\"==typeof e}", "function n(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function n(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function n(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function qe(t) {\n return !(\"object\" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof V || t instanceof Ne || t instanceof Ie || t instanceof Le || t instanceof Re);\n}", "static is()\n {\n var arg0 = arguments[0]\n var type = Tester.type(arg0)\n for (let i = 1, len = arguments.length; i < len; i++) {\n let argN = arguments[i]\n if (\n type === argN ||\n argN === 'mixed' ||\n argN === '*' ||\n Tester.type(argN) === 'function' && (\n arg0 instanceof argN ||\n // Why? Probably if the class does not have a constructor for \"this\".\n // @see @cyrhla/core/Controller/SetController\n Tester.type(arg0) === 'object' && arg0.constructor.name === argN.name\n )\n ) {\n return true\n }\n }\n\n return false\n }", "function ra(t){return Object.prototype.toString.call(t)===\"[object Object]\"}", "function f(i) {\n var x = new Number(i);\n return x;\n} // Assert that a unique object really was created.", "function Ft(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function isObject_(test) {\r\n return Object.prototype.toString.call(test) === '[object Object]';\r\n}", "function assertInstance(o, f) {\n assertSame(o.constructor, f);\n assertInstanceof(o, f);\n}", "function test_fail_hole_prototype() {\n var obj = Object.create({ stuff: \"in prototype\" });\n obj.foo = \"bar\";\n\n function f1() {\n bidar.serialize(obj);\n }\n assert.throws(f1, /Hole-ful graph, but no hole filter/);\n}", "function i(t){var e=typeof t;return null==t||\"object\"!=e&&\"function\"!=e}", "function isObject$1(obj){\nreturn kindOf(obj)==='object'||kindOf(obj)==='function';\n}", "function Object() {}", "function Object() {}", "function s(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function r(t){return t&&\"object\"===typeof t&&!Array.isArray(t)}", "function proxyInstanceof(args) {\n var obj = deserialize(args[0]);\n var type = deserialize(args[1]);\n return obj instanceof type;\n }", "function isObject$1(e){return\"[object Object]\"===Object.prototype.toString.call(e)}", "function r(e){return e&&\"object\"==typeof e&&!Array.isArray(e)}", "function r(e){return e&&\"object\"==typeof e&&!Array.isArray(e)}", "function r(e){return e&&\"object\"==typeof e&&!Array.isArray(e)}" ]
[ "0.6310727", "0.6224555", "0.62207437", "0.62207437", "0.62207437", "0.6154229", "0.61486113", "0.6084733", "0.6084733", "0.6084733", "0.6084733", "0.6084733", "0.6084733", "0.6084733", "0.6084733", "0.6084733", "0.60484034", "0.6019956", "0.5980783", "0.5980783", "0.5953351", "0.59335464", "0.59086776", "0.5893822", "0.5861267", "0.5854999", "0.5854999", "0.5854999", "0.58487904", "0.5839471", "0.5795979", "0.57904065", "0.57720566", "0.57692903", "0.57514924", "0.5736686", "0.56970644", "0.5676061", "0.56349057", "0.5612781", "0.5588063", "0.5584823", "0.5584823", "0.5584341", "0.55786806", "0.55740845", "0.556069", "0.5557668", "0.5551798", "0.5549271", "0.5542394", "0.5538592", "0.5532222", "0.5518469", "0.5514222", "0.5508458", "0.5508458", "0.5508458", "0.5508458", "0.5508458", "0.5508458", "0.5505634", "0.5501686", "0.5500359", "0.5498903", "0.549567", "0.54850066", "0.54850066", "0.5473191", "0.54715633", "0.5459148", "0.5459148", "0.54587924", "0.5453464", "0.5453464", "0.5445576", "0.5442355", "0.543739", "0.5423903", "0.5417907", "0.5417907", "0.5417907", "0.54170823", "0.5416613", "0.5408156", "0.54009336", "0.53919864", "0.53863716", "0.53851575", "0.5382887", "0.5369107", "0.53657943", "0.53629446", "0.53629446", "0.5362526", "0.5356745", "0.5342544", "0.5337779", "0.5334211", "0.5334211", "0.5334211" ]
0.0
-1
Calculate the MD5 of an array of littleendian words, and a bit length
function core_md5 (x, len) { /* append padding */ x[len >> 5] |= 0x80 << ((len) % 32) x[(((len + 64) >>> 9) << 4) + 14] = len var a = 1732584193 var b = -271733879 var c = -1732584194 var d = 271733878 for (var i = 0; i < x.length; i += 16) { var olda = a var oldb = b var oldc = c var oldd = d a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936) d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586) c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819) b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330) a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897) d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426) c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341) b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983) a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416) d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417) c = md5_ff(c, d, a, b, x[i + 10], 17, -42063) b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162) a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682) d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101) c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290) b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329) a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510) d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632) c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713) b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302) a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691) d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083) c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335) b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848) a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438) d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690) c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961) b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501) a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467) d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784) c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473) b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734) a = md5_hh(a, b, c, d, x[i + 5], 4, -378558) d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463) c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562) b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556) a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060) d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353) c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632) b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640) a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174) d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222) c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979) b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189) a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487) d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835) c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520) b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651) a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844) d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415) c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905) b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055) a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571) d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606) c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523) b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799) a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359) d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744) c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380) b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649) a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070) d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379) c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259) b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551) a = safe_add(a, olda) b = safe_add(b, oldb) c = safe_add(c, oldc) d = safe_add(d, oldd) } return [a, b, c, d] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function binl_md5 (x, len) {\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << (len % 32)\n\t x[(((len + 64) >>> 9) << 4) + 14] = len\n\t\n\t var i\n\t var olda\n\t var oldb\n\t var oldc\n\t var oldd\n\t var a = 1732584193\n\t var b = -271733879\n\t var c = -1732584194\n\t var d = 271733878\n\t\n\t for (i = 0; i < x.length; i += 16) {\n\t olda = a\n\t oldb = b\n\t oldc = c\n\t oldd = d\n\t\n\t a = md5_ff(a, b, c, d, x[i], 7, -680876936)\n\t d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n\t c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n\t b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n\t a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n\t d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n\t c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n\t b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n\t a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n\t d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n\t c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n\t b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n\t a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n\t d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n\t c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n\t b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\t\n\t a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n\t d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n\t c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n\t b = md5_gg(b, c, d, a, x[i], 20, -373897302)\n\t a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n\t d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n\t c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n\t b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n\t a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n\t d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n\t c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n\t b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n\t a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n\t d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n\t c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n\t b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\t\n\t a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n\t d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n\t c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n\t b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n\t a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n\t d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n\t c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n\t b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n\t a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n\t d = md5_hh(d, a, b, c, x[i], 11, -358537222)\n\t c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n\t b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n\t a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n\t d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n\t c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n\t b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\t\n\t a = md5_ii(a, b, c, d, x[i], 6, -198630844)\n\t d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n\t c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n\t b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n\t a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n\t d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n\t c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n\t b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n\t a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n\t d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n\t c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n\t b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n\t a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n\t d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n\t c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n\t b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\t\n\t a = safe_add(a, olda)\n\t b = safe_add(b, oldb)\n\t c = safe_add(c, oldc)\n\t d = safe_add(d, oldd)\n\t }\n\t return [a, b, c, d]\n\t }", "function binl_md5 (x, len) {\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << (len % 32)\n\t x[(((len + 64) >>> 9) << 4) + 14] = len\n\t\n\t var i\n\t var olda\n\t var oldb\n\t var oldc\n\t var oldd\n\t var a = 1732584193\n\t var b = -271733879\n\t var c = -1732584194\n\t var d = 271733878\n\t\n\t for (i = 0; i < x.length; i += 16) {\n\t olda = a\n\t oldb = b\n\t oldc = c\n\t oldd = d\n\t\n\t a = md5_ff(a, b, c, d, x[i], 7, -680876936)\n\t d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n\t c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n\t b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n\t a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n\t d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n\t c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n\t b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n\t a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n\t d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n\t c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n\t b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n\t a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n\t d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n\t c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n\t b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\t\n\t a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n\t d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n\t c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n\t b = md5_gg(b, c, d, a, x[i], 20, -373897302)\n\t a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n\t d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n\t c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n\t b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n\t a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n\t d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n\t c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n\t b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n\t a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n\t d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n\t c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n\t b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\t\n\t a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n\t d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n\t c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n\t b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n\t a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n\t d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n\t c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n\t b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n\t a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n\t d = md5_hh(d, a, b, c, x[i], 11, -358537222)\n\t c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n\t b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n\t a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n\t d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n\t c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n\t b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\t\n\t a = md5_ii(a, b, c, d, x[i], 6, -198630844)\n\t d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n\t c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n\t b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n\t a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n\t d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n\t c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n\t b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n\t a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n\t d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n\t c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n\t b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n\t a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n\t d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n\t c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n\t b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\t\n\t a = safe_add(a, olda)\n\t b = safe_add(b, oldb)\n\t c = safe_add(c, oldc)\n\t d = safe_add(d, oldd)\n\t }\n\t return [a, b, c, d]\n\t }", "function binl_md5 (x, len) {\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << (len % 32)\n\t x[(((len + 64) >>> 9) << 4) + 14] = len\n\n\t var i\n\t var olda\n\t var oldb\n\t var oldc\n\t var oldd\n\t var a = 1732584193\n\t var b = -271733879\n\t var c = -1732584194\n\t var d = 271733878\n\n\t for (i = 0; i < x.length; i += 16) {\n\t olda = a\n\t oldb = b\n\t oldc = c\n\t oldd = d\n\n\t a = md5_ff(a, b, c, d, x[i], 7, -680876936)\n\t d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n\t c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n\t b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n\t a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n\t d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n\t c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n\t b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n\t a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n\t d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n\t c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n\t b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n\t a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n\t d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n\t c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n\t b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n\t a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n\t d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n\t c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n\t b = md5_gg(b, c, d, a, x[i], 20, -373897302)\n\t a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n\t d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n\t c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n\t b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n\t a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n\t d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n\t c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n\t b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n\t a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n\t d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n\t c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n\t b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n\t a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n\t d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n\t c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n\t b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n\t a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n\t d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n\t c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n\t b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n\t a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n\t d = md5_hh(d, a, b, c, x[i], 11, -358537222)\n\t c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n\t b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n\t a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n\t d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n\t c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n\t b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n\t a = md5_ii(a, b, c, d, x[i], 6, -198630844)\n\t d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n\t c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n\t b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n\t a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n\t d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n\t c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n\t b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n\t a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n\t d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n\t c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n\t b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n\t a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n\t d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n\t c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n\t b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n\t a = safe_add(a, olda)\n\t b = safe_add(b, oldb)\n\t c = safe_add(c, oldc)\n\t d = safe_add(d, oldd)\n\t }\n\t return [a, b, c, d]\n\t }", "function binl_md5 (x, len) {\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << (len % 32)\n\t x[(((len + 64) >>> 9) << 4) + 14] = len\n\n\t var i\n\t var olda\n\t var oldb\n\t var oldc\n\t var oldd\n\t var a = 1732584193\n\t var b = -271733879\n\t var c = -1732584194\n\t var d = 271733878\n\n\t for (i = 0; i < x.length; i += 16) {\n\t olda = a\n\t oldb = b\n\t oldc = c\n\t oldd = d\n\n\t a = md5_ff(a, b, c, d, x[i], 7, -680876936)\n\t d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n\t c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n\t b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n\t a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n\t d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n\t c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n\t b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n\t a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n\t d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n\t c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n\t b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n\t a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n\t d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n\t c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n\t b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n\t a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n\t d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n\t c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n\t b = md5_gg(b, c, d, a, x[i], 20, -373897302)\n\t a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n\t d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n\t c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n\t b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n\t a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n\t d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n\t c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n\t b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n\t a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n\t d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n\t c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n\t b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n\t a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n\t d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n\t c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n\t b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n\t a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n\t d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n\t c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n\t b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n\t a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n\t d = md5_hh(d, a, b, c, x[i], 11, -358537222)\n\t c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n\t b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n\t a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n\t d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n\t c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n\t b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n\t a = md5_ii(a, b, c, d, x[i], 6, -198630844)\n\t d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n\t c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n\t b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n\t a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n\t d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n\t c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n\t b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n\t a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n\t d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n\t c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n\t b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n\t a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n\t d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n\t c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n\t b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n\t a = safe_add(a, olda)\n\t b = safe_add(b, oldb)\n\t c = safe_add(c, oldc)\n\t d = safe_add(d, oldd)\n\t }\n\t return [a, b, c, d]\n\t }", "function binl_md5(x, len) {\r\n\t\t /* append padding */\r\n\t\t x[len >> 5] |= 0x80 << ((len) % 32);\r\n\t\t x[(((len + 64) >>> 9) << 4) + 14] = len;\r\n\r\n\t\t var i, olda, oldb, oldc, oldd,\r\n\t\t a = 1732584193,\r\n\t\t b = -271733879,\r\n\t\t c = -1732584194,\r\n\t\t d = 271733878;\r\n\r\n\t\t for (i = 0; i < x.length; i += 16) {\r\n\t\t olda = a;\r\n\t\t oldb = b;\r\n\t\t oldc = c;\r\n\t\t oldd = d;\r\n\r\n\t\t a = md5_ff(a, b, c, d, x[i], 7, -680876936);\r\n\t\t d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\r\n\t\t c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\r\n\t\t b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\r\n\t\t a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\r\n\t\t d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\r\n\t\t c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\r\n\t\t b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\r\n\t\t a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\r\n\t\t d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\r\n\t\t c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\r\n\t\t b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\r\n\t\t a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\r\n\t\t d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\r\n\t\t c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\r\n\t\t b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\r\n\r\n\t\t a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\r\n\t\t d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\r\n\t\t c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\r\n\t\t b = md5_gg(b, c, d, a, x[i], 20, -373897302);\r\n\t\t a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\r\n\t\t d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\r\n\t\t c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\r\n\t\t b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\r\n\t\t a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\r\n\t\t d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\r\n\t\t c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\r\n\t\t b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\r\n\t\t a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\r\n\t\t d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\r\n\t\t c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\r\n\t\t b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\r\n\r\n\t\t a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\r\n\t\t d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\r\n\t\t c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\r\n\t\t b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\r\n\t\t a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\r\n\t\t d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\r\n\t\t c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\r\n\t\t b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\r\n\t\t a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\r\n\t\t d = md5_hh(d, a, b, c, x[i], 11, -358537222);\r\n\t\t c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\r\n\t\t b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\r\n\t\t a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\r\n\t\t d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\r\n\t\t c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\r\n\t\t b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\r\n\r\n\t\t a = md5_ii(a, b, c, d, x[i], 6, -198630844);\r\n\t\t d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\r\n\t\t c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\r\n\t\t b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\r\n\t\t a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\r\n\t\t d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\r\n\t\t c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\r\n\t\t b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\r\n\t\t a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\r\n\t\t d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\r\n\t\t c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\r\n\t\t b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\r\n\t\t a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\r\n\t\t d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\r\n\t\t c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\r\n\t\t b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\r\n\r\n\t\t a = safe_add(a, olda);\r\n\t\t b = safe_add(b, oldb);\r\n\t\t c = safe_add(c, oldc);\r\n\t\t d = safe_add(d, oldd);\r\n\t\t }\r\n\t\t return [a, b, c, d];\r\n\t\t }", "function binl_md5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var i\n var olda\n var oldb\n var oldc\n var oldd\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (i = 0; i < x.length; i += 16) {\n olda = a\n oldb = b\n oldc = c\n oldd = d\n\n a = md5_ff(a, b, c, d, x[i], 7, -680876936)\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5_gg(b, c, d, a, x[i], 20, -373897302)\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5_hh(d, a, b, c, x[i], 11, -358537222)\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5_ii(a, b, c, d, x[i], 6, -198630844)\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safe_add(a, olda)\n b = safe_add(b, oldb)\n c = safe_add(c, oldc)\n d = safe_add(d, oldd)\n }\n return [a, b, c, d]\n }", "function binlMD5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32)\n x[((len + 64) >>> 9 << 4) + 14] = len\n\n var i\n var olda\n var oldb\n var oldc\n var oldd\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (i = 0; i < x.length; i += 16) {\n olda = a\n oldb = b\n oldc = c\n oldd = d\n\n a = md5ff(a, b, c, d, x[i], 7, -680876936)\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5gg(b, c, d, a, x[i], 20, -373897302)\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5hh(d, a, b, c, x[i], 11, -358537222)\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5ii(a, b, c, d, x[i], 6, -198630844)\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safeAdd(a, olda)\n b = safeAdd(b, oldb)\n c = safeAdd(c, oldc)\n d = safeAdd(d, oldd)\n }\n return [a, b, c, d]\n}", "function binl_md5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var i, olda, oldb, oldc, oldd,\n a = 1732584193,\n b = -271733879,\n c = -1732584194,\n d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n\n a = md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return [a, b, c, d];\n }", "function binlMD5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var i\n var olda\n var oldb\n var oldc\n var oldd\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (i = 0; i < x.length; i += 16) {\n olda = a\n oldb = b\n oldc = c\n oldd = d\n\n a = md5ff(a, b, c, d, x[i], 7, -680876936)\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5gg(b, c, d, a, x[i], 20, -373897302)\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5hh(d, a, b, c, x[i], 11, -358537222)\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5ii(a, b, c, d, x[i], 6, -198630844)\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safeAdd(a, olda)\n b = safeAdd(b, oldb)\n c = safeAdd(c, oldc)\n d = safeAdd(d, oldd)\n }\n return [a, b, c, d]\n }", "function binlMD5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32)\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var i\n var olda\n var oldb\n var oldc\n var oldd\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (i = 0; i < x.length; i += 16) {\n olda = a\n oldb = b\n oldc = c\n oldd = d\n\n a = md5ff(a, b, c, d, x[i], 7, -680876936)\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5gg(b, c, d, a, x[i], 20, -373897302)\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5hh(d, a, b, c, x[i], 11, -358537222)\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5ii(a, b, c, d, x[i], 6, -198630844)\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safeAdd(a, olda)\n b = safeAdd(b, oldb)\n c = safeAdd(c, oldc)\n d = safeAdd(d, oldd)\n }\n return [a, b, c, d]\n }", "function binlMD5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[(len + 64 >>> 9 << 4) + 14] = len;\n\n var i;\n var olda;\n var oldb;\n var oldc;\n var oldd;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n return [a, b, c, d];\n }", "function binl_md5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[(len + 64 >>> 9 << 4) + 14] = len;\n\n var i;\n var olda;\n var oldb;\n var oldc;\n var oldd;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n\n a = md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return [a, b, c, d];\n }", "function binlMD5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32)\n x[((len + 64) >>> 9 << 4) + 14] = len\n\n var i\n var olda\n var oldb\n var oldc\n var oldd\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (i = 0; i < x.length; i += 16) {\n olda = a\n oldb = b\n oldc = c\n oldd = d\n\n a = md5ff(a, b, c, d, x[i], 7, -680876936)\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5gg(b, c, d, a, x[i], 20, -373897302)\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5hh(d, a, b, c, x[i], 11, -358537222)\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5ii(a, b, c, d, x[i], 6, -198630844)\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safeAdd(a, olda)\n b = safeAdd(b, oldb)\n c = safeAdd(c, oldc)\n d = safeAdd(d, oldd)\n }\n return [a, b, c, d]\n }", "function binlMD5 (x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32)\n x[((len + 64) >>> 9 << 4) + 14] = len\n\n var i\n var olda\n var oldb\n var oldc\n var oldd\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (i = 0; i < x.length; i += 16) {\n olda = a\n oldb = b\n oldc = c\n oldd = d\n\n a = md5ff(a, b, c, d, x[i], 7, -680876936)\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5gg(b, c, d, a, x[i], 20, -373897302)\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5hh(d, a, b, c, x[i], 11, -358537222)\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5ii(a, b, c, d, x[i], 6, -198630844)\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safeAdd(a, olda)\n b = safeAdd(b, oldb)\n c = safeAdd(c, oldc)\n d = safeAdd(d, oldd)\n }\n return [a, b, c, d]\n }", "function binl_md5(x, len) {\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << (len % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var i, olda, oldb, oldc, oldd,\n\t a = 1732584193,\n\t b = -271733879,\n\t c = -1732584194,\n\t d = 271733878;\n\t\n\t for (i = 0; i < x.length; i += 16) {\n\t olda = a;\n\t oldb = b;\n\t oldc = c;\n\t oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i], 7, -680876936);\n\t d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n\t d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n\t d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n\t d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n\t d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n\t c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n\t d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n\t c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n\t d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n\t c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n\t d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n\t c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n\t d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n\t d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n\t d = md5_hh(d, a, b, c, x[i], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n\t d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i], 6, -198630844);\n\t d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n\t d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n\t d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n\t d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return [a, b, c, d];\n\t }", "function binl_md5(x,len){/*append padding*/\r\n x[len >> 5] |= 0x80 << ((len) % 32);\r\n x[(((len+64) >>> 9) << 4)+14]=len;\r\n var a=1732584193, b=-271733879, c=-1732584194, d=271733878;\r\n for(var i=0;i<x.length;i +=16){\r\n var olda=a, oldb=b, oldc=c, oldd=d;\r\n a=md5_ff(a,b,c,d,x[i+ 0],7 ,-680876936);\r\n d=md5_ff(d,a,b,c,x[i+ 1],12,-389564586);\r\n c=md5_ff(c,d,a,b,x[i+ 2],17,606105819);\r\n b=md5_ff(b,c,d,a,x[i+ 3],22,-1044525330);\r\n a=md5_ff(a,b,c,d,x[i+ 4],7 ,-176418897);\r\n d=md5_ff(d,a,b,c,x[i+ 5],12,1200080426);\r\n c=md5_ff(c,d,a,b,x[i+ 6],17,-1473231341);\r\n b=md5_ff(b,c,d,a,x[i+ 7],22,-45705983);\r\n a=md5_ff(a,b,c,d,x[i+ 8],7 ,1770035416);\r\n d=md5_ff(d,a,b,c,x[i+ 9],12,-1958414417);\r\n c=md5_ff(c,d,a,b,x[i+10],17,-42063);\r\n b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);\r\n a=md5_ff(a,b,c,d,x[i+12],7 ,1804603682);\r\n d=md5_ff(d,a,b,c,x[i+13],12,-40341101);\r\n c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);\r\n b=md5_ff(b,c,d,a,x[i+15],22,1236535329);\r\n a=md5_gg(a,b,c,d,x[i+ 1],5 ,-165796510);\r\n d=md5_gg(d,a,b,c,x[i+ 6],9 ,-1069501632);\r\n c=md5_gg(c,d,a,b,x[i+11],14,643717713);\r\n b=md5_gg(b,c,d,a,x[i+ 0],20,-373897302);\r\n a=md5_gg(a,b,c,d,x[i+ 5],5 ,-701558691);\r\n d=md5_gg(d,a,b,c,x[i+10],9 ,38016083);\r\n c=md5_gg(c,d,a,b,x[i+15],14,-660478335);\r\n b=md5_gg(b,c,d,a,x[i+ 4],20,-405537848);\r\n a=md5_gg(a,b,c,d,x[i+ 9],5 ,568446438);\r\n d=md5_gg(d,a,b,c,x[i+14],9 ,-1019803690);\r\n c=md5_gg(c,d,a,b,x[i+ 3],14,-187363961);\r\n b=md5_gg(b,c,d,a,x[i+ 8],20,1163531501);\r\n a=md5_gg(a,b,c,d,x[i+13],5 ,-1444681467);\r\n d=md5_gg(d,a,b,c,x[i+ 2],9 ,-51403784);\r\n c=md5_gg(c,d,a,b,x[i+ 7],14,1735328473);\r\n b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);\r\n a=md5_hh(a,b,c,d,x[i+ 5],4 ,-378558);\r\n d=md5_hh(d,a,b,c,x[i+ 8],11,-2022574463);\r\n c=md5_hh(c,d,a,b,x[i+11],16,1839030562);\r\n b=md5_hh(b,c,d,a,x[i+14],23,-35309556);\r\n a=md5_hh(a,b,c,d,x[i+ 1],4 ,-1530992060);\r\n d=md5_hh(d,a,b,c,x[i+ 4],11,1272893353);\r\n c=md5_hh(c,d,a,b,x[i+ 7],16,-155497632);\r\n b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);\r\n a=md5_hh(a,b,c,d,x[i+13],4 ,681279174);\r\n d=md5_hh(d,a,b,c,x[i+ 0],11,-358537222);\r\n c=md5_hh(c,d,a,b,x[i+ 3],16,-722521979);\r\n b=md5_hh(b,c,d,a,x[i+ 6],23,76029189);\r\n a=md5_hh(a,b,c,d,x[i+ 9],4 ,-640364487);\r\n d=md5_hh(d,a,b,c,x[i+12],11,-421815835);\r\n c=md5_hh(c,d,a,b,x[i+15],16,530742520);\r\n b=md5_hh(b,c,d,a,x[i+ 2],23,-995338651);\r\n a=md5_ii(a,b,c,d,x[i+ 0],6 ,-198630844);\r\n d=md5_ii(d,a,b,c,x[i+ 7],10,1126891415);\r\n c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);\r\n b=md5_ii(b,c,d,a,x[i+ 5],21,-57434055);\r\n a=md5_ii(a,b,c,d,x[i+12],6 ,1700485571);\r\n d=md5_ii(d,a,b,c,x[i+ 3],10,-1894986606);\r\n c=md5_ii(c,d,a,b,x[i+10],15,-1051523);\r\n b=md5_ii(b,c,d,a,x[i+ 1],21,-2054922799);\r\n a=md5_ii(a,b,c,d,x[i+ 8],6 ,1873313359);\r\n d=md5_ii(d,a,b,c,x[i+15],10,-30611744);\r\n c=md5_ii(c,d,a,b,x[i+ 6],15,-1560198380);\r\n b=md5_ii(b,c,d,a,x[i+13],21,1309151649);\r\n a=md5_ii(a,b,c,d,x[i+ 4],6 ,-145523070);\r\n d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);\r\n c=md5_ii(c,d,a,b,x[i+ 2],15,718787259);\r\n b=md5_ii(b,c,d,a,x[i+ 9],21,-343485551);\r\n a=safe_add(a,olda);\r\n b=safe_add(b,oldb);\r\n c=safe_add(c,oldc);\r\n d=safe_add(d,oldd);\r\n }\r\n return Array(a,b,c,d);\r\n}", "function binlMD5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[(len + 64 >>> 9 << 4) + 14] = len;\n var i;\n var olda;\n var oldb;\n var oldc;\n var oldd;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}", "function binl_md5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return [a, b, c, d];\n}", "function binlMD5 (x, len) {\r\n /* append padding */\r\n x[len >> 5] |= 0x80 << (len % 32);\r\n x[(((len + 64) >>> 9) << 4) + 14] = len;\r\n\r\n var i;\r\n var olda;\r\n var oldb;\r\n var oldc;\r\n var oldd;\r\n var a = 1732584193;\r\n var b = -271733879;\r\n var c = -1732584194;\r\n var d = 271733878;\r\n\r\n for (i = 0; i < x.length; i += 16) {\r\n olda = a;\r\n oldb = b;\r\n oldc = c;\r\n oldd = d;\r\n\r\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\r\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\r\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\r\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\r\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\r\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\r\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\r\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\r\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\r\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\r\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\r\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\r\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\r\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\r\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\r\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\r\n\r\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\r\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\r\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\r\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\r\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\r\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\r\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\r\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\r\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\r\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\r\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\r\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\r\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\r\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\r\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\r\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\r\n\r\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\r\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\r\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\r\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\r\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\r\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\r\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\r\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\r\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\r\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\r\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\r\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\r\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\r\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\r\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\r\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\r\n\r\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\r\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\r\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\r\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\r\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\r\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\r\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\r\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\r\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\r\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\r\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\r\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\r\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\r\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\r\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\r\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\r\n\r\n a = safeAdd(a, olda);\r\n b = safeAdd(b, oldb);\r\n c = safeAdd(c, oldc);\r\n d = safeAdd(d, oldd);\r\n }\r\n return [a, b, c, d]\r\n }", "function binl_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n}", "function binl_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n}", "function binl_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n}", "function binl_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n}", "function binl_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n}", "function binl_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n}", "function binl_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n}", "function binl_md5(x, len) {\n\t\t/* append padding */\n\t\tx[len >> 5] |= 0x80 << len % 32;\n\t\tx[(((len + 64) >>> 9) << 4) + 14] = len;\n\n\t\tvar i;\n\t\tvar olda;\n\t\tvar oldb;\n\t\tvar oldc;\n\t\tvar oldd;\n\t\tvar a = 1732584193;\n\t\tvar b = -271733879;\n\t\tvar c = -1732584194;\n\t\tvar d = 271733878;\n\n\t\tfor (i = 0; i < x.length; i += 16) {\n\t\t\tolda = a;\n\t\t\toldb = b;\n\t\t\toldc = c;\n\t\t\toldd = d;\n\n\t\t\ta = md5_ff(a, b, c, d, x[i], 7, -680876936);\n\t\t\td = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n\t\t\tc = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n\t\t\tb = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n\t\t\ta = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n\t\t\td = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n\t\t\tc = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n\t\t\tb = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n\t\t\ta = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n\t\t\td = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n\t\t\tc = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n\t\t\tb = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n\t\t\ta = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n\t\t\td = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n\t\t\tc = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n\t\t\tb = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n\t\t\ta = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n\t\t\td = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n\t\t\tc = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n\t\t\tb = md5_gg(b, c, d, a, x[i], 20, -373897302);\n\t\t\ta = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n\t\t\td = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n\t\t\tc = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n\t\t\tb = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n\t\t\ta = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n\t\t\td = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n\t\t\tc = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n\t\t\tb = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n\t\t\ta = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n\t\t\td = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n\t\t\tc = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n\t\t\tb = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n\t\t\ta = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n\t\t\td = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n\t\t\tc = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n\t\t\tb = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n\t\t\ta = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n\t\t\td = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n\t\t\tc = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n\t\t\tb = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n\t\t\ta = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n\t\t\td = md5_hh(d, a, b, c, x[i], 11, -358537222);\n\t\t\tc = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n\t\t\tb = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n\t\t\ta = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n\t\t\td = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n\t\t\tc = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n\t\t\tb = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n\t\t\ta = md5_ii(a, b, c, d, x[i], 6, -198630844);\n\t\t\td = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n\t\t\tc = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n\t\t\tb = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n\t\t\ta = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n\t\t\td = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n\t\t\tc = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n\t\t\tb = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n\t\t\ta = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n\t\t\td = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n\t\t\tc = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n\t\t\tb = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n\t\t\ta = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n\t\t\td = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n\t\t\tc = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n\t\t\tb = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n\t\t\ta = safe_add(a, olda);\n\t\t\tb = safe_add(b, oldb);\n\t\t\tc = safe_add(c, oldc);\n\t\t\td = safe_add(d, oldd);\n\t\t}\n\t\treturn [a, b, c, d];\n\t}", "function binl_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n}", "function binl_md5(x, len) {\n\t/* append padding */\n\tx[len >> 5] |= 0x80 << ((len) % 32);\n\tx[(((len + 64) >>> 9) << 4) + 14] = len;\n\n\tvar a = 1732584193;\n\tvar b = -271733879;\n\tvar c = -1732584194;\n\tvar d = 271733878;\n\n\tfor ( var i = 0; i < x.length; i += 16) {\n\t\tvar olda = a;\n\t\tvar oldb = b;\n\t\tvar oldc = c;\n\t\tvar oldd = d;\n\n\t\ta = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);\n\t\td = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n\t\tc = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n\t\tb = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n\t\ta = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n\t\td = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n\t\tc = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n\t\tb = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n\t\ta = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n\t\td = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n\t\tc = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n\t\tb = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n\t\ta = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n\t\td = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n\t\tc = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n\t\tb = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n\t\ta = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n\t\td = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n\t\tc = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n\t\tb = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);\n\t\ta = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n\t\td = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n\t\tc = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n\t\tb = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n\t\ta = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n\t\td = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n\t\tc = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n\t\tb = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n\t\ta = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n\t\td = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n\t\tc = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n\t\tb = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n\t\ta = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n\t\td = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n\t\tc = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n\t\tb = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n\t\ta = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n\t\td = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n\t\tc = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n\t\tb = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n\t\ta = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n\t\td = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);\n\t\tc = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n\t\tb = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n\t\ta = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n\t\td = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n\t\tc = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n\t\tb = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n\t\ta = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);\n\t\td = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n\t\tc = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n\t\tb = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n\t\ta = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n\t\td = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n\t\tc = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n\t\tb = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n\t\ta = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n\t\td = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n\t\tc = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n\t\tb = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n\t\ta = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n\t\td = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n\t\tc = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n\t\tb = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n\t\ta = safe_add(a, olda);\n\t\tb = safe_add(b, oldb);\n\t\tc = safe_add(c, oldc);\n\t\td = safe_add(d, oldd);\n\t}\n\treturn Array(a, b, c, d);\n}", "function binl_md5(x, len) {\n\t/* append padding */\n\tx[len >> 5] |= 0x80 << ((len) % 32);\n\tx[(((len + 64) >>> 9) << 4) + 14] = len;\n\n\tvar a = 1732584193;\n\tvar b = -271733879;\n\tvar c = -1732584194;\n\tvar d = 271733878;\n\n\tfor(var i = 0; i < x.length; i += 16) {\n\t\tvar olda = a;\n\t\tvar oldb = b;\n\t\tvar oldc = c;\n\t\tvar oldd = d;\n\n\t\ta = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t\td = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t\tc = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t\tb = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t\ta = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t\td = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t\tc = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t\tb = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t\ta = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t\td = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t\tc = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t\tb = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t\ta = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t\td = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t\tc = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t\tb = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n\t\ta = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t\td = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t\tc = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t\tb = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t\ta = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t\td = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t\tc = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t\tb = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t\ta = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t\td = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t\tc = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t\tb = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t\ta = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t\td = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t\tc = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t\tb = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n\t\ta = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t\td = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t\tc = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t\tb = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t\ta = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t\td = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t\tc = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t\tb = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t\ta = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t\td = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t\tc = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t\tb = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t\ta = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t\td = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t\tc = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t\tb = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n\t\ta = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t\td = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t\tc = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t\tb = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t\ta = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t\td = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t\tc = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t\tb = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t\ta = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t\td = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t\tc = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t\tb = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t\ta = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t\td = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t\tc = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t\tb = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n\t\ta = safe_add(a, olda);\n\t\tb = safe_add(b, oldb);\n\t\tc = safe_add(c, oldc);\n\t\td = safe_add(d, oldd);\n\t}\n\treturn Array(a, b, c, d);\n}", "function binl_md5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var i, olda, oldb, oldc, oldd,\n a = 1732584193,\n b = -271733879,\n c = -1732584194,\n d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n\n a = md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return [a, b, c, d];\n}", "function binl_md5(x, len) {\n var olda, oldb, oldc, oldd, a = 1732584193, b = -271733879, c = -1732584194, d = 271733878;\n // append padding\n x[len >> 5] |= 0x80 << (len % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n for (var i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n a = MD5.md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = MD5.md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = MD5.md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = MD5.md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = MD5.md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = MD5.md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = MD5.md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = MD5.md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = MD5.md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = MD5.md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = MD5.md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = MD5.md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = MD5.md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = MD5.md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = MD5.md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = MD5.md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = MD5.md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = MD5.md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = MD5.md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = MD5.md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = MD5.md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = MD5.md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = MD5.md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = MD5.md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = MD5.md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = MD5.md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = MD5.md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = MD5.md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = MD5.md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = MD5.md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = MD5.md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = MD5.md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = MD5.md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = MD5.md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = MD5.md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = MD5.md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = MD5.md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = MD5.md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = MD5.md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = MD5.md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = MD5.md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = MD5.md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = MD5.md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = MD5.md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = MD5.md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = MD5.md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = MD5.md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = MD5.md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = MD5.md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = MD5.md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = MD5.md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = MD5.md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = MD5.md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = MD5.md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = MD5.md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = MD5.md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = MD5.md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = MD5.md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = MD5.md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = MD5.md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = MD5.md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = MD5.md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = MD5.md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = MD5.md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = MD5.safe_add(a, olda);\n b = MD5.safe_add(b, oldb);\n c = MD5.safe_add(c, oldc);\n d = MD5.safe_add(d, oldd);\n }\n return [a, b, c, d];\n }", "function binl_md5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var i, olda, oldb, oldc, oldd,\n a = 1732584193,\n b = -271733879,\n c = -1732584194,\n d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n\n a = md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return [a, b, c, d];\n }", "function leword_md5(x, len) {\n\tvar i, olda, oldb, oldc, oldd,\n\t\ta = 1732584193,\n\t\tb = -271733879,\n\t\tc = -1732584194,\n\t\td = 271733878;\n\t\n\t/* append padding */\n\tx[len >> 5] |= 0x80 << (len % 32);\n\tx[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\tfor (i = 0; i < x.length; i += 16) {\n\t\tolda = a;\n\t\toldb = b;\n\t\toldc = c;\n\t\toldd = d;\n\t\t\n\t\ta = md5_ff(a, b, c, d, x[i], 7, -680876936);\n\t\td = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n\t\tc = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n\t\tb = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n\t\ta = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n\t\td = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n\t\tc = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n\t\tb = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n\t\ta = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n\t\td = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n\t\tc = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n\t\tb = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n\t\ta = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n\t\td = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n\t\tc = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n\t\tb = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\t\t\n\t\ta = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n\t\td = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n\t\tc = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n\t\tb = md5_gg(b, c, d, a, x[i], 20, -373897302);\n\t\ta = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n\t\td = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n\t\tc = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n\t\tb = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n\t\ta = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n\t\td = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n\t\tc = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n\t\tb = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n\t\ta = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n\t\td = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n\t\tc = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n\t\tb = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\t\t\n\t\ta = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n\t\td = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n\t\tc = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n\t\tb = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n\t\ta = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n\t\td = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n\t\tc = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n\t\tb = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n\t\ta = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n\t\td = md5_hh(d, a, b, c, x[i], 11, -358537222);\n\t\tc = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n\t\tb = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n\t\ta = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n\t\td = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n\t\tc = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n\t\tb = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\t\t\n\t\ta = md5_ii(a, b, c, d, x[i], 6, -198630844);\n\t\td = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n\t\tc = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n\t\tb = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n\t\ta = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n\t\td = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n\t\tc = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n\t\tb = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n\t\ta = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n\t\td = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n\t\tc = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n\t\tb = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n\t\ta = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n\t\td = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n\t\tc = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n\t\tb = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\t\t\n\t\ta = add32b_op16b(a, olda);\n\t\tb = add32b_op16b(b, oldb);\n\t\tc = add32b_op16b(c, oldc);\n\t\td = add32b_op16b(d, oldd);\n\t}\n\treturn [a, b, c, d];\n}", "function binl_md5(x, len) {\r\n /* append padding */\r\n x[len >> 5] |= 0x80 << ((len) % 32);\r\n x[(((len + 64) >>> 9) << 4) + 14] = len;\r\n\r\n var i, olda, oldb, oldc, oldd,\r\n a = 1732584193,\r\n b = -271733879,\r\n c = -1732584194,\r\n d = 271733878;\r\n\r\n for (i = 0; i < x.length; i += 16) {\r\n olda = a;\r\n oldb = b;\r\n oldc = c;\r\n oldd = d;\r\n\r\n a = md5_ff(a, b, c, d, x[i], 7, -680876936);\r\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\r\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\r\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\r\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\r\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\r\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\r\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\r\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\r\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\r\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\r\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\r\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\r\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\r\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\r\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\r\n\r\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\r\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\r\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\r\n b = md5_gg(b, c, d, a, x[i], 20, -373897302);\r\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\r\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\r\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\r\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\r\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\r\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\r\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\r\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\r\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\r\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\r\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\r\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\r\n\r\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\r\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\r\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\r\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\r\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\r\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\r\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\r\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\r\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\r\n d = md5_hh(d, a, b, c, x[i], 11, -358537222);\r\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\r\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\r\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\r\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\r\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\r\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\r\n\r\n a = md5_ii(a, b, c, d, x[i], 6, -198630844);\r\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\r\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\r\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\r\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\r\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\r\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\r\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\r\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\r\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\r\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\r\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\r\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\r\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\r\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\r\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\r\n\r\n a = safe_add(a, olda);\r\n b = safe_add(b, oldb);\r\n c = safe_add(c, oldc);\r\n d = safe_add(d, oldd);\r\n }\r\n return [a, b, c, d];\r\n }", "function binl_md5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var i, olda, oldb, oldc, oldd,\n a = 1732584193,\n b = -271733879,\n c = -1732584194,\n d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n\n a = md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return [a, b, c, d];\n }", "function binl_md5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var i, olda, oldb, oldc, oldd,\n a = 1732584193,\n b = -271733879,\n c = -1732584194,\n d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n\n a = md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return [a, b, c, d];\n }", "function binl_md5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var i, olda, oldb, oldc, oldd,\n a = 1732584193,\n b = -271733879,\n c = -1732584194,\n d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n\n a = md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return [a, b, c, d];\n }", "function binl_md5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << (len % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var i, olda, oldb, oldc, oldd,\n a = 1732584193,\n b = -271733879,\n c = -1732584194,\n d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n\n a = md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return [a, b, c, d];\n }", "function binl_md5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var i, olda, oldb, oldc, oldd,\n a = 1732584193,\n b = -271733879,\n c = -1732584194,\n d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n\n a = md5_ff(a, b, c, d, x[i], 7, -680876936);\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5_hh(d, a, b, c, x[i], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i], 6, -198630844);\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return [a, b, c, d];\n }", "function binlMD5(x,len){/* append padding */x[len>>5]|=0x80<<len%32;x[(len+64>>>9<<4)+14]=len;var i;var olda;var oldb;var oldc;var oldd;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(i=0;i<x.length;i+=16){olda=a;oldb=b;oldc=c;oldd=d;a=md5ff(a,b,c,d,x[i],7,-680876936);d=md5ff(d,a,b,c,x[i+1],12,-389564586);c=md5ff(c,d,a,b,x[i+2],17,606105819);b=md5ff(b,c,d,a,x[i+3],22,-1044525330);a=md5ff(a,b,c,d,x[i+4],7,-176418897);d=md5ff(d,a,b,c,x[i+5],12,1200080426);c=md5ff(c,d,a,b,x[i+6],17,-1473231341);b=md5ff(b,c,d,a,x[i+7],22,-45705983);a=md5ff(a,b,c,d,x[i+8],7,1770035416);d=md5ff(d,a,b,c,x[i+9],12,-1958414417);c=md5ff(c,d,a,b,x[i+10],17,-42063);b=md5ff(b,c,d,a,x[i+11],22,-1990404162);a=md5ff(a,b,c,d,x[i+12],7,1804603682);d=md5ff(d,a,b,c,x[i+13],12,-40341101);c=md5ff(c,d,a,b,x[i+14],17,-1502002290);b=md5ff(b,c,d,a,x[i+15],22,1236535329);a=md5gg(a,b,c,d,x[i+1],5,-165796510);d=md5gg(d,a,b,c,x[i+6],9,-1069501632);c=md5gg(c,d,a,b,x[i+11],14,643717713);b=md5gg(b,c,d,a,x[i],20,-373897302);a=md5gg(a,b,c,d,x[i+5],5,-701558691);d=md5gg(d,a,b,c,x[i+10],9,38016083);c=md5gg(c,d,a,b,x[i+15],14,-660478335);b=md5gg(b,c,d,a,x[i+4],20,-405537848);a=md5gg(a,b,c,d,x[i+9],5,568446438);d=md5gg(d,a,b,c,x[i+14],9,-1019803690);c=md5gg(c,d,a,b,x[i+3],14,-187363961);b=md5gg(b,c,d,a,x[i+8],20,1163531501);a=md5gg(a,b,c,d,x[i+13],5,-1444681467);d=md5gg(d,a,b,c,x[i+2],9,-51403784);c=md5gg(c,d,a,b,x[i+7],14,1735328473);b=md5gg(b,c,d,a,x[i+12],20,-1926607734);a=md5hh(a,b,c,d,x[i+5],4,-378558);d=md5hh(d,a,b,c,x[i+8],11,-2022574463);c=md5hh(c,d,a,b,x[i+11],16,1839030562);b=md5hh(b,c,d,a,x[i+14],23,-35309556);a=md5hh(a,b,c,d,x[i+1],4,-1530992060);d=md5hh(d,a,b,c,x[i+4],11,1272893353);c=md5hh(c,d,a,b,x[i+7],16,-155497632);b=md5hh(b,c,d,a,x[i+10],23,-1094730640);a=md5hh(a,b,c,d,x[i+13],4,681279174);d=md5hh(d,a,b,c,x[i],11,-358537222);c=md5hh(c,d,a,b,x[i+3],16,-722521979);b=md5hh(b,c,d,a,x[i+6],23,76029189);a=md5hh(a,b,c,d,x[i+9],4,-640364487);d=md5hh(d,a,b,c,x[i+12],11,-421815835);c=md5hh(c,d,a,b,x[i+15],16,530742520);b=md5hh(b,c,d,a,x[i+2],23,-995338651);a=md5ii(a,b,c,d,x[i],6,-198630844);d=md5ii(d,a,b,c,x[i+7],10,1126891415);c=md5ii(c,d,a,b,x[i+14],15,-1416354905);b=md5ii(b,c,d,a,x[i+5],21,-57434055);a=md5ii(a,b,c,d,x[i+12],6,1700485571);d=md5ii(d,a,b,c,x[i+3],10,-1894986606);c=md5ii(c,d,a,b,x[i+10],15,-1051523);b=md5ii(b,c,d,a,x[i+1],21,-2054922799);a=md5ii(a,b,c,d,x[i+8],6,1873313359);d=md5ii(d,a,b,c,x[i+15],10,-30611744);c=md5ii(c,d,a,b,x[i+6],15,-1560198380);b=md5ii(b,c,d,a,x[i+13],21,1309151649);a=md5ii(a,b,c,d,x[i+4],6,-145523070);d=md5ii(d,a,b,c,x[i+11],10,-1120210379);c=md5ii(c,d,a,b,x[i+2],15,718787259);b=md5ii(b,c,d,a,x[i+9],21,-343485551);a=safeAdd(a,olda);b=safeAdd(b,oldb);c=safeAdd(c,oldc);d=safeAdd(d,oldd);}return[a,b,c,d];}", "function binl_md5(x,len){\n\t//append padding\n\tx[len>>5] |=0x80<<((len)%32);\n\tx[(((len+64)>>>9)<<4)+14]=len;\n\tvar a=1732584193;\n\tvar b=-271733879;\n\tvar c=-1732584194;\n\tvar d=271733878;\n\tfor(var i=0;i<x.length;i+=16){\n\t\tvar olda=a;\n\t\tvar oldb=b;\n\t\tvar oldc=c;\n\t\tvar oldd=d;\n\t\ta=md5_ff(a,b,c,d,x[i+0],7,-680876936);\n\t\td=md5_ff(d,a,b,c,x[i+1],12,-389564586);\n\t\tc=md5_ff(c,d,a,b,x[i+2],17,606105819);\n\t\tb=md5_ff(b,c,d,a,x[i+3],22,-1044525330);\n\t\ta=md5_ff(a,b,c,d,x[i+4],7,-176418897);\n\t\td=md5_ff(d,a,b,c,x[i+5],12,1200080426);\n\t\tc=md5_ff(c,d,a,b,x[i+6],17,-1473231341);\n\t\tb=md5_ff(b,c,d,a,x[i+7],22,-45705983);\n\t\ta=md5_ff(a,b,c,d,x[i+8],7,1770035416);\n\t\td=md5_ff(d,a,b,c,x[i+9],12,-1958414417);\n\t\tc=md5_ff(c,d,a,b,x[i+10],17,-42063);\n\t\tb=md5_ff(b,c,d,a,x[i+11],22,-1990404162);\n\t\ta=md5_ff(a,b,c,d,x[i+12],7,1804603682);\n\t\td=md5_ff(d,a,b,c,x[i+13],12,-40341101);\n\t\tc=md5_ff(c,d,a,b,x[i+14],17,-1502002290);\n\t\tb=md5_ff(b,c,d,a,x[i+15],22,1236535329);\n\t\ta=md5_gg(a,b,c,d,x[i+1],5,-165796510);\n\t\td=md5_gg(d,a,b,c,x[i+6],9,-1069501632);\n\t\tc=md5_gg(c,d,a,b,x[i+11],14,643717713);\n\t\tb=md5_gg(b,c,d,a,x[i+0],20,-373897302);\n\t\ta=md5_gg(a,b,c,d,x[i+5],5,-701558691);\n\t\td=md5_gg(d,a,b,c,x[i+10],9,38016083);\n\t\tc=md5_gg(c,d,a,b,x[i+15],14,-660478335);\n\t\tb=md5_gg(b,c,d,a,x[i+4],20,-405537848);\n\t\ta=md5_gg(a,b,c,d,x[i+9],5,568446438);\n\t\td=md5_gg(d,a,b,c,x[i+14],9,-1019803690);\n\t\tc=md5_gg(c,d,a,b,x[i+3],14,-187363961);\n\t\tb=md5_gg(b,c,d,a,x[i+8],20,1163531501);\n\t\ta=md5_gg(a,b,c,d,x[i+13],5,-1444681467);\n\t\td=md5_gg(d,a,b,c,x[i+2],9,-51403784);\n\t\tc=md5_gg(c,d,a,b,x[i+7],14,1735328473);\n\t\tb=md5_gg(b,c,d,a,x[i+12],20,-1926607734);\n\t\ta=md5_hh(a,b,c,d,x[i+5],4,-378558);\n\t\td=md5_hh(d,a,b,c,x[i+8],11,-2022574463);\n\t\tc=md5_hh(c,d,a,b,x[i+11],16,1839030562);\n\t\tb=md5_hh(b,c,d,a,x[i+14],23,-35309556);\n\t\ta=md5_hh(a,b,c,d,x[i+1],4,-1530992060);\n\t\td=md5_hh(d,a,b,c,x[i+4],11,1272893353);\n\t\tc=md5_hh(c,d,a,b,x[i+7],16,-155497632);\n\t\tb=md5_hh(b,c,d,a,x[i+10],23,-1094730640);\n\t\ta=md5_hh(a,b,c,d,x[i+13],4,681279174);\n\t\td=md5_hh(d,a,b,c,x[i+0],11,-358537222);\n\t\tc=md5_hh(c,d,a,b,x[i+3],16,-722521979);\n\t\tb=md5_hh(b,c,d,a,x[i+6],23,76029189);\n\t\ta=md5_hh(a,b,c,d,x[i+9],4,-640364487);\n\t\td=md5_hh(d,a,b,c,x[i+12],11,-421815835);\n\t\tc=md5_hh(c,d,a,b,x[i+15],16,530742520);\n\t\tb=md5_hh(b,c,d,a,x[i+2],23,-995338651);\n\t\ta=md5_ii(a,b,c,d,x[i+0],6,-198630844);\n\t\td=md5_ii(d,a,b,c,x[i+7],10,1126891415);\n\t\tc=md5_ii(c,d,a,b,x[i+14],15,-1416354905);\n\t\tb=md5_ii(b,c,d,a,x[i+5],21,-57434055);\n\t\ta=md5_ii(a,b,c,d,x[i+12],6,1700485571);\n\t\td=md5_ii(d,a,b,c,x[i+3],10,-1894986606);\n\t\tc=md5_ii(c,d,a,b,x[i+10],15,-1051523);\n\t\tb=md5_ii(b,c,d,a,x[i+1],21,-2054922799);\n\t\ta=md5_ii(a,b,c,d,x[i+8],6,1873313359);\n\t\td=md5_ii(d,a,b,c,x[i+15],10,-30611744);\n\t\tc=md5_ii(c,d,a,b,x[i+6],15,-1560198380);\n\t\tb=md5_ii(b,c,d,a,x[i+13],21,1309151649);\n\t\ta=md5_ii(a,b,c,d,x[i+4],6,-145523070);\n\t\td=md5_ii(d,a,b,c,x[i+11],10,-1120210379);\n\t\tc=md5_ii(c,d,a,b,x[i+2],15,718787259);\n\t\tb=md5_ii(b,c,d,a,x[i+9],21,-343485551);\n\t\ta=safe_add(a,olda);\n\t\tb=safe_add(b,oldb);\n\t\tc=safe_add(c,oldc);\n\t\td=safe_add(d,oldd);\n\t}\n\treturn Array(a,b,c,d);\n}", "function core_md5(x, len) { \n /* append padding */ \n x[len >> 5] |= 0x80 << ((len) % 32); \n x[(((len + 64) >>> 9) << 4) + 14] = len; \n \n var a = 1732584193; \n var b = -271733879; \n var c = -1732584194; \n var d = 271733878; \n \n for(var i = 0; i < x.length; i += 16) { \n var olda = a; \n var oldb = b; \n var oldc = c; \n var oldd = d; \n \n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); \n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); \n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); \n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); \n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); \n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); \n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); \n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); \n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); \n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); \n c = md5_ff(c, d, a, b, x[i+10], 17, -42063); \n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); \n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); \n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); \n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); \n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); \n \n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); \n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); \n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); \n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); \n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); \n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); \n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); \n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); \n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); \n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); \n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); \n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); \n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); \n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); \n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); \n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); \n \n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); \n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); \n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); \n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); \n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); \n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); \n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); \n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); \n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); \n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); \n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); \n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); \n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); \n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); \n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); \n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); \n \n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); \n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); \n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); \n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); \n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); \n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); \n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); \n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); \n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); \n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); \n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); \n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); \n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); \n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); \n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); \n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); \n \n a = safe_add(a, olda); \n b = safe_add(b, oldb); \n c = safe_add(c, oldc); \n d = safe_add(d, oldd); \n } \n return Array(a, b, c, d); \n}", "function core_md5(x : Array.<number>, len : number) : Array.<number>\n {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = this.md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = this.md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = this.md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = this.md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = this.md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = this.md5_ff(d, a, b, c, x[i+ 5] as number, 12, 1200080426);\n c = this.md5_ff(c, d, a, b, x[i+ 6] as number, 17, -1473231341);\n b = this.md5_ff(b, c, d, a, x[i+ 7] as number, 22, -45705983);\n a = this.md5_ff(a, b, c, d, x[i+ 8] as number, 7 , 1770035416);\n d = this.md5_ff(d, a, b, c, x[i+ 9] as number, 12, -1958414417);\n c = this.md5_ff(c, d, a, b, x[i+10] as number, 17, -42063);\n b = this.md5_ff(b, c, d, a, x[i+11] as number, 22, -1990404162);\n a = this.md5_ff(a, b, c, d, x[i+12] as number, 7 , 1804603682);\n d = this.md5_ff(d, a, b, c, x[i+13] as number, 12, -40341101);\n c = this.md5_ff(c, d, a, b, x[i+14] as number, 17, -1502002290);\n b = this.md5_ff(b, c, d, a, x[i+15] as number, 22, 1236535329);\n\n a = this.md5_gg(a, b, c, d, x[i+ 1] as number, 5 , -165796510);\n d = this.md5_gg(d, a, b, c, x[i+ 6] as number, 9 , -1069501632);\n c = this.md5_gg(c, d, a, b, x[i+11] as number, 14, 643717713);\n b = this.md5_gg(b, c, d, a, x[i+ 0] as number, 20, -373897302);\n a = this.md5_gg(a, b, c, d, x[i+ 5] as number, 5 , -701558691);\n d = this.md5_gg(d, a, b, c, x[i+10] as number, 9 , 38016083);\n c = this.md5_gg(c, d, a, b, x[i+15] as number, 14, -660478335);\n b = this.md5_gg(b, c, d, a, x[i+ 4] as number, 20, -405537848);\n a = this.md5_gg(a, b, c, d, x[i+ 9] as number, 5 , 568446438);\n d = this.md5_gg(d, a, b, c, x[i+14] as number, 9 , -1019803690);\n c = this.md5_gg(c, d, a, b, x[i+ 3] as number, 14, -187363961);\n b = this.md5_gg(b, c, d, a, x[i+ 8] as number, 20, 1163531501);\n a = this.md5_gg(a, b, c, d, x[i+13] as number, 5 , -1444681467);\n d = this.md5_gg(d, a, b, c, x[i+ 2] as number, 9 , -51403784);\n c = this.md5_gg(c, d, a, b, x[i+ 7] as number, 14, 1735328473);\n b = this.md5_gg(b, c, d, a, x[i+12] as number, 20, -1926607734);\n\n a = this.md5_hh(a, b, c, d, x[i+ 5] as number, 4 , -378558);\n d = this.md5_hh(d, a, b, c, x[i+ 8] as number, 11, -2022574463);\n c = this.md5_hh(c, d, a, b, x[i+11] as number, 16, 1839030562);\n b = this.md5_hh(b, c, d, a, x[i+14] as number, 23, -35309556);\n a = this.md5_hh(a, b, c, d, x[i+ 1] as number, 4 , -1530992060);\n d = this.md5_hh(d, a, b, c, x[i+ 4] as number, 11, 1272893353);\n c = this.md5_hh(c, d, a, b, x[i+ 7] as number, 16, -155497632);\n b = this.md5_hh(b, c, d, a, x[i+10] as number, 23, -1094730640);\n a = this.md5_hh(a, b, c, d, x[i+13] as number, 4 , 681279174);\n d = this.md5_hh(d, a, b, c, x[i+ 0] as number, 11, -358537222);\n c = this.md5_hh(c, d, a, b, x[i+ 3] as number, 16, -722521979);\n b = this.md5_hh(b, c, d, a, x[i+ 6] as number, 23, 76029189);\n a = this.md5_hh(a, b, c, d, x[i+ 9] as number, 4 , -640364487);\n d = this.md5_hh(d, a, b, c, x[i+12] as number, 11, -421815835);\n c = this.md5_hh(c, d, a, b, x[i+15] as number, 16, 530742520);\n b = this.md5_hh(b, c, d, a, x[i+ 2] as number, 23, -995338651);\n\n a = this.md5_ii(a, b, c, d, x[i+ 0] as number, 6 , -198630844);\n d = this.md5_ii(d, a, b, c, x[i+ 7] as number, 10, 1126891415);\n c = this.md5_ii(c, d, a, b, x[i+14] as number, 15, -1416354905);\n b = this.md5_ii(b, c, d, a, x[i+ 5] as number, 21, -57434055);\n a = this.md5_ii(a, b, c, d, x[i+12] as number, 6 , 1700485571);\n d = this.md5_ii(d, a, b, c, x[i+ 3] as number, 10, -1894986606);\n c = this.md5_ii(c, d, a, b, x[i+10] as number, 15, -1051523);\n b = this.md5_ii(b, c, d, a, x[i+ 1] as number, 21, -2054922799);\n a = this.md5_ii(a, b, c, d, x[i+ 8] as number, 6 , 1873313359);\n d = this.md5_ii(d, a, b, c, x[i+15] as number, 10, -30611744);\n c = this.md5_ii(c, d, a, b, x[i+ 6] as number, 15, -1560198380);\n b = this.md5_ii(b, c, d, a, x[i+13] as number, 21, 1309151649);\n a = this.md5_ii(a, b, c, d, x[i+ 4] as number, 6 , -145523070);\n d = this.md5_ii(d, a, b, c, x[i+11] as number, 10, -1120210379);\n c = this.md5_ii(c, d, a, b, x[i+ 2] as number, 15, 718787259);\n b = this.md5_ii(b, c, d, a, x[i+ 9] as number, 21, -343485551);\n\n a = this.safe_add(a, olda);\n b = this.safe_add(b, oldb);\n c = this.safe_add(c, oldc);\n d = this.safe_add(d, oldd);\n }\n return [a, b, c, d];\n\n }", "function core_md5 (x, len) {\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32)\n\t x[(((len + 64) >>> 9) << 4) + 14] = len\n\t\n\t var a = 1732584193\n\t var b = -271733879\n\t var c = -1732584194\n\t var d = 271733878\n\t\n\t for (var i = 0; i < x.length; i += 16) {\n\t var olda = a\n\t var oldb = b\n\t var oldc = c\n\t var oldd = d\n\t\n\t a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)\n\t d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)\n\t c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)\n\t b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)\n\t a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)\n\t d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)\n\t c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)\n\t b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)\n\t a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)\n\t d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)\n\t c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)\n\t b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)\n\t a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)\n\t d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)\n\t c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)\n\t b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\t\n\t a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)\n\t d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)\n\t c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)\n\t b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)\n\t a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)\n\t d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)\n\t c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)\n\t b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)\n\t a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)\n\t d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)\n\t c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)\n\t b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)\n\t a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)\n\t d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)\n\t c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)\n\t b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\t\n\t a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)\n\t d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)\n\t c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)\n\t b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)\n\t a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)\n\t d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)\n\t c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)\n\t b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)\n\t a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)\n\t d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)\n\t c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)\n\t b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)\n\t a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)\n\t d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)\n\t c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)\n\t b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)\n\t\n\t a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)\n\t d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)\n\t c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)\n\t b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)\n\t a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)\n\t d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)\n\t c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)\n\t b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)\n\t a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)\n\t d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)\n\t c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)\n\t b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)\n\t a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)\n\t d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)\n\t c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)\n\t b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)\n\t\n\t a = safe_add(a, olda)\n\t b = safe_add(b, oldb)\n\t c = safe_add(c, oldc)\n\t d = safe_add(d, oldd)\n\t }\n\t\n\t return [a, b, c, d]\n\t}", "function wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[(len + 64 >>> 9 << 4) + 14] = len;\n var i;\n var olda;\n var oldb;\n var oldc;\n var oldd;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}", "function core_md5(x, len) {\n\t\t/* append padding */\n\t\tx[len >> 5] |= 0x80 << len % 32;\n\t\tx[(len + 64 >>> 9 << 4) + 14] = len;\n\t\tvar a = 1732584193;\n\t\tvar b = -271733879;\n\t\tvar c = -1732584194;\n\t\tvar d = 271733878;\n\t\tfor (var i = 0; i < x.length; i += 16) {\n\t\t\tvar olda = a;\n\t\t\tvar oldb = b;\n\t\t\tvar oldc = c;\n\t\t\tvar oldd = d;\n\t\t\ta = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);\n\t\t\td = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n\t\t\tc = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n\t\t\tb = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n\t\t\ta = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n\t\t\td = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n\t\t\tc = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n\t\t\tb = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n\t\t\ta = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n\t\t\td = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n\t\t\tc = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n\t\t\tb = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n\t\t\ta = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n\t\t\td = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n\t\t\tc = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n\t\t\tb = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\t\t\ta = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n\t\t\td = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n\t\t\tc = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n\t\t\tb = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);\n\t\t\ta = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n\t\t\td = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n\t\t\tc = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n\t\t\tb = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n\t\t\ta = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n\t\t\td = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n\t\t\tc = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n\t\t\tb = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n\t\t\ta = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n\t\t\td = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n\t\t\tc = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n\t\t\tb = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\t\t\ta = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n\t\t\td = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n\t\t\tc = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n\t\t\tb = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n\t\t\ta = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n\t\t\td = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n\t\t\tc = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n\t\t\tb = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n\t\t\ta = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n\t\t\td = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);\n\t\t\tc = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n\t\t\tb = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n\t\t\ta = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n\t\t\td = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n\t\t\tc = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n\t\t\tb = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\t\t\ta = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);\n\t\t\td = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n\t\t\tc = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n\t\t\tb = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n\t\t\ta = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n\t\t\td = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n\t\t\tc = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n\t\t\tb = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n\t\t\ta = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n\t\t\td = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n\t\t\tc = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n\t\t\tb = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n\t\t\ta = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n\t\t\td = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n\t\t\tc = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n\t\t\tb = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\t\t\ta = safe_add(a, olda);\n\t\t\tb = safe_add(b, oldb);\n\t\t\tc = safe_add(c, oldc);\n\t\t\td = safe_add(d, oldd);\n\t\t}\n\t\treturn Array(a, b, c, d);\n\t}", "function wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}", "function wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}", "function wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}", "function wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}", "function wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}", "function wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}", "function wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n let a = 1732584193;\n let b = -271733879;\n let c = -1732584194;\n let d = 271733878;\n\n for (let i = 0; i < x.length; i += 16) {\n const olda = a;\n const oldb = b;\n const oldc = c;\n const oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}", "function wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n let a = 1732584193;\n let b = -271733879;\n let c = -1732584194;\n let d = 271733878;\n\n for (let i = 0; i < x.length; i += 16) {\n const olda = a;\n const oldb = b;\n const oldc = c;\n const oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}", "function wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n let a = 1732584193;\n let b = -271733879;\n let c = -1732584194;\n let d = 271733878;\n\n for (let i = 0; i < x.length; i += 16) {\n const olda = a;\n const oldb = b;\n const oldc = c;\n const oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}", "function wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n let a = 1732584193;\n let b = -271733879;\n let c = -1732584194;\n let d = 271733878;\n\n for (let i = 0; i < x.length; i += 16) {\n const olda = a;\n const oldb = b;\n const oldc = c;\n const oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}", "function wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n let a = 1732584193;\n let b = -271733879;\n let c = -1732584194;\n let d = 271733878;\n for (let i = 0; i < x.length; i += 16) {\n const olda = a;\n const oldb = b;\n const oldc = c;\n const oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n return [a, b, c, d];\n}", "function core_md5(x, len) \n{ \n/* append padding */ \nx[len >> 5] |= 0x80 << ((len) % 32); \nx[(((len + 64) >>> 9) << 4) + 14] = len;\n\nvar a = 1732584193; \nvar b = -271733879; \nvar c = -1732584194; \nvar d = 271733878;\n\nfor(var i = 0; i < x.length; i += 16) \n{ \nvar olda = a; \nvar oldb = b; \nvar oldc = c; \nvar oldd = d;\n\na = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); \nd = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); \nc = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); \nb = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); \na = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); \nd = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); \nc = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); \nb = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); \na = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); \nd = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); \nc = md5_ff(c, d, a, b, x[i+10], 17, -42063); \nb = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); \na = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); \nd = md5_ff(d, a, b, c, x[i+13], 12, -40341101); \nc = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); \nb = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\na = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); \nd = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); \nc = md5_gg(c, d, a, b, x[i+11], 14, 643717713); \nb = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); \na = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); \nd = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); \nc = md5_gg(c, d, a, b, x[i+15], 14, -660478335); \nb = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); \na = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); \nd = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); \nc = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); \nb = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); \na = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); \nd = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); \nc = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); \nb = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\na = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); \nd = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); \nc = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); \nb = md5_hh(b, c, d, a, x[i+14], 23, -35309556); \na = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); \nd = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); \nc = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); \nb = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); \na = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); \nd = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); \nc = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); \nb = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); \na = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); \nd = md5_hh(d, a, b, c, x[i+12], 11, -421815835); \nc = md5_hh(c, d, a, b, x[i+15], 16, 530742520); \nb = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\na = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); \nd = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); \nc = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); \nb = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); \na = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); \nd = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); \nc = md5_ii(c, d, a, b, x[i+10], 15, -1051523); \nb = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); \na = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); \nd = md5_ii(d, a, b, c, x[i+15], 10, -30611744); \nc = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); \nb = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); \na = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); \nd = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); \nc = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); \nb = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\na = safe_add(a, olda); \nb = safe_add(b, oldb); \nc = safe_add(c, oldc); \nd = safe_add(d, oldd); \n} \nreturn Array(a, b, c, d);\n\n}", "function core_md5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n \n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n \n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n \n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n \n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n \n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n \n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n \n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n \n}", "function core_md5(x, len) {\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << len % 32;\n\t x[(len + 64 >>> 9 << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for (var i = 0; i < x.length; i += 16) {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);\n\t d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n\t d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n\t d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n\t d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n\t d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n\t c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n\t d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n\t c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n\t d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n\t c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n\t d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n\t c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n\t d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n\t d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n\t d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n\t d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);\n\t d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n\t d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n\t d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n\t d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << ((len) % 32);\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\n\t\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\t\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\t\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\t\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t }\n\t return Array(a, b, c, d);\n\t\n\t}", "function core_md5(x, len) {\n\t\t\t/* append padding */\n\t\t\tx[len >> 5] |= 0x80 << ((len) % 32);\n\t\t\tx[(((len + 64) >>> 9) << 4) + 14] = len;\n\n\t\t\tvar a = 1732584193;\n\t\t\tvar b = -271733879;\n\t\t\tvar c = -1732584194;\n\t\t\tvar d = 271733878;\n\n\t\t\tfor(var i = 0; i < x.length; i += 16) {\n\t\t\t\tvar olda = a;\n\t\t\t\tvar oldb = b;\n\t\t\t\tvar oldc = c;\n\t\t\t\tvar oldd = d;\n\n\t\t\t\ta = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);\n\t\t\t\td = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\n\t\t\t\tc = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\n\t\t\t\tb = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\n\t\t\t\ta = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\n\t\t\t\td = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\n\t\t\t\tc = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\n\t\t\t\tb = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\n\t\t\t\ta = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\n\t\t\t\td = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\n\t\t\t\tc = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\n\t\t\t\tb = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\n\t\t\t\ta = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\n\t\t\t\td = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\n\t\t\t\tc = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\n\t\t\t\tb = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\n\n\t\t\t\ta = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\n\t\t\t\td = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\n\t\t\t\tc = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\n\t\t\t\tb = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);\n\t\t\t\ta = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\n\t\t\t\td = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\n\t\t\t\tc = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\n\t\t\t\tb = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\n\t\t\t\ta = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\n\t\t\t\td = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\n\t\t\t\tc = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\n\t\t\t\tb = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\n\t\t\t\ta = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\n\t\t\t\td = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\n\t\t\t\tc = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\n\t\t\t\tb = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\n\n\t\t\t\ta = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\n\t\t\t\td = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\n\t\t\t\tc = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\n\t\t\t\tb = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\n\t\t\t\ta = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\n\t\t\t\td = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\n\t\t\t\tc = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\n\t\t\t\tb = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\n\t\t\t\ta = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\n\t\t\t\td = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);\n\t\t\t\tc = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\n\t\t\t\tb = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\n\t\t\t\ta = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\n\t\t\t\td = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\n\t\t\t\tc = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\n\t\t\t\tb = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\n\n\t\t\t\ta = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);\n\t\t\t\td = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\n\t\t\t\tc = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\n\t\t\t\tb = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\n\t\t\t\ta = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\n\t\t\t\td = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\n\t\t\t\tc = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\n\t\t\t\tb = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\n\t\t\t\ta = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\n\t\t\t\td = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\n\t\t\t\tc = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\n\t\t\t\tb = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\n\t\t\t\ta = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\n\t\t\t\td = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\n\t\t\t\tc = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\n\t\t\t\tb = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\n\n\t\t\t\ta = safe_add(a, olda);\n\t\t\t\tb = safe_add(b, oldb);\n\t\t\t\tc = safe_add(c, oldc);\n\t\t\t\td = safe_add(d, oldd);\n\t\t\t}\n\t\t\treturn Array(a, b, c, d);\n\t\t}", "function core_md5(x, len) {\r\n /* append padding */\r\n x[len >> 5] |= 0x80 << ((len) % 32);\r\n x[(((len + 64) >>> 9) << 4) + 14] = len;\r\n\r\n var a = 1732584193;\r\n var b = -271733879;\r\n var c = -1732584194;\r\n var d = 271733878;\r\n\r\n for (var i = 0; i < x.length; i += 16) {\r\n var olda = a;\r\n var oldb = b;\r\n var oldc = c;\r\n var oldd = d;\r\n\r\n a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);\r\n d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);\r\n c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);\r\n b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);\r\n a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);\r\n d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);\r\n c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);\r\n b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);\r\n a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);\r\n d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);\r\n c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);\r\n b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);\r\n a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);\r\n d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);\r\n c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);\r\n b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);\r\n\r\n a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);\r\n d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);\r\n c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);\r\n b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);\r\n a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);\r\n d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);\r\n c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);\r\n b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);\r\n a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);\r\n d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);\r\n c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);\r\n b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);\r\n a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);\r\n d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);\r\n c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);\r\n b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);\r\n\r\n a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);\r\n d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);\r\n c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);\r\n b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);\r\n a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);\r\n d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);\r\n c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);\r\n b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);\r\n a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);\r\n d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);\r\n c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);\r\n b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);\r\n a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);\r\n d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);\r\n c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);\r\n b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);\r\n\r\n a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);\r\n d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);\r\n c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);\r\n b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);\r\n a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);\r\n d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);\r\n c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);\r\n b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);\r\n a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);\r\n d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);\r\n c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);\r\n b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);\r\n a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);\r\n d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);\r\n c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);\r\n b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);\r\n\r\n a = safe_add(a, olda);\r\n b = safe_add(b, oldb);\r\n c = safe_add(c, oldc);\r\n d = safe_add(d, oldd);\r\n }\r\n return Array(a, b, c, d);\r\n\r\n }", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}", "function core_md5(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}" ]
[ "0.7908864", "0.7908864", "0.7851151", "0.7851151", "0.78297484", "0.781424", "0.7799697", "0.7797474", "0.77968043", "0.77968043", "0.77955353", "0.7787075", "0.7781164", "0.7781164", "0.77667457", "0.77615637", "0.7760521", "0.7751281", "0.7748616", "0.7743792", "0.7743792", "0.7743792", "0.7743792", "0.7743792", "0.7743792", "0.7743792", "0.77375746", "0.7729931", "0.772481", "0.7709786", "0.77086514", "0.770115", "0.7695157", "0.7678502", "0.767632", "0.7663077", "0.7663077", "0.7663077", "0.7663077", "0.76334345", "0.76247174", "0.7620554", "0.76130843", "0.7558494", "0.75508064", "0.7540283", "0.7533404", "0.7526618", "0.7526618", "0.7526618", "0.7526618", "0.7526618", "0.7526618", "0.749391", "0.749391", "0.749391", "0.749391", "0.7483203", "0.74822277", "0.74802476", "0.74660134", "0.746039", "0.746039", "0.746039", "0.746039", "0.746039", "0.746039", "0.746039", "0.74583393", "0.7453497", "0.74454534", "0.74454534", "0.74454534", "0.74454534", "0.74454534", "0.74454534", "0.74454534", "0.74454534", "0.74454534", "0.74454534", "0.74454534", "0.74454534", "0.74454534", "0.74454534" ]
0.7489554
70
These functions implement the four basic operations the algorithm uses.
function md5_cmn (q, a, b, x, s, t) { return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BasicOp(a, b) {\n var sum = a + b;\n console.log(\"sum\" + sum);\n var sub = a - b;\n console.log(\"sub\" + sub);\n var multi = a * b;\n console.log(\"multiplication\" + multi);\n var div = a / b;\n console.log(\"devision\" + sub);\n}", "function arithmaticOpration(){\n\taddition();\n\tSubstration();\n\tMultiplication();\n\tDivision();\n\tModulus();\n\tIncrementPost();\n\tDecrementPre();\n\tPostPre();\n\n}", "function common_operation(value1,value2){\r\n var x = name_3.id[0];\r\n var y = name_3.id[1];\r\n x = parseInt(x);\r\n y = parseInt(y);\r\n var z = castle_elephent_4(x,y,turn);\r\n if (z == 5){\r\n return assign(value1,value2,x,y,turn);\r\n }\r\n else{\r\n z = castle_elephent_3(x,y,turn);\r\n if (z == 5){\r\n return assign(value1,value2,x,y,turn);\r\n } \r\n else{\r\n z = castle_elephent_2(x,y,turn);\r\n if (z == 5){\r\n return assign(value1,value2,x,y,turn);\r\n } \r\n else{\r\n z = castle_elephent_1(x,y,turn);\r\n if (z == 5){\r\n return assign(value1,value2,x,y,turn);\r\n } \r\n else{\r\n \r\n } \r\n } \r\n } \r\n }\r\n}", "function order_of_operation(){\n for(var i = 0; i<key_input_arr.length; i++){\n if(key_input_arr[i] === '*' || key_input_arr[i] === '/'){\n if(key_input_arr[i] === '*' ){\n var new_result = key_input_arr[i-1] * key_input_arr[i+1];\n key_input_arr.splice(i-1,3,new_result);\n i=0;\n }\n if(key_input_arr[i] === '/' ){\n var new_result = key_input_arr[i-1] / key_input_arr[i+1];\n key_input_arr.splice(i-1,3,new_result);\n i=0;\n }\n }\n }\n for(var j = 0; j<key_input_arr.length; j++){\n if(key_input_arr[j] === '+' || key_input_arr[j] === '-'){\n if(key_input_arr[j] === '+' ){\n var new_result = key_input_arr[j-1] + key_input_arr[j+1];\n key_input_arr.splice(j-1,3,new_result);\n j=0;\n }\n if(key_input_arr[j] === '-' ){\n var new_result = key_input_arr[j-1] - key_input_arr[j+1];\n key_input_arr.splice(j-1,3,new_result);\n j=0;\n }\n }\n }\n return key_input_arr[0];\n}", "function alg(){\nalert(\"Algebra is a branch of mathematics in which letters of the alphabet represent numbers. Algebraic expressions are a mixture of letters and numbers eg 3x+4y is an algebraic expression. More examples are 5z, 7g-4t, 2r(d-3) etc.\");\nalert(\"An algebraic expression is made up of terms eg 3x+5y is made up of the terms 3x and 5y. The terms are joined by either the plus(+) or minus(-) signs. In a term like 3x this is the same as 3×x or 3(x).In other words the number and letter are multiplying each other.In whatever operation you do the term always goes with its sign.In other words in the term 3x+5y the + sign goes with the term 5y.\");\nalert(\"Terms can either be like or unlike terms. Terms of the same letter are called like terms eg 2a and -7a are like terms. Terms of different letters are called unlike terms eg 8y and 7p are unlike terms.Always remember that LIKE TERMS COMBINE AND UNLIKE TERMS DO NOT COMBINE.In other words you can add or subtract like terms but you cannot do so with unlike terms.\");\nalert(\"Expressions in which the highest power is 1 are called linear expressions eg 3x+y, 5y+3x+y-7x+3 are linear terms.Expressions in which the highest power is two are called quadratic expressions eg 4x²-3, a²(a+1)-a²(a-1) are quadratic expressions.\");\nalert(\"Lets do some examples on like and unlike terms.\");\nalert(\"Simplify 5y+3x+y-7x+3.First rearrange the expression to group like terms like this: 5y+y+3x-7x+3.Now combine like terms like this:6y-4x+3.There are no more like terms hence we stop here.\");\nalert(\"7-(x-2y)+3(5x-2).First multiply each term in the bracket by the term outside the bracket(- is the same as -1) ie multiply bracket (x-2y) by -1 and (5x-2) by 3 hence 7-x+2y+15x-6.Now group like terms like this 7-6-x+15x+2y and combining like terms 1+14x+2y(REMEMBER A TERM GOES WITH ITS SIGN)\");\nalert(\"Simplify 5x-(3-x+3y)-7(5-y). First 5x-3+x-3y-35+7y. Now 5x+x-3y+7y-3-35 and this gives 6x+4y-38.\");\nalert(\"Sometimes you need to multiply a bracket by a bracket eg (x+1)(x-1). To do so break up the first bracket into two ie into x and +1.Now multiply the second bracket by each term from the first bracket ie x(x-1)+1(x-1)=x²-x+x-1=x²-1.\");\nalert(\"Lets do more examples on multiplying a bracket by a bracket.\");\nalert(\"(x+3)(x-5)=x(x-5)+3(x-5)=x²-5x+3x-15=x²-2x-15.\");\nalert(\"(3x-2)(3x+2)=3x(3x+2)-2(3x+2)=9x²+6x-6x-4=9x²-4.\");\nalert(\"(2y+3)²=(2y+3)(2y+3)=2y(2y+3)+3(2y+3)=4y²+6y+6y+9=4y²+12y+9.\");\n}", "function evaluate(indexStart, indexEnd, operators, operands) {\r\n\r\n for (var index = indexStart; index < indexEnd; index++) {\r\n\r\n var indexFirstOperand = index\r\n var indexNextOperand = index + 1\r\n var indexNextOperator = index\r\n\r\n if (operators[indexNextOperator] == null) {\r\n for (var indexNext = indexNextOperator + 1; indexNext < operators.length; indexNext++) {\r\n if (operators[indexNext] != null) {\r\n indexNextOperator = indexNext\r\n indexFirstOperand = indexNext\r\n indexNextOperand = indexNext + 1\r\n index = indexNext - 1\r\n break\r\n }\r\n }\r\n }\r\n\r\n if (operands[indexNextOperand] == null) {\r\n for (var indexNext = indexNextOperand + 1; indexNext < operands.length; indexNext++) {\r\n if (operands[indexNext] != null) {\r\n indexNextOperand = indexNext\r\n index = indexNext - 1\r\n break\r\n }\r\n }\r\n }\r\n\r\n // MULTIPLICATION \r\n if (operators[indexNextOperator] == '*') {\r\n result = operands[indexFirstOperand] * operands[indexNextOperand]\r\n\r\n operands[indexNextOperand] = result\r\n operands[indexFirstOperand] = null\r\n operators[indexNextOperator] = null\r\n finalResult = result\r\n result = 0\r\n\r\n console.log(operands)\r\n console.log(operators)\r\n }\r\n // DIVISION\r\n else if (operators[indexNextOperator] == '/') {\r\n result = operands[indexFirstOperand] / operands[indexNextOperand]\r\n\r\n operands[indexNextOperand] = result\r\n operands[indexFirstOperand] = null\r\n operators[indexNextOperator] = null\r\n finalResult = result\r\n result = 0\r\n\r\n console.log(operands)\r\n console.log(operators)\r\n }\r\n }\r\n\r\n // ADDITION and SUBSTRACTION\r\n for (var index = indexStart; index < indexEnd; index++) {\r\n\r\n var indexFirstOperand = index\r\n var indexNextOperand = index + 1\r\n var indexNextOperator = index\r\n\r\n if (operators[indexNextOperator] == null) {\r\n for (var indexNext = indexNextOperator + 1; indexNext < operators.length; indexNext++) {\r\n if (operators[indexNext] != null) {\r\n indexNextOperator = indexNext\r\n indexFirstOperand = indexNext\r\n indexNextOperand = indexNext + 1\r\n index = indexNext - 1\r\n break\r\n }\r\n }\r\n }\r\n\r\n if (operands[indexNextOperand] == null) {\r\n for (var indexNext = indexNextOperand + 1; indexNext < operands.length; indexNext++) {\r\n if (operands[indexNext] != null) {\r\n indexNextOperand = indexNext\r\n index = indexNext - 1\r\n break\r\n }\r\n }\r\n }\r\n\r\n // ADDITION \r\n if (operators[indexNextOperator] == '+') {\r\n result = operands[indexFirstOperand] + operands[indexNextOperand]\r\n\r\n operands[indexNextOperand] = result\r\n operands[indexFirstOperand] = null\r\n operators[indexNextOperator] = null\r\n finalResult = result\r\n result = 0\r\n\r\n console.log(operands)\r\n console.log(operators)\r\n }\r\n // SUBSTRACTION\r\n else if (operators[indexNextOperator] == '-') {\r\n result = operands[indexFirstOperand] - operands[indexNextOperand]\r\n\r\n operands[indexNextOperand] = result\r\n operands[indexFirstOperand] = null\r\n operators[indexNextOperator] = null\r\n finalResult = result\r\n result = 0\r\n\r\n console.log(operands)\r\n console.log(operators)\r\n }\r\n }\r\n return finalResult\r\n}", "function operate(operator,a,b) {\n\n if (operator == \"+\"){\n let results = addNums(a,b);\n return results;\n } else if (operator == \"-\"){\n let results = subtractNums(a,b);\n return results;\n } else if (operator == \"*\"){\n let results = multiplyNums(a,b);\n return results;\n } else if (operator == \"/\"){\n let results = divideNums(a,b);\n return results;\n }\n\n \n\n}", "function v19(v20,v21,v22) {\n for (let v25 = 0; v25 < 100; v25 = v25 + 3) {\n let v26 = 0;\n function v27(v28,v29,v30,v31,v32) {\n for (let v35 = v26; v35 < 100; v35 = v35 + 1100861557) {\n }\n }\n for (let v39 = 0; v39 < 100; v39 = v39 + 1) {\n const v43 = [NaN,-2987865916,\"flags\"];\n // v43 = .object(ofGroup: Array, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"reduce\", \"map\", \"forEach\", \"find\", \"keys\", \"indexOf\", \"copyWithin\", \"flatMap\", \"join\", \"reverse\", \"reduceRight\", \"unshift\", \"entries\", \"slice\", \"pop\", \"filter\", \"some\", \"lastIndexOf\", \"fill\", \"toLocaleString\", \"concat\", \"every\", \"values\", \"flat\", \"findIndex\", \"shift\", \"push\", \"sort\", \"splice\", \"includes\", \"toString\"])\n const v44 = v43.concat();\n // v44 = .object(ofGroup: Array, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"reduce\", \"map\", \"forEach\", \"find\", \"keys\", \"indexOf\", \"copyWithin\", \"flatMap\", \"join\", \"reverse\", \"reduceRight\", \"unshift\", \"entries\", \"slice\", \"pop\", \"filter\", \"some\", \"lastIndexOf\", \"fill\", \"toLocaleString\", \"concat\", \"every\", \"values\", \"flat\", \"findIndex\", \"shift\", \"push\", \"sort\", \"splice\", \"includes\", \"toString\"])\n const v45 = v27(v26,v27,v27,v26,v27);\n // v45 = .unknown\n }\n }\n}", "function basicOp(operation, value1, value2) {\n if (operation === \"+\") {\n return value1 + value2;\n } else if (operation === \"-\") {\n return value1 - value2;\n } else if (operation === \"*\") {\n return value1 * value2;\n } else if (operation === \"/\") {\n return value1 / value2;\n } else {\n return console.log(\"Wrong operation\");\n }\n}", "function operate(a, b)\n{\nswitch(operator){\n case \"add\":\n return add(a, b);\n break;\n \n case \"-\":\n return subtract(a, b);\n break;\n \n case \"*\":\n return multiply(a, b);\n break;\n \n case \"/\":\n return divied(a, b);\n break;\n}\n}", "function cornerAlgorithm(){\n\t\t\t\tR(); \n\t\t\t\tUPrime(); \n\t\t\t\tRPrime();\n\t\t\t\tUPrime();\n\t\t\t\tR();\n\t\t\t\tU();\n\t\t\t\tRPrime();\n\t\t\t\tFPrime();\n\t\t\t\tR();\n\t\t\t\tU();\n\t\t\t\tRPrime();\n\t\t\t\tUPrime();\n\t\t\t\tRPrime();\n\t\t\t\tF();\n\t\t\t\tR();\n\n\t\t\t}", "function compute(arr) // does not check for operation priorities\n{\n let tempArr = arr.map(x=>x);\n if (tempArr.length>2){\n let rslt = 'argtttt';\n if (tempArr[1]==='+') {\n rslt = add(tempArr[0],tempArr[2]);\n }\n else if (tempArr[1]==='-') {\n rslt = substract(tempArr[0],tempArr[2]);\n }\n tempArr.splice(0,3,rslt);\n return compute(tempArr);\n }\n else return tempArr[0];\n}", "function alg1(){\nalert(\"Sometimes we have to find the HCF and LCM of algebraic expressions.This depends on our ability to identify factors correctly\");\nalert(\"For example lets find the HCF and LCM of a²b,a³b² and a²b³.Now a and b are the common factors in the three terms.Use a and b with the lowest powers for HCF and those with the highest powers for LCM.In this case HCF=a²b(pick out the lowest power of each common factor.LCM=a³b³(pick out the highest power of each factor.)\");\nalert(\"Lets do more examples on HCF and LCM of algebraic expressions\");\nalert(\"Find the HCF and LCM of 3x+3,2x+2,x²-1.First factorise the terms ie 3x+3=3(x+1),2x+2=2(x+1) and x²-1=(x-1)(x+1). Looking at the three terms (x+1) is common hence HCF=(x+1).Now for the LCM take each factor where its most abundant hence LCM=2×3(x-1)(x+1)**Note-no need to expand brackets.\");\nalert(\"Find the HCF and LCM of x²-9,x²+6x+9 and 2x²+7x+3.First factorise the above quadratic expressions ie x²-9=(x+3)(x-3),x²+6x+9=(x+3)(x+3) and 2x²+7x+3=(2x+1)(x+3).Looking at the above terms (x+3) is common hence HCF=(x+3).For LCM take each factor where its most common hence LCM=(x+3)²(x-3)(2x+1).\");\n}", "function ex_7_R(a, b){\n s = 0; k = a;\n for( i = 1; i<b; i++){\n s = s + ex_5_R(a,k);\n k = ex_5_R(a,k);\n}\nreturn s;\n}", "function basicOp(operation, value1, value2)\n{\n // Code\n switch(operation) {\n case '+':\n return value1 + value2;\n case '-':\n return value1 - value2;\n case '*':\n return value1 * value2;\n case '/':\n return value1 / value2;\n default:\n break;\n }\n}", "compute(operation) {\n const modes = this.getMode()\n const mode_1 = this.getDigitFromRight(modes, 1)\n const mode_2 = this.getDigitFromRight(modes, 2)\n const mode_3 = this.getDigitFromRight(modes, 3)\n const param_1 = this.program[this.PC+1]\n const param_2 = this.program[this.PC+2]\n const param_3 = this.program[this.PC+3]\n\n const value_1 = this.getValue(mode_1, param_1)\n const value_2 = this.getValue(mode_2, param_2)\n const ans_index = this.getIndex(param_3, mode_3)\n switch (operation) {\n case 1:\n this.program[ans_index] = value_1 + value_2\n break;\n case 2:\n this.program[ans_index] = value_1 * value_2\n break;\n case 7:\n this.program[ans_index] = (value_1 < value_2) ? 1 : 0\n break;\n case 8:\n this.program[ans_index] = (value_1 === value_2) ? 1 : 0\n break;\n default:\n return;\n }\n this.PC += 4\n }", "function o10() {\n try {\no1.o2(\"x + y = \" + o5.add());\n}catch(e){}\n try {\no1.o2(\"x - y = \" + o5.o9());\n}catch(e){}\n}", "function calculation () {\n omega1 = Math.sqrt(G/L); // 1. Eigen-Kreisfrequenz (parallele Schwingung)\n omega2 = Math.sqrt(G/L+2*D/M); // 2. Eigen-Kreisfrequenz (antiparallele Schwingung)\n a1 = (alpha01+alpha02)/2; // Hilfsgröße \n a2 = (alpha01-alpha02)/2; // Hilfsgröße\n }", "function calcAll() {\n // Iteration 1.2\n\n}", "function otrosops (a){\n console.log(\"Veamos que pasa con ++a: \", ++a) // hace a+1 e imprime a+1\n console.log(\"Veamos que pasa con ++a: \", --a) // toma (a+1) le resta 1 e imprime a\n console.log(\"Esto es el inverso add. de a: \", -a)\n console.log(\"le sumare a a, un true: \", a+true)\n console.log(\"esto es a^a: \", a**a)\n\n}", "function Op(a,b){this.i=[];this.D=a;this.L=b||null;this.g=this.a=!1;this.c=void 0;this.s=this.w=this.j=!1;this.h=0;this.b=null;this.l=0}", "function runAllAlgos(){\n runFifo();\n runLru();\n runRandom();\n runOptimal();\n runNfu();\n runMru();\n runSecondChance();\n runClock();\n runGClock();\n runAging();\n // TODO add all other algorithms\n}", "function basicOp(operation, value1, value2)\n{\n if (operation == '+') {\n return value1 + value2\n } else if (operation == '-') {\n return value1 - value2\n } else if (operation == '*') {\n return value1 * value2\n } else if (operation == '/') {\n return value1 / value2\n }\n}", "function basicOp(operation, value1, value2) {\n switch (operation) {\n case '+':\n return value1 + value2;\n break;\n case '-':\n return value1 - value2;\n break;\n case '*':\n return value1 * value2;\n break;\n case '/':\n return value1 / value2;\n break;\n default:\n break;\n }\n}", "function basicOp(operation, value1, value2) {\n\tswitch (operation) {\n\t\tcase '+':\n\t\t\treturn value1 + value2;\n\t\t\tbreak;\n\t\tcase '-':\n\t\t\treturn value1 - value2;\n\t\t\tbreak;\n\t\tcase '/':\n\t\t\treturn value1 / value2;\n\t\t\tbreak;\n\t\tcase '*':\n\t\t\treturn value1 * value2;\n\t}\n}", "function performCalc(numArr, operArr) {\n\n for (var i = 0; i < numArr.length; i++) {\n numArr[i] = parseFloat(numArr[i]);\n }\n\n while (operArr.length > 0) {\n for (var i = 0; i < operArr.length; i++) {\n if (operArr[i] == \"/\") {\n tempAns = numArr[i] / numArr[i + 1];\n numArr.splice(i,2, tempAns);\n operArr.splice(i,1);\n i--;\n }\n }\n for (var i = 0; i < operArr.length; i++) {\n if (operArr[i] == \"x\") {\n tempAns = numArr[i] * numArr[i + 1];\n numArr.splice(i,2, tempAns);\n operArr.splice(i,1);\n i--;\n }\n }\n for (var i = 0; i < operArr.length; i++) {\n if (operArr[i] == \"+\") {\n tempAns = numArr[i] + numArr[i + 1];\n numArr.splice(i,2, tempAns);\n operArr.splice(i,1);\n i--;\n }\n }\n for (var i = 0; i < operArr.length; i++) {\n if (operArr[i] == \"-\") {\n tempAns = numArr[i] - numArr[i + 1];\n numArr.splice(i,2, tempAns);\n operArr.splice(i,1);\n i--;\n }\n }\n }\n\n numArr[0] = Math.round(100 * numArr[0]) / 100;\n\n return numArr[0];\n\n}", "function basicInstructionFormats(op) {//op = operation for explanple add,sub etc.\n var switcher;//returns the type of instruction\n if (op.equals(\"ADD\") || op.equals(\"SUB\") || op.equals(\"MULT\") || op.equals(\"DIV\") || op.equals(\"AND\")\n || op.equals(\"OR\") || op.equals(\"XOR\") || op.equals(\"SLL\") || op.equals(\"SRL\") || op.equals(\"SLT\")\n || op.equals(\"SLE\") || op.equals(\"SGT\") || op.equals(\"SGE\") || op.equals(\"SEQ\"))\n return switcher = 0; // R-type instructions\n else if (op.equals(\"ADDI\") || op.equals(\"ANDI\") || op.equals(\"ORI\") || op.equals(\"XORI\")\n || op.equals(\"SUBI\") || op.equals(\"SLLI\") || op.equals(\"SRLI\"))\n return switcher = 1; // I-type instructions\n else if (op.equals(\"LW\") || op.equals(\"SW\"))\n return switcher = 2; // load/store word instructions\n else if (op.equals(\"BEQ\") || op.equals(\"BNE\"))\n return switcher = 3; // branch instructions\n else alert(\"INSTRUCTION NOT FOUND :(\")\n }", "static approxEqRots(ra, rb) {\nvar aeq, i;\n//------–-----\naeq = (function() {\nvar j, results;\nresults = [];\nfor (i = j = 0; j < 4; i = ++j) {\nresults.push(this.approxEq(ra[i], rb[i]));\n}\nreturn results;\n}).call(this);\nreturn aeq[0] && aeq[1] && aeq[2] && aeq[3];\n}", "function calculate(input1,input2,inputN)\r\n{\r\n\t\r\n\treturn output;\r\n}", "function makeOpComposition () {\n \n var ops = []; \n var domain = makeEmptyMap(); \n var gen = 0; \n \n var func = function (s) {\n return function (i) {\n return evaluate(domain.has(i) ? (ops.length-1) - (gen-domain.get(i)) : -1, i)(i);\n }\n \n // determine selection state of i but only access the elements \n // of ops (staring from ind) that have i in their domain\n function evaluate(ind, i) {\n if (ind < 0) return s; // i defined in the base selection mapping s\n else {\n var op = ops[ind];\n return op(function (j) { return evaluate(ind - op.domain.get(i), j)(i); });\n // the call to evaluate is wrapped to a lambda to make the call lazy.\n // op will only call the lambda if op.f.constant is false\n }\n }\n }\n \n func.domain = domain;\n \n // member functions of func\n func.push = function (op) {\n ops.push(op);\n ++gen\n op.domain.forEach(function(_, i) {\n op.domain.set(i, domain.has(i) ? gen - domain.get(i) : ops.length);\n domain.set(i, gen); \n });\n }\n func.pop = function () {\n var n = ops.length;\n var op = ops.pop();\n --gen;\n // domain updated for those elements that are in op.domain\n op.domain.forEach(function (_, i) {\n if (op.domain.get(i) >= n) domain.delete(i); // no op defines i\n else domain.set(i, domain.get(i) - op.domain.get(i)); \n });\n return op;\n }\n func.top = function () { return ops[ops.length - 1]; }\n func.top2 = function () { return ops[ops.length - 2]; }\n func.shift = function (bmap) {\n var op = ops.shift();\n op.domain.forEach(function(_, i) {\n if (domain.get(i) - gen === ops.length) { domain.delete(i); }\n // if lastOp the only op that defines i, remove i from domain\n });\n return op;\n }\n func.size = function () { return ops.length; }\n func.removeIndex = function (i) {\n if (!domain.has(i)) return;\n \n // find the first op in ops that defines i\n var j = (ops.length - 1) - (gen - domain.get(i));\n \n while (j >= 0) {\n var d = ops[j].domain.get(i);\n ops[j].domain.delete(i);\n j -= d;\n }\n domain.delete(i);\n }\n \n return func;\n }", "function operate(nums) {\n\t\tvar num1 = nums[0];\n\t\tvar num2 = nums[1];\n\t\tvar num3 = nums[2];\n\t\tvar num4 = nums[3];\n\n\t\tfor(var i=0; i < op_keys.length; i++) {\n\t\t\tfor(var j=0; j < op_keys.length; j++) {\n\t\t\t\tfor(var k=0; k < op_keys.length; k++) {\n\t\t\t\t\tvar operation = \"(\" + \"(\" + num1 + op_keys[i] + num2 + \")\" + op_keys[j] + num3 + \")\" + op_keys[k] + num4;\n\t\t\t\t\tvar result = OPS[op_keys[i]](num1, num2);\n\t\t\t\t\tvar result2 = OPS[op_keys[j]](result, num3);\n\t\t\t\t\tvar result3 = OPS[op_keys[k]](result2, num4);\n\t\t\t\t\tvar display = operation + \" = \" + result3;\n\n\t\t\t\t\tif (result3 === 24) { \n\t\t\t\t\t\t$listofsolutions.append(\"<li class='sol'>\" + display + \"</li>\"); \n\t\t\t\t\t}\n\n\t\t\t\t}// k\n\t\t\t}// j\n\t\t}// i\n\n\t}// operate", "function a(num1, num2) { // we have this predictable functioin\n // thats minimized the bugs in the code\n return num1 + num2\n}", "function extractNumOpt(){\r\nn=arrayNumberOpt.length;\r\n//\r\nvar num1=0;//declared here\r\nvar num2=0;//declared here to be 0 at first\r\n\r\n//\r\nfor(i=0;i<n;i++){///iterating through each element in array\r\n//\r\n//\r\n//\r\n //verifying addition\r\n if(arrayNumberOpt[i]===\"+\"){//found operator\r\n var plusIndex=i;//storing operator index value in that array\r\n for(j=0;j<i;j++){//extracting first no. i.e before operator\r\n num1=(num1*10)+Number(arrayNumberOpt[j]);//finding num 1 before operator\r\n }\r\n j=i+1;\r\n for(j;j<n;j++){//extracting 2nd no. i.e after operator\r\n num2=(num2*10)+Number(arrayNumberOpt[j]);//finding num 2 after operator\r\n }\r\n //calling to get final answers\r\n add(num1,num2);\r\n\r\n }\r\n //verifying subtraction\r\n else if (arrayNumberOpt[i]===\"-\") {\r\n var minusIndex=i;\r\n for(j=0;j<i;j++){\r\n num1=(num1*10)+Number(arrayNumberOpt[j]);\r\n }\r\n j=i+1;\r\n for(j;j<n;j++){\r\n num2=(num2*10)+Number(arrayNumberOpt[j]);\r\n }\r\n sub(num1,num2);\r\n }\r\n\r\n //verifying multiplication\r\n else if(arrayNumberOpt[i]===\"*\"){\r\n var mulIndex=i;\r\n for(j=0;j<i;j++){\r\n num1=(num1*10)+Number(arrayNumberOpt[j]);\r\n }\r\n j=i+1;\r\n for(j;j<n;j++){\r\n num2=(num2*10)+Number(arrayNumberOpt[j]);\r\n }\r\n mul(num1,num2);\r\n }\r\n\r\n //verifying division\r\n else if(arrayNumberOpt[i]===\"/\"){\r\n var divIndex=i;\r\n for(j=0;j<i;j++){\r\n num1=(num1*10)+Number(arrayNumberOpt[j]);\r\n }\r\n j=i+1;\r\n for(j;j<n;j++){\r\n num2=(num2*10)+Number(arrayNumberOpt[j]);\r\n }\r\n div(num1,num2);\r\n }\r\n\r\n //verifying modulo\r\n else if(arrayNumberOpt[i]===\"%\"){\r\n var modIndex=i;\r\n for(j=0;j<i;j++){\r\n num1=(num1*10)+Number(arrayNumberOpt[j]);\r\n }\r\n j=i+1;\r\n for(j;j<n;j++){\r\n num2=(num2*10)+Number(arrayNumberOpt[j]);\r\n }\r\n mod(num1,num2);\r\n }\r\n else{\r\n }\r\n}\r\n}", "function R(e, t, n, r, o, i, a, s) {\n for (var u, l, c, p, d, f, h, m, g = [], v = [ [], [] ], y = 0; y < 2; ++y) if (0 == y ? (l = 6 * e - 12 * n + 6 * o, \n u = -3 * e + 9 * n - 9 * o + 3 * a, c = 3 * n - 3 * e) : (l = 6 * t - 12 * r + 6 * i, \n u = -3 * t + 9 * r - 9 * i + 3 * s, c = 3 * r - 3 * t), $(u) < 1e-12) {\n if ($(l) < 1e-12) continue;\n 0 < (p = -c / l) && p < 1 && g.push(p);\n } else h = l * l - 4 * c * u, m = q.sqrt(h), h < 0 || (d = (-l + m) / (2 * u), 0 < d && d < 1 && g.push(d), \n 0 < (f = (-l - m) / (2 * u)) && f < 1 && g.push(f));\n for (var b, x = g.length, C = x; x--; ) p = g[x], b = 1 - p, v[0][x] = b * b * b * e + 3 * b * b * p * n + 3 * b * p * p * o + p * p * p * a, \n v[1][x] = b * b * b * t + 3 * b * b * p * r + 3 * b * p * p * i + p * p * p * s;\n return v[0][C] = e, v[1][C] = t, v[0][C + 1] = a, v[1][C + 1] = s, v[0].length = v[1].length = C + 2, \n {\n min: {\n x: W.apply(0, v[0]),\n y: W.apply(0, v[1])\n },\n max: {\n x: V.apply(0, v[0]),\n y: V.apply(0, v[1])\n }\n };\n }", "function calc(value) {\n var operators = {\n '+': function(a, b) { return a + b },\n '-': function(a, b) { return a - b },\n '/': function(a, b) { return a / b },\n '*': function(a, b) { return a * b },\n };\n\n\n\n\n\n var buffer = Array.from(value);\n var num = [];\n var op = [];\n var resultTemp = 0;\n\n for (var i = 0; i < buffer.length; i++) {\n if(i === 0 || i%2===0) {\n num.push(buffer[i]);\n } else if (i===1 || i%2===1){\n op.push(buffer[i]);\n }\n }\n\n var base = num[0];\n var x = 0;\n\n for (var i = 0; i < op.length; i++) {\n if (op[i] == '*' || op[i] == '/'){\n resultTemp = operators[op[i]](num[i], num[i+1]);\n num.splice(i, 2, resultTemp);\n op.splice(i,1);\n console.log('num: ' + num + ' op: ' + op);\n }\n }\n\n var result = num.reduce(function (a,b){\n var temp = operators[op[x]](a,b);\n x++;\n return temp;\n });\n\n return Math.round( result * 100000000) / 100000000;\n}", "function execute(operation) {\n var operator = []\n var num = []\n\n var r = 0\n for (var i = 0; i < operation.length; i++) {\n if(i >= 3 && i%2 == 0){\n if(!isNaN(parseInt(operation[i]))){\n r = calculate(r, operation[i-1], parseInt(operation[i]))\n }\n }else if(i < 3){\n if (!isNaN(parseInt(operation[i]))) {\n num.push(parseInt(operation[i]))\n }else{\n operator.push(operation[i])\n }\n r = calculate(num[0], operator[0], num[1])\n }\n else{\n \n }\n }\n return r\n}", "function operate(operator, x, y) {\n if (operator === '+'){\n return add(x,y);\n }\n else if (operator === '-') {\n return subtract(x,y);\n }\n else if (operator === '*') {\n return multiply(x,y);\n }\n else {\n return divide(x,y);\n }\n}", "function calT(a, b, op) {\n\n var result;\n \n if (op == \"+\") {\n \n result = a + b;\n \n alert(result);\n }\n \n else if (op == \"-\") {\n \n result = a - b;\n \n alert(result);\n \n }\n \n else if(op == \"*\") {\n \n result = a * b;\n \n alert(result);\n }\n \n else if(op == \"/\"){\n \n result = a / b;\n \n alert(result);\n }\n \n \n }", "function calculate(x, op, y) {\n switch (op){\n case \"+\":\n return add(x,y)\n break \n case \"-\":\n return substract(x,y)\n break\n case \"*\":\n return multiply(x,y)\n break\n case \"/\":\n return divide(x,y)\n break\n default:\n null\n }\n}", "static operation(a, b, data, n, f = \"0\") {\n // Ensures that the current screen is NOT empty\n if (curr_o != \"\") {\n // Performs the operation through switch function\n switch (data) {\n case \"+\":\n res = b + a;\n check = 1;\n break;\n case \"x\":\n res = b * a;\n check = 1;\n break;\n case \"/\":\n res = b / a;\n check = 1;\n break;\n case \"-\":\n res = b - a;\n check = 1;\n break;\n case \"%\":\n res = (b * a) / 100;\n check = 1;\n break;\n case \"^\":\n res = Math.pow(b, a);\n check = 1;\n }\n }\n // If this function was called from \"result\" target, display the final result on the current screen\n if (f === \"1\") {\n prev_o = res.toString();\n curr_o = prev_o;\n prev_o = \"\";\n Calc.dispprev(prev_o);\n Calc.dispcurr(curr_o);\n }\n // If not then retain the current result on the previous screen followed by any new operator\n else {\n // Ensures that some operation is performed successfully\n if (check === 1) {\n prev_o = res.toString();\n check = 0;\n }\n // Calls this function to append the new operator on previous screen\n Calc.appendp(n);\n Calc.dispprev(prev_o);\n // Makes the current screen empty\n curr_o = \"\";\n Calc.dispcurr(curr_o);\n // Asigns the value of oppr to none\n oppr = \"\";\n }\n return;\n }", "function special_cases() {\n //Inserts a zero into index 1 of equation array if the first input is an operation\n if (is_operator(equation_array[0])) {\n equation_array.unshift(\"0\");\n }\n ;\n var store_i = [];\n for (var i = 0; i < equation_array.length; i++) {\n //Checks for a divid by zero case\n if (equation_array[i] == \"/\" && equation_array[i + 1] == 0) {\n display_val = \"Cannot Divid By Zero!\"\n divid_by_zero = true;\n }\n //Checks for a percentage and inserts 100 to divid with\n if (equation_array[i] == \"%\") {\n equation_array.splice(i + 1, 0, \"100\");\n }\n\n }\n ;\n\n //Checks if an equation ends with an operation, if true duplicates last input\n if (is_operator(equation_array[equation_array.length - 1])) {\n equation_array.push(equation_array[equation_array.length - 2]);\n }\n ;\n\n\n}", "function add4(a, b) {\r\n return (a + b);\r\n}", "function coreMD5(x) \n{ \n var a = 1732584193 \n var b = -271733879 \n var c = -1732584194 \n var d = 271733878 \n \n for(var i = 0; i < x.length; i += 16) \n { \n var olda = a \n var oldb = b \n var oldc = c \n var oldd = d \n \n a = ff(a, b, c, d, x[i+ 0], 7 , -680876936) \n d = ff(d, a, b, c, x[i+ 1], 12, -389564586) \n c = ff(c, d, a, b, x[i+ 2], 17, 606105819) \n b = ff(b, c, d, a, x[i+ 3], 22, -1044525330) \n a = ff(a, b, c, d, x[i+ 4], 7 , -176418897) \n d = ff(d, a, b, c, x[i+ 5], 12, 1200080426) \n c = ff(c, d, a, b, x[i+ 6], 17, -1473231341) \n b = ff(b, c, d, a, x[i+ 7], 22, -45705983) \n a = ff(a, b, c, d, x[i+ 8], 7 , 1770035416) \n d = ff(d, a, b, c, x[i+ 9], 12, -1958414417) \n c = ff(c, d, a, b, x[i+10], 17, -42063) \n b = ff(b, c, d, a, x[i+11], 22, -1990404162) \n a = ff(a, b, c, d, x[i+12], 7 , 1804603682) \n d = ff(d, a, b, c, x[i+13], 12, -40341101) \n c = ff(c, d, a, b, x[i+14], 17, -1502002290) \n b = ff(b, c, d, a, x[i+15], 22, 1236535329) \n \n a = gg(a, b, c, d, x[i+ 1], 5 , -165796510) \n d = gg(d, a, b, c, x[i+ 6], 9 , -1069501632) \n c = gg(c, d, a, b, x[i+11], 14, 643717713) \n b = gg(b, c, d, a, x[i+ 0], 20, -373897302) \n a = gg(a, b, c, d, x[i+ 5], 5 , -701558691) \n d = gg(d, a, b, c, x[i+10], 9 , 38016083) \n c = gg(c, d, a, b, x[i+15], 14, -660478335) \n b = gg(b, c, d, a, x[i+ 4], 20, -405537848) \n a = gg(a, b, c, d, x[i+ 9], 5 , 568446438) \n d = gg(d, a, b, c, x[i+14], 9 , -1019803690) \n c = gg(c, d, a, b, x[i+ 3], 14, -187363961) \n b = gg(b, c, d, a, x[i+ 8], 20, 1163531501) \n a = gg(a, b, c, d, x[i+13], 5 , -1444681467) \n d = gg(d, a, b, c, x[i+ 2], 9 , -51403784) \n c = gg(c, d, a, b, x[i+ 7], 14, 1735328473) \n b = gg(b, c, d, a, x[i+12], 20, -1926607734) \n \n a = hh(a, b, c, d, x[i+ 5], 4 , -378558) \n d = hh(d, a, b, c, x[i+ 8], 11, -2022574463) \n c = hh(c, d, a, b, x[i+11], 16, 1839030562) \n b = hh(b, c, d, a, x[i+14], 23, -35309556) \n a = hh(a, b, c, d, x[i+ 1], 4 , -1530992060) \n d = hh(d, a, b, c, x[i+ 4], 11, 1272893353) \n c = hh(c, d, a, b, x[i+ 7], 16, -155497632) \n b = hh(b, c, d, a, x[i+10], 23, -1094730640) \n a = hh(a, b, c, d, x[i+13], 4 , 681279174) \n d = hh(d, a, b, c, x[i+ 0], 11, -358537222) \n c = hh(c, d, a, b, x[i+ 3], 16, -722521979) \n b = hh(b, c, d, a, x[i+ 6], 23, 76029189) \n a = hh(a, b, c, d, x[i+ 9], 4 , -640364487) \n d = hh(d, a, b, c, x[i+12], 11, -421815835) \n c = hh(c, d, a, b, x[i+15], 16, 530742520) \n b = hh(b, c, d, a, x[i+ 2], 23, -995338651) \n \n a = ii(a, b, c, d, x[i+ 0], 6 , -198630844) \n d = ii(d, a, b, c, x[i+ 7], 10, 1126891415) \n c = ii(c, d, a, b, x[i+14], 15, -1416354905) \n b = ii(b, c, d, a, x[i+ 5], 21, -57434055) \n a = ii(a, b, c, d, x[i+12], 6 , 1700485571) \n d = ii(d, a, b, c, x[i+ 3], 10, -1894986606) \n c = ii(c, d, a, b, x[i+10], 15, -1051523) \n b = ii(b, c, d, a, x[i+ 1], 21, -2054922799) \n a = ii(a, b, c, d, x[i+ 8], 6 , 1873313359) \n d = ii(d, a, b, c, x[i+15], 10, -30611744) \n c = ii(c, d, a, b, x[i+ 6], 15, -1560198380) \n b = ii(b, c, d, a, x[i+13], 21, 1309151649) \n a = ii(a, b, c, d, x[i+ 4], 6 , -145523070) \n d = ii(d, a, b, c, x[i+11], 10, -1120210379) \n c = ii(c, d, a, b, x[i+ 2], 15, 718787259) \n b = ii(b, c, d, a, x[i+ 9], 21, -343485551) \n \n a = safe_add(a, olda) \n b = safe_add(b, oldb) \n c = safe_add(c, oldc) \n d = safe_add(d, oldd) \n } \n return [a, b, c, d] \n}", "sumOfHalvesEqual() {}", "function calculate(num1, op, num2) {\n // ifs and elses (switch?) using num1, num2 and operator\n\n\n var result;\n\n switch (op) {\n case \"+\":\n result = num1 + num2;\n\n break;\n\n case \"-\":\n result = num1 - num2;\n\n break;\n\n case \"*\":\n result = num1 * num2;\n\n break;\n\n case \"/\":\n result = num1 / num2;\n\n break;\n\n default:\n\n }\n // console.log(result);\n return result;\n }", "function main() {\n let meters = 15.6;\n const inches = meterToInches(meters);\n console.log(`${meters} meters = ${inches} inches`);\n console.log();\n let n = Math.floor(Math.random() * 20);\n loopThrough(n);\n console.log(`Sum of numbers from 0 to ${n} is ${calculateSum(n)}`);\n fizzbuzz(30);\n console.log(`Factorial of ${n} is ${findFactorial(n)}`);\n console.log(sleep_in(false, false));\n console.log(sleep_in(true, false));\n console.log(sleep_in(false, true));\n console.log(common([1, 2, 3], [7, 3]));\n console.log(common([1, 2, 3], [1, 0]));\n console.log(common([1, 2, 3], [7, 3, 2]));\n objectsAndKeysChallenge();\n mutatingObjects()\n}", "function questionCalculations()\r\n\t{\r\n\t\t// here, calculations for all the above variables should occur\r\n\t}", "function calcular (oper,...nums){\n let res\n switch (oper){\n case '+':\n //res = 0\n //for(let n of nums) soma +=n\n res = somaTudo(...nums)\n break\n\n case '*':\n res = 1\n for(let n of nums) res *=n\n }\n return res\n}", "function ACombinatorialWithDivide(pEn,pKay) {\nthis.en = pEn\nthis.kay = pKay\n//make a list of the number size that is just for the reminant of the top with the bottom crossed out.\nthis.newList = Array.apply(null, new Array(this.kay)).map(Function.call, Number).map(function(it){return it+this.en-this.kay+1},this)\n//reverse the list\nvar revList=this.newList.map(function(item,index){return this.newList[this.newList.length-index-1]},this)\n//make the other denominator number, that was not cancelled\nthis.botList=this.newList.map(function(item){return item-(this.en-this.kay)},this)\n//reverse that list\nvar revBot=this.botList.map(function(item,index){return this.botList[this.botList.length-index-1]},this)\nvar tallyList = infiniteArrayClone(revBot);\n// Logger.log(\" tallyList: \"+tallyList+\" revBot: \"+revBot+\" revList: \"+revList) \nfor (var cA=0;cA<revList.length;cA++)\n{\n var cB=0;\n //while you still have numbers to use and your count is less than length\n //and the item is greater than 1\n// Logger.log(\" tallyList: \"+tallyList+\" revBot: \"+revBot+\" revList[cA]: \"+revList[cA]+\" cB: \"+cB)\n while ((tallyList)&&(cB<revBot.length)&&(revList[cA]!=1))\n {\n //if the top list item is divisible by the bottom item\n //eliminate the bottom list item and make the top the result of the division\n if ((revList[cA]%revBot[cB])==0)\n {\n revList[cA]=revList[cA]/revBot[cB];\n// Logger.log(\" tallyList: \"+tallyList+\" revBot: \"+revBot+\" revList[cA]: \"+revList[cA]+\" cB: \"+cB)\n\n tallyList.splice(tallyList.indexOf(revBot[cB]),1);\n Logger.log(\" tallyList: \"+tallyList+\" revBot: \"+revBot+\" revList[cA]: \"+revList[cA]+\" cB: \"+cB)\n }\n cB++;\n }\n revBot=infiniteArrayClone(tallyList);\n}\nthis.prod=1\n//do the multiplication of the remnant\nif (revBot)\n{\nrevBot.forEach(function(item,ind){this.prod=this.prod*revList[ind]/item},this) ;\n}\nfor (var cH=revBot.length;cH<revList.length;cH++)\n{\n this.prod*=revList[cH];\n}\n//this.sum=0\n//revList.forEach(function(item){this.sum+=item},this);\n}", "function am1(i,x,w,j,c,n){while(--n>=0){var v=x*this[i++]+w[j]+c;c=Math.floor(v/0x4000000);w[j++]=v&0x3ffffff;}return c;}// am2 avoids a big mult-and-extract completely.", "function o0(o1, o2) {\n try {\nreturn o34(o32, o36, o37);\n}catch(e){}\n}", "function solve182()\n{\n var operations_ArrStr = input.split(\"\\n\");\n var register_MapStrInt = initRegister(operations_ArrStr);\n var register0 = new Map(register_MapStrInt);\n register0.set(\"p\", 0);\n var register1 = new Map(register_MapStrInt);\n register1.set(\"p\", 1);\n register_MapStrInt = new Map(register0);\n var nextOperationIndex_Int = 0; // index of next operation\n var nextOperation0 = 1;\n var nextOperation1 = 1;\n var in_Que = [];\n var out_Que = [];\n \n var count_Int = 0;\n \n var emptyInCount_Int = 0;\n var activeProgramm = 0;\n while(true)\n {\n let operation_ArrStr = operations_ArrStr[nextOperationIndex_Int].split(\" \");\n switch (operation_ArrStr[0])\n {\n case \"snd\":\n if(!isNaN(parseInt(operation_ArrStr[1])))\n {\n out_Que.push(parseInt(operation_ArrStr[1]));\n if(activeProgramm == 1)\n {\n count_Int++;\n }\n }\n else if(register_MapStrInt.has(operation_ArrStr[1]))\n {\n out_Que.push(register_MapStrInt.get(operation_ArrStr[1]));\n if(activeProgramm == 1)\n {\n count_Int++;\n }\n }\n nextOperationIndex_Int++;\n break;\n case \"set\":\n if(!isNaN(parseInt(operation_ArrStr[2])))\n {\n register_MapStrInt.set(operation_ArrStr[1], parseInt(operation_ArrStr[2]));\n }\n else if(register_MapStrInt.has(operation_ArrStr[2]))\n {\n register_MapStrInt.set(operation_ArrStr[1], register_MapStrInt.get(operation_ArrStr[2]));\n }\n nextOperationIndex_Int++;\n break;\n case \"add\":\n if(!isNaN(parseInt(operation_ArrStr[2])))\n {\n register_MapStrInt.set(operation_ArrStr[1], register_MapStrInt.get(operation_ArrStr[1]) + parseInt(operation_ArrStr[2]));\n }\n else if(register_MapStrInt.has(operation_ArrStr[2]))\n {\n register_MapStrInt.set(operation_ArrStr[1], register_MapStrInt.get(operation_ArrStr[1]) + register_MapStrInt.get(operation_ArrStr[2]));\n }\n nextOperationIndex_Int++;\n break;\n case \"mul\":\n if(!isNaN(parseInt(operation_ArrStr[2])))\n {\n register_MapStrInt.set(operation_ArrStr[1], register_MapStrInt.get(operation_ArrStr[1]) * parseInt(operation_ArrStr[2]));\n }\n else if(register_MapStrInt.has(operation_ArrStr[2]))\n {\n register_MapStrInt.set(operation_ArrStr[1], register_MapStrInt.get(operation_ArrStr[1]) * register_MapStrInt.get(operation_ArrStr[2]));\n }\n nextOperationIndex_Int++;\n break;\n case \"mod\":\n if(!isNaN(parseInt(operation_ArrStr[2])))\n {\n register_MapStrInt.set(operation_ArrStr[1], register_MapStrInt.get(operation_ArrStr[1]) % parseInt(operation_ArrStr[2]));\n }\n else if(register_MapStrInt.has(operation_ArrStr[2]))\n {\n register_MapStrInt.set(operation_ArrStr[1], register_MapStrInt.get(operation_ArrStr[1]) % register_MapStrInt.get(operation_ArrStr[2]));\n }\n nextOperationIndex_Int++;\n break;\n case \"rcv\":\n if(register_MapStrInt.has(operation_ArrStr[1]))\n {\n if(in_Que.length == 0)\n {\n emptyInCount_Int++;\n // check for deadlock\n if(out_Que.length == 0 && emptyInCount_Int >= 2)\n {\n return count_Int;\n }\n if(out_Que.length != 0)\n {\n //emptyInCount_Int = 0; ???\n }\n // change active programm\n if(activeProgramm == 0)\n {\n activeProgramm = 1;\n nextOperation0 = nextOperationIndex_Int;\n nextOperationIndex_Int = nextOperation1 - 1;\n register0 = new Map(register_MapStrInt);\n register_MapStrInt = new Map(register1);\n let a = in_Que.slice();\n in_Que = out_Que.slice();\n out_Que = a.slice(); // = [] (?)\n }\n else if(activeProgramm == 1)\n {\n activeProgramm = 0;\n nextOperation1 = nextOperationIndex_Int;\n nextOperationIndex_Int = nextOperation0 - 1;\n register1 = new Map(register_MapStrInt);\n register_MapStrInt = new Map(register0);\n let a = in_Que.slice();\n in_Que = out_Que.slice();\n out_Que = a.slice(); // = [] (?)\n }\n else\n {\n return -1;\n }\n }\n else\n {\n register_MapStrInt.set(operation_ArrStr[1], in_Que.shift());\n }\n }\n nextOperationIndex_Int++;\n break;\n case \"jgz\":\n var x = 0;\n if(!isNaN(parseInt(operation_ArrStr[1])))\n {\n x = parseInt(operation_ArrStr[1]);\n }\n else if(register_MapStrInt.has(operation_ArrStr[1]))\n {\n x = register_MapStrInt.get(operation_ArrStr[1]);\n }\n if(x <= 0)\n {\n nextOperationIndex_Int++;\n break;\n }\n if(!isNaN(parseInt(operation_ArrStr[2])))\n {\n nextOperationIndex_Int += parseInt(operation_ArrStr[2]);\n }\n else if(register_MapStrInt.has(operation_ArrStr[2]))\n {\n nextOperationIndex_Int += register_MapStrInt.get(operation_ArrStr[2]);\n }\n break;\n }\n }\n}", "static approxEqTrans(ta, tb) {\nvar aeq, i;\n//------–-----\naeq = (function() {\nvar j, results;\nresults = [];\nfor (i = j = 0; j < 3; i = ++j) {\nresults.push(this.approxEq(ta[i], tb[i]));\n}\nreturn results;\n}).call(this);\nreturn aeq[0] && aeq[1] && aeq[2];\n}", "function add(a,b){return a+b;}", "function add (a,b)\n{\n return a + b \n\n}", "function sum(a, b) {\n\n}", "function basicSum(x, y) {\n return x + y;\n}", "function orderOfProcedence(expressionArray)\r\n {\r\n\r\n for (var i = 0, d; d = expressionArray[i]; i++)\r\n {\r\n if (d == '^')\r\n {\r\n var elementPosition = expressionArray.indexOf('^'); // creates the element's current position of the array\r\n var sign = expressionArray[elementPosition]; // creates the sign variable to pass into the third function\r\n calculationByOperation(sign, elementPosition); // calling the function to resolve the sub expression found\r\n i = 0; // resets the counter to begin from the start of the expression\r\n }\r\n }\r\n\r\n // Checking and calculating division and multiplication from left to right\r\n for (var i = 0, d; d = expressionArray[i]; i++)\r\n {\r\n if (d == '/')\r\n {\r\n var elementPosition = expressionArray.indexOf('/'); // creates the element's current position of the array\r\n var sign = expressionArray[elementPosition]; // creates the sign variable to pass into the third function\r\n calculationByOperation(sign, elementPosition); // calling the third function to resolve the sub expression found\r\n\r\n if (divisionByZero == 1) // if division by zero is detected the program breaks out of the function\r\n {\r\n return false;\r\n }\r\n else {\r\n i = 0; // resets the counter to begin from the start of the array\r\n }\r\n\r\n }\r\n else if (d == '*')\r\n {\r\n var elementPosition = expressionArray.indexOf('*'); // creates the element's current position of the array\r\n var sign = expressionArray[elementPosition]; // creates the sign variable to pass into the third function\r\n calculationByOperation(sign, elementPosition); // calling the third function to resolve the sub expression found\r\n i = 0; // resets the counter to begin from the start of the array\r\n }\r\n }\r\n\r\n // Checking and calculating addition and subtraction from left to right\r\n for (var i = 0, d; d = expressionArray[i]; i++)\r\n {\r\n if (d == '+')\r\n {\r\n var elementPosition = expressionArray.indexOf('+'); // creates the element's current position of the array\r\n var sign = expressionArray[elementPosition]; // creates the sign variable to pass into the third function\r\n calculationByOperation(sign, elementPosition); // calling the function to resolve the sub expression found\r\n i = 0; // resets the counter to begin from the start of the expression\r\n }\r\n if (d == '-')\r\n {\r\n var elementPosition = expressionArray.indexOf('-'); // creates the element's current position of the array\r\n var sign = expressionArray[elementPosition]; // creates the sign variable to pass into the third function\r\n calculationByOperation(sign, elementPosition); // calling the function to resolve the sub expression found\r\n i = 0; // resets the counter to begin from the start of the expression\r\n }\r\n }\r\n\r\n }", "function a(num1, num2) { // & as a matter of fact\n // these function also have no side effects\n // they are not touching any of the outside world\n // they are only touching their own parameters\n // & parameterrs if you rememeber they are local variables\n return num1 + num2\n}", "function AMultipleCombinatorial(pEn,pKays) {\nthis.en = pEn\nif (typeof pKays === 'number')\n{pKays=[pKays];}\nvar sumOfVals = pKays.reduce(function(total,val){return total+=val});\nif (sumOfVals<pEn)\n{\n pKays.push(pEn-sumOfVals)\n}\n//biggest k\nthis.maxKay = pKays.reduce(function(total,val){return (total>val)?total:val});\nif (this.maxKay==1)\n{\nthis.prod=(Array.apply(null,new Array(pEn)).map(Function.call, Number).map(function(it){return it+1})).reduce(function(prd,val){return prd*=val;},1)\n}\nelse{\nthis.functionToMakeList= function(disKay,aKay){return Array.apply(null,new Array(disKay)).map(Function.call, Number).map(function(it){return it+aKay+1})}\nthis.functionToReverseLists = function(disArray){return disArray.map(function(val,ind){return disArray[disArray.length-ind-1]})}\n//Take it out of set\npKays.splice(pKays.indexOf(this.maxKay),1);\n//make a list of the number size that is just for the reminant of the top with the bottom crossed out.\n//array apply null ducks giving apply context, which is the point of the arguments in call, apply, and bind\n//so it just runs the new array constructor for the number, which makes an array which has indexes for three undefined slots\n//map (function.call), uses function call as a callback, which calls the call back in the context of the Number function\n//now map takes val, ind, array which are what number.call gets, so this is a fancy way to pass (val, ind, array) as the parameters\n// of any function. Remember first argument of number.call is context, which is val in this case, which is undefined, which gets thrown out\n//the next is taken as the one parameter of the Number method, which is the index.\n//you are using call call game to create a circumstance to through out maps first value\n//so we make a list just as long as maxKay which takes the numbers from max to kay and boosts them all up so the last one is em\nvar newList = this.functionToMakeList(pEn-this.maxKay,this.maxKay);\n//reverse the list\nthis.revList=this.functionToReverseLists(newList);\n//make the other denominator number, that was not cancelled\nthis.botLists=pKays.map(function(val){return this.functionToMakeList(val,0);},this);\n//reverse these list\nthis.revBots=this.botLists.map(function(dArray){return this.functionToReverseLists(dArray)},this);\n// Logger.log(\"maxKey: \"+this.maxKay+\" PK: \"+pKays+\" newList: \"+newList+\" rb: \"+this.revBots+\" TL: \"+this.tallyListOfLists+\" RL: \"+this.revList)\n//go through the toplist\n//go through the bot list\n//alter top and bottom\n//kill record when one is done \n \n this.tallyListOfLists = infiniteArrayClone(this.revBots)\n var revBotLengths= this.revBots.map(function(val){return val.length});\n revBotLengths.sort(function(a, b){return a - b});\n// var poses = []\n// for (var cA=revBotLengths.length-1;cA>-1;cA--)\n// {\n// var cB= this.revBots.length-1;\n// while (this.revBots[cB].length!=revBotLengths[cA])\n// {\n// cB--;\n// }\n// poses.push(this.revBots.length-cB-1);\n// }\n// this.tallyListOfLists = [];\n// poses.forEach(function(val){this.tallyListOfLists.push(this.revBots[val])},this)\n// this.revBots = infiniteArrayClone(this.tallyListOfLists);\n\n \nfor (var cA=0;cA<this.revList.length;cA++)\n{\n //while you still have numbers to use and your count is less than length\n //and the item is greater than 1\n var cC=0;\n// var huh=this.tallyListOfLists.length\n// var huha=this.revBots.length\n// var huhb=this.revList[cA];\n while ((this.tallyListOfLists.length>0)&&(cC<this.revBots.length)&&(this.revList[cA]!=1))\n {\n var cB=0;\n\n while ((this.tallyListOfLists[cC].length>0)&&(cB<this.tallyListOfLists[cC].length)&&(this.revList[cA]!=1))\n {\n //if the top list item is divisible by the bottom item\n //eliminate the bottom list item and make the top the result of the division\n if ((this.revList[cA]%this.revBots[cC][cB])==0)\n {\n this.revList[cA]=this.revList[cA]/this.revBots[cC][cB];\n this.tallyListOfLists[cC].splice(this.tallyListOfLists[cC].indexOf(this.revBots[cC][cB]),1);\n }\n cB++;\n }\n cC++;\n}\nthis.revBots=infiniteArrayClone(this.tallyListOfLists);\n}\n this.revBots= this.revBots.filter(function(val){return (val.length>0)});\n this.revBotProd=1\n//do the multiplication of the remnant\n this.revBots.forEach(function(val){val.forEach(function(item){this.revBotProd=this.revBotProd*item})});\n//SpreadsheetApp.getUi().alert(newList)\nthis.prod=1/this.revBotProd\nthis.revList.forEach(function(item){this.prod=this.prod*item},this) ;\n//this.revList.forEach(function(item){this.sum+=item},this);\n}\n}", "function c(e,n,r,i){function o(e,t){return 1-3*t+3*e}function s(e,t){return 3*t-6*e}function a(e){return 3*e}function l(e,t,n){return((o(t,n)*e+s(t,n))*e+a(t))*e}function u(e,t,n){return 3*o(t,n)*e*e+2*s(t,n)*e+a(t)}function c(t,n){for(var i=0;i<m;++i){var o=u(n,e,r);if(0===o)return n;n-=(l(n,e,r)-t)/o}return n}function f(){for(var t=0;t<b;++t)C[t]=l(t*x,e,r)}function p(t,n,i){var o,s,a=0;do{s=n+(i-n)/2,o=l(s,e,r)-t,o>0?i=s:n=s}while(Math.abs(o)>v&&++a<y);return s}function d(t){for(var n=0,i=1,o=b-1;i!==o&&C[i]<=t;++i)n+=x;--i;var s=(t-C[i])/(C[i+1]-C[i]),a=n+s*x,l=u(a,e,r);return l>=g?c(t,a):0===l?a:p(t,n,n+x)}function h(){T=!0,e===n&&r===i||f()}var m=4,g=.001,v=1e-7,y=10,b=11,x=1/(b-1),w=\"Float32Array\"in t;if(4!==arguments.length)return!1;for(var S=0;S<4;++S)if(\"number\"!=typeof arguments[S]||isNaN(arguments[S])||!isFinite(arguments[S]))return!1;e=Math.min(e,1),r=Math.min(r,1),e=Math.max(e,0),r=Math.max(r,0);var C=w?new Float32Array(b):new Array(b),T=!1,E=function(t){return T||h(),e===n&&r===i?t:0===t?0:1===t?1:l(d(t),n,i)};E.getControlPoints=function(){return[{x:e,y:n},{x:r,y:i}]};var k=\"generateBezier(\"+[e,n,r,i]+\")\";return E.toString=function(){return k},E}", "function l(e,n,o,r){function i(e,t){return 1-3*t+3*e}function a(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,n){return((i(t,n)*e+a(t,n))*e+s(t))*e}function u(e,t,n){return 3*i(t,n)*e*e+2*a(t,n)*e+s(t)}function c(t,n){for(var r=0;r<h;++r){var i=u(n,e,o);if(0===i)return n;n-=(l(n,e,o)-t)/i}return n}function f(){for(var t=0;t<w;++t)C[t]=l(t*b,e,o)}function d(t,n,r){var i,a,s=0;do{a=n+(r-n)/2,i=l(a,e,o)-t,i>0?r=a:n=a}while(Math.abs(i)>g&&++s<v);return a}function p(t){for(var n=0,r=1,i=w-1;r!=i&&C[r]<=t;++r)n+=b;--r;var a=(t-C[r])/(C[r+1]-C[r]),s=n+a*b,l=u(s,e,o);return l>=y?c(t,s):0==l?s:d(t,n,n+b)}function m(){S=!0,e==n&&o==r||f()}var h=4,y=.001,g=1e-7,v=10,w=11,b=1/(w-1),_=\"Float32Array\"in t;if(4!==arguments.length)return!1;for(var x=0;x<4;++x)if(\"number\"!=typeof arguments[x]||isNaN(arguments[x])||!isFinite(arguments[x]))return!1;e=Math.min(e,1),o=Math.min(o,1),e=Math.max(e,0),o=Math.max(o,0);var C=_?new Float32Array(w):new Array(w),S=!1,T=function(t){return S||m(),e===n&&o===r?t:0===t?0:1===t?1:l(p(t),n,r)};T.getControlPoints=function(){return[{x:e,y:n},{x:o,y:r}]};var k=\"generateBezier(\"+[e,n,o,r]+\")\";return T.toString=function(){return k},T}", "function izzqz( a , b , x , y , z )\n {\n\n const c_0 = 1e-6 ;\n \n var r = new Array( 5 ) ;\n var rr = new Array( 1 ) ;\n \n var xi = undefined ;\n var yi = undefined ;\n var ii = undefined ;\n \n var ri = undefined ;\n \n var izz = 0.0 ;\n var izzqz = 0.0 ;\n\n rr[0] = r ;\n\n if( z < c_0 ) z = c_0 ;\n \n for( i = 0; i < 4; ++i )\n { \n \n switch( i )\n {\n \n case 0:\n xi = ( (- a) / 2 ) ;\n yi = ( (- b) / 2 ) ;\n ii = ( 1 / (2 * Math.PI) ) ;\n break;\n \n case 1:\n xi = ( (- a) / 2 ) ;\n yi = ( ( b) / 2 ) ;\n ii = (- 1 / (2 * Math.PI) ) ;\n break;\n \n case 2:\n xi = ( ( a) / 2 ) ;\n yi = ( ( b) / 2 ) ;\n ii = ( 1 / (2 * Math.PI) ) ;\n break;\n\n case 3:\n xi = ( ( a) / 2 ) ;\n yi = ( (- b) / 2 ) ;\n ii = (- 1 / (2 * Math.PI) ) ;\n \n }; // end switch()\n \n ri = Math.sqrt( ((x + xi) * (x + xi)) + ((y + yi) * (y + yi)) + (z * z) ) ;\n izz = ( 1 / (((x + xi) * (x + xi)) + (z * z)) ) ;\n izz += ( 1 / (((y + yi) * (y + yi)) + (z * z)) ) ;\n izz *= ( ((x + xi) * (y + yi) * z) / ri ) ;\n izz += Math.atan2( ((x + xi) * (y + yi)) , (z * ri) ) ;\n \n r[i] = ( ii * izz ) ;\n\n izzqz += ( ii * izz ) ;\n \n }; // end for()\n\n r[4] = izzqz ;\n\n return( rr ) ;\n \n }", "pow22523(z) {\r\n const t0 = new FieldElement();\r\n const t1 = new FieldElement();\r\n const t2 = new FieldElement();\r\n let i;\r\n t0.square(z);\r\n // for (i = 1; i < 1; i++) {\r\n // t0.square(t0);\r\n // }\r\n t1.square(t0);\r\n for (i = 1; i < 2; i++) {\r\n t1.square(t1);\r\n }\r\n t1.mul(z, t1);\r\n t0.mul(t0, t1);\r\n t0.square(t0);\r\n // for (i = 1; i < 1; i++) {\r\n // t0.square(t0);\r\n // }\r\n t0.mul(t1, t0);\r\n t1.square(t0);\r\n for (i = 1; i < 5; i++) {\r\n t1.square(t1);\r\n }\r\n t0.mul(t1, t0);\r\n t1.square(t0);\r\n for (i = 1; i < 10; i++) {\r\n t1.square(t1);\r\n }\r\n t1.mul(t1, t0);\r\n t2.square(t1);\r\n for (i = 1; i < 20; i++) {\r\n t2.square(t2);\r\n }\r\n t1.mul(t2, t1);\r\n t1.square(t1);\r\n for (i = 1; i < 10; i++) {\r\n t1.square(t1);\r\n }\r\n t0.mul(t1, t0);\r\n t1.square(t0);\r\n for (i = 1; i < 50; i++) {\r\n t1.square(t1);\r\n }\r\n t1.mul(t1, t0);\r\n t2.square(t1);\r\n for (i = 1; i < 100; i++) {\r\n t2.square(t2);\r\n }\r\n t1.mul(t2, t1);\r\n t1.square(t1);\r\n for (i = 1; i < 50; i++) {\r\n t1.square(t1);\r\n }\r\n t0.mul(t1, t0);\r\n t0.square(t0);\r\n for (i = 1; i < 2; i++) {\r\n t0.square(t0);\r\n }\r\n this.mul(t0, z);\r\n }", "function operate(a,operator,b){\n\tswitch(operator){\n\t\tcase '+':\n\t\t\treturn add(a,b);\n\t\t\tbreak;\n\t\tcase '-':\n\t\t\treturn substract(a,b);\n\t\t\tbreak;\n\t\tcase '*':\n\t\t\treturn multiply(a,b);\n\t\t\tbreak;\n\t\tcase '/':\n\t\t\treturn divide(a,b);\n\t\t\tbreak;\n\t\tcase '=':\n\t\t\treturn b;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tclearAll();\n\t\t\talert(\"Error: Invalid operator!\");\n\t\t\treturn 0;\n\t\t\tbreak;\n\t}\n}", "function growFaster(intOps, boolOps, numberPrograms, booleanPrograms, inputoutputs){\r\n\r\n var levelNum = [];\r\n var levelBool = [];\r\n for(var i = 0; i < inputoutputs.length; i++){ \r\n //making the new enviroment for the i-th insatanc\r\n var envt = {};\r\n for(var key in inputoutputs[i]) {\r\n if(key != \"_out\"){\r\n envt[key] = inputoutputs[i][key];\r\n } \r\n }\r\n\r\n\r\n for(var i = 0; i < boolOps.length; i++){ \r\n for( var j = 0; j < numberPrograms.length; j++){\r\n for( var k = 0; k < numberPrograms.length; k++){\r\n var var1 = interpret(numberPrograms[j], envt);\r\n var var2 = interpret(numberPrograms[k], envt);\r\n if(boolOps[i] == LT){\r\n levelBool.push(lt(numberPrograms[j], numberPrograms[k]));\r\n }\r\n } \r\n }\r\n for( var j = 0; j < booleanPrograms.length; j++){\r\n for( var k = 0; k < booleanPrograms.length; k++){\r\n var var1 = interpret(booleanPrograms[j], envt);\r\n var var2 = interpret(booleanPrograms[k], envt);\r\n if(boolOps[i] == AND){\r\n if(var1 == false && var2 == false){\r\n levelBool.push(and(flse(), flse()));\r\n }else if(var1 != false && var2 == false){\r\n levelBool.push(and(not(flse()), flse()));\r\n }else if(var1 == false && var2 != false){\r\n levelBool.push(and(flse(),not(flse())));\r\n }else if(var1 != false && var2 != false){\r\n levelBool.push(and(not(flse()), not(flse())));\r\n }\r\n }\r\n }\r\n if(boolOps[i] == NOT){\r\n if(var1 != false){\r\n levelBool.push(not(flse()));\r\n }else{ \r\n levelBool.push(flse());\r\n }\r\n }\r\n }\r\n }\r\n\r\n for(var i = 0; i < intOps.length; i++){\r\n if(intOps[i] == ITE){\r\n for( var j = 0; j < booleanPrograms.length; j++){\r\n for( var k = 0; k < numberPrograms.length; k++){ \r\n for( var l = 0; l < numberPrograms.length; l++){\r\n var var1 = interpret(booleanPrograms[j], envt);\r\n if(var1 == false){\r\n levelNum.push(ite(flse(), numberPrograms[k], numberPrograms[j]));\r\n } else{\r\n levelNum.push(ite(not(flse()), numberPrograms[k], numberPrograms[j]));\r\n }\r\n }\r\n }\r\n }\r\n } \r\n\r\n for( var k = 0; k < numberPrograms.length; k++){ \r\n for( var l = 0; l < numberPrograms.length; l++){\r\n if(intOps[i] == PLUS){\r\n levelNum.push(plus(numberPrograms[k], numberPrograms[l]));\r\n } else if(intOps[i] == TIMES){\r\n levelNum.push(times(numberPrograms[k], numberPrograms[l]));\r\n }\r\n\r\n }\r\n }\r\n } \r\n \r\n } \r\n return {\"nums\":levelNum, \"bools\": levelBool};\r\n}", "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()}()}", "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()}()}", "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()}()}", "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()}()}", "function o0(e,o1,buffer) {\n try {\n\"use asm\";\n}catch(e){}\n function o7(o2,o3) {\n try {\nset.o27 = +o2;\n}catch(e){}\n try {\no384 = +o28;\n}catch(e){}\n try {\nreturn o1083 = o1062;\n}catch(e){}\n }\n \n function o4(o2,o3){\n try {\no4212]o4.o6(function() { try {\nObject.defineProperty(o3, key, { value: 'something', enumerable: true });\n}catch(e){} }, \"Object.defineProperty uses ToPropertyKey. Property is added to the object\")] = 2;\n}catch(e){}\n try {\no39.o38(o34);\n}catch(e){}\n var o673 = o215(1, \"i32*\", o212);\n var o1103 = 0;\n try {\no5 = +o7[this.o565[o810]](o2,o3);\n}catch(e){}\n try {\nreturn +o5;\n}catch(e){}\n }\n \n var o7 = [add,add,add,add];\n \n \n try {\nreturn o4.o10;\n}catch(e){}\n}", "function operate(num1, num2, operator){\n if(operator === '+') return add(num1, num2)\n if(operator === '-') return subtract(num1, num2)\n if(operator === '*') return multiply(num1, num2)\n if(operator === '/') return divide(num1, num2)\n}", "function operations(typeOperator) {\n\t\n\tif(typeOperator=='comma' && v!='v'){\n\t\tresText=resText+\".\";\n\t\tv='v';\n\t\tdv=1;\n\t\tanimateButtons('comma');\n\t}else if(typeOperator!='comma'){\n\t\tv='f';\n\t}\n\n\tif(typeOperator==\"sum\"){\n\t\tresText=resText+\"+\";\n\t\tanimateButtons('sum');\t \n\t}else if(typeOperator==\"minus\"){\n\t\tresText=resText+\"-\";\n\t\tanimateButtons('minus');\n\n\n\t}else if(typeOperator==\"times\"){\n\t\tresText=\"ans\"+\"×\";\n\t\tanimateButtons('times');\n\n\n\t}else if(typeOperator==\"divided\"){\n\t\tresText=\"ans\"+\"÷\";\n\t\tanimateButtons('divided');\n\n\t}\n\n\n\tif(typeOperator!='comma'){\n\n\t\tif(prevTypeOperator=='sum'){\n\t\t\tresNum=numberInstMemo+resNum;\n\t\t\tnumberInstMemo=0;\n\n\t\t}else if(prevTypeOperator=='minus'){\n\t\t\tresNum=resNum-numberInstMemo;\n\t\t\tnumberInstMemo=0;\n\n\t\t}else if(prevTypeOperator=='times' && d!=0){\n\t\t\tresNum=resNum*numberInstMemo;\n\t\t\tnumberInstMemo=0; \n\n\t\t}else if(prevTypeOperator=='divided' && d!=0){\n\t\t\tresNum=resNum/numberInstMemo;\n\t\t\tnumberInstMemo=0; \n\n\t\t}\n\n\t\tprevTypeOperator=typeOperator;\n\t\t\n\t}\n\t\n\t\n\tif(typeOperator=='equal'){\n\n\t\tresText='ans';\n\t\tanimateButtons('equal');\n\t\t\n\t}\n\n\tdocument.getElementById(\"resText\").innerHTML = resText;\n\tdocument.getElementById(\"resNum\").innerHTML = resNum;\n\t\n\td=0;\n\n\n}", "function o0(stdlib,o1,buffer) {\n try {\no8[4294967294];\n}catch(e){}\n function o104(o49, o50, o73) {\n try {\no95(o49, o50, o73, this);\n}catch(e){}\n\n try {\no489.o767++;\n}catch(e){}\n\n try {\nif (o97 === o49) {\n try {\nreturn true;\n}catch(e){}\n }\n}catch(e){}\n\n try {\nreturn false;\n}catch(e){}\n };\n //views\n var o3 =this;\n\n function o4(){\n var o30\n var o6 = o2(1.5);\n try {\no3[1] = o6;\n}catch(e){}\n try {\nreturn +(o3[1])\n}catch(e){}\n }\n try {\nreturn o4;\n}catch(e){}\n}", "_coreSHA1(_x, _len) {\n\n _x[_len >> 5] |= 0x80 << (24 - _len % 32);\n _x[((_len + 64 >> 9) << 4) + 15] = _len;\n\n const _this = this;\n let _a = 1732584193;\n let _b = -271733879;\n let _c = -1732584194;\n let _d = 271733878;\n let _e = -1009589776;\n const _w = new Array(80);\n let i;\n let _olda;\n let _oldb;\n let _oldc;\n let _oldd;\n let _olde;\n let j;\n let _t;\n\n for (i = 0; i < _x.length; i += 16) {\n _olda = _a;\n _oldb = _b;\n _oldc = _c;\n _oldd = _d;\n _olde = _e;\n\n for (j = 0; j < 80; j++) {\n if (j < 16) {\n _w[j] = _x[i + j];\n }\n else {\n _w[j] = _this._rol(_w[j-3] ^ _w[j-8] ^ _w[j-14] ^ _w[j-16], 1);\n }\n _t = _this._safeAdd(_this._safeAdd(_this._rol(_a, 5), _this._sha1FT(j, _b, _c, _d)),\n _this._safeAdd(_this._safeAdd(_e, _w[j]), _this._sha1KT(j)));\n _e = _d;\n _d = _c;\n _c = _this._rol(_b, 30);\n _b = _a;\n _a = _t;\n }\n\n _a = _this._safeAdd(_a, _olda);\n _b = _this._safeAdd(_b, _oldb);\n _c = _this._safeAdd(_c, _oldc);\n _d = _this._safeAdd(_d, _oldd);\n _e = _this._safeAdd(_e, _olde);\n }\n return [_a, _b, _c, _d, _e];\n }", "function tester() {\n document.getElementById(\"output\").innerHTML += firstLast6([1,2,3,4,5,6]);\n document.getElementById(\"output\").innerHTML += has23([2,3]);\n document.getElementById(\"output\").innerHTML += fix_23([1,2,3]);\n document.getElementById(\"output\").innerHTML += countYZ(\"fez day\");\n document.getElementById(\"output\").innerHTML += endOther(\"Hiabc\", \"abc\");\n document.getElementById(\"output\").innerHTML += starOut(\"ab***cd\");\n document.getElementById(\"output\").innerHTML += getSandwich(\"breadinkbread\");\n document.getElementById(\"output\").innerHTML += canBalance([1,1,1,2,1]);\n document.getElementById(\"output\").innerHTML += countClumps([2,2,2,3,3]);\n document.getElementById(\"output\").innerHTML += evenlySpaced(1,3,2);\n //test third method, etc\n}", "function calculate(number1, number2, operator) {\n if (operator === 'add') {\n return suma();\n } else if (operator === 'multiply') {\n return inmultire();\n } else if (operator === 'substract') {\n return scadere();\n } else if (operator === 'divide') {\n return impartire();\n }\n\n function suma() {\n return (number1 + number2);\n }\n function impartire() {\n return (number1 / number2);\n }\n function inmultire() {\n return (number1 * number2);\n }\n function scadere() {\n return (number1 - number2);\n }\n}", "function addition(a, b) {\r\n return a + b;\r\n}", "function addition(a, b) {\r\n\treturn a + b;\r\n}", "function reduceOperators(iObj_ops){ \n\tvar iObj_ops_red = iObj_ops.slice();\n\tvar selected_op;\n\tvar opsStr = '';\n\tfor (var n in iObj_ops) {\n\t\topsStr += iObj_ops[n].val;\n\t}\n\tconsole.log('reduceOperators - opsStr 1: ' + opsStr + ', iObj_ops: ' + JSON.stringify(iObj_ops));\n\n\t// If '+' OR '-' operator are present: -----> delete all '*' and '/' operators\n\t// ===================================\n\tif ((opsStr.indexOf('+')!==-1) || (opsStr.indexOf('-')!==-1)){\n\t\tfor (var i = iObj_ops.length - 1; i >= 0; i--) { \n\t\t\tif ('*/'.indexOf(iObj_ops[i].val)!==-1) {\n\t\t\t\tiObj_ops_red.splice(i, 1);\n\t\t\t}\n\t\t}\n\t\topsStr = opsStr.replace(/(\\*|\\/)/g, '');\n\t\tconsole.log('reduceOperators - opsStr 2: ' + opsStr + ', iObj_ops_red: ' + JSON.stringify(iObj_ops_red));\n\n\t\t////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t//\n\t\t//\tDecide HERE, based on the position of fObj.taget, which operator ('+' or '-') to choose\". NO: just choose the last operator to keep it simple!\n\t\t//\n\t\t////////////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t// At this point there will only be '+'- OR '-'-operators left - choose the last operator:\n\t\tselected_op = iObj_ops_red[iObj_ops_red.length-1];\n\t\tconsole.log('reduceOperators - selected_op: ' + JSON.stringify(selected_op));\n\n\t}\n\n\t// If '*' AND '/' operator are present: -----> delete all '*' operators, and choose the last '/' operator\n\t// ====================================\n\tif ((opsStr.indexOf('*')!==-1) && (opsStr.indexOf('/')!==-1)){\n\t\tfor (var i = iObj_ops.length - 1; i >= 0; i--) { \n\t\t\tif ('*'.indexOf(iObj_ops[i].val)!==-1) {\n\t\t\t\tiObj_ops_red.splice(i, 1);\n\t\t\t}\n\t\t}\n\t\topsStr = opsStr.replace(/\\*/g, '');\n\t\tconsole.log('reduceOperators - opsStr 2: ' + opsStr + ', iObj_ops_red: ' + JSON.stringify(iObj_ops_red));\n\n\t\t// // At this point there will only be '/'-operators left - choose the last '/'-operator:\n\t\t// selected_op = iObj_ops_red[iObj_ops_red.length-1];\n\t\t// console.log('reduceOperators - selected_op: ' + JSON.stringify(selected_op));\n\t}\n\n\t// If '*' OR '/' operators are present: -----> Select the last operator\n\t// ====================================\n\tif ((opsStr.indexOf('*')!==-1) || (opsStr.indexOf('/')!==-1)){\n\t\t\n\t\t// At this point there will only be '/'- OR '*'-operators left - choose the last operator:\n\t\tselected_op = iObj_ops_red[iObj_ops_red.length-1];\n\t\tconsole.log('reduceOperators - selected_op: ' + JSON.stringify(selected_op));\n\t}\n\n\n\treturn selected_op;\n}", "function test_operators() {\n var Vec2;\n\n function mul_scalar(p1, a) {\n var r = new Vec2();\n r.x = p1.x * a;\n r.y = p1.y * a;\n return r;\n }\n\n var vec2_ops = Operators(\n {\n '+'(p1, p2) {\n var r = new Vec2();\n r.x = p1.x + p2.x;\n r.y = p1.y + p2.y;\n return r;\n },\n '-'(p1, p2) {\n var r = new Vec2();\n r.x = p1.x - p2.x;\n r.y = p1.y - p2.y;\n return r;\n },\n '=='(a, b) {\n return a.x == b.x && a.y == b.y;\n },\n '<'(a, b) {\n var r;\n /* lexicographic order */\n if(a.x == b.x) r = a.y < b.y;\n else r = a.x < b.x;\n return r;\n },\n '++'(a) {\n var r = new Vec2();\n r.x = a.x + 1;\n r.y = a.y + 1;\n return r;\n },\n '--'(a) {\n var r = new Vec2();\n r.x = a.x - 1;\n r.y = a.y - 1;\n return r;\n },\n '^'(p1, p2) {\n var r = Math.sqrt((p1.x - p2.x) ** 2 + (p1.y - p2.y) ** 2);\n return r;\n }\n },\n {\n left: Number,\n '*'(a, b) {\n return mul_scalar(b, a);\n }\n },\n {\n right: Number,\n '*'(a, b) {\n return mul_scalar(a, b);\n }\n }\n );\n\n Vec2 = class Vec2 extends vec2_ops {\n constructor(x, y) {\n super();\n this.x = x;\n this.y = y;\n }\n toString() {\n return 'Vec2(' + this.x + ',' + this.y + ')';\n }\n };\n\n var a = new Vec2(10, 5);\n var b = new Vec2(110, 105);\n var r;\n\n console.log(`a = `, a);\n console.log(`b = `, b);\n console.log(`a * 2 + 3 * b = `, (r = a * 2 + 3 * b));\n console.log(`b - a = `, b - a);\n console.log(`b ^ a = `, b ^ a);\n a++;\n r = ++a;\n}", "function reduceTargetSide(termArr, iObj_ops, inverseOperator, reducingTerm){\n\tvar inversOpsLookup = {'/':'*', '*':'/', '+':'-', '-':'+'};\t\n\n\tconsole.log('reduceTargetSide - termArr 1: ' + JSON.stringify(termArr) + ', iObj_ops 1: ' + JSON.stringify(iObj_ops) + ', inverseOperator 1: ' + inverseOperator + ', reducingTerm 1: ' + reducingTerm);\n\n\tvar len = termArr.length;\n\tfor (var n in termArr){\n\t\tif (termArr[n] == reducingTerm) {\n\t\t\tconsole.log('reduceTargetSide - A0 - n: ' + n);\n\n\t\t\tif (inverseOperator == '-') {\n\t\t\t\tconsole.log('reduceTargetSide - A1 - n: ' + n);\n\n\t\t\t\tif ((n == 0) && (iObj_ops[n].val == '-')) { // CASE: a-x-a = k-a\n\t\t\t\t\tconsole.log('reduceTargetSide - A2 - n: ' + n);\n\n\t\t\t\t\ttermArr.splice(n, 1);\n\t\t\t\t}\n\n\t\t\t\tif ((n == 0) && (iObj_ops[n].val == '+')) { // CASE: a+x-a = k-a\n\t\t\t\t\tconsole.log('reduceTargetSide - A3 - n: ' + n);\n\n\t\t\t\t\ttermArr.splice(n, 1);\n\t\t\t\t\tiObj_ops.splice(n, 1); // <---- IMPORTANT: remove the \"+\" operator \n\t\t\t\t}\n\n\t\t\t\tif ((n > 0) && (n < len-1) && ((iObj_ops[n-1].val == '+') || (iObj_ops[n-1].val == '-')) && ((iObj_ops[n].val == '+') || (iObj_ops[n].val == '-'))) { // CASE: c+a+x-a = k-a\n\t\t\t\t\tconsole.log('reduceTargetSide - A4 - n: ' + n);\n\n\t\t\t\t\ttermArr.splice(n, 1);\n\t\t\t\t\tiObj_ops.splice(n-1, 1);\n\t\t\t\t}\n\n\t\t\t\tif ((n == len-1) && (iObj_ops[n-1].val == '+')) { // CASE: x+a-a = k-a\n\t\t\t\t\tconsole.log('reduceTargetSide - A5 - n: ' + n);\n\n\t\t\t\t\ttermArr.splice(n, 1);\n\t\t\t\t\tiObj_ops.splice(n-1, 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (inverseOperator == '+') {\n\t\t\t\tconsole.log('reduceTargetSide - A6 - n: ' + n);\n\n\t\t\t\tif ((n == 0) && (iObj_ops[n].val == '-')) { // CASE: -a-x+a = k-a\n\t\t\t\t\tconsole.log('reduceTargetSide - A7 - n: ' + n);\n\n\t\t\t\t\ttermArr.splice(n, 1);\n\t\t\t\t}\n\n\t\t\t\tif ((n == 0) && (iObj_ops[n].val == '+')) { // CASE: -a+x+a = k-a\n\t\t\t\t\tconsole.log('reduceTargetSide - A8 - n: ' + n);\n\n\t\t\t\t\ttermArr.splice(n, 1);\n\t\t\t\t\tiObj_ops.splice(n, 1); // <---- IMPORTANT: remove the \"+\" operator \n\t\t\t\t}\n\n\t\t\t\tif ((n > 0) && (n < len-1) && ((iObj_ops[n-1].val == '+') || (iObj_ops[n-1].val == '-')) && ((iObj_ops[n].val == '+') || (iObj_ops[n].val == '-'))) { // CASE: c-a+x+a = k-a\n\t\t\t\t\tconsole.log('reduceTargetSide - A9 - n: ' + n);\n\n\t\t\t\t\ttermArr.splice(n, 1);\n\t\t\t\t\tiObj_ops.splice(n-1, 1);\n\t\t\t\t}\n\n\t\t\t\tif ((n == len-1) && (iObj_ops[n-1].val == '-')) { // CASE: x-a+a = k-a\n\t\t\t\t\tconsole.log('reduceTargetSide - A10 - n: ' + n);\n\n\t\t\t\t\ttermArr.splice(n, 1);\n\t\t\t\t\tiObj_ops.splice(n-1, 1);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif ((inverseOperator == '*') || (inverseOperator == '/')) {\n\t\t\t\tconsole.log('reduceTargetSide - A11 - n: ' + n);\n\n\t\t\t\tif (n == 0) { // CASE: a*x/a = k/a\n\t\t\t\t\tconsole.log('reduceTargetSide - A12 - n: ' + n);\n\n\t\t\t\t\ttermArr.splice(n, 1);\n\t\t\t\t\tiObj_ops.splice(n, 1);\n\t\t\t\t}\n\n\t\t\t\tif ((n > 0) && (n < len-1)) { // CASE: c*a*x/a = k/a\n\t\t\t\t\tconsole.log('reduceTargetSide - A13 - n: ' + n);\n\n\t\t\t\t\ttermArr.splice(n, 1);\n\t\t\t\t\tiObj_ops.splice(n-1, 1);\n\t\t\t\t}\n\n\t\t\t\tif (n == len-1) { // CASE: x*a/a = k/a\n\t\t\t\t\tconsole.log('reduceTargetSide - A14 - n: ' + n);\n\n\t\t\t\t\ttermArr.splice(n, 1);\n\t\t\t\t\tiObj_ops.splice(n-1, 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\tconsole.log('reduceTargetSide - termArr 2: ' + JSON.stringify(termArr) + ', iObj_ops 2: ' + JSON.stringify(iObj_ops) + ', inverseOperator 2: ' + inverseOperator + ', reducingTerm 2: ' + reducingTerm);\n\n\tvar reducedEquationSide = '';\n\tif (termArr.length == iObj_ops.length){\n\t\tfor (var n in termArr) {\n\t\t\treducedEquationSide += iObj_ops[n].val+termArr[n];\n\t\t}\n\t}\n\n\tif (termArr.length == iObj_ops.length + 1){\n\t\tfor (var n in termArr) {\n\t\t\tconsole.log('reduceTargetSide - n: ' + n + ', iObj_ops.length: ' + iObj_ops.length );\n\t\t\treducedEquationSide += termArr[n]+((typeof(iObj_ops[n])!=='undefined')? iObj_ops[n].val : '');\n\t\t}\n\t}\n\n\tconsole.log('reduceTargetSide - reducedEquationSide: ' + reducedEquationSide);\n\n\treturn reducedEquationSide;\n}", "function l(e,i,n,r){function o(e,t){return 1-3*t+3*e}function a(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,i){return((o(t,i)*e+a(t,i))*e+s(t))*e}function c(e,t,i){return 3*o(t,i)*e*e+2*a(t,i)*e+s(t)}function u(t,i){for(var r=0;f>r;++r){var o=c(i,e,n);if(0===o)return i;var a=l(i,e,n)-t;i-=a/o}return i}function d(){for(var t=0;C>t;++t)A[t]=l(t*w,e,n)}function h(t,i,r){var o,a,s=0;do a=i+(r-i)/2,o=l(a,e,n)-t,o>0?r=a:i=a;while(Math.abs(o)>v&&++s<b);return a}function g(t){for(var i=0,r=1,o=C-1;r!=o&&A[r]<=t;++r)i+=w;--r;var a=(t-A[r])/(A[r+1]-A[r]),s=i+a*w,l=c(s,e,n);return l>=m?u(t,s):0==l?s:h(t,i,i+w)}function p(){S=!0,(e!=i||n!=r)&&d()}var f=4,m=.001,v=1e-7,b=10,C=11,w=1/(C-1),y=\"Float32Array\"in t;if(4!==arguments.length)return!1;for(var x=0;4>x;++x)if(\"number\"!=typeof arguments[x]||isNaN(arguments[x])||!isFinite(arguments[x]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var A=y?new Float32Array(C):new Array(C),S=!1,E=function(t){return S||p(),e===i&&n===r?t:0===t?0:1===t?1:l(g(t),i,r)};E.getControlPoints=function(){return[{x:e,y:i},{x:n,y:r}]};var _=\"generateBezier(\"+[e,i,n,r]+\")\";return E.toString=function(){return _},E}", "function operate(x, y, operator) {\n switch (operator) {\n case 'add':\n return add(x, y);\n\n case 'subtract':\n return subtract(x, y);\n\n case 'multiply':\n return multiply(x, y);\n \n case 'divide':\n return divide(x, y);\n\n default: \n alert('Use numbers and declare operator');\n };\n}", "exec(op, { a, b, c }) {\n switch (op) {\n case Instr.Add:\n this.memory[c] = this.memory[a] + this.memory[b];\n this.ip += 4;\n return;\n case Instr.Mult:\n this.memory[c] = this.memory[a] * this.memory[b];\n this.ip += 4;\n return;\n case Instr.SaveInput:\n this.memory[a] = this.input.shift();\n this.ip += 2;\n return;\n case Instr.Output:\n this.ip += 2;\n return this.memory[a];\n case Instr.JumpIfTrue:\n this.ip = this.memory[a] !== 0 ? this.memory[b] : this.ip + 3;\n return;\n case Instr.JumpIfFalse:\n this.ip = this.memory[a] == 0 ? this.memory[b] : this.ip + 3;\n return;\n case Instr.LessThan:\n this.memory[c] = this.memory[a] < this.memory[b] ? 1 : 0;\n this.ip += 4;\n return;\n case Instr.Equals:\n this.memory[c] = this.memory[a] === this.memory[b] ? 1 : 0;\n this.ip += 4;\n return;\n }\n }", "function sum4(x, y) {\r\n return x + y;\r\n }", "function soustraction(a, b) { // Nommage de ma function\n console.log(a - b); // Ce que la function fait\n}", "function main() {\n showResult(47);\n showResult(88);\n showResult(34);\n showResult(3);\n showResult(-2);\n showResult(105);\n}", "function sum(a, b){return a+b;}", "function calculate(){}", "function evenOddSums() {}", "function calcularOperacoes (operador1, operador2) {\n console.log(operador1+operador2, operador1- operador2, operador1 * operador2, operador1 / operador2)\n}", "function o0(o1)\n{\n var o11 = function () {\n try {\nreturn (this.o4 - this.o5) + \" (overwritten)\";\n}catch(this.o665()){}\n};\n try {\nfor (var o2 = 0; __defineGetter__[o1091 >> [4.4, 5.5, 6.6]]; this.o391[0xFF68] = this.o902)\n {\n try {\nif (o6(o29) == \"this.lastOutput[\" + o214 + \"] = output\" + o214)\n {\n try {\nif (o259[10724 >> 2] = o1098 == -1)\n {\n try {\no2 = o3;\n}catch(e){}\n }\n}catch(e){}\n }\n else\n {\n try {\nif (o2 != -\"Array.prototype.copyWithin called on an object with length > 2^32 and a source range completely > 2^32 and destination range crossing 2^32\")\n {\n try {\no4.o5(o2 + \"-\" + (o3-'error!') + \" = undefined\");\n}catch(e){}\n try {\no421 = -1;\n}catch(e){}\n }\n}catch(e){}\n try {\no4.o5(o3 + \" = \" + o1[o3]);\n}catch(e){}\n }\n}catch(e){}\n }\n}catch(e){}\n}", "function sum(a, b) {\n return a + b; // processamento\n}", "reduce (){\n this.hunger -= 2\n this.energy -= 1\n this.hygiene -= 1\n this.fun -= 2\n }", "function performCalculation(arr, symbol1 = '*',symbol2 = '/'){\n var found = false;\n var i = 0; \n\n while(found === false && i < arr.length - 1){ //using < than, since the last symbol will always be a number because of the validation perfomed in the method 'calculate'\n if(arr[i] === symbol1 || arr[i] === symbol2){\n found = true;\n\n arr[i] = window[operations[arr[i]]](arr[i-1], arr[i+1])\n arr.splice(i+1,1); arr.splice(i-1,1);\n\n //reccursive method to continue searching for and perform the same reccursive function only if array's length is more than 1\n if(arr.length <= 1){\n return arr; //the result\n } else {\n return performCalculation(arr,symbol1,symbol2)\n }\n } \n i++; \n }\n\n // this means that this round of the while loop did not find any * or / operations, time to move to + and -\n return performCalculation(arr,'+','-');\n\n}", "function eGCD_(x,y,v,a,b) {\n var g=0;\n var k=Math.max(x.length,y.length);\n if (eg_u.length!=k) {\n eg_u=new Array(k);\n eg_A=new Array(k);\n eg_B=new Array(k);\n eg_C=new Array(k);\n eg_D=new Array(k);\n }\n while(!(x[0]&1) && !(y[0]&1)) { //while x and y both even\n halve_(x);\n halve_(y);\n g++;\n }\n copy_(eg_u,x);\n copy_(v,y);\n copyInt_(eg_A,1);\n copyInt_(eg_B,0);\n copyInt_(eg_C,0);\n copyInt_(eg_D,1);\n for (;;) {\n while(!(eg_u[0]&1)) { //while u is even\n halve_(eg_u);\n if (!(eg_A[0]&1) && !(eg_B[0]&1)) { //if A==B==0 mod 2\n halve_(eg_A);\n halve_(eg_B); \n } else {\n add_(eg_A,y); halve_(eg_A);\n sub_(eg_B,x); halve_(eg_B);\n }\n }\n\n while (!(v[0]&1)) { //while v is even\n halve_(v);\n if (!(eg_C[0]&1) && !(eg_D[0]&1)) { //if C==D==0 mod 2\n halve_(eg_C);\n halve_(eg_D); \n } else {\n add_(eg_C,y); halve_(eg_C);\n sub_(eg_D,x); halve_(eg_D);\n }\n }\n\n if (!greater(v,eg_u)) { //v<=u\n sub_(eg_u,v);\n sub_(eg_A,eg_C);\n sub_(eg_B,eg_D);\n } else { //v>u\n sub_(v,eg_u);\n sub_(eg_C,eg_A);\n sub_(eg_D,eg_B);\n }\n if (equalsInt(eg_u,0)) {\n while (negative(eg_C)) { //make sure a (C) is nonnegative\n add_(eg_C,y);\n sub_(eg_D,x);\n }\n multInt_(eg_D,-1); ///make sure b (D) is nonnegative\n copy_(a,eg_C);\n copy_(b,eg_D);\n leftShift_(v,g);\n return;\n }\n }\n }", "function Addition(a, b) {\n return a + b;\n}", "function order_of_operations(array) {\n var no_more_parentheses = false;\n var open_p_lastIndexOf = array.lastIndexOf(\"(\");\n if (open_p_lastIndexOf < 0) {\n open_p_lastIndexOf = 0;\n no_more_parentheses = true;\n }\n var close_p_indexOf = array.indexOf(\")\", open_p_lastIndexOf);\n if (close_p_indexOf < 0) {\n close_p_indexOf = 100000000;\n }\n var working_array = array.slice(open_p_lastIndexOf + 1, close_p_indexOf);\n if (working_array.length == 1) {\n console.log(\"before splice:\", equation_array)\n equation_array.splice(open_p_lastIndexOf, 1);\n equation_array.splice(open_p_lastIndexOf + 1, 1)\n open_p_lastIndexOf = 0;\n close_p_indexOf = 100000000;\n console.log(\"after splice:\", equation_array)\n }\n\n var percentage_indexOf = array.indexOf(\"%\", open_p_lastIndexOf);\n var exponent_indexOf = array.indexOf(\"^\", open_p_lastIndexOf);\n var mult_indexOf = array.indexOf(\"x\", open_p_lastIndexOf);\n var divid_indexOf = array.indexOf(\"/\", open_p_lastIndexOf);\n var add_indexOf = array.indexOf(\"+\", open_p_lastIndexOf);\n var sub_indexOf = array.indexOf(\"-\", open_p_lastIndexOf);\n var done = false;\n\n\n if (percentage_indexOf >= 0 && percentage_indexOf < close_p_indexOf) {\n ordered_index = percentage_indexOf;\n return;\n }\n else if (exponent_indexOf >= 0 && exponent_indexOf < close_p_indexOf) {\n ordered_index = exponent_indexOf;\n return;\n }\n else if (mult_indexOf >= 0 && mult_indexOf < close_p_indexOf) {\n ordered_index = mult_indexOf;\n return;\n }\n else if (divid_indexOf >= 0 && divid_indexOf < close_p_indexOf) {\n ordered_index = divid_indexOf;\n return;\n }\n else if (add_indexOf >= 0 && add_indexOf < close_p_indexOf) {\n ordered_index = add_indexOf;\n return;\n }\n else if (sub_indexOf >= 0 && sub_indexOf < close_p_indexOf) {\n ordered_index = sub_indexOf;\n return;\n }\n else {\n return done = true;\n }\n\n if (!done && no_more_parentheses) {\n return done = false;\n }\n\n}", "function s_array_op(arr1, arr2, what_to_do, sort_function)\n{\n\t// http://stackoverflow.com/questions/10866756/fast-intersection-of-two-sorted-integer-arrays\n\t\n\tif (!isArray(arr1) || !isArray(arr2))\n\t\treturn [];\n\t// need at least one to be be longer than zero\n\tif (arr1.length == 0 && arr2.length == 0)\n\t\treturn [];\n\t\t\n\t// intersection check that both are longer than zero\n\tif (what_to_do == \"i\" && (arr1.length == 0 || arr2.length == 0))\n\t\treturn [];\n\t\t\n\t// counters\n\tvar i=0, j=0;\n\t// values\n\tvar a=0, b=0;\n\t\n\tvar out = [];\n\t\n\t// comparison function\n\tvar the_compare;\n\tif (typeof(sort_function) != \"function\")\n\t\tthe_compare = function(a1,b1) { return [a1,b1].sort()[0] == a1 ? -1 : 1; };\n\telse\n\t\tthe_compare = sort_function;\n\t// push functions\n\tvar eq_push;\n\tvar lt_push;\n\tvar gte_push;\n\t\n\tswitch(what_to_do)\n\t{\n\t\tcase \"i\":\n\t\t\teq_push = function(in1) { return out.push(in1); };\n\t\t\tlt_push = function() { return; };\n\t\t\tgte_push = function() { return; };\n\t\tbreak;\n\t\tcase \"u\":\n\t\t\teq_push = function(in1) { return out.push(in1); };\n\t\t\tlt_push = function(in1) { return out.push(in1); };\n\t\t\tgte_push = function(in1) { return out.push(in1); };\n\t\tbreak;\n\t\tcase \"x\":\n\t\t\teq_push = function() { return; };\n\t\t\tlt_push = function(in1) { return out.push(in1); };\n\t\t\tgte_push = function(in1) { return out.push(in1); };\n\t\tbreak;\n\t\tdefault:\n\t\t\treturn [];\n\t}\n\t\n\t// the continues should speed up execution ...\n\twhile (i < arr1.length && j < arr2.length)\n\t{\n\t\ta = arr1[i];\n\t\tb = arr2[j];\n\t\t\n\t\tif (a === b)\n\t\t{\n\t\t\teq_push(a);\n\t\t\ti++;\n\t\t\tj++;\n\t\t\tcontinue;\n\t\t}\n\t\t// a < b\n\t\telse if (the_compare(a,b) == -1)\n\t\t{\n\t\t\tlt_push(a);\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgte_push(b);\n\t\t\tj++;\n\t\t\tcontinue;\n\t\t}\n\t}\n\t\n\tif (what_to_do == \"u\" || what_to_do == \"x\")\n\t{\n\t\t// add any remainders\n\t\tfor (; i<arr1.length; i++)\n\t\t\tout.push(arr1[i]);\n\t\tfor (; j<arr2.length; j++)\n\t\t\tout.push(arr2[j]);\n\t}\n\t\n\treturn out;\n}", "function testBasicOperations() {\n var sha512 = new goog.crypt.Sha512();\n goog.crypt.hashTester.runBasicTests(sha512);\n\n var sha384 = new goog.crypt.Sha384();\n goog.crypt.hashTester.runBasicTests(sha384);\n\n var sha256 = new goog.crypt.Sha512_256();\n goog.crypt.hashTester.runBasicTests(sha256);\n}" ]
[ "0.614667", "0.60421485", "0.5994541", "0.5898469", "0.57985216", "0.5742825", "0.5727613", "0.57271165", "0.56053096", "0.55835235", "0.5573103", "0.55728894", "0.55604", "0.5515135", "0.550902", "0.55050015", "0.54754686", "0.5475394", "0.5429418", "0.54290855", "0.54249525", "0.5417619", "0.538555", "0.5372798", "0.5367819", "0.5363375", "0.5360653", "0.5355621", "0.5353821", "0.53380334", "0.53288937", "0.53245884", "0.53235793", "0.5322381", "0.53185356", "0.53134507", "0.53005606", "0.52959734", "0.5291227", "0.5283636", "0.5283378", "0.5263641", "0.5261882", "0.52496904", "0.5248229", "0.5242129", "0.5240094", "0.5236668", "0.52307665", "0.5229271", "0.52244", "0.52122647", "0.52090186", "0.5201154", "0.51923335", "0.51919365", "0.5191039", "0.51854485", "0.51836175", "0.51831424", "0.5182645", "0.5181863", "0.517792", "0.51775503", "0.5177458", "0.5174859", "0.51733893", "0.51733893", "0.51733893", "0.51733893", "0.5172929", "0.5172871", "0.51713556", "0.5169019", "0.51681614", "0.51668525", "0.516542", "0.5164659", "0.51622164", "0.51541376", "0.51492494", "0.51478916", "0.5147066", "0.5146485", "0.5143294", "0.5142137", "0.5141985", "0.5140552", "0.5140242", "0.5138856", "0.51366234", "0.5133925", "0.5132236", "0.51313084", "0.5130759", "0.51289886", "0.51249135", "0.5122214", "0.5120483", "0.5118567", "0.51134956" ]
0.0
-1
Add integers, wrapping at 2^32. This uses 16bit operations internally to work around bugs in some JS interpreters.
function safe_add (x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF) var msw = (x >> 16) + (y >> 16) + (lsw >> 16) return (msw << 16) | (lsw & 0xFFFF) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n}", "function add32(a, b) {\n return a + b & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\nreturn (a + b) & 0xFFFFFFFF;\n}", "function add32(a, b) {\nreturn (a + b) & 0xFFFFFFFF;\n}", "function unsigned32Add(){\n\treturn Array.from(arguments).reduce(function (a, b){\n\t\treturn ((a >>> 0) + (b >>> 0)) >>> 0;\n\t}, 0);\n}", "function add32(a, b) {\n\treturn (a + b) & 0xFFFFFFFF;\n}", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF\n}", "function add32(a, b) {\n return a + b & 0xFFFFFFFF;\n}", "function add32(a, b) {\n return a + b & 0xFFFFFFFF;\n}", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return ((a + b) & ~0) >>> 0;\n}", "function radix16_sum32() {\n\tfor (let j = 0; j < 2; j++) {\n\t\tconst iStart = (j << 8),\n\t\t\tiEnd = ((j + 1) << 8);\n\t\tfor (let i = iStart, v = 0, sum = 0; i < iEnd; i++) {\n\t\t\tv = count32[i];\n\t\t\tcount32[i++] = sum;\n\t\t\tsum += v;\n\t\t\tv = count32[i];\n\t\t\tcount32[i++] = sum;\n\t\t\tsum += v;\n\t\t\tv = count32[i];\n\t\t\tcount32[i++] = sum;\n\t\t\tsum += v;\n\t\t\tv = count32[i];\n\t\t\tcount32[i] = sum;\n\t\t\tsum += v;\n\t\t}\n\t}\n}", "function safeAdd_32 (x, y)\n\t{\n\t\tvar lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t\tvar msw = (x >>> 16) + (y >>> 16) + (lsw >>> 16);\n\n\t\treturn ((msw & 0xFFFF) << 16) | (lsw & 0xFFFF);\n\t}", "add(addend) {\n if (!Long.isLong(addend))\n addend = Long.fromValue(addend);\n // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\n const a48 = this.high >>> 16;\n const a32 = this.high & 0xffff;\n const a16 = this.low >>> 16;\n const a00 = this.low & 0xffff;\n const b48 = addend.high >>> 16;\n const b32 = addend.high & 0xffff;\n const b16 = addend.low >>> 16;\n const b00 = addend.low & 0xffff;\n let c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 + b00;\n c16 += c00 >>> 16;\n c00 &= 0xffff;\n c16 += a16 + b16;\n c32 += c16 >>> 16;\n c16 &= 0xffff;\n c32 += a32 + b32;\n c48 += c32 >>> 16;\n c32 &= 0xffff;\n c48 += a48 + b48;\n c48 &= 0xffff;\n return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\n }", "function radix32_sum32() {\n\tfor (let j = 0; j < 4; j++) {\n\t\tconst iStart = (j << 8),\n\t\t\tiEnd = ((j + 1) << 8);\n\t\tfor (let i = iStart, v = 0, sum = 0; i < iEnd; i++) {\n\t\t\tv = count32[i];\n\t\t\tcount32[i++] = sum;\n\t\t\tsum += v;\n\t\t\tv = count32[i];\n\t\t\tcount32[i++] = sum;\n\t\t\tsum += v;\n\t\t\tv = count32[i];\n\t\t\tcount32[i++] = sum;\n\t\t\tsum += v;\n\t\t\tv = count32[i];\n\t\t\tcount32[i] = sum;\n\t\t\tsum += v;\n\t\t}\n\t}\n}", "function radix32_sum16() {\n\tfor (let j = 0; j < 4; j++) {\n\t\tconst iStart = (j << 8),\n\t\t\tiEnd = ((j + 1) << 8);\n\t\tfor (let i = iStart, v = 0, sum = 0; i < iEnd; i++) {\n\t\t\tv = count16[i];\n\t\t\tcount16[i++] = sum;\n\t\t\tsum += v;\n\t\t\tv = count16[i];\n\t\t\tcount16[i++] = sum;\n\t\t\tsum += v;\n\t\t\tv = count16[i];\n\t\t\tcount16[i++] = sum;\n\t\t\tsum += v;\n\t\t\tv = count16[i];\n\t\t\tcount16[i] = sum;\n\t\t\tsum += v;\n\t\t}\n\t}\n}", "function add16(a, b) {\n return (a + b) & 0xFFFF;\n}", "function add16(a, b) {\n return (a + b) & 0xFFFF;\n}", "function safe_add(x,y){var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&0xFFFF;}", "function safe_add(x,y){var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&0xFFFF;}", "function bigint_add(base, rh) {\n var carry = false;\n for (var i = 0; i < base.length; i++) {\n var vc = full_add(base[i], rh[i], carry);\n base[i] = vc[0];\n carry = vc[1];\n }\n}", "function safeAdd(x,y){var lsw=(x&0xffff)+(y&0xffff);var msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&0xffff;}", "function safe_add(x, y) \n{ \nvar lsw = (x & 0xFFFF) + (y & 0xFFFF); \nvar msw = (x >> 16) + (y >> 16) + (lsw >> 16); \nreturn (msw << 16) | (lsw & 0xFFFF); \n}", "function safe_add(x : number, y : number) : number\n {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n }", "function safe_add(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n}", "function x64_add(a, b){\n\t\tvar A0 = a[0] & 0xFFFF; // lowest 16 bits\n\t\tvar A1 = a[0] >>> 16; // ...\n\t\tvar A2 = a[1] & 0xFFFF; // ...\n\t\tvar A3 = a[1] >>> 16; // highest 16 bits\n\t\tvar B0 = b[0] & 0xFFFF;\n\t\tvar B1 = b[0] >>> 16;\n\t\tvar B2 = b[1] & 0xFFFF;\n\t\tvar B3 = b[1] >>> 16;\n\t\tvar R0 = A0 + B0;\n\t\tvar R1 = A1 + B1 + (R0 >> 16);\n\t\tvar R2 = A2 + B2 + (R1 >> 16);\n\t\tvar R3 = A3 + B3 + (R2 >> 16);\n\t\treturn [(R0 & 0xFFFF) | ((R1 & 0xFFFF) << 16), (R2 & 0xFFFF) | ((R3 & 0xFFFF) << 16)];\n\t}", "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "function ADD64AA (v, a, b) {\n var o0 = v[a] + v[b]\n var o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "function safe_add(x, y) \n{ \n var lsw = (x & 0xFFFF) + (y & 0xFFFF) \n var msw = (x >> 16) + (y >> 16) + (lsw >> 16) \n return (msw << 16) | (lsw & 0xFFFF) \n}", "function safe_add$1(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xFFFF;\n }", "function safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}", "function safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}", "function safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}", "function safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}", "function safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}", "function safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}", "function safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}", "function safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}", "function add(x, y) {\n return (x + y ) | 0\n //lets see how this goes on testling.\n // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n // return (msw << 16) | (lsw & 0xFFFF);\n }", "function add(x, y) {\n return (x + y ) | 0\n //lets see how this goes on testling.\n // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n // return (msw << 16) | (lsw & 0xFFFF);\n }", "function add(x, y) {\n return (x + y ) | 0\n //lets see how this goes on testling.\n // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n // return (msw << 16) | (lsw & 0xFFFF);\n }", "function add(x, y) {\n return (x + y ) | 0\n //lets see how this goes on testling.\n // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n // return (msw << 16) | (lsw & 0xFFFF);\n }", "function add(x, y) {\n return (x + y ) | 0\n //lets see how this goes on testling.\n // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n // return (msw << 16) | (lsw & 0xFFFF);\n }", "function add(x, y) {\n return (x + y ) | 0\n //lets see how this goes on testling.\n // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n // return (msw << 16) | (lsw & 0xFFFF);\n }", "function add(x, y) {\n return (x + y ) | 0\n //lets see how this goes on testling.\n // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n // return (msw << 16) | (lsw & 0xFFFF);\n }", "function safeAdd(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xFFFF;\n }", "function safe_add(x, y)\r\n{\r\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n return (msw << 16) | (lsw & 0xFFFF);\r\n}", "function safe_add(x, y)\r\n{\r\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n return (msw << 16) | (lsw & 0xFFFF);\r\n}", "function safe_add(x, y)\r\n{\r\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n return (msw << 16) | (lsw & 0xFFFF);\r\n}", "function safe_add(x, y)\r\n{\r\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n return (msw << 16) | (lsw & 0xFFFF);\r\n}", "function safe_add(x, y)\r\n{\r\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n return (msw << 16) | (lsw & 0xFFFF);\r\n}", "function safe_add(x, y)\r\n{\r\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n return (msw << 16) | (lsw & 0xFFFF);\r\n}", "function safe_add(x, y)\r\n{\r\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n return (msw << 16) | (lsw & 0xFFFF);\r\n}", "function safe_add(x, y)\r\n{\r\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n return (msw << 16) | (lsw & 0xFFFF);\r\n}", "function safe_add(x, y)\r\n{\r\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n return (msw << 16) | (lsw & 0xFFFF);\r\n}", "function safe_add(x, y)\r\n{\r\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n return (msw << 16) | (lsw & 0xFFFF);\r\n}", "function safe_add(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xFFFF;\n }", "function addInt_(x, n) {\n var i, k, c, b;\n x[0] += n;\n k = x.length;\n c = 0;\n for (i = 0; i < k; i++) {\n c += x[i];\n b = 0;\n if (c < 0) {\n b = -(c >> bpe);\n c += b * radix;\n }\n x[i] = c & mask;\n c = (c >> bpe) - b;\n if (!c) return; //stop carrying as soon as the carry is zero\n }\n }", "function ADD64AA (v, a, b) {\n const o0 = v[a] + v[b]\n let o1 = v[a + 1] + v[b + 1]\n if (o0 >= 0x100000000) {\n o1++\n }\n v[a] = o0\n v[a + 1] = o1\n}", "function safe_add(x, y) {\n\t var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t return msw << 16 | lsw & 0xFFFF;\n\t}", "function safe_add(x, y) {\n\t var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t return msw << 16 | lsw & 0xFFFF;\n\t}", "function add(x, y) {\r\n return (x + y ) | 0\r\n //lets see how this goes on testling.\r\n // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n // return (msw << 16) | (lsw & 0xFFFF);\r\n }", "function safe_add(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xFFFF;\n}", "function safe_add(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xFFFF;\n}", "function safe_add(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xFFFF;\n}", "function safe_add(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xFFFF;\n}", "function safe_add(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xFFFF;\n}", "function safe_add(x, y)\n{\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n}", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & 0xFFFF);\n\t }", "function safe_add(x, y)\n{\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n}", "function safe_add(x, y)\n{\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n}", "function safe_add(x, y)\n{\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n}", "function safe_add(x, y)\n{\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n}" ]
[ "0.77990013", "0.77990013", "0.7757441", "0.7740754", "0.7736016", "0.77296126", "0.77296126", "0.77224797", "0.77194643", "0.769616", "0.76924163", "0.76924163", "0.76805955", "0.76805955", "0.76805955", "0.7522335", "0.7448978", "0.7289236", "0.7154131", "0.7140704", "0.7063321", "0.7056442", "0.7056442", "0.69981897", "0.69981897", "0.6992814", "0.69324285", "0.6871048", "0.68367624", "0.68357146", "0.681872", "0.6795246", "0.6795246", "0.6795246", "0.6795246", "0.6795246", "0.6795246", "0.6795246", "0.6795246", "0.67848396", "0.6760587", "0.6759224", "0.6759224", "0.6759224", "0.6759224", "0.6759224", "0.6759224", "0.6759224", "0.6759224", "0.67570204", "0.67570204", "0.67570204", "0.67570204", "0.67570204", "0.67570204", "0.67570204", "0.6750503", "0.67458516", "0.67458516", "0.67458516", "0.67458516", "0.67458516", "0.67458516", "0.67458516", "0.67458516", "0.67458516", "0.67458516", "0.6743335", "0.6743034", "0.67405033", "0.6737645", "0.6737645", "0.67368656", "0.6729709", "0.6729709", "0.6729709", "0.6729709", "0.6729709", "0.6728517", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.6726645", "0.67201966", "0.67201966", "0.67201966", "0.67201966" ]
0.0
-1
Bitwise rotate a 32bit number to the left.
function bit_rol (num, cnt) { return (num << cnt) | (num >>> (32 - cnt)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bitRotateLeft(num,cnt){return num<<cnt|num>>>32-cnt;}", "function bitRotateLeft (num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n }", "function bitRotateLeft (num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n }", "function bitRotateLeft (num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n }", "function bitRotateLeft (num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n }", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}", "function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n }", "function bitRotateLeft (num, cnt) {\r\n return (num << cnt) | (num >>> (32 - cnt))\r\n }", "function bitRotateLeft(num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n}", "rotateLeft(n) {\n if (n < 32) {\n\n var lower = ((this.lower << n | this.upper >>> (32 - n))) & (0xFFFFFFFF);\n var upper = ((this.upper << n | this.lower >>> (32 - n))) & (0xFFFFFFFF);\n return new jsLong(upper, lower);\n }\n\n if (n >= 32) {\n n -= 32;\n var lower = ((this.upper << n | this.lower >>> (32 - n))) & (0xFFFFFFFF);\n var upper = ((this.lower << n | this.upper >>> (32 - n))) & (0xFFFFFFFF);\n return new jsLong(upper, lower);\n }\n }", "function rotateLeft(x, n){\n\tif(n != Math.floor(n) || n < 0){\n\t\tthrow 'Invalid argument (n): requires positive integer'\n\t}\n\n\treturn ((x << n) | (x >>> (32 - n))) >>> 0;\n}", "static rot_4bit_left( shift, v ){ return ((v << shift) & 15) | (v & 15) >> (4-shift); }", "function rot32b_L(x, count) {\n\treturn (x << count) | (x >>> (32 - count));\n}", "function bit_rol(num,cnt){return num<<cnt|num>>>32-cnt;}", "function bit_rol(num,cnt){return num<<cnt|num>>>32-cnt;}", "function bit_rol(num,cnt){return (num << cnt) | (num >>> (32 - cnt));}", "function rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}", "function rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}", "function rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}", "function rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}", "function rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}", "function rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}", "function rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}", "function bit_rol(num, cnt) \n{ \nreturn (num << cnt) | (num >>> (32 - cnt)); \n}", "function rol(num, cnt) \n{ \n return (num << cnt) | (num >>> (32 - cnt)) \n}", "static rotate(value, bits) {\r\n return (value << bits) | (value >>> (32 - bits));\r\n }", "function bit_rol(num, cnt) {\r\n\t\t return (num << cnt) | (num >>> (32 - cnt));\r\n\t\t }", "function rol(num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function rol(num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t }", "function bit_rol(num, cnt)\r\n{\r\n return (num << cnt) | (num >>> (32 - cnt));\r\n}", "function bit_rol(num, cnt)\r\n{\r\n return (num << cnt) | (num >>> (32 - cnt));\r\n}", "function bit_rol(num, cnt)\r\n{\r\n return (num << cnt) | (num >>> (32 - cnt));\r\n}", "function bit_rol(num, cnt)\r\n{\r\n return (num << cnt) | (num >>> (32 - cnt));\r\n}", "function bit_rol(num, cnt)\r\n{\r\n return (num << cnt) | (num >>> (32 - cnt));\r\n}", "function bit_rol(num, cnt)\r\n{\r\n return (num << cnt) | (num >>> (32 - cnt));\r\n}", "function bit_rol(num, cnt)\r\n{\r\n return (num << cnt) | (num >>> (32 - cnt));\r\n}", "function bit_rol(num, cnt)\r\n{\r\n return (num << cnt) | (num >>> (32 - cnt));\r\n}", "function bit_rol(num, cnt)\r\n{\r\n return (num << cnt) | (num >>> (32 - cnt));\r\n}", "function bit_rol(num : number, cnt : number) : number\n {\n return (num << cnt) | (num >>> (32 - cnt));\n }", "function bit_rol (num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt))\n\t }", "function bit_rol (num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt))\n\t }", "function bit_rol (num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt))\n\t }", "function bit_rol (num, cnt) {\n\t return (num << cnt) | (num >>> (32 - cnt))\n\t }", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}", "function bit_rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}" ]
[ "0.87508583", "0.8438198", "0.8438198", "0.8438198", "0.8438198", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8334637", "0.83200794", "0.8303131", "0.78028613", "0.772624", "0.77101445", "0.7570813", "0.7397471", "0.7397471", "0.73963314", "0.73750615", "0.73750615", "0.73750615", "0.73750615", "0.73750615", "0.73750615", "0.73750615", "0.72805834", "0.72359073", "0.72349817", "0.7171933", "0.716322", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.7144939", "0.71380234", "0.71380234", "0.71380234", "0.71380234", "0.71380234", "0.71380234", "0.71380234", "0.71380234", "0.71380234", "0.71286684", "0.7127272", "0.7127272", "0.7127272", "0.7127272", "0.71240675", "0.7116279", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115", "0.71139115" ]
0.0
-1
Represent num in a wNAF form
function getNAF(num, w) { var naf = []; var ws = 1 << (w + 1); var k = num.clone(); while (k.cmpn(1) >= 0) { var z; if (k.isOdd()) { var mod = k.andln(ws - 1); if (mod > (ws >> 1) - 1) z = (ws >> 1) - mod; else z = mod; k.isubn(z); } else { z = 0; } naf.push(z); // Optimization, shift by word if possible var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1; for (var i = 1; i < shift; i++) naf.push(0); k.iushrn(shift); } return naf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toUnformattedNF()\n{\n\treturn (this.num);\n}", "function getNAF(num,w){var naf=[];var ws=1<<w+1;var k=num.clone();while(k.cmpn(1)>=0){var z;if(k.isOdd()){var mod=k.andln(ws-1);if(mod>(ws>>1)-1)z=(ws>>1)-mod;else z=mod;k.isubn(z);}else{z=0;}naf.push(z);// Optimization, shift by word if possible\nvar shift=k.cmpn(0)!==0&&k.andln(ws-1)===0?w+1:1;for(var i=1;i<shift;i++){naf.push(0);}k.iushrn(shift);}return naf;}", "function getNAF(num,w){var naf=[];var ws=1<<w+1;var k=num.clone();while(k.cmpn(1)>=0){var z;if(k.isOdd()){var mod=k.andln(ws-1);if(mod>(ws>>1)-1)z=(ws>>1)-mod;else z=mod;k.isubn(z);}else{z=0;}naf.push(z);// Optimization, shift by word if possible\nvar shift=k.cmpn(0)!==0&&k.andln(ws-1)===0?w+1:1;for(var i=1;i<shift;i++){naf.push(0);}k.iushrn(shift);}return naf;}", "function nFormatter(num) {\n\tif (num >= 1000000000) {\n\t\treturn (num / 1000000000).toFixed(1).replace(/\\.0$/, '') + ' B';\n\t}\n\tif (num >= 1000000) {\n\t\treturn (num / 1000000).toFixed(1).replace(/\\.0$/, '') + ' M';\n\t}\n\tif (num >= 1000) {\n\t\treturn (num / 1000).toFixed(1).replace(/\\.0$/, '') + ' K';\n\t}\n\treturn num;\n}", "function getNAF(num, w) {\n var naf = [];\n var ws = 1 << w + 1;\n var k = num.clone();\n while (k.cmpn(1) >= 0) {\n var z;\n if (k.isOdd()) {\n var mod = k.andln(ws - 1);\n if (mod > (ws >> 1) - 1) z = (ws >> 1) - mod;else z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n naf.push(z);\n\n // Optimization, shift by word if possible\n var shift = k.cmpn(0) !== 0 && k.andln(ws - 1) === 0 ? w + 1 : 1;\n for (var i = 1; i < shift; i++) naf.push(0);\n k.iushrn(shift);\n }\n\n return naf;\n }", "function getNAF(num, w) {\n var naf = [];\n var ws = 1 << w + 1;\n var k = num.clone();\n while (k.cmpn(1) >= 0) {\n var z;\n if (k.isOdd()) {\n var mod = k.andln(ws - 1);\n if (mod > (ws >> 1) - 1) z = (ws >> 1) - mod;else z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n naf.push(z);\n\n // Optimization, shift by word if possible\n var shift = k.cmpn(0) !== 0 && k.andln(ws - 1) === 0 ? w + 1 : 1;\n for (var i = 1; i < shift; i++) {\n naf.push(0);\n }k.ishrn(shift);\n }\n\n return naf;\n}", "function glslifyNumber (n) {\n return n === (n | 0) ? n + '.0' : n + '';\n }", "function getNAF(num, w) {\n var naf = [];\n var ws = 1 << w + 1;\n var k = num.clone();\n while (k.cmpn(1) >= 0) {\n var z;\n if (k.isOdd()) {\n var mod = k.andln(ws - 1);\n if (mod > (ws >> 1) - 1) z = (ws >> 1) - mod;else z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n naf.push(z);\n\n // Optimization, shift by word if possible\n var shift = k.cmpn(0) !== 0 && k.andln(ws - 1) === 0 ? w + 1 : 1;\n for (var i = 1; i < shift; i++) {\n naf.push(0);\n }k.iushrn(shift);\n }\n\n return naf;\n}", "function getNAF(num, w) {\n var naf = [];\n var ws = 1 << w + 1;\n var k = num.clone();\n while (k.cmpn(1) >= 0) {\n var z;\n if (k.isOdd()) {\n var mod = k.andln(ws - 1);\n if (mod > (ws >> 1) - 1) z = (ws >> 1) - mod;else z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n naf.push(z);\n\n // Optimization, shift by word if possible\n var shift = k.cmpn(0) !== 0 && k.andln(ws - 1) === 0 ? w + 1 : 1;\n for (var i = 1; i < shift; i++) {\n naf.push(0);\n }k.iushrn(shift);\n }\n\n return naf;\n}", "function getNAF(num, w) {\n\t var naf = [];\n\t var ws = 1 << (w + 1);\n\t var k = num.clone();\n\t while (k.cmpn(1) >= 0) {\n\t var z;\n\t if (k.isOdd()) {\n\t var mod = k.andln(ws - 1);\n\t if (mod > (ws >> 1) - 1)\n\t z = (ws >> 1) - mod;\n\t else\n\t z = mod;\n\t k.isubn(z);\n\t } else {\n\t z = 0;\n\t }\n\t naf.push(z);\n\t\n\t // Optimization, shift by word if possible\n\t var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1;\n\t for (var i = 1; i < shift; i++)\n\t naf.push(0);\n\t k.iushrn(shift);\n\t }\n\t\n\t return naf;\n\t}", "function getNAF(num, w) {\n var naf = [];\n var ws = 1 << (w + 1);\n var k = num.clone();\n while (k.cmpn(1) >= 0) {\n var z;\n if (k.isOdd()) {\n var mod = k.andln(ws - 1);\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n naf.push(z);\n\n // Optimization, shift by word if possible\n var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1;\n for (var i = 1; i < shift; i++)\n naf.push(0);\n k.ishrn(shift);\n }\n\n return naf;\n}", "function getNAF(num, w) {\n var naf = [];\n var ws = 1 << (w + 1);\n var k = num.clone();\n while (k.cmpn(1) >= 0) {\n var z;\n if (k.isOdd()) {\n var mod = k.andln(ws - 1);\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n naf.push(z);\n\n // Optimization, shift by word if possible\n var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1;\n for (var i = 1; i < shift; i++)\n naf.push(0);\n k.ishrn(shift);\n }\n\n return naf;\n}", "function getNAF(num, w) {\n var naf = [];\n var ws = 1 << (w + 1);\n var k = num.clone();\n while (k.cmpn(1) >= 0) {\n var z;\n if (k.isOdd()) {\n var mod = k.andln(ws - 1);\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n naf.push(z);\n\n // Optimization, shift by word if possible\n var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1;\n for (var i = 1; i < shift; i++)\n naf.push(0);\n k.ishrn(shift);\n }\n\n return naf;\n}", "function getNAF(num, w) {\n var naf = [];\n var ws = 1 << (w + 1);\n var k = num.clone();\n while (k.cmpn(1) >= 0) {\n var z;\n if (k.isOdd()) {\n var mod = k.andln(ws - 1);\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n naf.push(z);\n\n // Optimization, shift by word if possible\n var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1;\n for (var i = 1; i < shift; i++)\n naf.push(0);\n k.ishrn(shift);\n }\n\n return naf;\n}", "function getNAF(num, w) {\n var naf = [];\n var ws = 1 << (w + 1);\n var k = num.clone();\n while (k.cmpn(1) >= 0) {\n var z;\n if (k.isOdd()) {\n var mod = k.andln(ws - 1);\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n naf.push(z);\n\n // Optimization, shift by word if possible\n var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1;\n for (var i = 1; i < shift; i++)\n naf.push(0);\n k.ishrn(shift);\n }\n\n return naf;\n}", "function getNAF(num, w) {\n\t var naf = [];\n\t var ws = 1 << (w + 1);\n\t var k = num.clone();\n\t while (k.cmpn(1) >= 0) {\n\t var z;\n\t if (k.isOdd()) {\n\t var mod = k.andln(ws - 1);\n\t if (mod > (ws >> 1) - 1)\n\t z = (ws >> 1) - mod;\n\t else\n\t z = mod;\n\t k.isubn(z);\n\t } else {\n\t z = 0;\n\t }\n\t naf.push(z);\n\n\t // Optimization, shift by word if possible\n\t var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1;\n\t for (var i = 1; i < shift; i++)\n\t naf.push(0);\n\t k.iushrn(shift);\n\t }\n\n\t return naf;\n\t}", "function getNAF(num, w) {\n\t var naf = [];\n\t var ws = 1 << (w + 1);\n\t var k = num.clone();\n\t while (k.cmpn(1) >= 0) {\n\t var z;\n\t if (k.isOdd()) {\n\t var mod = k.andln(ws - 1);\n\t if (mod > (ws >> 1) - 1)\n\t z = (ws >> 1) - mod;\n\t else\n\t z = mod;\n\t k.isubn(z);\n\t } else {\n\t z = 0;\n\t }\n\t naf.push(z);\n\n\t // Optimization, shift by word if possible\n\t var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1;\n\t for (var i = 1; i < shift; i++)\n\t naf.push(0);\n\t k.iushrn(shift);\n\t }\n\n\t return naf;\n\t}", "function getNAF(num, w) {\n var naf = [];\n var ws = 1 << w + 1;\n var k = num.clone();\n while (k.cmpn(1) >= 0) {\n var z;\n if (k.isOdd()) {\n var mod = k.andln(ws - 1);\n if (mod > (ws >> 1) - 1) z = (ws >> 1) - mod;else z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n naf.push(z);\n\n // Optimization, shift by word if possible\n var shift = k.cmpn(0) !== 0 && k.andln(ws - 1) === 0 ? w + 1 : 1;\n for (var i = 1; i < shift; i++) naf.push(0);\n k.iushrn(shift);\n }\n\n return naf;\n}", "function setNumberNF(num)\n{\n\tthis.numOriginal = num;\n\tthis.num = this.justNumber(num);\n}", "function fnW(str){\n\t var num;\n\t str>9?num=str:num=\"0\"+str;\n\t return num;\n\t }", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}", "function getNAF(num, w, bits) {\n\t var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n\t naf.fill(0);\n\n\t var ws = 1 << (w + 1);\n\t var k = num.clone();\n\n\t for (var i = 0; i < naf.length; i++) {\n\t var z;\n\t var mod = k.andln(ws - 1);\n\t if (k.isOdd()) {\n\t if (mod > (ws >> 1) - 1)\n\t z = (ws >> 1) - mod;\n\t else\n\t z = mod;\n\t k.isubn(z);\n\t } else {\n\t z = 0;\n\t }\n\n\t naf[i] = z;\n\t k.iushrn(1);\n\t }\n\n\t return naf;\n\t}", "function getNAF(num, w, bits) {\n\t var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n\t naf.fill(0);\n\n\t var ws = 1 << (w + 1);\n\t var k = num.clone();\n\n\t for (var i = 0; i < naf.length; i++) {\n\t var z;\n\t var mod = k.andln(ws - 1);\n\t if (k.isOdd()) {\n\t if (mod > (ws >> 1) - 1)\n\t z = (ws >> 1) - mod;\n\t else\n\t z = mod;\n\t k.isubn(z);\n\t } else {\n\t z = 0;\n\t }\n\n\t naf[i] = z;\n\t k.iushrn(1);\n\t }\n\n\t return naf;\n\t}", "function expandedForm(num) {\n\tconst degree = (num + '').length;\n\tlet arr = [];\n\tfor (let i = degree; i >= 0; i--) {\n\t\tlet number = Math.floor(num / Math.pow(10, i - 1)) * Math.pow(10, i - 1);\n\t\tif (number !== 0) {\n\t\t\tarr.push(number + '');\n\t\t\tnum -= number;\n\t\t}\n\t}\n\treturn arr.join(' + ');\n}", "function n(n) {\n return n > 9 ? \"\" + n : \"0\" + n; \n }", "function flow_g_fmt(num) {\n // TODO: shorten string\n return caml_new_string(caml_js_from_float(num).toString());\n}" ]
[ "0.6765914", "0.64303064", "0.64303064", "0.6332739", "0.6330919", "0.62930375", "0.6287292", "0.6284914", "0.6284914", "0.6283662", "0.627307", "0.627307", "0.627307", "0.627307", "0.627307", "0.6270584", "0.6270584", "0.62674284", "0.6219913", "0.6143485", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60998714", "0.60901976", "0.60901976", "0.6053688", "0.60145485", "0.59926975" ]
0.6263132
62
Represent k1, k2 in a Joint Sparse Form
function getJSF(k1, k2) { var jsf = [ [], [] ]; k1 = k1.clone(); k2 = k2.clone(); var d1 = 0; var d2 = 0; while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { // First phase var m14 = (k1.andln(3) + d1) & 3; var m24 = (k2.andln(3) + d2) & 3; if (m14 === 3) m14 = -1; if (m24 === 3) m24 = -1; var u1; if ((m14 & 1) === 0) { u1 = 0; } else { var m8 = (k1.andln(7) + d1) & 7; if ((m8 === 3 || m8 === 5) && m24 === 2) u1 = -m14; else u1 = m14; } jsf[0].push(u1); var u2; if ((m24 & 1) === 0) { u2 = 0; } else { var m8 = (k2.andln(7) + d2) & 7; if ((m8 === 3 || m8 === 5) && m14 === 2) u2 = -m24; else u2 = m24; } jsf[1].push(u2); // Second phase if (2 * d1 === u1 + 1) d1 = 1 - d1; if (2 * d2 === u2 + 1) d2 = 1 - d2; k1.iushrn(1); k2.iushrn(1); } return jsf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function K(a,b){this.g=[];this.H=a;this.G=b||null;this.f=this.a=!1;this.c=void 0;this.u=this.K=this.m=!1;this.j=0;this.b=null;this.o=0}", "function K(){this.i=0,this.j=0,this.S=new Array}", "function k(m1, m2){\r\n return do_(\r\n bind(\"x\", m1),\r\n bind(\"xs\", m2),\r\n ret(withBound(cons, \"x\", \"xs\"))\r\n );\r\n }", "function K(a){var b=Oc;this.l=[];this.F=b;this.D=a||null;this.j=this.i=!1;this.h=void 0;this.v=this.I=this.o=!1;this.m=0;this.g=null;this.s=0}", "computeControlPoints(K)\n {\n let p1=new Array();\n let p2=new Array();\n let n = K.length-1;\n let i,m;\n\n /*rhs vector*/\n let a=new Array();\n let b=new Array();\n let c=new Array();\n let r=new Array();\n\n /*left most segment*/\n a[0]=0;\n b[0]=2;\n c[0]=1;\n r[0] = K[0]+2*K[1];\n\n /*internal segments*/\n for (i = 1; i < n - 1; i++)\n {\n a[i]=1;\n b[i]=4;\n c[i]=1;\n r[i] = 4 * K[i] + 2 * K[i+1];\n }\n\n /*right segment*/\n a[n-1]=2;\n b[n-1]=7;\n c[n-1]=0;\n r[n-1] = 8*K[n-1]+K[n];\n\n /*solves Ax=b with the Thomas algorithm (from Wikipedia)*/\n for (i = 1; i < n; i++)\n {\n m = a[i]/b[i-1];\n b[i] = b[i] - m * c[i - 1];\n r[i] = r[i] - m*r[i-1];\n }\n\n p1[n-1] = r[n-1]/b[n-1];\n for (i = n - 2; i >= 0; --i)\n p1[i] = (r[i] - c[i] * p1[i+1]) / b[i];\n\n /*we have p1, now compute p2*/\n for (i=0;i<n-1;i++)\n p2[i]=2*K[i+1]-p1[i+1];\n\n p2[n-1]=0.5*(K[n]+p1[n-1]);\n\n return {p1:p1, p2:p2};\n }", "function computeControlPoints(K) {\n var i, m,\n p1 = new Array(),\n p2 = new Array(),\n n = K.length - 1,\n /*rhs vector*/\n a = new Array(),\n b = new Array(),\n c = new Array(),\n r = new Array();\n /*left most segment*/\n a[0] = 0;\n b[0] = 2;\n c[0] = 1;\n r[0] = K[0] + 2 * K[1];\n /*internal segments*/\n for (i = 1; i < n - 1; i++) {\n a[i] = 1;\n b[i] = 4;\n c[i] = 1;\n r[i] = 4 * K[i] + 2 * K[i + 1];\n }\n\n /*right segment*/\n a[n - 1] = 2;\n b[n - 1] = 7;\n c[n - 1] = 0;\n r[n - 1] = 8 * K[n - 1] + K[n];\n /*solves Ax=b with the Thomas algorithm (from Wikipedia)*/\n for (i = 1; i < n; i++) {\n m = a[i] / b[i - 1];\n b[i] = b[i] - m * c[i - 1];\n r[i] = r[i] - m * r[i - 1];\n }\n\n p1[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) {\n p1[i] = (r[i] - c[i] * p1[i + 1]) / b[i];\n }\n\n /*we have p1, now compute p2*/\n for (i = 0; i < n - 1; i++) {\n p2[i] = 2 * K[i + 1] - p1[i + 1];\n }\n p2[n - 1] = 0.5 * (K[n] + p1[n - 1]);\n return {p1: p1, p2: p2};\n }", "static apply__i0_i1__o0_o1__k0_k1() {\n this.output0.realTensor = this.input0.realTensor.clone();\n this.output1.realTensor = this.input1.realTensor.clone(); }", "function cantorPairing(k1, k2) {\n\treturn ((((k1+k2) * (k1+k2+1)) / 2) + k2);\n}", "function Pair(s1, s2) {\n\n // The first shape.\n this.shape1 = s1 || null;\n // The second shape.\n this.shape2 = s2 || null;\n}", "function SparseMatrixCRS(sm) {\n this.M = sm.M;\n this.N = sm.N;\n this.j = [];\n this.v = [];\n this.rp = []; // row pointer\n \n var j = Array(this.M); var v = Array(this.M);\n for (var k=0; k<this.M; k++) { j[k] = []; v[k] = []; }\n for (var k=0; k<sm.i.length; k++) {\n j[sm.i[k]].push(sm.j[k]);\n v[sm.i[k]].push(sm.v[k]);\n }\n var count = 0;\n this.rp.push(count);\n for (var k=0; k<this.M; k++) {\n this.j = this.j.concat(j[k]);\n this.v = this.v.concat(v[k]);\n count += j[k].length;\n this.rp.push(count);\n } \n}", "function mult2d(u, k)\r\n{\r\n return [u[0]*k, u[1]*k]\r\n}", "function computeControlPoints(K)\r\n{\r\n\tp1=new Array();\r\n\tp2=new Array();\r\n\tn = K.length-1;\r\n\t\r\n\t/*rhs vector*/\r\n\ta=new Array();\r\n\tb=new Array();\r\n\tc=new Array();\r\n\tr=new Array();\r\n\t\r\n\t/*left most segment*/\r\n a[0]=0;\r\n b[0]=2;\r\n c[0]=1;\r\n r[0] = K[0]+2*K[1];\r\n\r\n\t/*internal segments*/\r\n\tfor (i = 1; i < n - 1; i++)\r\n\t{\r\n\t\ta[i]=1;\r\n\t\tb[i]=4;\r\n\t\tc[i]=1;\r\n\t\tr[i] = 4 * K[i] + 2 * K[i+1];\r\n\t}\r\n\t\t\t\r\n\t/*right segment*/\r\n a[n-1]=2;\r\n b[n-1]=7;\r\n c[n-1]=0;\r\n r[n-1] = 8*K[n-1]+K[n];\r\n\t\r\n\t/*solves Ax=b with the Thomas algorithm (from Wikipedia)*/\r\n\tfor (i = 1; i < n; i++)\r\n\t{\r\n\t\tm = a[i]/b[i-1];\r\n\t\tb[i] = b[i] - m * c[i - 1];\r\n\t\tr[i] = r[i] - m*r[i-1];\r\n\t}\r\n \r\n\tp1[n-1] = r[n-1]/b[n-1];\r\n\tfor (i = n - 2; i >= 0; --i)\r\n\t\tp1[i] = (r[i] - c[i] * p1[i+1]) / b[i];\r\n\t\t\r\n\t/*we have p1, now compute p2*/\r\n\tfor (i=0;i<n-1;i++)\r\n\t\tp2[i]=2*K[i+1]-p1[i+1];\r\n\t\r\n\tp2[n-1]=0.5*(K[n]+p1[n-1]);\r\n\t\r\n\treturn {p1:p1, p2:p2};\r\n}", "function ku(a,b){this.o=[];this.G=a;this.I=b||null;this.k=this.b=!1;this.j=void 0;this.D=this.K=this.B=!1;this.A=0;this.g=null;this.C=0}", "function getIntersectionKey(o) {\n return o.a.join(',') + ';' + o.b.join(',');\n }", "ishash(x, y) {\n var key = x*this.smul1 + y*this.smul2;\n \n return key;\n }", "function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}", "function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}", "function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}", "function Clusterer() {\n var _equivClasses = [];\n var _points = [];\n var _clusters = [];\n var _classes = [];\n\n function clear() {\n _equivClasses = [];\n _points = [];\n _clusters = [];\n _classes = [];\n }\n\n function newCluster() {\n return {\n fx: 0,\n fy: 0,\n points: []\n };\n }\n\n function addCluster(cluster) {\n _clusters.push(cluster);\n return cluster;\n }\n\n function newEquivClass() {\n var index = _classes.length;\n\n var equivClass = {\n iParent: index,\n iNext: -1,\n iFirstPoint: -1\n };\n _classes.push(equivClass);\n return index;\n }\n\n // Vamos a unificar c1 y c2\n // Esto es equivalente a unificar el padre de c1 (p1), y el padre de c2(p2)\n // Cada clase de equivalencia tiene el índice del padre y el índice del siguiente hermano que comparte el mismo padre.\n // El padre de una clase de equivalencia es, en principio, ella misma, lo que nos permite evitar código farragoso,\n // ya que siempre miro el padre de una clase.\n //\n // 1. Haremos que el siguiente hermano del padre de p1 sea p2\n // 2. Recorreremos la lista de p2 (incluyendo a p2), poniendo que su padre es p1\n // 3. Haremos que el último \"hermano\" de p2 sea el anterior primer \"hermano\" de p1.\n // Al final del proceso, tendremos enlazadas las listas de p1 y p2, haciendo que todos los elementos\n // tengan como padre a p1.\n // Este sistema permite no tener que realizar un segundo paso para \"mergear\" las clases de equivalencia.\n // Dado que el algoritmo se hace mediante \"scanLine\", siempre mergearemos con el índice de padre inferior,\n // ya ue hay una probabilidad muchisimo más alta de que este padre sea el que tiene más elementos. Lo normal\n // es que las clases de equivalencia nuevas sean más cortas, y el algoritmo no tenga que hacer muchas \"uniones\" de clases\n // Se ha probado y es muy eficiente.\n\n function mergeClasses(i0, i1) {\n var c1 = _classes[i0];\n var c2 = _classes[i1];\n var p1, c;\n var ip1 = c1.iParent;\n var ip2 = c2.iParent;\n var iAux;\n var iNext;\n var iter;\n if (ip1 == ip2) {\n return ip1;\n }\n if (ip1 > ip2) {\n iAux = ip1;\n ip1 = ip2;\n ip2 = iAux;\n }\n p1 = _classes[ip1];\n\n iNext = p1.iNext;\n p1.iNext = ip2;\n iter = ip2;\n while (1) {\n c = _classes[iter];\n c.iParent = ip1;\n if (c.iNext != -1) {\n iter = c.iNext;\n } else {\n c.iNext = iNext;\n return ip1;\n }\n }\n }\n\n function addPointToClass(iClass, x, y, v) {\n var c = _classes[iClass];\n var iPoint = _points.length;\n var clusterPoint = {\n x: x,\n y: y,\n v: v,\n iNext: c.iFirstPoint\n };\n c.iFirstPoint = iPoint;\n _points.push(clusterPoint);\n }\n\n function findClusters(params) {\n var imageData = params.imageData;\n var bw = params.bw;\n var threshold = params.threshold;\n var minPointsPerCluster = params.minPointsPerCluster;\n\n if (!imageData || threshold === undefined || minPointsPerCluster === undefined) {\n throw \"findClusters: please specify imageData, threshold and minPointsPerCluster\";\n }\n\n var width = imageData.width;\n var height = imageData.height;\n var size = width * height;\n var detectBuffer = new Int32Array(size);\n\n for (var i = 0; i < size; i++) {\n detectBuffer[i] = -1;\n }\n\n var y, x;\n var value;\n var iRow;\n var iRowUp;\n var iClassUp;\n var iClassLeft;\n var iClass;\n var rowIndex;\n var data = imageData.data;\n\n clear();\n var shifter = 2;\n if (bw) {\n shifter = 0;\n }\n for (y = 1; y < height - 1; y++) {\n iRow = y * width;\n iRowUp = iRow - width;\n for (x = 1; x < width - 1; x++) {\n value = data[iRow + x << shifter];\n if (value > threshold) {\n iClassUp = detectBuffer[iRowUp + x];\n iClassLeft = detectBuffer[iRow + x - 1];\n if (iClassUp == -1) {\n if (iClassLeft == -1) {\n iClass = newEquivClass();\n } else {\n iClass = iClassLeft;\n }\n } else {\n if (iClassLeft == -1) {\n iClass = iClassUp;\n } else {\n iClass = mergeClasses(iClassUp, iClassLeft);\n }\n }\n detectBuffer[iRow + x] = iClass;\n addPointToClass(iClass, x, y, value);\n }\n }\n }\n // Ahora vamos a calcular los centros de los clusters\n var i;\n var totalPoints;\n var fx;\n var fy;\n var index;\n var iPoint;\n var cRoot, cCur;\n var p;\n var cluster;\n\n for (i = 0; i < _classes.length; i++) {\n //for (i=0; i<0; i++){\n cRoot = _classes[i];\n if (cRoot.iParent == i) {\n // soy un raíz porque mi padre soy yo\n index = i;\n fx = 0;\n fy = 0;\n totalPoints = 0;\n var cluster = newCluster();\n while (index != -1) {\n cCur = _classes[index];\n iPoint = cCur.iFirstPoint;\n while (iPoint != -1) {\n p = _points[iPoint];\n cluster.points.push({\n x: p.x,\n y: p.y,\n v: p.v\n });\n iPoint = p.iNext;\n fx += p.x * p.v;\n fy += p.y * p.v;\n totalPoints += p.v;\n }\n index = cCur.iNext;\n }\n if (totalPoints >= minPointsPerCluster) {\n fx /= totalPoints;\n fy /= totalPoints;\n cluster.fx = fx;\n cluster.fy = fy;\n addCluster(cluster);\n }\n }\n }\n }\n\n function numClusters() {\n return _clusters.length;\n }\n\n function getCluster(i) {\n return _clusters[i];\n }\n\n this.numClusters = numClusters.bind(this);\n this.getCluster = getCluster.bind(this);\n this.findClusters = findClusters.bind(this);\n}", "function intiDistanceMatrix(graph) {\n var distanceMatrix = {};\n\n $.each(graph.vertices, function () {\n distanceMatrix[this.label] = {};\n var rowVertex = this;\n $.each(graph.vertices, function () {\n if (rowVertex.label === this.label)\n distanceMatrix[rowVertex.label][this.label] = 0;\n else\n distanceMatrix[rowVertex.label][this.label] = -1;\n });\n });\n\n return distanceMatrix;\n}", "train(array, k = 2) {\n this.k = k;\n //initial data and centoid;\n var data = {};\n for (var i = 0; i < k; i++) {\n data[i] = {\n k: [],\n centroid: Math.ceil(this.sum(array) / array.length) * (i+1) / 3,\n temp: []\n }\n }\n while (true) {\n\n for (var i = 0; i < k; i++) {\n data[i].temp = []\n }\n for (var i = 0; i < array.length; i++) {\n let index = this.getCluster(data, array[i], k)\n data[index].temp.push(array[i])\n }\n //compare data for k set;\n this.showResult(data, k, 'temp')\n if (this.checkFinish(data, k)) {\n console.log('========================finish algorithm=============================')\n this.showResult(data, k)\n this.data = data;\n break;\n } else {\n for (var i = 0; i < k; i++) {\n data[i].centroid = this.getCentoid(data[i].temp);\n console.log('centroi ', i, data[i].centroid)\n data[i].k = data[i].temp;\n }\n }\n }\n }", "function skConstraint(element1, geom1, element2, geom2, offset) {\n this._element1 = element1;\n this._geom1 = geom1;\n this._element2 = element2;\n this._geom2 = geom2;\n this._offset = offset;\n\n this.geom1 = function () {\n return this._geom1;\n }\n\n this.geom2 = function () {\n return this._geom2;\n }\n\n this.element1 = function () {\n this._element1;\n }\n\n this.element2 = function () {\n this._element2;\n }\n\n this.offset = function () {\n return this._offset;\n }\n\n this.setOffset = function (offset) {\n this._offset = v;\n }\n\n}", "addEdge(v1,v2){\n //*This will find the value of the v1 and push it into v2 array to make the relationship\n this.adjacencyList[v1].push(v2);\n //*This will find the value of the v2 and push it into v1 array to make the relationship\n this.adjacencyList[v2].push(v1);\n }", "function Ik(a,b){this.g=[];this.D=a;this.G=b||null;this.f=this.a=!1;this.c=void 0;this.B=this.Da=this.l=!1;this.j=0;this.b=null;this.o=0}", "function addEdge(v1, v2) {\n adjMatrix[v1][v2] = 1;\n adjMatrix[v2][v1] = 1;\n}", "function knn(features, labels, predictionPoint, k){\n const {mean,variance}=tf.moments(features,0);\n const scaledPrediction=predictionPoint.sub(mean).div(variance.pow(.5));\n return features\n .sub(mean)\n .div(variance.pow(.5))\n .sub(scaledPrediction)\n .pow(2)\n .sum(1)\n .pow(0.5)\n .expandDims(1)\n .concat(labels, 1)\n .unstack()\n .sort((tensorA, tensorB) => tensorA.arraySync() > tensorB.arraySync() ? 1 : -1)\n .slice(0, k)\n .reduce((acc, pair) => acc + pair.arraySync()[1], 0) / k;\n}", "function gjk(shape1, shape2) {\n var _a;\n var supportFunction = minkowiskDifferenceSupportFunction(shape1, shape2);\n var initialPoint = supportFunction(new vec2_1[\"default\"](1, 0));\n var simplexPoints = new object_set_1.ObjectSet([initialPoint]);\n var point = initialPoint;\n var iterations = MAX_ITERATIONS;\n for (var i = 0; i < MAX_ITERATIONS; i++) {\n var supportPoint = supportFunction(vec2_1[\"default\"].negate(point));\n var pointDirection = vec2_1[\"default\"].normalize(point);\n var negPointDirection = vec2_1[\"default\"].negate(pointDirection);\n var pointDotNegDir = vec2_1[\"default\"].dot(point, negPointDirection);\n var supportPointDotNegDir = vec2_1[\"default\"].dot(supportPoint, negPointDirection);\n if (pointDotNegDir > supportPointDotNegDir || util_1.fpCmp(pointDotNegDir, supportPointDotNegDir) || vec2_1[\"default\"].norm(point) == 0) {\n iterations = i + 1;\n break;\n }\n simplexPoints.add(supportPoint);\n _a = findNearestPointSetOfUpTo4PointsConvexHull(simplexPoints), point = _a[0], simplexPoints = _a[1];\n }\n // console.log('Finished in', iterations, 'iterations');\n return [vec2_1[\"default\"].norm(point), vec2_1[\"default\"].normalize(point)];\n}", "function makeAdjMat(myObj){\n var myKeys = Object.keys(myObj); // get the keys of dictionary\n var adjMat = myKeys.reduce(function(output, elem){ // creating the adjacency matrix\n // keep in mind myObj[elem] is the list of states that border elem\n var stateBorderArr = myKeys.map(function(state) {\n return myObj[elem].indexOf(state) > -1;\n });\n output[elem] = stateBorderArr;\n return output;\n }, {});\n return adjMat;\n}", "function keygen(k) {\n var P = [];\n var s = [];\n k = k || [];\n clamp(k);\n core(P, s, k, null);\n return { p: P, s: s, k: k };\n }", "function SparseMatrix(M, N) {\n this.N = N || 0;\n this.M = M || 0;\n this.i = []; // row indices of non-zero values\n this.j = []; // col indices of now-zero values\n this.v = []; // non-zero values\n}", "insertKnot(un, r) {\r\n let p = this.degree;\r\n let dim = this.dimension;\r\n let k = this.findSpan(un);\r\n let isRational = this.isRational();\r\n // If un already exists in the knot vector then s is it's multiplicity\r\n let s = 0;\r\n for (let i = 0; i < this.knots.shape[0]; i++) {\r\n if (this.knots.get(i) === un) {\r\n s++;\r\n }\r\n }\r\n if (r + s >= p) {\r\n throw new Error('Knot insertion exceeds knot multiplicity beyond degree');\r\n }\r\n let m = this.knots.shape[0] - 1;\r\n let n = m - p - 1;\r\n let P = this.cpoints;\r\n let Up = this.knots;\r\n let Q = new common_1.NDArray({ shape: [P.shape[0] + r, dim] });\r\n let Uq = new common_1.NDArray({ shape: [Up.shape[0] + r] });\r\n let Rtmp, Wtmp;\r\n Rtmp = new common_1.NDArray({ shape: [p + 1, dim] });\r\n let Wp, Wq;\r\n if (this.weights) {\r\n Wp = this.weights;\r\n Wq = new common_1.NDArray({ shape: [Wp.shape[0] + r] });\r\n Wtmp = new common_1.NDArray({ shape: [p + 1] });\r\n }\r\n // Load new knot vector\r\n for (let i = 0; i < k + 1; i++) {\r\n Uq.set(i, Up.get(i));\r\n }\r\n for (let i = 1; i < r + 1; i++) {\r\n Uq.set(k + i, un);\r\n }\r\n for (let i = k + 1; i < m + 1; i++) {\r\n Uq.set(i + r, Up.get(i));\r\n }\r\n // Save unaltered control points\r\n for (let i = 0; i < k - p + 1; i++) {\r\n for (let j = 0; j < dim; j++) {\r\n Q.set(i, j, P.get(i, j));\r\n }\r\n if (Wp && Wq) {\r\n Wq.set(i, Wp.get(i));\r\n }\r\n }\r\n for (let i = k - s; i < n + 1; i++) {\r\n for (let j = 0; j < dim; j++) {\r\n Q.set(i + r, j, P.get(i, j));\r\n }\r\n if (Wp && Wq) {\r\n Wq.set(i + r, Wp.get(i));\r\n }\r\n }\r\n for (let i = 0; i < p - s + 1; i++) {\r\n for (let j = 0; j < dim; j++) {\r\n Rtmp.set(i, j, P.get(k - p + i, j));\r\n }\r\n }\r\n let L = 0;\r\n for (let j = 1; j < r + 1; j++) {\r\n L = k - p + j;\r\n for (let i = 0; i < p - j - s + 1; i++) {\r\n let alpha = (un - Up.get(L + i)) / (Up.get(i + k + 1) - Up.get(L + i));\r\n for (let z = 0; z < dim; z++) {\r\n Rtmp.set(i, z, alpha * Rtmp.get(i + 1, z) + (1 - alpha) * Rtmp.get(i, z));\r\n }\r\n if (Wtmp) {\r\n Wtmp.set(i, alpha * Wtmp.get(i + 1) + (1 - alpha) * Wtmp.get(i));\r\n }\r\n }\r\n for (let z = 0; z < dim; z++) {\r\n Q.set(L, z, Rtmp.get(0, z));\r\n Q.set(k + r - j - s, z, Rtmp.get(p - j - s, z));\r\n }\r\n if (Wq && Wtmp) {\r\n Wq.set(L, Wtmp.get(0));\r\n Wq.set(k + r - j - s, Wtmp.get(p - j - s));\r\n }\r\n }\r\n for (let i = L + 1; i < k - s + 1; i++) {\r\n for (let z = 0; z < dim; z++) {\r\n Q.set(i, z, Rtmp.get(i - L, z));\r\n }\r\n if (Wq && Wtmp) {\r\n Wq.set(i, Wtmp.get(i - L));\r\n }\r\n }\r\n this.knots = Uq;\r\n this.cpoints = Q;\r\n if (isRational) {\r\n this.weights = Wq;\r\n }\r\n }", "_addToIndex(index0, key0, key1, key2) {\n // Create layers as necessary\n var index1 = index0[key0] || (index0[key0] = {});\n var index2 = index1[key1] || (index1[key1] = {}); // Setting the key to _any_ value signals the presence of the quad\n\n var existed = key2 in index2;\n if (!existed) index2[key2] = null;\n return !existed;\n }", "_addToIndex(index0, key0, key1, key2) {\n // Create layers as necessary\n const index1 = index0[key0] || (index0[key0] = {});\n const index2 = index1[key1] || (index1[key1] = {});\n // Setting the key to _any_ value signals the presence of the quad\n const existed = (key2 in index2);\n if (!existed) index2[key2] = null;\n return !existed;\n }", "function buildGraph$2() {\n var graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\n var models = Object.keys(conversions$2);\n\n for (var len = models.length, i = 0; i < len; i++) {\n graph[models[i]] = {\n // http://jsperf.com/1-vs-infinity\n // micro-opt, but this is simple.\n distance: -1,\n parent: null\n };\n }\n\n return graph;\n} // https://en.wikipedia.org/wiki/Breadth-first_search", "function knn(features, labels, predictionPoint, k) {\n // tf.moments() => gives { mean, variance }\n // Standard Deviation = sqrt(variance)\n const { mean, variance } = tf.moments(features, 0);\n const standardDeviation = variance.pow(0.5);\n const scale = point => standardize(point, mean, standardDeviation);\n\n return (\n scale(features)\n .sub(scale(predictionPoint))\n .pow(2)\n .sum(1)\n .pow(0.5)\n .expandDims(1)\n .concat(labels, 1)\n .unstack()\n .sort((a, b) => (a.get(0) > b.get(0) ? 1 : -1))\n .slice(0, k)\n .reduce((acc, pair) => acc + pair.get(1), 0) / k\n );\n}", "function inout ( k ) {\n\n\t\tif ( ( k *= 2 ) < 1 ) return 0.5 * k * k;\n\t\treturn - 0.5 * ( --k * ( k - 2 ) - 1 );\n\n\t}", "function getVertexAcross(v1, v2, f) {\n var Vs = f.getVertices();\n if (Vs.length != 3) {\n console.log(\"Warning(getLaplacianSparseMatrix): Expecting 3 vertices per face\");\n return null;\n }\n var idx = 0;\n if ( (v1.ID != Vs[1].ID) && (v2.ID != Vs[1].ID) ) {\n idx = 1;\n }\n else if ( (v1.ID != Vs[2].ID) && (v2.ID != Vs[2].ID) ) {\n idx = 2;\n }\n return Vs[idx];\n }", "function mat2 (v0, v1) {\n\t//mat2(x0, y0, x1, y1)\n\tif (arguments.length >= 4) {\n\t\tvar x0 = this.process(arguments[0]);\n\t\tvar y0 = this.process(arguments[1]);\n\t\tvar x1 = this.process(arguments[2]);\n\t\tvar y1 = this.process(arguments[3]);\n\t\tvar comps = [x0, y0, x1, y1];\n\t\treturn Descriptor(\n\t\t\t`[${comps.join(', ')}]`, {\n\t\t\tcomponents: comps,\n\t\t\ttype: 'mat2',\n\t\t\tcomplexity: cmpl(comps)\n\t\t});\n\t};\n\n\t//ensure at least identity matrix\n\tif (v0 == null) v0 = 1;\n\n\tvar v0 = this.process(v0);\n\tvar v1 = this.process(v1);\n\n\t//mat2(float) → identity matrix\n\tif (this.types[v0.type].length === 1) {\n\t\tvar res = Descriptor(\n\t\t\t`mat2(${v0})`, {\n\t\t\tcomponents: [\n\t\t\t\tv0, 0,\n\t\t\t\t0, v0\n\t\t\t].map(float, this),\n\t\t\ttype: 'mat2',\n\t\t\tcomplexity: v0.complexity * 2 + 2,\n\t\t\tinclude: 'mat2'\n\t\t});\n\t\treturn res;\n\t}\n\n\t//mat2(mat2)\n\tif (v0.type === 'mat2') {\n\t\treturn v0;\n\t}\n\n\t//mat(vec, vec)\n\tvar comps = v0.components.slice(0,2).concat(v1.components.slice(0,2));\n\treturn Descriptor(`${this.types.vec2.call(this, v0)}.concat(${this.types.vec2.call(this, v1)})`, {\n\t\tcomponents: comps.map(float, this),\n\t\tcomplexity: cmpl(comps),\n\t\ttype: 'mat2'\n\t});\n}", "addEdge(v1,v2){\n this.adjacencyList[v1].push(v2)\n this.adjacencyList[v2].push(v1) \n }", "lin_ij(i, j) {\n if (Array.isArray(i)) [i, j] = i;\n\n return j + i * this.mapWidth;\n }", "function M(a,b){this.g=[];this.K=a;this.I=b||null;this.f=this.a=!1;this.c=void 0;this.s=this.N=this.l=!1;this.i=0;this.b=null;this.o=0}", "function K(){var e=o();return this.copyTo(e),e}", "_addToIndex (index0, key0, key1, key2) {\n // Create layers as necessary\n const index1 = index0[key0] || (index0[key0] = {})\n const index2 = index1[key1] || (index1[key1] = {})\n // Setting the key to _any_ value signals the presence of the quad\n const existed = key2 in index2\n\n if (!existed) {\n index2[key2] = null\n }\n\n return !existed\n }", "function key(x, y) {\n return x + ',' + y;\n}", "function kobon(a, b, c) {\n this.a = a;\n this.b = b;\n this.c = c;\n this.getUniquePoints = function() {\n var points = [];\n points.push(a.intersect1.point);\n points.push(a.intersect2.point);\n if (b.intersect1.point.equals(a.intersect2.point) ||\n b.intersect1.point.equals(a.intersect1.point)) {\n points.push(b.intersect2.point);\n } else {\n points.push(b.intersect1.point);\n }\n return points;\n };\n }", "constructor()\r\n\t{\r\n\t\tvar mapJ1 = [\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n\t\t[0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,9,0],\r\n\t\t[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]];\r\n\t\t\r\n\t\tvar mapJ2 = [\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n\t\t[0,0,0,6,0,0,0,0,0,0,0,0,0,0,9,0,0,0],\r\n\t\t[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n\t\t[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]];\r\n\r\n var lvlList = [mapJ1, mapJ2]\r\n\t\tvar listLength = lvlList.length;\r\n\t\tvar lvlListIndex = -1;\r\n\t\tthis.GetLvl = function ()\r\n\t\t{\r\n\t\t\tif(lvlListIndex <= listLength)\r\n\t\t\t{\r\n\t\t\t\tlvlListIndex++;\r\n\t\t\t\treturn lvlList[lvlListIndex];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t};\r\n\t}", "function M(a,b){this.g=[];this.u=a;this.s=b||null;this.f=this.a=!1;this.c=void 0;this.l=this.K=this.i=!1;this.h=0;this.b=null;this.j=0}", "function getAllPairs(skill_array) {\n var pair_array = [];\n for (var i=0;i<skill_array.length;i++){\n for (var j=0;j<skill_array.length;j++){\n if(i > j){\n if(j%2){\n pair_array.push({\"label\":skill_array[i] + \" or \" +skill_array[j], \"param1\":skill_array[i], \"param2\":skill_array[j]});\n }\n else {\n pair_array.push({\"label\":skill_array[j] + \" or \" +skill_array[i], \"param1\":skill_array[j], \"param2\":skill_array[i]});\n }\n }\n }\n }\n return pair_array;\n}", "function buildGraph$2() {\n\tvar graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\n\tvar models = Object.keys( conversions$2 );\n\n\tfor ( var len = models.length, i = 0; i < len; i++ ) {\n\t\tgraph[ models[ i ] ] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null,\n\t\t};\n\t}\n\n\treturn graph;\n} // https://en.wikipedia.org/wiki/Breadth-first_search", "function Matrix2D() {\n this.a = 1;\n this.c = 0;\n this.tx = 0;\n this.b = 0;\n this.d = 1;\n this.ty = 0;\n }", "function getJSF(k1, k2) {\n var jsf = [[], []];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\n // First phase\n var m14 = k1.andln(3) + d1 & 3;\n var m24 = k2.andln(3) + d2 & 3;\n if (m14 === 3) m14 = -1;\n if (m24 === 3) m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n var m8 = k1.andln(7) + d1 & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2) u1 = -m14;else u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n var m8 = k2.andln(7) + d2 & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2) u2 = -m24;else u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1) d1 = 1 - d1;\n if (2 * d2 === u2 + 1) d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n }", "function pointToKey(x, y) {\n return `${x},${y}`;\n}", "function getJSF(k1, k2) {\n var jsf = [[], []];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\n // First phase\n var m14 = k1.andln(3) + d1 & 3;\n var m24 = k2.andln(3) + d2 & 3;\n if (m14 === 3) m14 = -1;\n if (m24 === 3) m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n var m8 = k1.andln(7) + d1 & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2) u1 = -m14;else u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n var m8 = k2.andln(7) + d2 & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2) u2 = -m24;else u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1) d1 = 1 - d1;\n if (2 * d2 === u2 + 1) d2 = 1 - d2;\n k1.ishrn(1);\n k2.ishrn(1);\n }\n\n return jsf;\n}", "function connectorKey(leftNode, rightNode) {\n return 'c_' + leftNode.key + '_to_' + rightNode.key;\n}", "function getJSF(k1, k2) {\n var jsf = [[], []];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\n // First phase\n var m14 = k1.andln(3) + d1 & 3;\n var m24 = k2.andln(3) + d2 & 3;\n if (m14 === 3) m14 = -1;\n if (m24 === 3) m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n var m8 = k1.andln(7) + d1 & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2) u1 = -m14;else u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n var m8 = k2.andln(7) + d2 & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2) u2 = -m24;else u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1) d1 = 1 - d1;\n if (2 * d2 === u2 + 1) d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}", "function getJSF(k1, k2) {\n var jsf = [[], []];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\n // First phase\n var m14 = k1.andln(3) + d1 & 3;\n var m24 = k2.andln(3) + d2 & 3;\n if (m14 === 3) m14 = -1;\n if (m24 === 3) m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n var m8 = k1.andln(7) + d1 & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2) u1 = -m14;else u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n var m8 = k2.andln(7) + d2 & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2) u2 = -m24;else u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1) d1 = 1 - d1;\n if (2 * d2 === u2 + 1) d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}", "function getJSF(k1, k2) {\n var jsf = [[], []];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\n // First phase\n var m14 = k1.andln(3) + d1 & 3;\n var m24 = k2.andln(3) + d2 & 3;\n if (m14 === 3) m14 = -1;\n if (m24 === 3) m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n var m8 = k1.andln(7) + d1 & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2) u1 = -m14;else u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n var m8 = k2.andln(7) + d2 & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2) u2 = -m24;else u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1) d1 = 1 - d1;\n if (2 * d2 === u2 + 1) d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}", "function K (v) {\n return v;\n}", "function K (v) {\n return v;\n}", "function K (v) {\n return v;\n}", "function K (v) {\n return v;\n}", "function K (v) {\n return v;\n}", "function K (v) {\n return v;\n}", "function K (v) {\n return v;\n}", "function connect(en, ei, p) {\n var n = en.s.length + ei.s.length\n var see = new SMatrix(n-2,n-2),sei = new SMatrix(n-2,2)\n var sie = new SMatrix( 2,n-2),sii = new SMatrix( 2,2)\n /*\n var g = new SMatrix((new Junction(2)).smatrix())\n /*/\n var g = new SMatrix([\n [new Complex(0), new Complex(1)],\n [new Complex(1), new Complex(0)]\n ])\n //*/\n var i,j,k,l,m,h\n\n // Generazione di see, sei, sie, sii mediante scansione di en ed ei\n // see è diagonale a blocchi n-2 righe, n-2 colonne\n // sei è verticale di n-2 righe, 2 colonne\n // sie è orizzontale di 2 righe, n-2 colonne\n // sii è diagonale e contiene solo i due elementi delle porte da connettere\n h = 0 // Elemento in corso di gestione\n m = 0 // Blocco dell'elemento (S è diagonale a blocchi))\n k = 0 // 0 Prima o -1 dopo la porta da connettere\n var elements = [ei,en]\n\n while ( elements.length > 0 ) {\n // elemento da gestire\n var es = elements.pop()\n var el = es.s.length\n var pp = es.n.indexOf(p)\n for ( i=0; i<el; i++) {\n l = m // m Prima o m-1 dopo la porta da connettere\n for ( j=0; j<el; j++) {\n if ( i !== pp ) { // Porta non connessa\n if ( j !== pp ) { // Porta non connessa\n see.set(i+k,j+l,es.s[i][j])\n } else { // Porta connessa\n l = m-1\n sei.set(i+k,h,es.s[i][j])\n }\n } else { // Porta connessa\n k = m-1\n if ( j !== pp ) { // Porta non connessa\n sie.set(h,j+l,es.s[i][j])\n } else { // Porta connessa\n l = m-1\n sii.set(h,h,es.s[i][j])\n }\n }\n }\n }\n m += es.s.length-1\n k = m // m Prima o m-1 dopo la porta da connettere\n h += 1 // prossimo elemento\n }\n\n var snet = see.add(sei.mul(g.sub(sii).inverse().mul(sie)))\n return snet.val()\n}", "function coordsToIndex(k, numberOfColumns) {\n let i = k[0] * numberOfColumns + k[1];\n return i;\n}", "function printPathBi(p1, p2, k, src, dst) {\n\n /* FillArray returns the path from intersecting location 'k' upto source and hence will be in reverseorder. */\n let arr1 = fillArray(p1, k, src).reverse(); /* reversing explicitly to get the correct path. */\n\n /* Fill Array returns the path from intersection location 'k' upto destination and hence will be straight */\n let arr2 = fillArray(p2, k, dst); /* No need to reverse */\n\n /* \n * Add the intersecting in the first array because:-\n * arr1: contains the path from src to K [K is excluded].\n * arr2: contains the path from k to dst [K is excluded].\n * In order to get full path we need to do -> arr1 + K + arr2 [Full path from src to dst including intersection]\n */\n arr1.push(k); /* performing arr1 + K */\n\n /* Performing arr1 + K + arr2 [As stated above] */\n let arr = arr1.concat(arr2);\n\n /* \n * Loop for the array created after split and Do not forget to skip 0th and last 2 elements otherwise they will be coloured too\n * Hence, src and dest locations will be coloured and user will not be able to src and dest again so ignore these indices. \n */\n for (let i = 1; i < arr.length - 1; i++) {\n\n /* Now split the individual element of array with ':' [colon] to get row_number and col_number */\n let temp = arr[i].split(\":\");\n\n /* Convert row_number to number inorder to use it as row index of matrix */\n let nx = parseInt(temp[0]);\n\n /* Convert col_number to number inorder to use it as col index of matrix */\n let ny = parseInt(temp[1]);\n\n /* Update the matrix value to 9 to denote that the current rect is part of shortest path */\n matrix[nx][ny] = 9;\n\n /* Update the color of shortest path to show the User there exist an Shortest Path */\n document.getElementById(`${nx}:${ny}`).style.fill = \"rgb(0, 68, 137)\";\n }\n}", "function interleave(k) {\n\tif (k < 0) {\n\t\treturn -2*k;\n\t} else {\n\t\treturn 2*k + 1;\n\t}\n}", "function KShape(value,shape) { \n return value / (value + (1 - (1/shape)) * (value-1));\n}", "constructor({nway, size, k, memory, bits}) {\n this.size = size;\n this.k = k;\n this.nway = nway;\n this.bits = bits;\n this.statistics = { misses: 0, replacements: 0, total: 0 };\n this.cache = Array.from({length: nway},\n () => Array.from({length: size},\n () => Array.from({length: k},\n () => {\n return {\n data: '0'.repeat(bits+30), // bits for address + 32 bits for data\n time: 0\n }\n }))); // 3D array for n-way set association\n //this.printSnapshot();\n this.memory = memory;\n }", "insertKnotU(un, r) {\r\n let p = this.u_degree;\r\n // Knot will be inserted between [k, k+1)\r\n let k = helper_1.findSpan(p, this.u_knots.data, un);\r\n // If un already exists in the knot vector, s is its multiplicity\r\n let s = common_1.count(this.u_knots, un, 0);\r\n if (r + s > p) {\r\n throw new Error('Knot insertion exceeds knot multiplicity beyond degree');\r\n }\r\n let mU = this.u_knots.length - 1;\r\n let nU = mU - this.u_degree - 1;\r\n let mV = this.v_knots.length - 1;\r\n let nV = mV - this.v_degree - 1;\r\n let P = this.cpoints;\r\n let Q = common_1.empty([nU + 1 + r, nV + 1, this.dimension]);\r\n let UP = this.u_knots;\r\n let UQ = common_1.empty([UP.length + r]);\r\n let VP = this.v_knots;\r\n let VQ = common_1.empty([VP.length]);\r\n // Load u-vector\r\n for (let i = 0; i < k + 1; i++) {\r\n UQ.set(i, UP.get(i));\r\n }\r\n for (let i = 1; i < r + 1; i++) {\r\n UQ.set(k + i, un);\r\n }\r\n for (let i = k + 1; i < mU + 1; i++) {\r\n UQ.set(i + r, UP.get(i));\r\n }\r\n // Copy v-vector\r\n VQ.copyfrom(VP);\r\n let alpha = common_1.empty([p + 1, r + 1]);\r\n let R = common_1.empty([p + 1, this.dimension]);\r\n let L = 0;\r\n // Pre-calculate alphas\r\n for (let j = 1; j < r + 1; j++) {\r\n L = k - p + j;\r\n for (let i = 0; i < p - j - s + 1; i++) {\r\n alpha.set(i, j, (un - UP.get(L + i)) / (UP.get(i + k + 1) - UP.get(L + i)));\r\n }\r\n }\r\n for (let row = 0; row < nV + 1; row++) {\r\n // Save unaltered control points\r\n for (let i = 0; i < k - p + 1; i++) {\r\n Q.set(i, row, P.get(i, row));\r\n }\r\n for (let i = k - s; i < nU + 1; i++) {\r\n Q.set(i + r, row, P.get(i, row));\r\n }\r\n // Load auxiliary control points\r\n for (let i = 0; i < p - s + 1; i++) {\r\n R.set(i, P.get(k - p + i, row));\r\n }\r\n for (let j = 1; j < r + 1; j++) {\r\n L = k - p + j;\r\n for (let i = 0; i < p - j - s + 1; i++) {\r\n R.set(i, common_1.add(common_1.mul(alpha.get(i, j), R.get(i + 1)), common_1.mul(1.0 - alpha.get(i, j), R.get(i))));\r\n }\r\n Q.set(L, row, R.get(0));\r\n Q.set(k + r - j - s, row, R.get(p - j - s));\r\n }\r\n // Load the remaining control points\r\n for (let i = L + 1; i < k - s; i++) {\r\n Q.set(i, row, R.get(i - L));\r\n }\r\n }\r\n this.cpoints = Q;\r\n this.v_knots = VQ;\r\n }", "addEdge(v1, v2) {\n this.adjacencyList[v1].push(v2);\n this.adjacencyList[v2].push(v1);\n }", "function mapper_make_key(feature) {\n\tvar key = feature[\"lat\"] + \":\" + feature[\"lon\"] + \":\" + feature[\"title\"];\n\treturn key;\n}", "function buildMatrixLookup(arr) { \n var lookup = {};\n var index = arr.columns;\n var verbal = index[0];\n for(var i =0; i<arr.length;i++){\n var k = arr[i][verbal];\n \n delete arr[i][verbal];\n \n lookup[parseInt(k)] = Object.keys(arr[i]).reduce((obj, key) => (obj[parseInt(key)] = Number(arr[i][key]),obj), {});\n }\n\n return lookup;\n}", "function km() { // km - short for \"Key Manager\"\n return Array.prototype.slice.call(arguments).join(\":\");\n}", "function get_coords_cat(i,j)\n{\n return {\n \"x\": 18 + 40*i +(j % 2 == 1 ? 20:0),\n \"y\": 20 + 35*j\n };\n}", "function J(a,b){this.l=[];this.kb=a;this.V=b||null;this.f=this.a=!1;this.b=void 0;this.C=this.ya=this.s=!1;this.i=0;this.c=null;this.A=0}", "function N(a,b){this.j=[];this.D=a;this.v=b||null;this.h=this.a=!1;this.g=void 0;this.I=this.K=this.p=!1;this.o=0;this.b=null;this.k=0}", "get Clustering() {}", "function EncodePair(word1, word2)\n{\n\tlet code = EncodeWord(word1).concat(EncodeWord(word2));\n\t\n\tcode.push(1);\n\t\n\treturn code;\n}", "function getJSF(k1, k2) {\n\t var jsf = [\n\t [],\n\t []\n\t ];\n\t\n\t k1 = k1.clone();\n\t k2 = k2.clone();\n\t var d1 = 0;\n\t var d2 = 0;\n\t while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\t\n\t // First phase\n\t var m14 = (k1.andln(3) + d1) & 3;\n\t var m24 = (k2.andln(3) + d2) & 3;\n\t if (m14 === 3)\n\t m14 = -1;\n\t if (m24 === 3)\n\t m24 = -1;\n\t var u1;\n\t if ((m14 & 1) === 0) {\n\t u1 = 0;\n\t } else {\n\t var m8 = (k1.andln(7) + d1) & 7;\n\t if ((m8 === 3 || m8 === 5) && m24 === 2)\n\t u1 = -m14;\n\t else\n\t u1 = m14;\n\t }\n\t jsf[0].push(u1);\n\t\n\t var u2;\n\t if ((m24 & 1) === 0) {\n\t u2 = 0;\n\t } else {\n\t var m8 = (k2.andln(7) + d2) & 7;\n\t if ((m8 === 3 || m8 === 5) && m14 === 2)\n\t u2 = -m24;\n\t else\n\t u2 = m24;\n\t }\n\t jsf[1].push(u2);\n\t\n\t // Second phase\n\t if (2 * d1 === u1 + 1)\n\t d1 = 1 - d1;\n\t if (2 * d2 === u2 + 1)\n\t d2 = 1 - d2;\n\t k1.iushrn(1);\n\t k2.iushrn(1);\n\t }\n\t\n\t return jsf;\n\t}", "function communityRepresentation() {\n\nfunction convertToBinaryArray(coordinates) {\n\n\"use strict\";\n var coordInBinary = coordiates.toString(2); \n \n if(coordInBinary.length > 7) {\n return [1,1,1,1,1,1,1,1];\n\n }\n \n while(coordInBinary.length < 7) { \n coordInBinary = \"0\" + coordInBinary;\n }\n \n // Convert string to array\n return coordInBinary.split(\"\").map(function(i) {\n return parseInt(i); }\n );\n}\n\nvar predictr = new synaptic.Architect.Perceptron(\n\n/* Remember to change numbers of neurons. */\n 7, \n 3,\n 3, \n 0\n);\n\nvar trainingData = [];\n\nvar i;\n\nvar input;\n\nvar output;\n\n/* Add training data here. */\ninput = [0,0,0,0,0,0,0,1];\noutput = [1];\n \n trainingData.push({\n input: input,\n output: output\n });\n}", "init(){\n if( this.a2i === undefined ){\n this.a2i = {}\n for( var k=0; k<this.i2a.length; k++ )\n this.a2i[this.i2a[k]] = k \n } \n }", "function getJSF(k1, k2) {\n var jsf = [\n [],\n []\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n var m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n var m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.ishrn(1);\n k2.ishrn(1);\n }\n\n return jsf;\n}", "function getJSF(k1, k2) {\n var jsf = [\n [],\n []\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n var m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n var m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.ishrn(1);\n k2.ishrn(1);\n }\n\n return jsf;\n}", "function getJSF(k1, k2) {\n var jsf = [\n [],\n []\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n var m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n var m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.ishrn(1);\n k2.ishrn(1);\n }\n\n return jsf;\n}", "function getJSF(k1, k2) {\n var jsf = [\n [],\n []\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n var m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n var m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.ishrn(1);\n k2.ishrn(1);\n }\n\n return jsf;\n}", "function getJSF(k1, k2) {\n var jsf = [\n [],\n []\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n var m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n var m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.ishrn(1);\n k2.ishrn(1);\n }\n\n return jsf;\n}", "function findTwoElementsUsingHash(K, matrix) {\n // Define hash map using simple object\n let hash = {};\n let hasElements = false;\n for (let index = 0; index < matrix.length; index++) {\n const element = matrix[index];\n // K = element + another_element\n // another_element = K - element\n const another_element = K - element;\n // Check that another element is found in hash\n if (another_element in hash) {\n // If found return true\n hasElements = true;\n break;\n }\n // Otherwise add this new element to hash map and continue\n hash[element] = 1;\n }\n return hasElements;\n}", "function LinearConstraint(joint) {\n\n this.m1 = NaN;\n this.m2 = NaN;\n\n this.ii1 = null;\n this.ii2 = null;\n this.dd = null;\n\n this.r1x = NaN;\n this.r1y = NaN;\n this.r1z = NaN;\n\n this.r2x = NaN;\n this.r2y = NaN;\n this.r2z = NaN;\n\n this.ax1x = NaN;\n this.ax1y = NaN;\n this.ax1z = NaN;\n this.ay1x = NaN;\n this.ay1y = NaN;\n this.ay1z = NaN;\n this.az1x = NaN;\n this.az1y = NaN;\n this.az1z = NaN;\n\n this.ax2x = NaN;\n this.ax2y = NaN;\n this.ax2z = NaN;\n this.ay2x = NaN;\n this.ay2y = NaN;\n this.ay2z = NaN;\n this.az2x = NaN;\n this.az2y = NaN;\n this.az2z = NaN;\n\n this.vel = NaN;\n this.velx = NaN;\n this.vely = NaN;\n this.velz = NaN;\n\n this.joint = joint;\n this.r1 = joint.relativeAnchorPoint1;\n this.r2 = joint.relativeAnchorPoint2;\n this.p1 = joint.anchorPoint1;\n this.p2 = joint.anchorPoint2;\n this.b1 = joint.body1;\n this.b2 = joint.body2;\n this.l1 = this.b1.linearVelocity;\n this.l2 = this.b2.linearVelocity;\n this.a1 = this.b1.angularVelocity;\n this.a2 = this.b2.angularVelocity;\n this.i1 = this.b1.inverseInertia;\n this.i2 = this.b2.inverseInertia;\n this.impx = 0;\n this.impy = 0;\n this.impz = 0;\n}", "addEdge(v1, v2) {\n if (v1 in this.adjacencyList && v2 in this.adjacencyList) {\n this.adjacencyList[v1].push(v2);\n this.adjacencyList[v2].push(v1);\n }\n }", "insertKnotV(vn, r) {\r\n let q = this.v_degree;\r\n // Knot will be inserted between [k,k+1)\r\n let k = helper_1.findSpan(this.v_degree, this.v_knots.data, vn);\r\n // If v already exists in knot vector, s is its multiplicity\r\n let s = common_1.count(this.v_knots, vn, 0);\r\n if (r + s > q) {\r\n throw new Error('Knot insertion exceeds knot multiplicity beyond degree');\r\n }\r\n let mU = this.u_knots.length - 1;\r\n let nU = mU - this.u_degree - 1;\r\n let mV = this.v_knots.length - 1;\r\n let nV = mV - this.v_degree - 1;\r\n let P = this.cpoints;\r\n let Q = common_1.empty([nU + 1, nV + r + 1, this.dimension]);\r\n let UP = this.u_knots;\r\n let UQ = common_1.empty([UP.length]);\r\n let VP = this.v_knots;\r\n let VQ = common_1.empty([VP.length + r]);\r\n // Copy u knot vector\r\n UQ.copyfrom(UP);\r\n // Load v knot vector\r\n for (let i = 0; i < k + 1; i++) {\r\n VQ.set(i, VP.get(i));\r\n }\r\n for (let i = 1; i < r + 1; i++) {\r\n VQ.set(k + i, vn);\r\n }\r\n for (let i = k + 1; i < mV + 1; i++) {\r\n VQ.set(i + r, VP.get(i));\r\n }\r\n let alpha = common_1.empty([q + 1, r + 1]);\r\n let R = common_1.empty([q + 1, this.dimension]);\r\n let L = 0;\r\n // Pre-calculate alphas\r\n for (let j = 1; j < r + 1; j++) {\r\n L = k - q + j;\r\n for (let i = 0; i < q - j - s + 1; i++) {\r\n alpha.set(i, j, (vn - VP.get(L + i)) / (VP.get(i + k + 1) - VP.get(L + i)));\r\n }\r\n }\r\n for (let col = 0; col < nU + 1; col++) {\r\n // Save unaltered control points\r\n for (let i = 0; i < k - q + 1; i++) {\r\n Q.set(col, i, P.get(col, i));\r\n }\r\n for (let i = k - s; i < nV + 1; i++) {\r\n Q.set(col, i + r, P.get(col, i));\r\n }\r\n // Load auxiliary control points\r\n for (let i = 0; i < q - s + 1; i++) {\r\n R.set(i, P.get(col, k - q + i));\r\n }\r\n for (let j = 1; j < r + 1; j++) {\r\n L = k - q + j;\r\n for (let i = 0; i < q - j - s + 1; i++) {\r\n R.set(i, common_1.add(common_1.mul(alpha.get(i, j), R.get(i + 1)), common_1.mul((1.0 - alpha.get(i, j)), R.get(i))));\r\n }\r\n Q.set(col, L, R.get(0));\r\n Q.set(col, k + r - j - s, R.get(q - j - s));\r\n }\r\n // Load remaining control points\r\n for (let i = L + 1; i < k - s; i++) {\r\n Q.set(col, i, R.get(i - L));\r\n }\r\n }\r\n this.cpoints = Q;\r\n this.v_knots = VQ;\r\n }" ]
[ "0.5769692", "0.5731908", "0.53482056", "0.52648157", "0.5132514", "0.51150286", "0.5110443", "0.50927955", "0.50731033", "0.50641257", "0.50608915", "0.5059641", "0.5027422", "0.50183904", "0.5014289", "0.49767065", "0.49767065", "0.49767065", "0.49522403", "0.4840789", "0.4811124", "0.4804849", "0.48002002", "0.47599766", "0.47433776", "0.4740253", "0.4732004", "0.46942648", "0.46817204", "0.46745524", "0.46722746", "0.4666603", "0.46561432", "0.46218282", "0.46205807", "0.46192792", "0.4614782", "0.46078208", "0.4601573", "0.45993122", "0.45957723", "0.4589375", "0.45884567", "0.45858547", "0.45664823", "0.45518818", "0.4547008", "0.45409003", "0.4534044", "0.45337266", "0.45151037", "0.45126334", "0.4512541", "0.4511414", "0.45046014", "0.45046014", "0.45046014", "0.44957232", "0.44957232", "0.44957232", "0.44957232", "0.44957232", "0.44957232", "0.44957232", "0.44779924", "0.44753745", "0.44718018", "0.4455567", "0.44523352", "0.44340664", "0.44294307", "0.4427678", "0.44214773", "0.441031", "0.44035006", "0.44009313", "0.438912", "0.4387908", "0.4378443", "0.43660858", "0.4365378", "0.43604973", "0.43449137", "0.43435717", "0.43435717", "0.43435717", "0.43435717", "0.43435717", "0.4342955", "0.434248", "0.43413916", "0.43411765" ]
0.0
-1
Copyright Joyent, Inc. and other Node contributors. 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: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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.
function EventEmitter() { this._events = this._events || {}; this._maxListeners = this._maxListeners || undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function me(e,t,a,s){var n,i=arguments.length,r=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(n=e[d])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r\n/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */}", "function n(r){return!!r.constructor&&typeof r.constructor.isBuffer==\"function\"&&r.constructor.isBuffer(r)}", "function Generator() {} // 80", "function r() {}", "function r() {}", "function r() {}", "function i(e){var t=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(e),n=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(e),r=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),i=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),a=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),s=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),c=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),d=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),f=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),m=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),v=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),y=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),g=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),_=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),b=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),w=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),T=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),E=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),S=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),x=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(e),k=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x),C=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x),A=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x),N=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x),I=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x);(0,o.default)(e,{0:t,NetworkOrCORSError:t,400:n,BadRequest:n,401:r,Unauthorized:r,402:i,PaymentRequired:i,403:a,Forbidden:a,404:s,NotFound:s,405:c,MethodNotAllowed:c,406:d,NotAcceptable:d,407:f,ProxyAuthenticationRequired:f,408:m,RequestTimeout:m,409:v,Conflict:v,410:y,Gone:y,411:g,LengthRequired:g,412:_,PreconditionFailed:_,413:b,RequestEntityTooLarge:b,414:w,RequestUriTooLong:w,415:T,UnsupportedMediaType:T,416:E,RequestRangeNotSatisfiable:E,417:S,ExpectationFailed:S,500:x,InternalServerError:x,501:k,NotImplemented:k,502:C,BadGateway:C,503:A,ServiceUnavailable:A,504:N,GatewayTimeout:N,505:I,HttpVersionNotSupported:I,select:function(t){if(void 0===t||null===t)return e;t=t.statusCode||t;var n=e[t];return n||(t=t.toString().split(\"\").shift()+\"00\",t=parseInt(t,10),e[t]||e)}})}", "function t(n){return!!n.constructor&&typeof n.constructor.isBuffer==\"function\"&&n.constructor.isBuffer(n)}", "function t(n){return!!n.constructor&&typeof n.constructor.isBuffer==\"function\"&&n.constructor.isBuffer(n)}", "function t(n){return!!n.constructor&&typeof n.constructor.isBuffer==\"function\"&&n.constructor.isBuffer(n)}", "function y(e){let t=R,n=D,r=j,s=v,i=M,o=B,a=_,u=new Uint8Array(x.slice(0,R)),d=E,c=E.slice(0,E.length),g=F,l=Y,p=e();return R=t,D=n,j=r,v=s,M=i,B=o,_=a,x=u,Y=l,E=d,E.splice(0,E.length,...c),F=g,P=new DataView(x.buffer,x.byteOffset,x.byteLength),p}", "function Generator() {} // 84", "function require() { return {}; }", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function Util() {}", "function n(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function lt(t,i){return t(i={exports:{}},i.exports),i.exports}", "function c(e,t,n){Array.isArray(e)?(n=t,t=e,e=void 0):\"string\"!=typeof e&&(n=e,e=t=void 0),t&&!Array.isArray(t)&&(n=t,t=void 0),t||(t=[\"require\",\"exports\",\"module\"]),\n//Set up properties for this module. If an ID, then use\n//internal cache. If no ID, then use the external variables\n//for this node module.\ne?\n//Put the module in deep freeze until there is a\n//require call for it.\nd[e]=[e,t,n]:l(e,t,n)}", "private public function m246() {}", "function t(e){return!!e.constructor&&'function'==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function universalModule() {\n\t\t var $Object = Object;\n\n\t\tfunction createClass(ctor, methods, staticMethods, superClass) {\n\t\t var proto;\n\t\t if (superClass) {\n\t\t var superProto = superClass.prototype;\n\t\t proto = $Object.create(superProto);\n\t\t } else {\n\t\t proto = ctor.prototype;\n\t\t }\n\t\t $Object.keys(methods).forEach(function (key) {\n\t\t proto[key] = methods[key];\n\t\t });\n\t\t $Object.keys(staticMethods).forEach(function (key) {\n\t\t ctor[key] = staticMethods[key];\n\t\t });\n\t\t proto.constructor = ctor;\n\t\t ctor.prototype = proto;\n\t\t return ctor;\n\t\t}\n\n\t\tfunction superCall(self, proto, name, args) {\n\t\t return $Object.getPrototypeOf(proto)[name].apply(self, args);\n\t\t}\n\n\t\tfunction defaultSuperCall(self, proto, args) {\n\t\t superCall(self, proto, 'constructor', args);\n\t\t}\n\n\t\tvar $traceurRuntime = {};\n\t\t$traceurRuntime.createClass = createClass;\n\t\t$traceurRuntime.superCall = superCall;\n\t\t$traceurRuntime.defaultSuperCall = defaultSuperCall;\n\t\t\"use strict\";\n\t\tfunction is(valueA, valueB) {\n\t\t if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n\t\t return true;\n\t\t }\n\t\t if (!valueA || !valueB) {\n\t\t return false;\n\t\t }\n\t\t if (typeof valueA.valueOf === 'function' && typeof valueB.valueOf === 'function') {\n\t\t valueA = valueA.valueOf();\n\t\t valueB = valueB.valueOf();\n\t\t }\n\t\t return typeof valueA.equals === 'function' && typeof valueB.equals === 'function' ? valueA.equals(valueB) : valueA === valueB || (valueA !== valueA && valueB !== valueB);\n\t\t}\n\t\tfunction invariant(condition, error) {\n\t\t if (!condition)\n\t\t throw new Error(error);\n\t\t}\n\t\tvar DELETE = 'delete';\n\t\tvar SHIFT = 5;\n\t\tvar SIZE = 1 << SHIFT;\n\t\tvar MASK = SIZE - 1;\n\t\tvar NOT_SET = {};\n\t\tvar CHANGE_LENGTH = {value: false};\n\t\tvar DID_ALTER = {value: false};\n\t\tfunction MakeRef(ref) {\n\t\t ref.value = false;\n\t\t return ref;\n\t\t}\n\t\tfunction SetRef(ref) {\n\t\t ref && (ref.value = true);\n\t\t}\n\t\tfunction OwnerID() {}\n\t\tfunction arrCopy(arr, offset) {\n\t\t offset = offset || 0;\n\t\t var len = Math.max(0, arr.length - offset);\n\t\t var newArr = new Array(len);\n\t\t for (var ii = 0; ii < len; ii++) {\n\t\t newArr[ii] = arr[ii + offset];\n\t\t }\n\t\t return newArr;\n\t\t}\n\t\tfunction assertNotInfinite(size) {\n\t\t invariant(size !== Infinity, 'Cannot perform this action with an infinite size.');\n\t\t}\n\t\tfunction ensureSize(iter) {\n\t\t if (iter.size === undefined) {\n\t\t iter.size = iter.__iterate(returnTrue);\n\t\t }\n\t\t return iter.size;\n\t\t}\n\t\tfunction wrapIndex(iter, index) {\n\t\t return index >= 0 ? (+index) : ensureSize(iter) + (+index);\n\t\t}\n\t\tfunction returnTrue() {\n\t\t return true;\n\t\t}\n\t\tfunction wholeSlice(begin, end, size) {\n\t\t return (begin === 0 || (size !== undefined && begin <= -size)) && (end === undefined || (size !== undefined && end >= size));\n\t\t}\n\t\tfunction resolveBegin(begin, size) {\n\t\t return resolveIndex(begin, size, 0);\n\t\t}\n\t\tfunction resolveEnd(end, size) {\n\t\t return resolveIndex(end, size, size);\n\t\t}\n\t\tfunction resolveIndex(index, size, defaultIndex) {\n\t\t return index === undefined ? defaultIndex : index < 0 ? Math.max(0, size + index) : size === undefined ? index : Math.min(size, index);\n\t\t}\n\t\tvar imul = typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ? Math.imul : function imul(a, b) {\n\t\t a = a | 0;\n\t\t b = b | 0;\n\t\t var c = a & 0xffff;\n\t\t var d = b & 0xffff;\n\t\t return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0;\n\t\t};\n\t\tfunction smi(i32) {\n\t\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t\t}\n\t\tfunction hash(o) {\n\t\t if (o === false || o === null || o === undefined) {\n\t\t return 0;\n\t\t }\n\t\t if (typeof o.valueOf === 'function') {\n\t\t o = o.valueOf();\n\t\t if (o === false || o === null || o === undefined) {\n\t\t return 0;\n\t\t }\n\t\t }\n\t\t if (o === true) {\n\t\t return 1;\n\t\t }\n\t\t var type = typeof o;\n\t\t if (type === 'number') {\n\t\t var h = o | 0;\n\t\t while (o > 0xFFFFFFFF) {\n\t\t o /= 0xFFFFFFFF;\n\t\t h ^= o;\n\t\t }\n\t\t return smi(h);\n\t\t }\n\t\t if (type === 'string') {\n\t\t return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n\t\t }\n\t\t if (typeof o.hashCode === 'function') {\n\t\t return o.hashCode();\n\t\t }\n\t\t return hashJSObj(o);\n\t\t}\n\t\tfunction cachedHashString(string) {\n\t\t var hash = stringHashCache[string];\n\t\t if (hash === undefined) {\n\t\t hash = hashString(string);\n\t\t if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n\t\t STRING_HASH_CACHE_SIZE = 0;\n\t\t stringHashCache = {};\n\t\t }\n\t\t STRING_HASH_CACHE_SIZE++;\n\t\t stringHashCache[string] = hash;\n\t\t }\n\t\t return hash;\n\t\t}\n\t\tfunction hashString(string) {\n\t\t var hash = 0;\n\t\t for (var ii = 0; ii < string.length; ii++) {\n\t\t hash = 31 * hash + string.charCodeAt(ii) | 0;\n\t\t }\n\t\t return smi(hash);\n\t\t}\n\t\tfunction hashJSObj(obj) {\n\t\t var hash = weakMap && weakMap.get(obj);\n\t\t if (hash)\n\t\t return hash;\n\t\t hash = obj[UID_HASH_KEY];\n\t\t if (hash)\n\t\t return hash;\n\t\t if (!canDefineProperty) {\n\t\t hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n\t\t if (hash)\n\t\t return hash;\n\t\t hash = getIENodeHash(obj);\n\t\t if (hash)\n\t\t return hash;\n\t\t }\n\t\t if (Object.isExtensible && !Object.isExtensible(obj)) {\n\t\t throw new Error('Non-extensible objects are not allowed as keys.');\n\t\t }\n\t\t hash = ++objHashUID;\n\t\t if (objHashUID & 0x40000000) {\n\t\t objHashUID = 0;\n\t\t }\n\t\t if (weakMap) {\n\t\t weakMap.set(obj, hash);\n\t\t } else if (canDefineProperty) {\n\t\t Object.defineProperty(obj, UID_HASH_KEY, {\n\t\t 'enumerable': false,\n\t\t 'configurable': false,\n\t\t 'writable': false,\n\t\t 'value': hash\n\t\t });\n\t\t } else if (obj.propertyIsEnumerable && obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n\t\t obj.propertyIsEnumerable = function() {\n\t\t return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n\t\t };\n\t\t obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n\t\t } else if (obj.nodeType) {\n\t\t obj[UID_HASH_KEY] = hash;\n\t\t } else {\n\t\t throw new Error('Unable to set a non-enumerable property on object.');\n\t\t }\n\t\t return hash;\n\t\t}\n\t\tvar canDefineProperty = (function() {\n\t\t try {\n\t\t Object.defineProperty({}, 'x', {});\n\t\t return true;\n\t\t } catch (e) {\n\t\t return false;\n\t\t }\n\t\t}());\n\t\tfunction getIENodeHash(node) {\n\t\t if (node && node.nodeType > 0) {\n\t\t switch (node.nodeType) {\n\t\t case 1:\n\t\t return node.uniqueID;\n\t\t case 9:\n\t\t return node.documentElement && node.documentElement.uniqueID;\n\t\t }\n\t\t }\n\t\t}\n\t\tvar weakMap = typeof WeakMap === 'function' && new WeakMap();\n\t\tvar objHashUID = 0;\n\t\tvar UID_HASH_KEY = '__immutablehash__';\n\t\tif (typeof Symbol === 'function') {\n\t\t UID_HASH_KEY = Symbol(UID_HASH_KEY);\n\t\t}\n\t\tvar STRING_HASH_CACHE_MIN_STRLEN = 16;\n\t\tvar STRING_HASH_CACHE_MAX_SIZE = 255;\n\t\tvar STRING_HASH_CACHE_SIZE = 0;\n\t\tvar stringHashCache = {};\n\t\tvar ITERATE_KEYS = 0;\n\t\tvar ITERATE_VALUES = 1;\n\t\tvar ITERATE_ENTRIES = 2;\n\t\tvar FAUX_ITERATOR_SYMBOL = '@@iterator';\n\t\tvar REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n\t\tvar ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\t\tvar Iterator = function Iterator(next) {\n\t\t this.next = next;\n\t\t};\n\t\t($traceurRuntime.createClass)(Iterator, {toString: function() {\n\t\t return '[Iterator]';\n\t\t }}, {});\n\t\tIterator.KEYS = ITERATE_KEYS;\n\t\tIterator.VALUES = ITERATE_VALUES;\n\t\tIterator.ENTRIES = ITERATE_ENTRIES;\n\t\tvar IteratorPrototype = Iterator.prototype;\n\t\tIteratorPrototype.inspect = IteratorPrototype.toSource = function() {\n\t\t return this.toString();\n\t\t};\n\t\tIteratorPrototype[ITERATOR_SYMBOL] = function() {\n\t\t return this;\n\t\t};\n\t\tfunction iteratorValue(type, k, v, iteratorResult) {\n\t\t var value = type === 0 ? k : type === 1 ? v : [k, v];\n\t\t iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n\t\t value: value,\n\t\t done: false\n\t\t });\n\t\t return iteratorResult;\n\t\t}\n\t\tfunction iteratorDone() {\n\t\t return {\n\t\t value: undefined,\n\t\t done: true\n\t\t };\n\t\t}\n\t\tfunction hasIterator(maybeIterable) {\n\t\t return !!_iteratorFn(maybeIterable);\n\t\t}\n\t\tfunction isIterator(maybeIterator) {\n\t\t return maybeIterator && typeof maybeIterator.next === 'function';\n\t\t}\n\t\tfunction getIterator(iterable) {\n\t\t var iteratorFn = _iteratorFn(iterable);\n\t\t return iteratorFn && iteratorFn.call(iterable);\n\t\t}\n\t\tfunction _iteratorFn(iterable) {\n\t\t var iteratorFn = iterable && ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || iterable[FAUX_ITERATOR_SYMBOL]);\n\t\t if (typeof iteratorFn === 'function') {\n\t\t return iteratorFn;\n\t\t }\n\t\t}\n\t\tvar Iterable = function Iterable(value) {\n\t\t return isIterable(value) ? value : Seq(value);\n\t\t};\n\t\tvar $Iterable = Iterable;\n\t\t($traceurRuntime.createClass)(Iterable, {\n\t\t toArray: function() {\n\t\t assertNotInfinite(this.size);\n\t\t var array = new Array(this.size || 0);\n\t\t this.valueSeq().__iterate((function(v, i) {\n\t\t array[i] = v;\n\t\t }));\n\t\t return array;\n\t\t },\n\t\t toIndexedSeq: function() {\n\t\t return new ToIndexedSequence(this);\n\t\t },\n\t\t toJS: function() {\n\t\t return this.toSeq().map((function(value) {\n\t\t return value && typeof value.toJS === 'function' ? value.toJS() : value;\n\t\t })).__toJS();\n\t\t },\n\t\t toKeyedSeq: function() {\n\t\t return new ToKeyedSequence(this, true);\n\t\t },\n\t\t toMap: function() {\n\t\t return Map(this.toKeyedSeq());\n\t\t },\n\t\t toObject: function() {\n\t\t assertNotInfinite(this.size);\n\t\t var object = {};\n\t\t this.__iterate((function(v, k) {\n\t\t object[k] = v;\n\t\t }));\n\t\t return object;\n\t\t },\n\t\t toOrderedMap: function() {\n\t\t return OrderedMap(this.toKeyedSeq());\n\t\t },\n\t\t toOrderedSet: function() {\n\t\t return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n\t\t },\n\t\t toSet: function() {\n\t\t return Set(isKeyed(this) ? this.valueSeq() : this);\n\t\t },\n\t\t toSetSeq: function() {\n\t\t return new ToSetSequence(this);\n\t\t },\n\t\t toSeq: function() {\n\t\t return isIndexed(this) ? this.toIndexedSeq() : isKeyed(this) ? this.toKeyedSeq() : this.toSetSeq();\n\t\t },\n\t\t toStack: function() {\n\t\t return Stack(isKeyed(this) ? this.valueSeq() : this);\n\t\t },\n\t\t toList: function() {\n\t\t return List(isKeyed(this) ? this.valueSeq() : this);\n\t\t },\n\t\t toString: function() {\n\t\t return '[Iterable]';\n\t\t },\n\t\t __toString: function(head, tail) {\n\t\t if (this.size === 0) {\n\t\t return head + tail;\n\t\t }\n\t\t return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n\t\t },\n\t\t concat: function() {\n\t\t for (var values = [],\n\t\t $__2 = 0; $__2 < arguments.length; $__2++)\n\t\t values[$__2] = arguments[$__2];\n\t\t return reify(this, concatFactory(this, values));\n\t\t },\n\t\t contains: function(searchValue) {\n\t\t return this.some((function(value) {\n\t\t return is(value, searchValue);\n\t\t }));\n\t\t },\n\t\t entries: function() {\n\t\t return this.__iterator(ITERATE_ENTRIES);\n\t\t },\n\t\t every: function(predicate, context) {\n\t\t assertNotInfinite(this.size);\n\t\t var returnValue = true;\n\t\t this.__iterate((function(v, k, c) {\n\t\t if (!predicate.call(context, v, k, c)) {\n\t\t returnValue = false;\n\t\t return false;\n\t\t }\n\t\t }));\n\t\t return returnValue;\n\t\t },\n\t\t filter: function(predicate, context) {\n\t\t return reify(this, filterFactory(this, predicate, context, true));\n\t\t },\n\t\t find: function(predicate, context, notSetValue) {\n\t\t var foundValue = notSetValue;\n\t\t this.__iterate((function(v, k, c) {\n\t\t if (predicate.call(context, v, k, c)) {\n\t\t foundValue = v;\n\t\t return false;\n\t\t }\n\t\t }));\n\t\t return foundValue;\n\t\t },\n\t\t forEach: function(sideEffect, context) {\n\t\t assertNotInfinite(this.size);\n\t\t return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n\t\t },\n\t\t join: function(separator) {\n\t\t assertNotInfinite(this.size);\n\t\t separator = separator !== undefined ? '' + separator : ',';\n\t\t var joined = '';\n\t\t var isFirst = true;\n\t\t this.__iterate((function(v) {\n\t\t isFirst ? (isFirst = false) : (joined += separator);\n\t\t joined += v !== null && v !== undefined ? v : '';\n\t\t }));\n\t\t return joined;\n\t\t },\n\t\t keys: function() {\n\t\t return this.__iterator(ITERATE_KEYS);\n\t\t },\n\t\t map: function(mapper, context) {\n\t\t return reify(this, mapFactory(this, mapper, context));\n\t\t },\n\t\t reduce: function(reducer, initialReduction, context) {\n\t\t assertNotInfinite(this.size);\n\t\t var reduction;\n\t\t var useFirst;\n\t\t if (arguments.length < 2) {\n\t\t useFirst = true;\n\t\t } else {\n\t\t reduction = initialReduction;\n\t\t }\n\t\t this.__iterate((function(v, k, c) {\n\t\t if (useFirst) {\n\t\t useFirst = false;\n\t\t reduction = v;\n\t\t } else {\n\t\t reduction = reducer.call(context, reduction, v, k, c);\n\t\t }\n\t\t }));\n\t\t return reduction;\n\t\t },\n\t\t reduceRight: function(reducer, initialReduction, context) {\n\t\t var reversed = this.toKeyedSeq().reverse();\n\t\t return reversed.reduce.apply(reversed, arguments);\n\t\t },\n\t\t reverse: function() {\n\t\t return reify(this, reverseFactory(this, true));\n\t\t },\n\t\t slice: function(begin, end) {\n\t\t if (wholeSlice(begin, end, this.size)) {\n\t\t return this;\n\t\t }\n\t\t var resolvedBegin = resolveBegin(begin, this.size);\n\t\t var resolvedEnd = resolveEnd(end, this.size);\n\t\t if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n\t\t return this.toSeq().cacheResult().slice(begin, end);\n\t\t }\n\t\t var skipped = resolvedBegin === 0 ? this : this.skip(resolvedBegin);\n\t\t return reify(this, resolvedEnd === undefined || resolvedEnd === this.size ? skipped : skipped.take(resolvedEnd - resolvedBegin));\n\t\t },\n\t\t some: function(predicate, context) {\n\t\t return !this.every(not(predicate), context);\n\t\t },\n\t\t sort: function(comparator) {\n\t\t return reify(this, sortFactory(this, comparator));\n\t\t },\n\t\t values: function() {\n\t\t return this.__iterator(ITERATE_VALUES);\n\t\t },\n\t\t butLast: function() {\n\t\t return this.slice(0, -1);\n\t\t },\n\t\t count: function(predicate, context) {\n\t\t return ensureSize(predicate ? this.toSeq().filter(predicate, context) : this);\n\t\t },\n\t\t countBy: function(grouper, context) {\n\t\t return countByFactory(this, grouper, context);\n\t\t },\n\t\t equals: function(other) {\n\t\t return deepEqual(this, other);\n\t\t },\n\t\t entrySeq: function() {\n\t\t var iterable = this;\n\t\t if (iterable._cache) {\n\t\t return new ArraySeq(iterable._cache);\n\t\t }\n\t\t var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n\t\t entriesSequence.fromEntrySeq = (function() {\n\t\t return iterable.toSeq();\n\t\t });\n\t\t return entriesSequence;\n\t\t },\n\t\t filterNot: function(predicate, context) {\n\t\t return this.filter(not(predicate), context);\n\t\t },\n\t\t findLast: function(predicate, context, notSetValue) {\n\t\t return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n\t\t },\n\t\t first: function() {\n\t\t return this.find(returnTrue);\n\t\t },\n\t\t flatMap: function(mapper, context) {\n\t\t return reify(this, flatMapFactory(this, mapper, context));\n\t\t },\n\t\t flatten: function(depth) {\n\t\t return reify(this, flattenFactory(this, depth, true));\n\t\t },\n\t\t fromEntrySeq: function() {\n\t\t return new FromEntriesSequence(this);\n\t\t },\n\t\t get: function(searchKey, notSetValue) {\n\t\t return this.find((function(_, key) {\n\t\t return is(key, searchKey);\n\t\t }), undefined, notSetValue);\n\t\t },\n\t\t getIn: function(searchKeyPath, notSetValue) {\n\t\t var nested = this;\n\t\t if (searchKeyPath) {\n\t\t var iter = getIterator(searchKeyPath) || getIterator($Iterable(searchKeyPath));\n\t\t var step;\n\t\t while (!(step = iter.next()).done) {\n\t\t var key = step.value;\n\t\t nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n\t\t if (nested === NOT_SET) {\n\t\t return notSetValue;\n\t\t }\n\t\t }\n\t\t }\n\t\t return nested;\n\t\t },\n\t\t groupBy: function(grouper, context) {\n\t\t return groupByFactory(this, grouper, context);\n\t\t },\n\t\t has: function(searchKey) {\n\t\t return this.get(searchKey, NOT_SET) !== NOT_SET;\n\t\t },\n\t\t hasIn: function(searchKeyPath) {\n\t\t return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n\t\t },\n\t\t isSubset: function(iter) {\n\t\t iter = typeof iter.contains === 'function' ? iter : $Iterable(iter);\n\t\t return this.every((function(value) {\n\t\t return iter.contains(value);\n\t\t }));\n\t\t },\n\t\t isSuperset: function(iter) {\n\t\t return iter.isSubset(this);\n\t\t },\n\t\t keySeq: function() {\n\t\t return this.toSeq().map(keyMapper).toIndexedSeq();\n\t\t },\n\t\t last: function() {\n\t\t return this.toSeq().reverse().first();\n\t\t },\n\t\t max: function(comparator) {\n\t\t return maxFactory(this, comparator);\n\t\t },\n\t\t maxBy: function(mapper, comparator) {\n\t\t return maxFactory(this, comparator, mapper);\n\t\t },\n\t\t min: function(comparator) {\n\t\t return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n\t\t },\n\t\t minBy: function(mapper, comparator) {\n\t\t return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n\t\t },\n\t\t rest: function() {\n\t\t return this.slice(1);\n\t\t },\n\t\t skip: function(amount) {\n\t\t return reify(this, skipFactory(this, amount, true));\n\t\t },\n\t\t skipLast: function(amount) {\n\t\t return reify(this, this.toSeq().reverse().skip(amount).reverse());\n\t\t },\n\t\t skipWhile: function(predicate, context) {\n\t\t return reify(this, skipWhileFactory(this, predicate, context, true));\n\t\t },\n\t\t skipUntil: function(predicate, context) {\n\t\t return this.skipWhile(not(predicate), context);\n\t\t },\n\t\t sortBy: function(mapper, comparator) {\n\t\t return reify(this, sortFactory(this, comparator, mapper));\n\t\t },\n\t\t take: function(amount) {\n\t\t return reify(this, takeFactory(this, amount));\n\t\t },\n\t\t takeLast: function(amount) {\n\t\t return reify(this, this.toSeq().reverse().take(amount).reverse());\n\t\t },\n\t\t takeWhile: function(predicate, context) {\n\t\t return reify(this, takeWhileFactory(this, predicate, context));\n\t\t },\n\t\t takeUntil: function(predicate, context) {\n\t\t return this.takeWhile(not(predicate), context);\n\t\t },\n\t\t valueSeq: function() {\n\t\t return this.toIndexedSeq();\n\t\t },\n\t\t hashCode: function() {\n\t\t return this.__hash || (this.__hash = hashIterable(this));\n\t\t }\n\t\t}, {});\n\t\tvar IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n\t\tvar IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n\t\tvar IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n\t\tvar IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\t\tvar IterablePrototype = Iterable.prototype;\n\t\tIterablePrototype[IS_ITERABLE_SENTINEL] = true;\n\t\tIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n\t\tIterablePrototype.toJSON = IterablePrototype.toJS;\n\t\tIterablePrototype.__toJS = IterablePrototype.toArray;\n\t\tIterablePrototype.__toStringMapper = quoteString;\n\t\tIterablePrototype.inspect = IterablePrototype.toSource = function() {\n\t\t return this.toString();\n\t\t};\n\t\tIterablePrototype.chain = IterablePrototype.flatMap;\n\t\t(function() {\n\t\t try {\n\t\t Object.defineProperty(IterablePrototype, 'length', {get: function() {\n\t\t if (!Iterable.noLengthWarning) {\n\t\t var stack;\n\t\t try {\n\t\t throw new Error();\n\t\t } catch (error) {\n\t\t stack = error.stack;\n\t\t }\n\t\t if (stack.indexOf('_wrapObject') === -1) {\n\t\t console && console.warn && console.warn('iterable.length has been deprecated, ' + 'use iterable.size or iterable.count(). ' + 'This warning will become a silent error in a future version. ' + stack);\n\t\t return this.size;\n\t\t }\n\t\t }\n\t\t }});\n\t\t } catch (e) {}\n\t\t})();\n\t\tvar KeyedIterable = function KeyedIterable(value) {\n\t\t return isKeyed(value) ? value : KeyedSeq(value);\n\t\t};\n\t\t($traceurRuntime.createClass)(KeyedIterable, {\n\t\t flip: function() {\n\t\t return reify(this, flipFactory(this));\n\t\t },\n\t\t findKey: function(predicate, context) {\n\t\t var foundKey;\n\t\t this.__iterate((function(v, k, c) {\n\t\t if (predicate.call(context, v, k, c)) {\n\t\t foundKey = k;\n\t\t return false;\n\t\t }\n\t\t }));\n\t\t return foundKey;\n\t\t },\n\t\t findLastKey: function(predicate, context) {\n\t\t return this.toSeq().reverse().findKey(predicate, context);\n\t\t },\n\t\t keyOf: function(searchValue) {\n\t\t return this.findKey((function(value) {\n\t\t return is(value, searchValue);\n\t\t }));\n\t\t },\n\t\t lastKeyOf: function(searchValue) {\n\t\t return this.toSeq().reverse().keyOf(searchValue);\n\t\t },\n\t\t mapEntries: function(mapper, context) {\n\t\t var $__0 = this;\n\t\t var iterations = 0;\n\t\t return reify(this, this.toSeq().map((function(v, k) {\n\t\t return mapper.call(context, [k, v], iterations++, $__0);\n\t\t })).fromEntrySeq());\n\t\t },\n\t\t mapKeys: function(mapper, context) {\n\t\t var $__0 = this;\n\t\t return reify(this, this.toSeq().flip().map((function(k, v) {\n\t\t return mapper.call(context, k, v, $__0);\n\t\t })).flip());\n\t\t }\n\t\t}, {}, Iterable);\n\t\tvar KeyedIterablePrototype = KeyedIterable.prototype;\n\t\tKeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n\t\tKeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n\t\tKeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n\t\tKeyedIterablePrototype.__toStringMapper = (function(v, k) {\n\t\t return k + ': ' + quoteString(v);\n\t\t});\n\t\tvar IndexedIterable = function IndexedIterable(value) {\n\t\t return isIndexed(value) ? value : IndexedSeq(value);\n\t\t};\n\t\t($traceurRuntime.createClass)(IndexedIterable, {\n\t\t toKeyedSeq: function() {\n\t\t return new ToKeyedSequence(this, false);\n\t\t },\n\t\t filter: function(predicate, context) {\n\t\t return reify(this, filterFactory(this, predicate, context, false));\n\t\t },\n\t\t findIndex: function(predicate, context) {\n\t\t var key = this.toKeyedSeq().findKey(predicate, context);\n\t\t return key === undefined ? -1 : key;\n\t\t },\n\t\t indexOf: function(searchValue) {\n\t\t var key = this.toKeyedSeq().keyOf(searchValue);\n\t\t return key === undefined ? -1 : key;\n\t\t },\n\t\t lastIndexOf: function(searchValue) {\n\t\t var key = this.toKeyedSeq().lastKeyOf(searchValue);\n\t\t return key === undefined ? -1 : key;\n\t\t },\n\t\t reverse: function() {\n\t\t return reify(this, reverseFactory(this, false));\n\t\t },\n\t\t splice: function(index, removeNum) {\n\t\t var numArgs = arguments.length;\n\t\t removeNum = Math.max(removeNum | 0, 0);\n\t\t if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n\t\t return this;\n\t\t }\n\t\t index = resolveBegin(index, this.size);\n\t\t var spliced = this.slice(0, index);\n\t\t return reify(this, numArgs === 1 ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)));\n\t\t },\n\t\t findLastIndex: function(predicate, context) {\n\t\t var key = this.toKeyedSeq().findLastKey(predicate, context);\n\t\t return key === undefined ? -1 : key;\n\t\t },\n\t\t first: function() {\n\t\t return this.get(0);\n\t\t },\n\t\t flatten: function(depth) {\n\t\t return reify(this, flattenFactory(this, depth, false));\n\t\t },\n\t\t get: function(index, notSetValue) {\n\t\t index = wrapIndex(this, index);\n\t\t return (index < 0 || (this.size === Infinity || (this.size !== undefined && index > this.size))) ? notSetValue : this.find((function(_, key) {\n\t\t return key === index;\n\t\t }), undefined, notSetValue);\n\t\t },\n\t\t has: function(index) {\n\t\t index = wrapIndex(this, index);\n\t\t return index >= 0 && (this.size !== undefined ? this.size === Infinity || index < this.size : this.indexOf(index) !== -1);\n\t\t },\n\t\t interpose: function(separator) {\n\t\t return reify(this, interposeFactory(this, separator));\n\t\t },\n\t\t last: function() {\n\t\t return this.get(-1);\n\t\t },\n\t\t skip: function(amount) {\n\t\t var iter = this;\n\t\t var skipSeq = skipFactory(iter, amount, false);\n\t\t if (isSeq(iter) && skipSeq !== iter) {\n\t\t skipSeq.get = function(index, notSetValue) {\n\t\t index = wrapIndex(this, index);\n\t\t return index >= 0 ? iter.get(index + amount, notSetValue) : notSetValue;\n\t\t };\n\t\t }\n\t\t return reify(this, skipSeq);\n\t\t },\n\t\t skipWhile: function(predicate, context) {\n\t\t return reify(this, skipWhileFactory(this, predicate, context, false));\n\t\t },\n\t\t take: function(amount) {\n\t\t var iter = this;\n\t\t var takeSeq = takeFactory(iter, amount);\n\t\t if (isSeq(iter) && takeSeq !== iter) {\n\t\t takeSeq.get = function(index, notSetValue) {\n\t\t index = wrapIndex(this, index);\n\t\t return index >= 0 && index < amount ? iter.get(index, notSetValue) : notSetValue;\n\t\t };\n\t\t }\n\t\t return reify(this, takeSeq);\n\t\t }\n\t\t}, {}, Iterable);\n\t\tIndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n\t\tIndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n\t\tvar SetIterable = function SetIterable(value) {\n\t\t return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n\t\t};\n\t\t($traceurRuntime.createClass)(SetIterable, {\n\t\t get: function(value, notSetValue) {\n\t\t return this.has(value) ? value : notSetValue;\n\t\t },\n\t\t contains: function(value) {\n\t\t return this.has(value);\n\t\t },\n\t\t keySeq: function() {\n\t\t return this.valueSeq();\n\t\t }\n\t\t}, {}, Iterable);\n\t\tSetIterable.prototype.has = IterablePrototype.contains;\n\t\tfunction isIterable(maybeIterable) {\n\t\t return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n\t\t}\n\t\tfunction isKeyed(maybeKeyed) {\n\t\t return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n\t\t}\n\t\tfunction isIndexed(maybeIndexed) {\n\t\t return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n\t\t}\n\t\tfunction isAssociative(maybeAssociative) {\n\t\t return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n\t\t}\n\t\tfunction isOrdered(maybeOrdered) {\n\t\t return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);\n\t\t}\n\t\tIterable.isIterable = isIterable;\n\t\tIterable.isKeyed = isKeyed;\n\t\tIterable.isIndexed = isIndexed;\n\t\tIterable.isAssociative = isAssociative;\n\t\tIterable.isOrdered = isOrdered;\n\t\tIterable.Keyed = KeyedIterable;\n\t\tIterable.Indexed = IndexedIterable;\n\t\tIterable.Set = SetIterable;\n\t\tIterable.Iterator = Iterator;\n\t\tfunction keyMapper(v, k) {\n\t\t return k;\n\t\t}\n\t\tfunction entryMapper(v, k) {\n\t\t return [k, v];\n\t\t}\n\t\tfunction not(predicate) {\n\t\t return function() {\n\t\t return !predicate.apply(this, arguments);\n\t\t };\n\t\t}\n\t\tfunction neg(predicate) {\n\t\t return function() {\n\t\t return -predicate.apply(this, arguments);\n\t\t };\n\t\t}\n\t\tfunction quoteString(value) {\n\t\t return typeof value === 'string' ? JSON.stringify(value) : value;\n\t\t}\n\t\tfunction defaultNegComparator(a, b) {\n\t\t return a < b ? 1 : a > b ? -1 : 0;\n\t\t}\n\t\tfunction deepEqual(a, b) {\n\t\t if (a === b) {\n\t\t return true;\n\t\t }\n\t\t if (!isIterable(b) || a.size !== undefined && b.size !== undefined && a.size !== b.size || a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash || isKeyed(a) !== isKeyed(b) || isIndexed(a) !== isIndexed(b) || isOrdered(a) !== isOrdered(b)) {\n\t\t return false;\n\t\t }\n\t\t if (a.size === 0 && b.size === 0) {\n\t\t return true;\n\t\t }\n\t\t var notAssociative = !isAssociative(a);\n\t\t if (isOrdered(a)) {\n\t\t var entries = a.entries();\n\t\t return b.every((function(v, k) {\n\t\t var entry = entries.next().value;\n\t\t return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n\t\t })) && entries.next().done;\n\t\t }\n\t\t var flipped = false;\n\t\t if (a.size === undefined) {\n\t\t if (b.size === undefined) {\n\t\t a.cacheResult();\n\t\t } else {\n\t\t flipped = true;\n\t\t var _ = a;\n\t\t a = b;\n\t\t b = _;\n\t\t }\n\t\t }\n\t\t var allEqual = true;\n\t\t var bSize = b.__iterate((function(v, k) {\n\t\t if (notAssociative ? !a.has(v) : flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n\t\t allEqual = false;\n\t\t return false;\n\t\t }\n\t\t }));\n\t\t return allEqual && a.size === bSize;\n\t\t}\n\t\tfunction hashIterable(iterable) {\n\t\t if (iterable.size === Infinity) {\n\t\t return 0;\n\t\t }\n\t\t var ordered = isOrdered(iterable);\n\t\t var keyed = isKeyed(iterable);\n\t\t var h = ordered ? 1 : 0;\n\t\t var size = iterable.__iterate(keyed ? ordered ? (function(v, k) {\n\t\t h = 31 * h + hashMerge(hash(v), hash(k)) | 0;\n\t\t }) : (function(v, k) {\n\t\t h = h + hashMerge(hash(v), hash(k)) | 0;\n\t\t }) : ordered ? (function(v) {\n\t\t h = 31 * h + hash(v) | 0;\n\t\t }) : (function(v) {\n\t\t h = h + hash(v) | 0;\n\t\t }));\n\t\t return murmurHashOfSize(size, h);\n\t\t}\n\t\tfunction murmurHashOfSize(size, h) {\n\t\t h = imul(h, 0xCC9E2D51);\n\t\t h = imul(h << 15 | h >>> -15, 0x1B873593);\n\t\t h = imul(h << 13 | h >>> -13, 5);\n\t\t h = (h + 0xE6546B64 | 0) ^ size;\n\t\t h = imul(h ^ h >>> 16, 0x85EBCA6B);\n\t\t h = imul(h ^ h >>> 13, 0xC2B2AE35);\n\t\t h = smi(h ^ h >>> 16);\n\t\t return h;\n\t\t}\n\t\tfunction hashMerge(a, b) {\n\t\t return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0;\n\t\t}\n\t\tfunction mixin(ctor, methods) {\n\t\t var proto = ctor.prototype;\n\t\t var keyCopier = (function(key) {\n\t\t proto[key] = methods[key];\n\t\t });\n\t\t Object.keys(methods).forEach(keyCopier);\n\t\t Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n\t\t return ctor;\n\t\t}\n\t\tvar Seq = function Seq(value) {\n\t\t return value === null || value === undefined ? emptySequence() : isIterable(value) ? value.toSeq() : seqFromValue(value);\n\t\t};\n\t\tvar $Seq = Seq;\n\t\t($traceurRuntime.createClass)(Seq, {\n\t\t toSeq: function() {\n\t\t return this;\n\t\t },\n\t\t toString: function() {\n\t\t return this.__toString('Seq {', '}');\n\t\t },\n\t\t cacheResult: function() {\n\t\t if (!this._cache && this.__iterateUncached) {\n\t\t this._cache = this.entrySeq().toArray();\n\t\t this.size = this._cache.length;\n\t\t }\n\t\t return this;\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t return seqIterate(this, fn, reverse, true);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t return seqIterator(this, type, reverse, true);\n\t\t }\n\t\t}, {of: function() {\n\t\t return $Seq(arguments);\n\t\t }}, Iterable);\n\t\tvar KeyedSeq = function KeyedSeq(value) {\n\t\t return value === null || value === undefined ? emptySequence().toKeyedSeq() : isIterable(value) ? (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) : keyedSeqFromValue(value);\n\t\t};\n\t\tvar $KeyedSeq = KeyedSeq;\n\t\t($traceurRuntime.createClass)(KeyedSeq, {\n\t\t toKeyedSeq: function() {\n\t\t return this;\n\t\t },\n\t\t toSeq: function() {\n\t\t return this;\n\t\t }\n\t\t}, {of: function() {\n\t\t return $KeyedSeq(arguments);\n\t\t }}, Seq);\n\t\tmixin(KeyedSeq, KeyedIterable.prototype);\n\t\tvar IndexedSeq = function IndexedSeq(value) {\n\t\t return value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n\t\t};\n\t\tvar $IndexedSeq = IndexedSeq;\n\t\t($traceurRuntime.createClass)(IndexedSeq, {\n\t\t toIndexedSeq: function() {\n\t\t return this;\n\t\t },\n\t\t toString: function() {\n\t\t return this.__toString('Seq [', ']');\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t return seqIterate(this, fn, reverse, false);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t return seqIterator(this, type, reverse, false);\n\t\t }\n\t\t}, {of: function() {\n\t\t return $IndexedSeq(arguments);\n\t\t }}, Seq);\n\t\tmixin(IndexedSeq, IndexedIterable.prototype);\n\t\tvar SetSeq = function SetSeq(value) {\n\t\t return (value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value).toSetSeq();\n\t\t};\n\t\tvar $SetSeq = SetSeq;\n\t\t($traceurRuntime.createClass)(SetSeq, {toSetSeq: function() {\n\t\t return this;\n\t\t }}, {of: function() {\n\t\t return $SetSeq(arguments);\n\t\t }}, Seq);\n\t\tmixin(SetSeq, SetIterable.prototype);\n\t\tSeq.isSeq = isSeq;\n\t\tSeq.Keyed = KeyedSeq;\n\t\tSeq.Set = SetSeq;\n\t\tSeq.Indexed = IndexedSeq;\n\t\tvar IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\t\tSeq.prototype[IS_SEQ_SENTINEL] = true;\n\t\tvar ArraySeq = function ArraySeq(array) {\n\t\t this._array = array;\n\t\t this.size = array.length;\n\t\t};\n\t\t($traceurRuntime.createClass)(ArraySeq, {\n\t\t get: function(index, notSetValue) {\n\t\t return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var array = this._array;\n\t\t var maxIndex = array.length - 1;\n\t\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t\t if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n\t\t return ii + 1;\n\t\t }\n\t\t }\n\t\t return ii;\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var array = this._array;\n\t\t var maxIndex = array.length - 1;\n\t\t var ii = 0;\n\t\t return new Iterator((function() {\n\t\t return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++]);\n\t\t }));\n\t\t }\n\t\t}, {}, IndexedSeq);\n\t\tvar ObjectSeq = function ObjectSeq(object) {\n\t\t var keys = Object.keys(object);\n\t\t this._object = object;\n\t\t this._keys = keys;\n\t\t this.size = keys.length;\n\t\t};\n\t\t($traceurRuntime.createClass)(ObjectSeq, {\n\t\t get: function(key, notSetValue) {\n\t\t if (notSetValue !== undefined && !this.has(key)) {\n\t\t return notSetValue;\n\t\t }\n\t\t return this._object[key];\n\t\t },\n\t\t has: function(key) {\n\t\t return this._object.hasOwnProperty(key);\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var object = this._object;\n\t\t var keys = this._keys;\n\t\t var maxIndex = keys.length - 1;\n\t\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t\t var key = keys[reverse ? maxIndex - ii : ii];\n\t\t if (fn(object[key], key, this) === false) {\n\t\t return ii + 1;\n\t\t }\n\t\t }\n\t\t return ii;\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var object = this._object;\n\t\t var keys = this._keys;\n\t\t var maxIndex = keys.length - 1;\n\t\t var ii = 0;\n\t\t return new Iterator((function() {\n\t\t var key = keys[reverse ? maxIndex - ii : ii];\n\t\t return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]);\n\t\t }));\n\t\t }\n\t\t}, {}, KeyedSeq);\n\t\tObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n\t\tvar IterableSeq = function IterableSeq(iterable) {\n\t\t this._iterable = iterable;\n\t\t this.size = iterable.length || iterable.size;\n\t\t};\n\t\t($traceurRuntime.createClass)(IterableSeq, {\n\t\t __iterateUncached: function(fn, reverse) {\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterate(fn, reverse);\n\t\t }\n\t\t var iterable = this._iterable;\n\t\t var iterator = getIterator(iterable);\n\t\t var iterations = 0;\n\t\t if (isIterator(iterator)) {\n\t\t var step;\n\t\t while (!(step = iterator.next()).done) {\n\t\t if (fn(step.value, iterations++, this) === false) {\n\t\t break;\n\t\t }\n\t\t }\n\t\t }\n\t\t return iterations;\n\t\t },\n\t\t __iteratorUncached: function(type, reverse) {\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterable = this._iterable;\n\t\t var iterator = getIterator(iterable);\n\t\t if (!isIterator(iterator)) {\n\t\t return new Iterator(iteratorDone);\n\t\t }\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t var step = iterator.next();\n\t\t return step.done ? step : iteratorValue(type, iterations++, step.value);\n\t\t }));\n\t\t }\n\t\t}, {}, IndexedSeq);\n\t\tvar IteratorSeq = function IteratorSeq(iterator) {\n\t\t this._iterator = iterator;\n\t\t this._iteratorCache = [];\n\t\t};\n\t\t($traceurRuntime.createClass)(IteratorSeq, {\n\t\t __iterateUncached: function(fn, reverse) {\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterate(fn, reverse);\n\t\t }\n\t\t var iterator = this._iterator;\n\t\t var cache = this._iteratorCache;\n\t\t var iterations = 0;\n\t\t while (iterations < cache.length) {\n\t\t if (fn(cache[iterations], iterations++, this) === false) {\n\t\t return iterations;\n\t\t }\n\t\t }\n\t\t var step;\n\t\t while (!(step = iterator.next()).done) {\n\t\t var val = step.value;\n\t\t cache[iterations] = val;\n\t\t if (fn(val, iterations++, this) === false) {\n\t\t break;\n\t\t }\n\t\t }\n\t\t return iterations;\n\t\t },\n\t\t __iteratorUncached: function(type, reverse) {\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterator = this._iterator;\n\t\t var cache = this._iteratorCache;\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t if (iterations >= cache.length) {\n\t\t var step = iterator.next();\n\t\t if (step.done) {\n\t\t return step;\n\t\t }\n\t\t cache[iterations] = step.value;\n\t\t }\n\t\t return iteratorValue(type, iterations, cache[iterations++]);\n\t\t }));\n\t\t }\n\t\t}, {}, IndexedSeq);\n\t\tfunction isSeq(maybeSeq) {\n\t\t return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n\t\t}\n\t\tvar EMPTY_SEQ;\n\t\tfunction emptySequence() {\n\t\t return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n\t\t}\n\t\tfunction keyedSeqFromValue(value) {\n\t\t var seq = Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : typeof value === 'object' ? new ObjectSeq(value) : undefined;\n\t\t if (!seq) {\n\t\t throw new TypeError('Expected Array or iterable object of [k, v] entries, ' + 'or keyed object: ' + value);\n\t\t }\n\t\t return seq;\n\t\t}\n\t\tfunction indexedSeqFromValue(value) {\n\t\t var seq = maybeIndexedSeqFromValue(value);\n\t\t if (!seq) {\n\t\t throw new TypeError('Expected Array or iterable object of values: ' + value);\n\t\t }\n\t\t return seq;\n\t\t}\n\t\tfunction seqFromValue(value) {\n\t\t var seq = maybeIndexedSeqFromValue(value) || (typeof value === 'object' && new ObjectSeq(value));\n\t\t if (!seq) {\n\t\t throw new TypeError('Expected Array or iterable object of values, or keyed object: ' + value);\n\t\t }\n\t\t return seq;\n\t\t}\n\t\tfunction maybeIndexedSeqFromValue(value) {\n\t\t return (isArrayLike(value) ? new ArraySeq(value) : isIterator(value) ? new IteratorSeq(value) : hasIterator(value) ? new IterableSeq(value) : undefined);\n\t\t}\n\t\tfunction isArrayLike(value) {\n\t\t return value && typeof value.length === 'number';\n\t\t}\n\t\tfunction seqIterate(seq, fn, reverse, useKeys) {\n\t\t var cache = seq._cache;\n\t\t if (cache) {\n\t\t var maxIndex = cache.length - 1;\n\t\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t\t var entry = cache[reverse ? maxIndex - ii : ii];\n\t\t if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n\t\t return ii + 1;\n\t\t }\n\t\t }\n\t\t return ii;\n\t\t }\n\t\t return seq.__iterateUncached(fn, reverse);\n\t\t}\n\t\tfunction seqIterator(seq, type, reverse, useKeys) {\n\t\t var cache = seq._cache;\n\t\t if (cache) {\n\t\t var maxIndex = cache.length - 1;\n\t\t var ii = 0;\n\t\t return new Iterator((function() {\n\t\t var entry = cache[reverse ? maxIndex - ii : ii];\n\t\t return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n\t\t }));\n\t\t }\n\t\t return seq.__iteratorUncached(type, reverse);\n\t\t}\n\t\tfunction fromJS(json, converter) {\n\t\t return converter ? _fromJSWith(converter, json, '', {'': json}) : _fromJSDefault(json);\n\t\t}\n\t\tfunction _fromJSWith(converter, json, key, parentJSON) {\n\t\t if (Array.isArray(json)) {\n\t\t return converter.call(parentJSON, key, IndexedSeq(json).map((function(v, k) {\n\t\t return _fromJSWith(converter, v, k, json);\n\t\t })));\n\t\t }\n\t\t if (isPlainObj(json)) {\n\t\t return converter.call(parentJSON, key, KeyedSeq(json).map((function(v, k) {\n\t\t return _fromJSWith(converter, v, k, json);\n\t\t })));\n\t\t }\n\t\t return json;\n\t\t}\n\t\tfunction _fromJSDefault(json) {\n\t\t if (Array.isArray(json)) {\n\t\t return IndexedSeq(json).map(_fromJSDefault).toList();\n\t\t }\n\t\t if (isPlainObj(json)) {\n\t\t return KeyedSeq(json).map(_fromJSDefault).toMap();\n\t\t }\n\t\t return json;\n\t\t}\n\t\tfunction isPlainObj(value) {\n\t\t return value && value.constructor === Object;\n\t\t}\n\t\tvar Collection = function Collection() {\n\t\t throw TypeError('Abstract');\n\t\t};\n\t\t($traceurRuntime.createClass)(Collection, {}, {}, Iterable);\n\t\tvar KeyedCollection = function KeyedCollection() {\n\t\t $traceurRuntime.defaultSuperCall(this, $KeyedCollection.prototype, arguments);\n\t\t};\n\t\tvar $KeyedCollection = KeyedCollection;\n\t\t($traceurRuntime.createClass)(KeyedCollection, {}, {}, Collection);\n\t\tmixin(KeyedCollection, KeyedIterable.prototype);\n\t\tvar IndexedCollection = function IndexedCollection() {\n\t\t $traceurRuntime.defaultSuperCall(this, $IndexedCollection.prototype, arguments);\n\t\t};\n\t\tvar $IndexedCollection = IndexedCollection;\n\t\t($traceurRuntime.createClass)(IndexedCollection, {}, {}, Collection);\n\t\tmixin(IndexedCollection, IndexedIterable.prototype);\n\t\tvar SetCollection = function SetCollection() {\n\t\t $traceurRuntime.defaultSuperCall(this, $SetCollection.prototype, arguments);\n\t\t};\n\t\tvar $SetCollection = SetCollection;\n\t\t($traceurRuntime.createClass)(SetCollection, {}, {}, Collection);\n\t\tmixin(SetCollection, SetIterable.prototype);\n\t\tCollection.Keyed = KeyedCollection;\n\t\tCollection.Indexed = IndexedCollection;\n\t\tCollection.Set = SetCollection;\n\t\tvar Map = function Map(value) {\n\t\t return value === null || value === undefined ? emptyMap() : isMap(value) ? value : emptyMap().withMutations((function(map) {\n\t\t var iter = KeyedIterable(value);\n\t\t assertNotInfinite(iter.size);\n\t\t iter.forEach((function(v, k) {\n\t\t return map.set(k, v);\n\t\t }));\n\t\t }));\n\t\t};\n\t\t($traceurRuntime.createClass)(Map, {\n\t\t toString: function() {\n\t\t return this.__toString('Map {', '}');\n\t\t },\n\t\t get: function(k, notSetValue) {\n\t\t return this._root ? this._root.get(0, undefined, k, notSetValue) : notSetValue;\n\t\t },\n\t\t set: function(k, v) {\n\t\t return updateMap(this, k, v);\n\t\t },\n\t\t setIn: function(keyPath, v) {\n\t\t return this.updateIn(keyPath, NOT_SET, (function() {\n\t\t return v;\n\t\t }));\n\t\t },\n\t\t remove: function(k) {\n\t\t return updateMap(this, k, NOT_SET);\n\t\t },\n\t\t deleteIn: function(keyPath) {\n\t\t return this.updateIn(keyPath, (function() {\n\t\t return NOT_SET;\n\t\t }));\n\t\t },\n\t\t update: function(k, notSetValue, updater) {\n\t\t return arguments.length === 1 ? k(this) : this.updateIn([k], notSetValue, updater);\n\t\t },\n\t\t updateIn: function(keyPath, notSetValue, updater) {\n\t\t if (!updater) {\n\t\t updater = notSetValue;\n\t\t notSetValue = undefined;\n\t\t }\n\t\t var updatedValue = updateInDeepMap(this, getIterator(keyPath) || getIterator(Iterable(keyPath)), notSetValue, updater);\n\t\t return updatedValue === NOT_SET ? undefined : updatedValue;\n\t\t },\n\t\t clear: function() {\n\t\t if (this.size === 0) {\n\t\t return this;\n\t\t }\n\t\t if (this.__ownerID) {\n\t\t this.size = 0;\n\t\t this._root = null;\n\t\t this.__hash = undefined;\n\t\t this.__altered = true;\n\t\t return this;\n\t\t }\n\t\t return emptyMap();\n\t\t },\n\t\t merge: function() {\n\t\t return mergeIntoMapWith(this, undefined, arguments);\n\t\t },\n\t\t mergeWith: function(merger) {\n\t\t for (var iters = [],\n\t\t $__3 = 1; $__3 < arguments.length; $__3++)\n\t\t iters[$__3 - 1] = arguments[$__3];\n\t\t return mergeIntoMapWith(this, merger, iters);\n\t\t },\n\t\t mergeIn: function(keyPath) {\n\t\t for (var iters = [],\n\t\t $__4 = 1; $__4 < arguments.length; $__4++)\n\t\t iters[$__4 - 1] = arguments[$__4];\n\t\t return this.updateIn(keyPath, emptyMap(), (function(m) {\n\t\t return m.merge.apply(m, iters);\n\t\t }));\n\t\t },\n\t\t mergeDeep: function() {\n\t\t return mergeIntoMapWith(this, deepMerger(undefined), arguments);\n\t\t },\n\t\t mergeDeepWith: function(merger) {\n\t\t for (var iters = [],\n\t\t $__5 = 1; $__5 < arguments.length; $__5++)\n\t\t iters[$__5 - 1] = arguments[$__5];\n\t\t return mergeIntoMapWith(this, deepMerger(merger), iters);\n\t\t },\n\t\t mergeDeepIn: function(keyPath) {\n\t\t for (var iters = [],\n\t\t $__6 = 1; $__6 < arguments.length; $__6++)\n\t\t iters[$__6 - 1] = arguments[$__6];\n\t\t return this.updateIn(keyPath, emptyMap(), (function(m) {\n\t\t return m.mergeDeep.apply(m, iters);\n\t\t }));\n\t\t },\n\t\t sort: function(comparator) {\n\t\t return OrderedMap(sortFactory(this, comparator));\n\t\t },\n\t\t sortBy: function(mapper, comparator) {\n\t\t return OrderedMap(sortFactory(this, comparator, mapper));\n\t\t },\n\t\t withMutations: function(fn) {\n\t\t var mutable = this.asMutable();\n\t\t fn(mutable);\n\t\t return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n\t\t },\n\t\t asMutable: function() {\n\t\t return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n\t\t },\n\t\t asImmutable: function() {\n\t\t return this.__ensureOwner();\n\t\t },\n\t\t wasAltered: function() {\n\t\t return this.__altered;\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t return new MapIterator(this, type, reverse);\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t var iterations = 0;\n\t\t this._root && this._root.iterate((function(entry) {\n\t\t iterations++;\n\t\t return fn(entry[1], entry[0], $__0);\n\t\t }), reverse);\n\t\t return iterations;\n\t\t },\n\t\t __ensureOwner: function(ownerID) {\n\t\t if (ownerID === this.__ownerID) {\n\t\t return this;\n\t\t }\n\t\t if (!ownerID) {\n\t\t this.__ownerID = ownerID;\n\t\t this.__altered = false;\n\t\t return this;\n\t\t }\n\t\t return makeMap(this.size, this._root, ownerID, this.__hash);\n\t\t }\n\t\t}, {}, KeyedCollection);\n\t\tfunction isMap(maybeMap) {\n\t\t return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n\t\t}\n\t\tMap.isMap = isMap;\n\t\tvar IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\t\tvar MapPrototype = Map.prototype;\n\t\tMapPrototype[IS_MAP_SENTINEL] = true;\n\t\tMapPrototype[DELETE] = MapPrototype.remove;\n\t\tMapPrototype.removeIn = MapPrototype.deleteIn;\n\t\tvar ArrayMapNode = function ArrayMapNode(ownerID, entries) {\n\t\t this.ownerID = ownerID;\n\t\t this.entries = entries;\n\t\t};\n\t\tvar $ArrayMapNode = ArrayMapNode;\n\t\t($traceurRuntime.createClass)(ArrayMapNode, {\n\t\t get: function(shift, keyHash, key, notSetValue) {\n\t\t var entries = this.entries;\n\t\t for (var ii = 0,\n\t\t len = entries.length; ii < len; ii++) {\n\t\t if (is(key, entries[ii][0])) {\n\t\t return entries[ii][1];\n\t\t }\n\t\t }\n\t\t return notSetValue;\n\t\t },\n\t\t update: function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n\t\t var removed = value === NOT_SET;\n\t\t var entries = this.entries;\n\t\t var idx = 0;\n\t\t for (var len = entries.length; idx < len; idx++) {\n\t\t if (is(key, entries[idx][0])) {\n\t\t break;\n\t\t }\n\t\t }\n\t\t var exists = idx < len;\n\t\t if (exists ? entries[idx][1] === value : removed) {\n\t\t return this;\n\t\t }\n\t\t SetRef(didAlter);\n\t\t (removed || !exists) && SetRef(didChangeSize);\n\t\t if (removed && entries.length === 1) {\n\t\t return;\n\t\t }\n\t\t if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n\t\t return createNodes(ownerID, entries, key, value);\n\t\t }\n\t\t var isEditable = ownerID && ownerID === this.ownerID;\n\t\t var newEntries = isEditable ? entries : arrCopy(entries);\n\t\t if (exists) {\n\t\t if (removed) {\n\t\t idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n\t\t } else {\n\t\t newEntries[idx] = [key, value];\n\t\t }\n\t\t } else {\n\t\t newEntries.push([key, value]);\n\t\t }\n\t\t if (isEditable) {\n\t\t this.entries = newEntries;\n\t\t return this;\n\t\t }\n\t\t return new $ArrayMapNode(ownerID, newEntries);\n\t\t }\n\t\t}, {});\n\t\tvar BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) {\n\t\t this.ownerID = ownerID;\n\t\t this.bitmap = bitmap;\n\t\t this.nodes = nodes;\n\t\t};\n\t\tvar $BitmapIndexedNode = BitmapIndexedNode;\n\t\t($traceurRuntime.createClass)(BitmapIndexedNode, {\n\t\t get: function(shift, keyHash, key, notSetValue) {\n\t\t if (keyHash === undefined) {\n\t\t keyHash = hash(key);\n\t\t }\n\t\t var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));\n\t\t var bitmap = this.bitmap;\n\t\t return (bitmap & bit) === 0 ? notSetValue : this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);\n\t\t },\n\t\t update: function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n\t\t if (keyHash === undefined) {\n\t\t keyHash = hash(key);\n\t\t }\n\t\t var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\t\t var bit = 1 << keyHashFrag;\n\t\t var bitmap = this.bitmap;\n\t\t var exists = (bitmap & bit) !== 0;\n\t\t if (!exists && value === NOT_SET) {\n\t\t return this;\n\t\t }\n\t\t var idx = popCount(bitmap & (bit - 1));\n\t\t var nodes = this.nodes;\n\t\t var node = exists ? nodes[idx] : undefined;\n\t\t var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\t\t if (newNode === node) {\n\t\t return this;\n\t\t }\n\t\t if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n\t\t return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n\t\t }\n\t\t if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n\t\t return nodes[idx ^ 1];\n\t\t }\n\t\t if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n\t\t return newNode;\n\t\t }\n\t\t var isEditable = ownerID && ownerID === this.ownerID;\n\t\t var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n\t\t var newNodes = exists ? newNode ? setIn(nodes, idx, newNode, isEditable) : spliceOut(nodes, idx, isEditable) : spliceIn(nodes, idx, newNode, isEditable);\n\t\t if (isEditable) {\n\t\t this.bitmap = newBitmap;\n\t\t this.nodes = newNodes;\n\t\t return this;\n\t\t }\n\t\t return new $BitmapIndexedNode(ownerID, newBitmap, newNodes);\n\t\t }\n\t\t}, {});\n\t\tvar HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) {\n\t\t this.ownerID = ownerID;\n\t\t this.count = count;\n\t\t this.nodes = nodes;\n\t\t};\n\t\tvar $HashArrayMapNode = HashArrayMapNode;\n\t\t($traceurRuntime.createClass)(HashArrayMapNode, {\n\t\t get: function(shift, keyHash, key, notSetValue) {\n\t\t if (keyHash === undefined) {\n\t\t keyHash = hash(key);\n\t\t }\n\t\t var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\t\t var node = this.nodes[idx];\n\t\t return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n\t\t },\n\t\t update: function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n\t\t if (keyHash === undefined) {\n\t\t keyHash = hash(key);\n\t\t }\n\t\t var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\t\t var removed = value === NOT_SET;\n\t\t var nodes = this.nodes;\n\t\t var node = nodes[idx];\n\t\t if (removed && !node) {\n\t\t return this;\n\t\t }\n\t\t var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\t\t if (newNode === node) {\n\t\t return this;\n\t\t }\n\t\t var newCount = this.count;\n\t\t if (!node) {\n\t\t newCount++;\n\t\t } else if (!newNode) {\n\t\t newCount--;\n\t\t if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n\t\t return packNodes(ownerID, nodes, newCount, idx);\n\t\t }\n\t\t }\n\t\t var isEditable = ownerID && ownerID === this.ownerID;\n\t\t var newNodes = setIn(nodes, idx, newNode, isEditable);\n\t\t if (isEditable) {\n\t\t this.count = newCount;\n\t\t this.nodes = newNodes;\n\t\t return this;\n\t\t }\n\t\t return new $HashArrayMapNode(ownerID, newCount, newNodes);\n\t\t }\n\t\t}, {});\n\t\tvar HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) {\n\t\t this.ownerID = ownerID;\n\t\t this.keyHash = keyHash;\n\t\t this.entries = entries;\n\t\t};\n\t\tvar $HashCollisionNode = HashCollisionNode;\n\t\t($traceurRuntime.createClass)(HashCollisionNode, {\n\t\t get: function(shift, keyHash, key, notSetValue) {\n\t\t var entries = this.entries;\n\t\t for (var ii = 0,\n\t\t len = entries.length; ii < len; ii++) {\n\t\t if (is(key, entries[ii][0])) {\n\t\t return entries[ii][1];\n\t\t }\n\t\t }\n\t\t return notSetValue;\n\t\t },\n\t\t update: function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n\t\t if (keyHash === undefined) {\n\t\t keyHash = hash(key);\n\t\t }\n\t\t var removed = value === NOT_SET;\n\t\t if (keyHash !== this.keyHash) {\n\t\t if (removed) {\n\t\t return this;\n\t\t }\n\t\t SetRef(didAlter);\n\t\t SetRef(didChangeSize);\n\t\t return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n\t\t }\n\t\t var entries = this.entries;\n\t\t var idx = 0;\n\t\t for (var len = entries.length; idx < len; idx++) {\n\t\t if (is(key, entries[idx][0])) {\n\t\t break;\n\t\t }\n\t\t }\n\t\t var exists = idx < len;\n\t\t if (exists ? entries[idx][1] === value : removed) {\n\t\t return this;\n\t\t }\n\t\t SetRef(didAlter);\n\t\t (removed || !exists) && SetRef(didChangeSize);\n\t\t if (removed && len === 2) {\n\t\t return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n\t\t }\n\t\t var isEditable = ownerID && ownerID === this.ownerID;\n\t\t var newEntries = isEditable ? entries : arrCopy(entries);\n\t\t if (exists) {\n\t\t if (removed) {\n\t\t idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n\t\t } else {\n\t\t newEntries[idx] = [key, value];\n\t\t }\n\t\t } else {\n\t\t newEntries.push([key, value]);\n\t\t }\n\t\t if (isEditable) {\n\t\t this.entries = newEntries;\n\t\t return this;\n\t\t }\n\t\t return new $HashCollisionNode(ownerID, this.keyHash, newEntries);\n\t\t }\n\t\t}, {});\n\t\tvar ValueNode = function ValueNode(ownerID, keyHash, entry) {\n\t\t this.ownerID = ownerID;\n\t\t this.keyHash = keyHash;\n\t\t this.entry = entry;\n\t\t};\n\t\tvar $ValueNode = ValueNode;\n\t\t($traceurRuntime.createClass)(ValueNode, {\n\t\t get: function(shift, keyHash, key, notSetValue) {\n\t\t return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n\t\t },\n\t\t update: function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n\t\t var removed = value === NOT_SET;\n\t\t var keyMatch = is(key, this.entry[0]);\n\t\t if (keyMatch ? value === this.entry[1] : removed) {\n\t\t return this;\n\t\t }\n\t\t SetRef(didAlter);\n\t\t if (removed) {\n\t\t SetRef(didChangeSize);\n\t\t return;\n\t\t }\n\t\t if (keyMatch) {\n\t\t if (ownerID && ownerID === this.ownerID) {\n\t\t this.entry[1] = value;\n\t\t return this;\n\t\t }\n\t\t return new $ValueNode(ownerID, this.keyHash, [key, value]);\n\t\t }\n\t\t SetRef(didChangeSize);\n\t\t return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n\t\t }\n\t\t}, {});\n\t\tArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function(fn, reverse) {\n\t\t var entries = this.entries;\n\t\t for (var ii = 0,\n\t\t maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n\t\t if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n\t\t return false;\n\t\t }\n\t\t }\n\t\t};\n\t\tBitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function(fn, reverse) {\n\t\t var nodes = this.nodes;\n\t\t for (var ii = 0,\n\t\t maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n\t\t var node = nodes[reverse ? maxIndex - ii : ii];\n\t\t if (node && node.iterate(fn, reverse) === false) {\n\t\t return false;\n\t\t }\n\t\t }\n\t\t};\n\t\tValueNode.prototype.iterate = function(fn, reverse) {\n\t\t return fn(this.entry);\n\t\t};\n\t\tvar MapIterator = function MapIterator(map, type, reverse) {\n\t\t this._type = type;\n\t\t this._reverse = reverse;\n\t\t this._stack = map._root && mapIteratorFrame(map._root);\n\t\t};\n\t\t($traceurRuntime.createClass)(MapIterator, {next: function() {\n\t\t var type = this._type;\n\t\t var stack = this._stack;\n\t\t while (stack) {\n\t\t var node = stack.node;\n\t\t var index = stack.index++;\n\t\t var maxIndex;\n\t\t if (node.entry) {\n\t\t if (index === 0) {\n\t\t return mapIteratorValue(type, node.entry);\n\t\t }\n\t\t } else if (node.entries) {\n\t\t maxIndex = node.entries.length - 1;\n\t\t if (index <= maxIndex) {\n\t\t return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n\t\t }\n\t\t } else {\n\t\t maxIndex = node.nodes.length - 1;\n\t\t if (index <= maxIndex) {\n\t\t var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n\t\t if (subNode) {\n\t\t if (subNode.entry) {\n\t\t return mapIteratorValue(type, subNode.entry);\n\t\t }\n\t\t stack = this._stack = mapIteratorFrame(subNode, stack);\n\t\t }\n\t\t continue;\n\t\t }\n\t\t }\n\t\t stack = this._stack = this._stack.__prev;\n\t\t }\n\t\t return iteratorDone();\n\t\t }}, {}, Iterator);\n\t\tfunction mapIteratorValue(type, entry) {\n\t\t return iteratorValue(type, entry[0], entry[1]);\n\t\t}\n\t\tfunction mapIteratorFrame(node, prev) {\n\t\t return {\n\t\t node: node,\n\t\t index: 0,\n\t\t __prev: prev\n\t\t };\n\t\t}\n\t\tfunction makeMap(size, root, ownerID, hash) {\n\t\t var map = Object.create(MapPrototype);\n\t\t map.size = size;\n\t\t map._root = root;\n\t\t map.__ownerID = ownerID;\n\t\t map.__hash = hash;\n\t\t map.__altered = false;\n\t\t return map;\n\t\t}\n\t\tvar EMPTY_MAP;\n\t\tfunction emptyMap() {\n\t\t return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n\t\t}\n\t\tfunction updateMap(map, k, v) {\n\t\t var newRoot;\n\t\t var newSize;\n\t\t if (!map._root) {\n\t\t if (v === NOT_SET) {\n\t\t return map;\n\t\t }\n\t\t newSize = 1;\n\t\t newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n\t\t } else {\n\t\t var didChangeSize = MakeRef(CHANGE_LENGTH);\n\t\t var didAlter = MakeRef(DID_ALTER);\n\t\t newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n\t\t if (!didAlter.value) {\n\t\t return map;\n\t\t }\n\t\t newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n\t\t }\n\t\t if (map.__ownerID) {\n\t\t map.size = newSize;\n\t\t map._root = newRoot;\n\t\t map.__hash = undefined;\n\t\t map.__altered = true;\n\t\t return map;\n\t\t }\n\t\t return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n\t\t}\n\t\tfunction updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n\t\t if (!node) {\n\t\t if (value === NOT_SET) {\n\t\t return node;\n\t\t }\n\t\t SetRef(didAlter);\n\t\t SetRef(didChangeSize);\n\t\t return new ValueNode(ownerID, keyHash, [key, value]);\n\t\t }\n\t\t return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n\t\t}\n\t\tfunction isLeafNode(node) {\n\t\t return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n\t\t}\n\t\tfunction mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n\t\t if (node.keyHash === keyHash) {\n\t\t return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n\t\t }\n\t\t var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n\t\t var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\t\t var newNode;\n\t\t var nodes = idx1 === idx2 ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] : ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\t\t return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n\t\t}\n\t\tfunction createNodes(ownerID, entries, key, value) {\n\t\t if (!ownerID) {\n\t\t ownerID = new OwnerID();\n\t\t }\n\t\t var node = new ValueNode(ownerID, hash(key), [key, value]);\n\t\t for (var ii = 0; ii < entries.length; ii++) {\n\t\t var entry = entries[ii];\n\t\t node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n\t\t }\n\t\t return node;\n\t\t}\n\t\tfunction packNodes(ownerID, nodes, count, excluding) {\n\t\t var bitmap = 0;\n\t\t var packedII = 0;\n\t\t var packedNodes = new Array(count);\n\t\t for (var ii = 0,\n\t\t bit = 1,\n\t\t len = nodes.length; ii < len; ii++, bit <<= 1) {\n\t\t var node = nodes[ii];\n\t\t if (node !== undefined && ii !== excluding) {\n\t\t bitmap |= bit;\n\t\t packedNodes[packedII++] = node;\n\t\t }\n\t\t }\n\t\t return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n\t\t}\n\t\tfunction expandNodes(ownerID, nodes, bitmap, including, node) {\n\t\t var count = 0;\n\t\t var expandedNodes = new Array(SIZE);\n\t\t for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n\t\t expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n\t\t }\n\t\t expandedNodes[including] = node;\n\t\t return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n\t\t}\n\t\tfunction mergeIntoMapWith(map, merger, iterables) {\n\t\t var iters = [];\n\t\t for (var ii = 0; ii < iterables.length; ii++) {\n\t\t var value = iterables[ii];\n\t\t var iter = KeyedIterable(value);\n\t\t if (!isIterable(value)) {\n\t\t iter = iter.map((function(v) {\n\t\t return fromJS(v);\n\t\t }));\n\t\t }\n\t\t iters.push(iter);\n\t\t }\n\t\t return mergeIntoCollectionWith(map, merger, iters);\n\t\t}\n\t\tfunction deepMerger(merger) {\n\t\t return (function(existing, value) {\n\t\t return existing && existing.mergeDeepWith && isIterable(value) ? existing.mergeDeepWith(merger, value) : merger ? merger(existing, value) : value;\n\t\t });\n\t\t}\n\t\tfunction mergeIntoCollectionWith(collection, merger, iters) {\n\t\t iters = iters.filter((function(x) {\n\t\t return x.size !== 0;\n\t\t }));\n\t\t if (iters.length === 0) {\n\t\t return collection;\n\t\t }\n\t\t if (collection.size === 0 && iters.length === 1) {\n\t\t return collection.constructor(iters[0]);\n\t\t }\n\t\t return collection.withMutations((function(collection) {\n\t\t var mergeIntoMap = merger ? (function(value, key) {\n\t\t collection.update(key, NOT_SET, (function(existing) {\n\t\t return existing === NOT_SET ? value : merger(existing, value);\n\t\t }));\n\t\t }) : (function(value, key) {\n\t\t collection.set(key, value);\n\t\t });\n\t\t for (var ii = 0; ii < iters.length; ii++) {\n\t\t iters[ii].forEach(mergeIntoMap);\n\t\t }\n\t\t }));\n\t\t}\n\t\tfunction updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n\t\t var isNotSet = existing === NOT_SET;\n\t\t var step = keyPathIter.next();\n\t\t if (step.done) {\n\t\t var existingValue = isNotSet ? notSetValue : existing;\n\t\t var newValue = updater(existingValue);\n\t\t return newValue === existingValue ? existing : newValue;\n\t\t }\n\t\t invariant(isNotSet || (existing && existing.set), 'invalid keyPath');\n\t\t var key = step.value;\n\t\t var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n\t\t var nextUpdated = updateInDeepMap(nextExisting, keyPathIter, notSetValue, updater);\n\t\t return nextUpdated === nextExisting ? existing : nextUpdated === NOT_SET ? existing.remove(key) : (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n\t\t}\n\t\tfunction popCount(x) {\n\t\t x = x - ((x >> 1) & 0x55555555);\n\t\t x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n\t\t x = (x + (x >> 4)) & 0x0f0f0f0f;\n\t\t x = x + (x >> 8);\n\t\t x = x + (x >> 16);\n\t\t return x & 0x7f;\n\t\t}\n\t\tfunction setIn(array, idx, val, canEdit) {\n\t\t var newArray = canEdit ? array : arrCopy(array);\n\t\t newArray[idx] = val;\n\t\t return newArray;\n\t\t}\n\t\tfunction spliceIn(array, idx, val, canEdit) {\n\t\t var newLen = array.length + 1;\n\t\t if (canEdit && idx + 1 === newLen) {\n\t\t array[idx] = val;\n\t\t return array;\n\t\t }\n\t\t var newArray = new Array(newLen);\n\t\t var after = 0;\n\t\t for (var ii = 0; ii < newLen; ii++) {\n\t\t if (ii === idx) {\n\t\t newArray[ii] = val;\n\t\t after = -1;\n\t\t } else {\n\t\t newArray[ii] = array[ii + after];\n\t\t }\n\t\t }\n\t\t return newArray;\n\t\t}\n\t\tfunction spliceOut(array, idx, canEdit) {\n\t\t var newLen = array.length - 1;\n\t\t if (canEdit && idx === newLen) {\n\t\t array.pop();\n\t\t return array;\n\t\t }\n\t\t var newArray = new Array(newLen);\n\t\t var after = 0;\n\t\t for (var ii = 0; ii < newLen; ii++) {\n\t\t if (ii === idx) {\n\t\t after = 1;\n\t\t }\n\t\t newArray[ii] = array[ii + after];\n\t\t }\n\t\t return newArray;\n\t\t}\n\t\tvar MAX_ARRAY_MAP_SIZE = SIZE / 4;\n\t\tvar MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n\t\tvar MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\t\tvar ToKeyedSequence = function ToKeyedSequence(indexed, useKeys) {\n\t\t this._iter = indexed;\n\t\t this._useKeys = useKeys;\n\t\t this.size = indexed.size;\n\t\t};\n\t\t($traceurRuntime.createClass)(ToKeyedSequence, {\n\t\t get: function(key, notSetValue) {\n\t\t return this._iter.get(key, notSetValue);\n\t\t },\n\t\t has: function(key) {\n\t\t return this._iter.has(key);\n\t\t },\n\t\t valueSeq: function() {\n\t\t return this._iter.valueSeq();\n\t\t },\n\t\t reverse: function() {\n\t\t var $__0 = this;\n\t\t var reversedSequence = reverseFactory(this, true);\n\t\t if (!this._useKeys) {\n\t\t reversedSequence.valueSeq = (function() {\n\t\t return $__0._iter.toSeq().reverse();\n\t\t });\n\t\t }\n\t\t return reversedSequence;\n\t\t },\n\t\t map: function(mapper, context) {\n\t\t var $__0 = this;\n\t\t var mappedSequence = mapFactory(this, mapper, context);\n\t\t if (!this._useKeys) {\n\t\t mappedSequence.valueSeq = (function() {\n\t\t return $__0._iter.toSeq().map(mapper, context);\n\t\t });\n\t\t }\n\t\t return mappedSequence;\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t var ii;\n\t\t return this._iter.__iterate(this._useKeys ? (function(v, k) {\n\t\t return fn(v, k, $__0);\n\t\t }) : ((ii = reverse ? resolveSize(this) : 0), (function(v) {\n\t\t return fn(v, reverse ? --ii : ii++, $__0);\n\t\t })), reverse);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t if (this._useKeys) {\n\t\t return this._iter.__iterator(type, reverse);\n\t\t }\n\t\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t\t var ii = reverse ? resolveSize(this) : 0;\n\t\t return new Iterator((function() {\n\t\t var step = iterator.next();\n\t\t return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n\t\t }));\n\t\t }\n\t\t}, {}, KeyedSeq);\n\t\tToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n\t\tvar ToIndexedSequence = function ToIndexedSequence(iter) {\n\t\t this._iter = iter;\n\t\t this.size = iter.size;\n\t\t};\n\t\t($traceurRuntime.createClass)(ToIndexedSequence, {\n\t\t contains: function(value) {\n\t\t return this._iter.contains(value);\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t var iterations = 0;\n\t\t return this._iter.__iterate((function(v) {\n\t\t return fn(v, iterations++, $__0);\n\t\t }), reverse);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t var step = iterator.next();\n\t\t return step.done ? step : iteratorValue(type, iterations++, step.value, step);\n\t\t }));\n\t\t }\n\t\t}, {}, IndexedSeq);\n\t\tvar ToSetSequence = function ToSetSequence(iter) {\n\t\t this._iter = iter;\n\t\t this.size = iter.size;\n\t\t};\n\t\t($traceurRuntime.createClass)(ToSetSequence, {\n\t\t has: function(key) {\n\t\t return this._iter.contains(key);\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return this._iter.__iterate((function(v) {\n\t\t return fn(v, v, $__0);\n\t\t }), reverse);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t\t return new Iterator((function() {\n\t\t var step = iterator.next();\n\t\t return step.done ? step : iteratorValue(type, step.value, step.value, step);\n\t\t }));\n\t\t }\n\t\t}, {}, SetSeq);\n\t\tvar FromEntriesSequence = function FromEntriesSequence(entries) {\n\t\t this._iter = entries;\n\t\t this.size = entries.size;\n\t\t};\n\t\t($traceurRuntime.createClass)(FromEntriesSequence, {\n\t\t entrySeq: function() {\n\t\t return this._iter.toSeq();\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return this._iter.__iterate((function(entry) {\n\t\t if (entry) {\n\t\t validateEntry(entry);\n\t\t return fn(entry[1], entry[0], $__0);\n\t\t }\n\t\t }), reverse);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t\t return new Iterator((function() {\n\t\t while (true) {\n\t\t var step = iterator.next();\n\t\t if (step.done) {\n\t\t return step;\n\t\t }\n\t\t var entry = step.value;\n\t\t if (entry) {\n\t\t validateEntry(entry);\n\t\t return type === ITERATE_ENTRIES ? step : iteratorValue(type, entry[0], entry[1], step);\n\t\t }\n\t\t }\n\t\t }));\n\t\t }\n\t\t}, {}, KeyedSeq);\n\t\tToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough;\n\t\tfunction flipFactory(iterable) {\n\t\t var flipSequence = makeSequence(iterable);\n\t\t flipSequence._iter = iterable;\n\t\t flipSequence.size = iterable.size;\n\t\t flipSequence.flip = (function() {\n\t\t return iterable;\n\t\t });\n\t\t flipSequence.reverse = function() {\n\t\t var reversedSequence = iterable.reverse.apply(this);\n\t\t reversedSequence.flip = (function() {\n\t\t return iterable.reverse();\n\t\t });\n\t\t return reversedSequence;\n\t\t };\n\t\t flipSequence.has = (function(key) {\n\t\t return iterable.contains(key);\n\t\t });\n\t\t flipSequence.contains = (function(key) {\n\t\t return iterable.has(key);\n\t\t });\n\t\t flipSequence.cacheResult = cacheResultThrough;\n\t\t flipSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return iterable.__iterate((function(v, k) {\n\t\t return fn(k, v, $__0) !== false;\n\t\t }), reverse);\n\t\t };\n\t\t flipSequence.__iteratorUncached = function(type, reverse) {\n\t\t if (type === ITERATE_ENTRIES) {\n\t\t var iterator = iterable.__iterator(type, reverse);\n\t\t return new Iterator((function() {\n\t\t var step = iterator.next();\n\t\t if (!step.done) {\n\t\t var k = step.value[0];\n\t\t step.value[0] = step.value[1];\n\t\t step.value[1] = k;\n\t\t }\n\t\t return step;\n\t\t }));\n\t\t }\n\t\t return iterable.__iterator(type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse);\n\t\t };\n\t\t return flipSequence;\n\t\t}\n\t\tfunction mapFactory(iterable, mapper, context) {\n\t\t var mappedSequence = makeSequence(iterable);\n\t\t mappedSequence.size = iterable.size;\n\t\t mappedSequence.has = (function(key) {\n\t\t return iterable.has(key);\n\t\t });\n\t\t mappedSequence.get = (function(key, notSetValue) {\n\t\t var v = iterable.get(key, NOT_SET);\n\t\t return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable);\n\t\t });\n\t\t mappedSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return iterable.__iterate((function(v, k, c) {\n\t\t return fn(mapper.call(context, v, k, c), k, $__0) !== false;\n\t\t }), reverse);\n\t\t };\n\t\t mappedSequence.__iteratorUncached = function(type, reverse) {\n\t\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t\t return new Iterator((function() {\n\t\t var step = iterator.next();\n\t\t if (step.done) {\n\t\t return step;\n\t\t }\n\t\t var entry = step.value;\n\t\t var key = entry[0];\n\t\t return iteratorValue(type, key, mapper.call(context, entry[1], key, iterable), step);\n\t\t }));\n\t\t };\n\t\t return mappedSequence;\n\t\t}\n\t\tfunction reverseFactory(iterable, useKeys) {\n\t\t var reversedSequence = makeSequence(iterable);\n\t\t reversedSequence._iter = iterable;\n\t\t reversedSequence.size = iterable.size;\n\t\t reversedSequence.reverse = (function() {\n\t\t return iterable;\n\t\t });\n\t\t if (iterable.flip) {\n\t\t reversedSequence.flip = function() {\n\t\t var flipSequence = flipFactory(iterable);\n\t\t flipSequence.reverse = (function() {\n\t\t return iterable.flip();\n\t\t });\n\t\t return flipSequence;\n\t\t };\n\t\t }\n\t\t reversedSequence.get = (function(key, notSetValue) {\n\t\t return iterable.get(useKeys ? key : -1 - key, notSetValue);\n\t\t });\n\t\t reversedSequence.has = (function(key) {\n\t\t return iterable.has(useKeys ? key : -1 - key);\n\t\t });\n\t\t reversedSequence.contains = (function(value) {\n\t\t return iterable.contains(value);\n\t\t });\n\t\t reversedSequence.cacheResult = cacheResultThrough;\n\t\t reversedSequence.__iterate = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return iterable.__iterate((function(v, k) {\n\t\t return fn(v, k, $__0);\n\t\t }), !reverse);\n\t\t };\n\t\t reversedSequence.__iterator = (function(type, reverse) {\n\t\t return iterable.__iterator(type, !reverse);\n\t\t });\n\t\t return reversedSequence;\n\t\t}\n\t\tfunction filterFactory(iterable, predicate, context, useKeys) {\n\t\t var filterSequence = makeSequence(iterable);\n\t\t if (useKeys) {\n\t\t filterSequence.has = (function(key) {\n\t\t var v = iterable.get(key, NOT_SET);\n\t\t return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n\t\t });\n\t\t filterSequence.get = (function(key, notSetValue) {\n\t\t var v = iterable.get(key, NOT_SET);\n\t\t return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue;\n\t\t });\n\t\t }\n\t\t filterSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t var iterations = 0;\n\t\t iterable.__iterate((function(v, k, c) {\n\t\t if (predicate.call(context, v, k, c)) {\n\t\t iterations++;\n\t\t return fn(v, useKeys ? k : iterations - 1, $__0);\n\t\t }\n\t\t }), reverse);\n\t\t return iterations;\n\t\t };\n\t\t filterSequence.__iteratorUncached = function(type, reverse) {\n\t\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t while (true) {\n\t\t var step = iterator.next();\n\t\t if (step.done) {\n\t\t return step;\n\t\t }\n\t\t var entry = step.value;\n\t\t var key = entry[0];\n\t\t var value = entry[1];\n\t\t if (predicate.call(context, value, key, iterable)) {\n\t\t return iteratorValue(type, useKeys ? key : iterations++, value, step);\n\t\t }\n\t\t }\n\t\t }));\n\t\t };\n\t\t return filterSequence;\n\t\t}\n\t\tfunction countByFactory(iterable, grouper, context) {\n\t\t var groups = Map().asMutable();\n\t\t iterable.__iterate((function(v, k) {\n\t\t groups.update(grouper.call(context, v, k, iterable), 0, (function(a) {\n\t\t return a + 1;\n\t\t }));\n\t\t }));\n\t\t return groups.asImmutable();\n\t\t}\n\t\tfunction groupByFactory(iterable, grouper, context) {\n\t\t var isKeyedIter = isKeyed(iterable);\n\t\t var groups = Map().asMutable();\n\t\t iterable.__iterate((function(v, k) {\n\t\t groups.update(grouper.call(context, v, k, iterable), (function(a) {\n\t\t return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a);\n\t\t }));\n\t\t }));\n\t\t var coerce = iterableClass(iterable);\n\t\t return groups.map((function(arr) {\n\t\t return reify(iterable, coerce(arr));\n\t\t }));\n\t\t}\n\t\tfunction takeFactory(iterable, amount) {\n\t\t if (amount > iterable.size) {\n\t\t return iterable;\n\t\t }\n\t\t if (amount < 0) {\n\t\t amount = 0;\n\t\t }\n\t\t var takeSequence = makeSequence(iterable);\n\t\t takeSequence.size = iterable.size && Math.min(iterable.size, amount);\n\t\t takeSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t if (amount === 0) {\n\t\t return 0;\n\t\t }\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterate(fn, reverse);\n\t\t }\n\t\t var iterations = 0;\n\t\t iterable.__iterate((function(v, k) {\n\t\t return ++iterations && fn(v, k, $__0) !== false && iterations < amount;\n\t\t }));\n\t\t return iterations;\n\t\t };\n\t\t takeSequence.__iteratorUncached = function(type, reverse) {\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterator = amount && iterable.__iterator(type, reverse);\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t if (iterations++ > amount) {\n\t\t return iteratorDone();\n\t\t }\n\t\t return iterator.next();\n\t\t }));\n\t\t };\n\t\t return takeSequence;\n\t\t}\n\t\tfunction takeWhileFactory(iterable, predicate, context) {\n\t\t var takeSequence = makeSequence(iterable);\n\t\t takeSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterate(fn, reverse);\n\t\t }\n\t\t var iterations = 0;\n\t\t iterable.__iterate((function(v, k, c) {\n\t\t return predicate.call(context, v, k, c) && ++iterations && fn(v, k, $__0);\n\t\t }));\n\t\t return iterations;\n\t\t };\n\t\t takeSequence.__iteratorUncached = function(type, reverse) {\n\t\t var $__0 = this;\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t\t var iterating = true;\n\t\t return new Iterator((function() {\n\t\t if (!iterating) {\n\t\t return iteratorDone();\n\t\t }\n\t\t var step = iterator.next();\n\t\t if (step.done) {\n\t\t return step;\n\t\t }\n\t\t var entry = step.value;\n\t\t var k = entry[0];\n\t\t var v = entry[1];\n\t\t if (!predicate.call(context, v, k, $__0)) {\n\t\t iterating = false;\n\t\t return iteratorDone();\n\t\t }\n\t\t return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n\t\t }));\n\t\t };\n\t\t return takeSequence;\n\t\t}\n\t\tfunction skipFactory(iterable, amount, useKeys) {\n\t\t if (amount <= 0) {\n\t\t return iterable;\n\t\t }\n\t\t var skipSequence = makeSequence(iterable);\n\t\t skipSequence.size = iterable.size && Math.max(0, iterable.size - amount);\n\t\t skipSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterate(fn, reverse);\n\t\t }\n\t\t var skipped = 0;\n\t\t var isSkipping = true;\n\t\t var iterations = 0;\n\t\t iterable.__iterate((function(v, k) {\n\t\t if (!(isSkipping && (isSkipping = skipped++ < amount))) {\n\t\t iterations++;\n\t\t return fn(v, useKeys ? k : iterations - 1, $__0);\n\t\t }\n\t\t }));\n\t\t return iterations;\n\t\t };\n\t\t skipSequence.__iteratorUncached = function(type, reverse) {\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterator = amount && iterable.__iterator(type, reverse);\n\t\t var skipped = 0;\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t while (skipped < amount) {\n\t\t skipped++;\n\t\t iterator.next();\n\t\t }\n\t\t var step = iterator.next();\n\t\t if (useKeys || type === ITERATE_VALUES) {\n\t\t return step;\n\t\t } else if (type === ITERATE_KEYS) {\n\t\t return iteratorValue(type, iterations++, undefined, step);\n\t\t } else {\n\t\t return iteratorValue(type, iterations++, step.value[1], step);\n\t\t }\n\t\t }));\n\t\t };\n\t\t return skipSequence;\n\t\t}\n\t\tfunction skipWhileFactory(iterable, predicate, context, useKeys) {\n\t\t var skipSequence = makeSequence(iterable);\n\t\t skipSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterate(fn, reverse);\n\t\t }\n\t\t var isSkipping = true;\n\t\t var iterations = 0;\n\t\t iterable.__iterate((function(v, k, c) {\n\t\t if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n\t\t iterations++;\n\t\t return fn(v, useKeys ? k : iterations - 1, $__0);\n\t\t }\n\t\t }));\n\t\t return iterations;\n\t\t };\n\t\t skipSequence.__iteratorUncached = function(type, reverse) {\n\t\t var $__0 = this;\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t\t var skipping = true;\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t var step,\n\t\t k,\n\t\t v;\n\t\t do {\n\t\t step = iterator.next();\n\t\t if (step.done) {\n\t\t if (useKeys || type === ITERATE_VALUES) {\n\t\t return step;\n\t\t } else if (type === ITERATE_KEYS) {\n\t\t return iteratorValue(type, iterations++, undefined, step);\n\t\t } else {\n\t\t return iteratorValue(type, iterations++, step.value[1], step);\n\t\t }\n\t\t }\n\t\t var entry = step.value;\n\t\t k = entry[0];\n\t\t v = entry[1];\n\t\t skipping && (skipping = predicate.call(context, v, k, $__0));\n\t\t } while (skipping);\n\t\t return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n\t\t }));\n\t\t };\n\t\t return skipSequence;\n\t\t}\n\t\tfunction concatFactory(iterable, values) {\n\t\t var isKeyedIterable = isKeyed(iterable);\n\t\t var iters = [iterable].concat(values).map((function(v) {\n\t\t if (!isIterable(v)) {\n\t\t v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n\t\t } else if (isKeyedIterable) {\n\t\t v = KeyedIterable(v);\n\t\t }\n\t\t return v;\n\t\t })).filter((function(v) {\n\t\t return v.size !== 0;\n\t\t }));\n\t\t if (iters.length === 0) {\n\t\t return iterable;\n\t\t }\n\t\t if (iters.length === 1) {\n\t\t var singleton = iters[0];\n\t\t if (singleton === iterable || isKeyedIterable && isKeyed(singleton) || isIndexed(iterable) && isIndexed(singleton)) {\n\t\t return singleton;\n\t\t }\n\t\t }\n\t\t var concatSeq = new ArraySeq(iters);\n\t\t if (isKeyedIterable) {\n\t\t concatSeq = concatSeq.toKeyedSeq();\n\t\t } else if (!isIndexed(iterable)) {\n\t\t concatSeq = concatSeq.toSetSeq();\n\t\t }\n\t\t concatSeq = concatSeq.flatten(true);\n\t\t concatSeq.size = iters.reduce((function(sum, seq) {\n\t\t if (sum !== undefined) {\n\t\t var size = seq.size;\n\t\t if (size !== undefined) {\n\t\t return sum + size;\n\t\t }\n\t\t }\n\t\t }), 0);\n\t\t return concatSeq;\n\t\t}\n\t\tfunction flattenFactory(iterable, depth, useKeys) {\n\t\t var flatSequence = makeSequence(iterable);\n\t\t flatSequence.__iterateUncached = function(fn, reverse) {\n\t\t var iterations = 0;\n\t\t var stopped = false;\n\t\t function flatDeep(iter, currentDepth) {\n\t\t var $__0 = this;\n\t\t iter.__iterate((function(v, k) {\n\t\t if ((!depth || currentDepth < depth) && isIterable(v)) {\n\t\t flatDeep(v, currentDepth + 1);\n\t\t } else if (fn(v, useKeys ? k : iterations++, $__0) === false) {\n\t\t stopped = true;\n\t\t }\n\t\t return !stopped;\n\t\t }), reverse);\n\t\t }\n\t\t flatDeep(iterable, 0);\n\t\t return iterations;\n\t\t };\n\t\t flatSequence.__iteratorUncached = function(type, reverse) {\n\t\t var iterator = iterable.__iterator(type, reverse);\n\t\t var stack = [];\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t while (iterator) {\n\t\t var step = iterator.next();\n\t\t if (step.done !== false) {\n\t\t iterator = stack.pop();\n\t\t continue;\n\t\t }\n\t\t var v = step.value;\n\t\t if (type === ITERATE_ENTRIES) {\n\t\t v = v[1];\n\t\t }\n\t\t if ((!depth || stack.length < depth) && isIterable(v)) {\n\t\t stack.push(iterator);\n\t\t iterator = v.__iterator(type, reverse);\n\t\t } else {\n\t\t return useKeys ? step : iteratorValue(type, iterations++, v, step);\n\t\t }\n\t\t }\n\t\t return iteratorDone();\n\t\t }));\n\t\t };\n\t\t return flatSequence;\n\t\t}\n\t\tfunction flatMapFactory(iterable, mapper, context) {\n\t\t var coerce = iterableClass(iterable);\n\t\t return iterable.toSeq().map((function(v, k) {\n\t\t return coerce(mapper.call(context, v, k, iterable));\n\t\t })).flatten(true);\n\t\t}\n\t\tfunction interposeFactory(iterable, separator) {\n\t\t var interposedSequence = makeSequence(iterable);\n\t\t interposedSequence.size = iterable.size && iterable.size * 2 - 1;\n\t\t interposedSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t var iterations = 0;\n\t\t iterable.__iterate((function(v, k) {\n\t\t return (!iterations || fn(separator, iterations++, $__0) !== false) && fn(v, iterations++, $__0) !== false;\n\t\t }), reverse);\n\t\t return iterations;\n\t\t };\n\t\t interposedSequence.__iteratorUncached = function(type, reverse) {\n\t\t var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n\t\t var iterations = 0;\n\t\t var step;\n\t\t return new Iterator((function() {\n\t\t if (!step || iterations % 2) {\n\t\t step = iterator.next();\n\t\t if (step.done) {\n\t\t return step;\n\t\t }\n\t\t }\n\t\t return iterations % 2 ? iteratorValue(type, iterations++, separator) : iteratorValue(type, iterations++, step.value, step);\n\t\t }));\n\t\t };\n\t\t return interposedSequence;\n\t\t}\n\t\tfunction sortFactory(iterable, comparator, mapper) {\n\t\t if (!comparator) {\n\t\t comparator = defaultComparator;\n\t\t }\n\t\t var isKeyedIterable = isKeyed(iterable);\n\t\t var index = 0;\n\t\t var entries = iterable.toSeq().map((function(v, k) {\n\t\t return [k, v, index++, mapper ? mapper(v, k, iterable) : v];\n\t\t })).toArray();\n\t\t entries.sort((function(a, b) {\n\t\t return comparator(a[3], b[3]) || a[2] - b[2];\n\t\t })).forEach(isKeyedIterable ? (function(v, i) {\n\t\t entries[i].length = 2;\n\t\t }) : (function(v, i) {\n\t\t entries[i] = v[1];\n\t\t }));\n\t\t return isKeyedIterable ? KeyedSeq(entries) : isIndexed(iterable) ? IndexedSeq(entries) : SetSeq(entries);\n\t\t}\n\t\tfunction maxFactory(iterable, comparator, mapper) {\n\t\t if (!comparator) {\n\t\t comparator = defaultComparator;\n\t\t }\n\t\t if (mapper) {\n\t\t var entry = iterable.toSeq().map((function(v, k) {\n\t\t return [v, mapper(v, k, iterable)];\n\t\t })).reduce((function(a, b) {\n\t\t return _maxCompare(comparator, a[1], b[1]) ? b : a;\n\t\t }));\n\t\t return entry && entry[0];\n\t\t } else {\n\t\t return iterable.reduce((function(a, b) {\n\t\t return _maxCompare(comparator, a, b) ? b : a;\n\t\t }));\n\t\t }\n\t\t}\n\t\tfunction _maxCompare(comparator, a, b) {\n\t\t var comp = comparator(b, a);\n\t\t return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;\n\t\t}\n\t\tfunction reify(iter, seq) {\n\t\t return isSeq(iter) ? seq : iter.constructor(seq);\n\t\t}\n\t\tfunction validateEntry(entry) {\n\t\t if (entry !== Object(entry)) {\n\t\t throw new TypeError('Expected [K, V] tuple: ' + entry);\n\t\t }\n\t\t}\n\t\tfunction resolveSize(iter) {\n\t\t assertNotInfinite(iter.size);\n\t\t return ensureSize(iter);\n\t\t}\n\t\tfunction iterableClass(iterable) {\n\t\t return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable;\n\t\t}\n\t\tfunction makeSequence(iterable) {\n\t\t return Object.create((isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq).prototype);\n\t\t}\n\t\tfunction cacheResultThrough() {\n\t\t if (this._iter.cacheResult) {\n\t\t this._iter.cacheResult();\n\t\t this.size = this._iter.size;\n\t\t return this;\n\t\t } else {\n\t\t return Seq.prototype.cacheResult.call(this);\n\t\t }\n\t\t}\n\t\tfunction defaultComparator(a, b) {\n\t\t return a > b ? 1 : a < b ? -1 : 0;\n\t\t}\n\t\tvar List = function List(value) {\n\t\t var empty = emptyList();\n\t\t if (value === null || value === undefined) {\n\t\t return empty;\n\t\t }\n\t\t if (isList(value)) {\n\t\t return value;\n\t\t }\n\t\t var iter = IndexedIterable(value);\n\t\t var size = iter.size;\n\t\t if (size === 0) {\n\t\t return empty;\n\t\t }\n\t\t assertNotInfinite(size);\n\t\t if (size > 0 && size < SIZE) {\n\t\t return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n\t\t }\n\t\t return empty.withMutations((function(list) {\n\t\t list.setSize(size);\n\t\t iter.forEach((function(v, i) {\n\t\t return list.set(i, v);\n\t\t }));\n\t\t }));\n\t\t};\n\t\t($traceurRuntime.createClass)(List, {\n\t\t toString: function() {\n\t\t return this.__toString('List [', ']');\n\t\t },\n\t\t get: function(index, notSetValue) {\n\t\t index = wrapIndex(this, index);\n\t\t if (index < 0 || index >= this.size) {\n\t\t return notSetValue;\n\t\t }\n\t\t index += this._origin;\n\t\t var node = listNodeFor(this, index);\n\t\t return node && node.array[index & MASK];\n\t\t },\n\t\t set: function(index, value) {\n\t\t return updateList(this, index, value);\n\t\t },\n\t\t remove: function(index) {\n\t\t return !this.has(index) ? this : index === 0 ? this.shift() : index === this.size - 1 ? this.pop() : this.splice(index, 1);\n\t\t },\n\t\t clear: function() {\n\t\t if (this.size === 0) {\n\t\t return this;\n\t\t }\n\t\t if (this.__ownerID) {\n\t\t this.size = this._origin = this._capacity = 0;\n\t\t this._level = SHIFT;\n\t\t this._root = this._tail = null;\n\t\t this.__hash = undefined;\n\t\t this.__altered = true;\n\t\t return this;\n\t\t }\n\t\t return emptyList();\n\t\t },\n\t\t push: function() {\n\t\t var values = arguments;\n\t\t var oldSize = this.size;\n\t\t return this.withMutations((function(list) {\n\t\t setListBounds(list, 0, oldSize + values.length);\n\t\t for (var ii = 0; ii < values.length; ii++) {\n\t\t list.set(oldSize + ii, values[ii]);\n\t\t }\n\t\t }));\n\t\t },\n\t\t pop: function() {\n\t\t return setListBounds(this, 0, -1);\n\t\t },\n\t\t unshift: function() {\n\t\t var values = arguments;\n\t\t return this.withMutations((function(list) {\n\t\t setListBounds(list, -values.length);\n\t\t for (var ii = 0; ii < values.length; ii++) {\n\t\t list.set(ii, values[ii]);\n\t\t }\n\t\t }));\n\t\t },\n\t\t shift: function() {\n\t\t return setListBounds(this, 1);\n\t\t },\n\t\t merge: function() {\n\t\t return mergeIntoListWith(this, undefined, arguments);\n\t\t },\n\t\t mergeWith: function(merger) {\n\t\t for (var iters = [],\n\t\t $__7 = 1; $__7 < arguments.length; $__7++)\n\t\t iters[$__7 - 1] = arguments[$__7];\n\t\t return mergeIntoListWith(this, merger, iters);\n\t\t },\n\t\t mergeDeep: function() {\n\t\t return mergeIntoListWith(this, deepMerger(undefined), arguments);\n\t\t },\n\t\t mergeDeepWith: function(merger) {\n\t\t for (var iters = [],\n\t\t $__8 = 1; $__8 < arguments.length; $__8++)\n\t\t iters[$__8 - 1] = arguments[$__8];\n\t\t return mergeIntoListWith(this, deepMerger(merger), iters);\n\t\t },\n\t\t setSize: function(size) {\n\t\t return setListBounds(this, 0, size);\n\t\t },\n\t\t slice: function(begin, end) {\n\t\t var size = this.size;\n\t\t if (wholeSlice(begin, end, size)) {\n\t\t return this;\n\t\t }\n\t\t return setListBounds(this, resolveBegin(begin, size), resolveEnd(end, size));\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var index = 0;\n\t\t var values = iterateList(this, reverse);\n\t\t return new Iterator((function() {\n\t\t var value = values();\n\t\t return value === DONE ? iteratorDone() : iteratorValue(type, index++, value);\n\t\t }));\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var index = 0;\n\t\t var values = iterateList(this, reverse);\n\t\t var value;\n\t\t while ((value = values()) !== DONE) {\n\t\t if (fn(value, index++, this) === false) {\n\t\t break;\n\t\t }\n\t\t }\n\t\t return index;\n\t\t },\n\t\t __ensureOwner: function(ownerID) {\n\t\t if (ownerID === this.__ownerID) {\n\t\t return this;\n\t\t }\n\t\t if (!ownerID) {\n\t\t this.__ownerID = ownerID;\n\t\t return this;\n\t\t }\n\t\t return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n\t\t }\n\t\t}, {of: function() {\n\t\t return this(arguments);\n\t\t }}, IndexedCollection);\n\t\tfunction isList(maybeList) {\n\t\t return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n\t\t}\n\t\tList.isList = isList;\n\t\tvar IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\t\tvar ListPrototype = List.prototype;\n\t\tListPrototype[IS_LIST_SENTINEL] = true;\n\t\tListPrototype[DELETE] = ListPrototype.remove;\n\t\tListPrototype.setIn = MapPrototype.setIn;\n\t\tListPrototype.deleteIn = ListPrototype.removeIn = MapPrototype.removeIn;\n\t\tListPrototype.update = MapPrototype.update;\n\t\tListPrototype.updateIn = MapPrototype.updateIn;\n\t\tListPrototype.mergeIn = MapPrototype.mergeIn;\n\t\tListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n\t\tListPrototype.withMutations = MapPrototype.withMutations;\n\t\tListPrototype.asMutable = MapPrototype.asMutable;\n\t\tListPrototype.asImmutable = MapPrototype.asImmutable;\n\t\tListPrototype.wasAltered = MapPrototype.wasAltered;\n\t\tvar VNode = function VNode(array, ownerID) {\n\t\t this.array = array;\n\t\t this.ownerID = ownerID;\n\t\t};\n\t\tvar $VNode = VNode;\n\t\t($traceurRuntime.createClass)(VNode, {\n\t\t removeBefore: function(ownerID, level, index) {\n\t\t if (index === level ? 1 << level : 0 || this.array.length === 0) {\n\t\t return this;\n\t\t }\n\t\t var originIndex = (index >>> level) & MASK;\n\t\t if (originIndex >= this.array.length) {\n\t\t return new $VNode([], ownerID);\n\t\t }\n\t\t var removingFirst = originIndex === 0;\n\t\t var newChild;\n\t\t if (level > 0) {\n\t\t var oldChild = this.array[originIndex];\n\t\t newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n\t\t if (newChild === oldChild && removingFirst) {\n\t\t return this;\n\t\t }\n\t\t }\n\t\t if (removingFirst && !newChild) {\n\t\t return this;\n\t\t }\n\t\t var editable = editableVNode(this, ownerID);\n\t\t if (!removingFirst) {\n\t\t for (var ii = 0; ii < originIndex; ii++) {\n\t\t editable.array[ii] = undefined;\n\t\t }\n\t\t }\n\t\t if (newChild) {\n\t\t editable.array[originIndex] = newChild;\n\t\t }\n\t\t return editable;\n\t\t },\n\t\t removeAfter: function(ownerID, level, index) {\n\t\t if (index === level ? 1 << level : 0 || this.array.length === 0) {\n\t\t return this;\n\t\t }\n\t\t var sizeIndex = ((index - 1) >>> level) & MASK;\n\t\t if (sizeIndex >= this.array.length) {\n\t\t return this;\n\t\t }\n\t\t var removingLast = sizeIndex === this.array.length - 1;\n\t\t var newChild;\n\t\t if (level > 0) {\n\t\t var oldChild = this.array[sizeIndex];\n\t\t newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n\t\t if (newChild === oldChild && removingLast) {\n\t\t return this;\n\t\t }\n\t\t }\n\t\t if (removingLast && !newChild) {\n\t\t return this;\n\t\t }\n\t\t var editable = editableVNode(this, ownerID);\n\t\t if (!removingLast) {\n\t\t editable.array.pop();\n\t\t }\n\t\t if (newChild) {\n\t\t editable.array[sizeIndex] = newChild;\n\t\t }\n\t\t return editable;\n\t\t }\n\t\t}, {});\n\t\tvar DONE = {};\n\t\tfunction iterateList(list, reverse) {\n\t\t var left = list._origin;\n\t\t var right = list._capacity;\n\t\t var tailPos = getTailOffset(right);\n\t\t var tail = list._tail;\n\t\t return iterateNodeOrLeaf(list._root, list._level, 0);\n\t\t function iterateNodeOrLeaf(node, level, offset) {\n\t\t return level === 0 ? iterateLeaf(node, offset) : iterateNode(node, level, offset);\n\t\t }\n\t\t function iterateLeaf(node, offset) {\n\t\t var array = offset === tailPos ? tail && tail.array : node && node.array;\n\t\t var from = offset > left ? 0 : left - offset;\n\t\t var to = right - offset;\n\t\t if (to > SIZE) {\n\t\t to = SIZE;\n\t\t }\n\t\t return (function() {\n\t\t if (from === to) {\n\t\t return DONE;\n\t\t }\n\t\t var idx = reverse ? --to : from++;\n\t\t return array && array[idx];\n\t\t });\n\t\t }\n\t\t function iterateNode(node, level, offset) {\n\t\t var values;\n\t\t var array = node && node.array;\n\t\t var from = offset > left ? 0 : (left - offset) >> level;\n\t\t var to = ((right - offset) >> level) + 1;\n\t\t if (to > SIZE) {\n\t\t to = SIZE;\n\t\t }\n\t\t return (function() {\n\t\t do {\n\t\t if (values) {\n\t\t var value = values();\n\t\t if (value !== DONE) {\n\t\t return value;\n\t\t }\n\t\t values = null;\n\t\t }\n\t\t if (from === to) {\n\t\t return DONE;\n\t\t }\n\t\t var idx = reverse ? --to : from++;\n\t\t values = iterateNodeOrLeaf(array && array[idx], level - SHIFT, offset + (idx << level));\n\t\t } while (true);\n\t\t });\n\t\t }\n\t\t}\n\t\tfunction makeList(origin, capacity, level, root, tail, ownerID, hash) {\n\t\t var list = Object.create(ListPrototype);\n\t\t list.size = capacity - origin;\n\t\t list._origin = origin;\n\t\t list._capacity = capacity;\n\t\t list._level = level;\n\t\t list._root = root;\n\t\t list._tail = tail;\n\t\t list.__ownerID = ownerID;\n\t\t list.__hash = hash;\n\t\t list.__altered = false;\n\t\t return list;\n\t\t}\n\t\tvar EMPTY_LIST;\n\t\tfunction emptyList() {\n\t\t return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n\t\t}\n\t\tfunction updateList(list, index, value) {\n\t\t index = wrapIndex(list, index);\n\t\t if (index >= list.size || index < 0) {\n\t\t return list.withMutations((function(list) {\n\t\t index < 0 ? setListBounds(list, index).set(0, value) : setListBounds(list, 0, index + 1).set(index, value);\n\t\t }));\n\t\t }\n\t\t index += list._origin;\n\t\t var newTail = list._tail;\n\t\t var newRoot = list._root;\n\t\t var didAlter = MakeRef(DID_ALTER);\n\t\t if (index >= getTailOffset(list._capacity)) {\n\t\t newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n\t\t } else {\n\t\t newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n\t\t }\n\t\t if (!didAlter.value) {\n\t\t return list;\n\t\t }\n\t\t if (list.__ownerID) {\n\t\t list._root = newRoot;\n\t\t list._tail = newTail;\n\t\t list.__hash = undefined;\n\t\t list.__altered = true;\n\t\t return list;\n\t\t }\n\t\t return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n\t\t}\n\t\tfunction updateVNode(node, ownerID, level, index, value, didAlter) {\n\t\t var idx = (index >>> level) & MASK;\n\t\t var nodeHas = node && idx < node.array.length;\n\t\t if (!nodeHas && value === undefined) {\n\t\t return node;\n\t\t }\n\t\t var newNode;\n\t\t if (level > 0) {\n\t\t var lowerNode = node && node.array[idx];\n\t\t var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n\t\t if (newLowerNode === lowerNode) {\n\t\t return node;\n\t\t }\n\t\t newNode = editableVNode(node, ownerID);\n\t\t newNode.array[idx] = newLowerNode;\n\t\t return newNode;\n\t\t }\n\t\t if (nodeHas && node.array[idx] === value) {\n\t\t return node;\n\t\t }\n\t\t SetRef(didAlter);\n\t\t newNode = editableVNode(node, ownerID);\n\t\t if (value === undefined && idx === newNode.array.length - 1) {\n\t\t newNode.array.pop();\n\t\t } else {\n\t\t newNode.array[idx] = value;\n\t\t }\n\t\t return newNode;\n\t\t}\n\t\tfunction editableVNode(node, ownerID) {\n\t\t if (ownerID && node && ownerID === node.ownerID) {\n\t\t return node;\n\t\t }\n\t\t return new VNode(node ? node.array.slice() : [], ownerID);\n\t\t}\n\t\tfunction listNodeFor(list, rawIndex) {\n\t\t if (rawIndex >= getTailOffset(list._capacity)) {\n\t\t return list._tail;\n\t\t }\n\t\t if (rawIndex < 1 << (list._level + SHIFT)) {\n\t\t var node = list._root;\n\t\t var level = list._level;\n\t\t while (node && level > 0) {\n\t\t node = node.array[(rawIndex >>> level) & MASK];\n\t\t level -= SHIFT;\n\t\t }\n\t\t return node;\n\t\t }\n\t\t}\n\t\tfunction setListBounds(list, begin, end) {\n\t\t var owner = list.__ownerID || new OwnerID();\n\t\t var oldOrigin = list._origin;\n\t\t var oldCapacity = list._capacity;\n\t\t var newOrigin = oldOrigin + begin;\n\t\t var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n\t\t if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n\t\t return list;\n\t\t }\n\t\t if (newOrigin >= newCapacity) {\n\t\t return list.clear();\n\t\t }\n\t\t var newLevel = list._level;\n\t\t var newRoot = list._root;\n\t\t var offsetShift = 0;\n\t\t while (newOrigin + offsetShift < 0) {\n\t\t newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n\t\t newLevel += SHIFT;\n\t\t offsetShift += 1 << newLevel;\n\t\t }\n\t\t if (offsetShift) {\n\t\t newOrigin += offsetShift;\n\t\t oldOrigin += offsetShift;\n\t\t newCapacity += offsetShift;\n\t\t oldCapacity += offsetShift;\n\t\t }\n\t\t var oldTailOffset = getTailOffset(oldCapacity);\n\t\t var newTailOffset = getTailOffset(newCapacity);\n\t\t while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n\t\t newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n\t\t newLevel += SHIFT;\n\t\t }\n\t\t var oldTail = list._tail;\n\t\t var newTail = newTailOffset < oldTailOffset ? listNodeFor(list, newCapacity - 1) : newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\t\t if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n\t\t newRoot = editableVNode(newRoot, owner);\n\t\t var node = newRoot;\n\t\t for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n\t\t var idx = (oldTailOffset >>> level) & MASK;\n\t\t node = node.array[idx] = editableVNode(node.array[idx], owner);\n\t\t }\n\t\t node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n\t\t }\n\t\t if (newCapacity < oldCapacity) {\n\t\t newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n\t\t }\n\t\t if (newOrigin >= newTailOffset) {\n\t\t newOrigin -= newTailOffset;\n\t\t newCapacity -= newTailOffset;\n\t\t newLevel = SHIFT;\n\t\t newRoot = null;\n\t\t newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\t\t } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n\t\t offsetShift = 0;\n\t\t while (newRoot) {\n\t\t var beginIndex = (newOrigin >>> newLevel) & MASK;\n\t\t if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n\t\t break;\n\t\t }\n\t\t if (beginIndex) {\n\t\t offsetShift += (1 << newLevel) * beginIndex;\n\t\t }\n\t\t newLevel -= SHIFT;\n\t\t newRoot = newRoot.array[beginIndex];\n\t\t }\n\t\t if (newRoot && newOrigin > oldOrigin) {\n\t\t newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n\t\t }\n\t\t if (newRoot && newTailOffset < oldTailOffset) {\n\t\t newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n\t\t }\n\t\t if (offsetShift) {\n\t\t newOrigin -= offsetShift;\n\t\t newCapacity -= offsetShift;\n\t\t }\n\t\t }\n\t\t if (list.__ownerID) {\n\t\t list.size = newCapacity - newOrigin;\n\t\t list._origin = newOrigin;\n\t\t list._capacity = newCapacity;\n\t\t list._level = newLevel;\n\t\t list._root = newRoot;\n\t\t list._tail = newTail;\n\t\t list.__hash = undefined;\n\t\t list.__altered = true;\n\t\t return list;\n\t\t }\n\t\t return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n\t\t}\n\t\tfunction mergeIntoListWith(list, merger, iterables) {\n\t\t var iters = [];\n\t\t var maxSize = 0;\n\t\t for (var ii = 0; ii < iterables.length; ii++) {\n\t\t var value = iterables[ii];\n\t\t var iter = IndexedIterable(value);\n\t\t if (iter.size > maxSize) {\n\t\t maxSize = iter.size;\n\t\t }\n\t\t if (!isIterable(value)) {\n\t\t iter = iter.map((function(v) {\n\t\t return fromJS(v);\n\t\t }));\n\t\t }\n\t\t iters.push(iter);\n\t\t }\n\t\t if (maxSize > list.size) {\n\t\t list = list.setSize(maxSize);\n\t\t }\n\t\t return mergeIntoCollectionWith(list, merger, iters);\n\t\t}\n\t\tfunction getTailOffset(size) {\n\t\t return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n\t\t}\n\t\tvar OrderedMap = function OrderedMap(value) {\n\t\t return value === null || value === undefined ? emptyOrderedMap() : isOrderedMap(value) ? value : emptyOrderedMap().withMutations((function(map) {\n\t\t var iter = KeyedIterable(value);\n\t\t assertNotInfinite(iter.size);\n\t\t iter.forEach((function(v, k) {\n\t\t return map.set(k, v);\n\t\t }));\n\t\t }));\n\t\t};\n\t\t($traceurRuntime.createClass)(OrderedMap, {\n\t\t toString: function() {\n\t\t return this.__toString('OrderedMap {', '}');\n\t\t },\n\t\t get: function(k, notSetValue) {\n\t\t var index = this._map.get(k);\n\t\t return index !== undefined ? this._list.get(index)[1] : notSetValue;\n\t\t },\n\t\t clear: function() {\n\t\t if (this.size === 0) {\n\t\t return this;\n\t\t }\n\t\t if (this.__ownerID) {\n\t\t this.size = 0;\n\t\t this._map.clear();\n\t\t this._list.clear();\n\t\t return this;\n\t\t }\n\t\t return emptyOrderedMap();\n\t\t },\n\t\t set: function(k, v) {\n\t\t return updateOrderedMap(this, k, v);\n\t\t },\n\t\t remove: function(k) {\n\t\t return updateOrderedMap(this, k, NOT_SET);\n\t\t },\n\t\t wasAltered: function() {\n\t\t return this._map.wasAltered() || this._list.wasAltered();\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return this._list.__iterate((function(entry) {\n\t\t return entry && fn(entry[1], entry[0], $__0);\n\t\t }), reverse);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t return this._list.fromEntrySeq().__iterator(type, reverse);\n\t\t },\n\t\t __ensureOwner: function(ownerID) {\n\t\t if (ownerID === this.__ownerID) {\n\t\t return this;\n\t\t }\n\t\t var newMap = this._map.__ensureOwner(ownerID);\n\t\t var newList = this._list.__ensureOwner(ownerID);\n\t\t if (!ownerID) {\n\t\t this.__ownerID = ownerID;\n\t\t this._map = newMap;\n\t\t this._list = newList;\n\t\t return this;\n\t\t }\n\t\t return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n\t\t }\n\t\t}, {of: function() {\n\t\t return this(arguments);\n\t\t }}, Map);\n\t\tfunction isOrderedMap(maybeOrderedMap) {\n\t\t return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n\t\t}\n\t\tOrderedMap.isOrderedMap = isOrderedMap;\n\t\tOrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n\t\tOrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\t\tfunction makeOrderedMap(map, list, ownerID, hash) {\n\t\t var omap = Object.create(OrderedMap.prototype);\n\t\t omap.size = map ? map.size : 0;\n\t\t omap._map = map;\n\t\t omap._list = list;\n\t\t omap.__ownerID = ownerID;\n\t\t omap.__hash = hash;\n\t\t return omap;\n\t\t}\n\t\tvar EMPTY_ORDERED_MAP;\n\t\tfunction emptyOrderedMap() {\n\t\t return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n\t\t}\n\t\tfunction updateOrderedMap(omap, k, v) {\n\t\t var map = omap._map;\n\t\t var list = omap._list;\n\t\t var i = map.get(k);\n\t\t var has = i !== undefined;\n\t\t var newMap;\n\t\t var newList;\n\t\t if (v === NOT_SET) {\n\t\t if (!has) {\n\t\t return omap;\n\t\t }\n\t\t if (list.size >= SIZE && list.size >= map.size * 2) {\n\t\t newList = list.filter((function(entry, idx) {\n\t\t return entry !== undefined && i !== idx;\n\t\t }));\n\t\t newMap = newList.toKeyedSeq().map((function(entry) {\n\t\t return entry[0];\n\t\t })).flip().toMap();\n\t\t if (omap.__ownerID) {\n\t\t newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n\t\t }\n\t\t } else {\n\t\t newMap = map.remove(k);\n\t\t newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n\t\t }\n\t\t } else {\n\t\t if (has) {\n\t\t if (v === list.get(i)[1]) {\n\t\t return omap;\n\t\t }\n\t\t newMap = map;\n\t\t newList = list.set(i, [k, v]);\n\t\t } else {\n\t\t newMap = map.set(k, list.size);\n\t\t newList = list.set(list.size, [k, v]);\n\t\t }\n\t\t }\n\t\t if (omap.__ownerID) {\n\t\t omap.size = newMap.size;\n\t\t omap._map = newMap;\n\t\t omap._list = newList;\n\t\t omap.__hash = undefined;\n\t\t return omap;\n\t\t }\n\t\t return makeOrderedMap(newMap, newList);\n\t\t}\n\t\tvar Stack = function Stack(value) {\n\t\t return value === null || value === undefined ? emptyStack() : isStack(value) ? value : emptyStack().unshiftAll(value);\n\t\t};\n\t\tvar $Stack = Stack;\n\t\t($traceurRuntime.createClass)(Stack, {\n\t\t toString: function() {\n\t\t return this.__toString('Stack [', ']');\n\t\t },\n\t\t get: function(index, notSetValue) {\n\t\t var head = this._head;\n\t\t while (head && index--) {\n\t\t head = head.next;\n\t\t }\n\t\t return head ? head.value : notSetValue;\n\t\t },\n\t\t peek: function() {\n\t\t return this._head && this._head.value;\n\t\t },\n\t\t push: function() {\n\t\t if (arguments.length === 0) {\n\t\t return this;\n\t\t }\n\t\t var newSize = this.size + arguments.length;\n\t\t var head = this._head;\n\t\t for (var ii = arguments.length - 1; ii >= 0; ii--) {\n\t\t head = {\n\t\t value: arguments[ii],\n\t\t next: head\n\t\t };\n\t\t }\n\t\t if (this.__ownerID) {\n\t\t this.size = newSize;\n\t\t this._head = head;\n\t\t this.__hash = undefined;\n\t\t this.__altered = true;\n\t\t return this;\n\t\t }\n\t\t return makeStack(newSize, head);\n\t\t },\n\t\t pushAll: function(iter) {\n\t\t iter = IndexedIterable(iter);\n\t\t if (iter.size === 0) {\n\t\t return this;\n\t\t }\n\t\t assertNotInfinite(iter.size);\n\t\t var newSize = this.size;\n\t\t var head = this._head;\n\t\t iter.reverse().forEach((function(value) {\n\t\t newSize++;\n\t\t head = {\n\t\t value: value,\n\t\t next: head\n\t\t };\n\t\t }));\n\t\t if (this.__ownerID) {\n\t\t this.size = newSize;\n\t\t this._head = head;\n\t\t this.__hash = undefined;\n\t\t this.__altered = true;\n\t\t return this;\n\t\t }\n\t\t return makeStack(newSize, head);\n\t\t },\n\t\t pop: function() {\n\t\t return this.slice(1);\n\t\t },\n\t\t unshift: function() {\n\t\t return this.push.apply(this, arguments);\n\t\t },\n\t\t unshiftAll: function(iter) {\n\t\t return this.pushAll(iter);\n\t\t },\n\t\t shift: function() {\n\t\t return this.pop.apply(this, arguments);\n\t\t },\n\t\t clear: function() {\n\t\t if (this.size === 0) {\n\t\t return this;\n\t\t }\n\t\t if (this.__ownerID) {\n\t\t this.size = 0;\n\t\t this._head = undefined;\n\t\t this.__hash = undefined;\n\t\t this.__altered = true;\n\t\t return this;\n\t\t }\n\t\t return emptyStack();\n\t\t },\n\t\t slice: function(begin, end) {\n\t\t if (wholeSlice(begin, end, this.size)) {\n\t\t return this;\n\t\t }\n\t\t var resolvedBegin = resolveBegin(begin, this.size);\n\t\t var resolvedEnd = resolveEnd(end, this.size);\n\t\t if (resolvedEnd !== this.size) {\n\t\t return $traceurRuntime.superCall(this, $Stack.prototype, \"slice\", [begin, end]);\n\t\t }\n\t\t var newSize = this.size - resolvedBegin;\n\t\t var head = this._head;\n\t\t while (resolvedBegin--) {\n\t\t head = head.next;\n\t\t }\n\t\t if (this.__ownerID) {\n\t\t this.size = newSize;\n\t\t this._head = head;\n\t\t this.__hash = undefined;\n\t\t this.__altered = true;\n\t\t return this;\n\t\t }\n\t\t return makeStack(newSize, head);\n\t\t },\n\t\t __ensureOwner: function(ownerID) {\n\t\t if (ownerID === this.__ownerID) {\n\t\t return this;\n\t\t }\n\t\t if (!ownerID) {\n\t\t this.__ownerID = ownerID;\n\t\t this.__altered = false;\n\t\t return this;\n\t\t }\n\t\t return makeStack(this.size, this._head, ownerID, this.__hash);\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t if (reverse) {\n\t\t return this.toSeq().cacheResult.__iterate(fn, reverse);\n\t\t }\n\t\t var iterations = 0;\n\t\t var node = this._head;\n\t\t while (node) {\n\t\t if (fn(node.value, iterations++, this) === false) {\n\t\t break;\n\t\t }\n\t\t node = node.next;\n\t\t }\n\t\t return iterations;\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t if (reverse) {\n\t\t return this.toSeq().cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterations = 0;\n\t\t var node = this._head;\n\t\t return new Iterator((function() {\n\t\t if (node) {\n\t\t var value = node.value;\n\t\t node = node.next;\n\t\t return iteratorValue(type, iterations++, value);\n\t\t }\n\t\t return iteratorDone();\n\t\t }));\n\t\t }\n\t\t}, {of: function() {\n\t\t return this(arguments);\n\t\t }}, IndexedCollection);\n\t\tfunction isStack(maybeStack) {\n\t\t return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n\t\t}\n\t\tStack.isStack = isStack;\n\t\tvar IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\t\tvar StackPrototype = Stack.prototype;\n\t\tStackPrototype[IS_STACK_SENTINEL] = true;\n\t\tStackPrototype.withMutations = MapPrototype.withMutations;\n\t\tStackPrototype.asMutable = MapPrototype.asMutable;\n\t\tStackPrototype.asImmutable = MapPrototype.asImmutable;\n\t\tStackPrototype.wasAltered = MapPrototype.wasAltered;\n\t\tfunction makeStack(size, head, ownerID, hash) {\n\t\t var map = Object.create(StackPrototype);\n\t\t map.size = size;\n\t\t map._head = head;\n\t\t map.__ownerID = ownerID;\n\t\t map.__hash = hash;\n\t\t map.__altered = false;\n\t\t return map;\n\t\t}\n\t\tvar EMPTY_STACK;\n\t\tfunction emptyStack() {\n\t\t return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n\t\t}\n\t\tvar Set = function Set(value) {\n\t\t return value === null || value === undefined ? emptySet() : isSet(value) ? value : emptySet().withMutations((function(set) {\n\t\t var iter = SetIterable(value);\n\t\t assertNotInfinite(iter.size);\n\t\t iter.forEach((function(v) {\n\t\t return set.add(v);\n\t\t }));\n\t\t }));\n\t\t};\n\t\t($traceurRuntime.createClass)(Set, {\n\t\t toString: function() {\n\t\t return this.__toString('Set {', '}');\n\t\t },\n\t\t has: function(value) {\n\t\t return this._map.has(value);\n\t\t },\n\t\t add: function(value) {\n\t\t return updateSet(this, this._map.set(value, true));\n\t\t },\n\t\t remove: function(value) {\n\t\t return updateSet(this, this._map.remove(value));\n\t\t },\n\t\t clear: function() {\n\t\t return updateSet(this, this._map.clear());\n\t\t },\n\t\t union: function() {\n\t\t for (var iters = [],\n\t\t $__9 = 0; $__9 < arguments.length; $__9++)\n\t\t iters[$__9] = arguments[$__9];\n\t\t iters = iters.filter((function(x) {\n\t\t return x.size !== 0;\n\t\t }));\n\t\t if (iters.length === 0) {\n\t\t return this;\n\t\t }\n\t\t if (this.size === 0 && iters.length === 1) {\n\t\t return this.constructor(iters[0]);\n\t\t }\n\t\t return this.withMutations((function(set) {\n\t\t for (var ii = 0; ii < iters.length; ii++) {\n\t\t SetIterable(iters[ii]).forEach((function(value) {\n\t\t return set.add(value);\n\t\t }));\n\t\t }\n\t\t }));\n\t\t },\n\t\t intersect: function() {\n\t\t for (var iters = [],\n\t\t $__10 = 0; $__10 < arguments.length; $__10++)\n\t\t iters[$__10] = arguments[$__10];\n\t\t if (iters.length === 0) {\n\t\t return this;\n\t\t }\n\t\t iters = iters.map((function(iter) {\n\t\t return SetIterable(iter);\n\t\t }));\n\t\t var originalSet = this;\n\t\t return this.withMutations((function(set) {\n\t\t originalSet.forEach((function(value) {\n\t\t if (!iters.every((function(iter) {\n\t\t return iter.contains(value);\n\t\t }))) {\n\t\t set.remove(value);\n\t\t }\n\t\t }));\n\t\t }));\n\t\t },\n\t\t subtract: function() {\n\t\t for (var iters = [],\n\t\t $__11 = 0; $__11 < arguments.length; $__11++)\n\t\t iters[$__11] = arguments[$__11];\n\t\t if (iters.length === 0) {\n\t\t return this;\n\t\t }\n\t\t iters = iters.map((function(iter) {\n\t\t return SetIterable(iter);\n\t\t }));\n\t\t var originalSet = this;\n\t\t return this.withMutations((function(set) {\n\t\t originalSet.forEach((function(value) {\n\t\t if (iters.some((function(iter) {\n\t\t return iter.contains(value);\n\t\t }))) {\n\t\t set.remove(value);\n\t\t }\n\t\t }));\n\t\t }));\n\t\t },\n\t\t merge: function() {\n\t\t return this.union.apply(this, arguments);\n\t\t },\n\t\t mergeWith: function(merger) {\n\t\t for (var iters = [],\n\t\t $__12 = 1; $__12 < arguments.length; $__12++)\n\t\t iters[$__12 - 1] = arguments[$__12];\n\t\t return this.union.apply(this, iters);\n\t\t },\n\t\t sort: function(comparator) {\n\t\t return OrderedSet(sortFactory(this, comparator));\n\t\t },\n\t\t sortBy: function(mapper, comparator) {\n\t\t return OrderedSet(sortFactory(this, comparator, mapper));\n\t\t },\n\t\t wasAltered: function() {\n\t\t return this._map.wasAltered();\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return this._map.__iterate((function(_, k) {\n\t\t return fn(k, k, $__0);\n\t\t }), reverse);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t return this._map.map((function(_, k) {\n\t\t return k;\n\t\t })).__iterator(type, reverse);\n\t\t },\n\t\t __ensureOwner: function(ownerID) {\n\t\t if (ownerID === this.__ownerID) {\n\t\t return this;\n\t\t }\n\t\t var newMap = this._map.__ensureOwner(ownerID);\n\t\t if (!ownerID) {\n\t\t this.__ownerID = ownerID;\n\t\t this._map = newMap;\n\t\t return this;\n\t\t }\n\t\t return this.__make(newMap, ownerID);\n\t\t }\n\t\t}, {\n\t\t of: function() {\n\t\t return this(arguments);\n\t\t },\n\t\t fromKeys: function(value) {\n\t\t return this(KeyedIterable(value).keySeq());\n\t\t }\n\t\t}, SetCollection);\n\t\tfunction isSet(maybeSet) {\n\t\t return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n\t\t}\n\t\tSet.isSet = isSet;\n\t\tvar IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\t\tvar SetPrototype = Set.prototype;\n\t\tSetPrototype[IS_SET_SENTINEL] = true;\n\t\tSetPrototype[DELETE] = SetPrototype.remove;\n\t\tSetPrototype.mergeDeep = SetPrototype.merge;\n\t\tSetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n\t\tSetPrototype.withMutations = MapPrototype.withMutations;\n\t\tSetPrototype.asMutable = MapPrototype.asMutable;\n\t\tSetPrototype.asImmutable = MapPrototype.asImmutable;\n\t\tSetPrototype.__empty = emptySet;\n\t\tSetPrototype.__make = makeSet;\n\t\tfunction updateSet(set, newMap) {\n\t\t if (set.__ownerID) {\n\t\t set.size = newMap.size;\n\t\t set._map = newMap;\n\t\t return set;\n\t\t }\n\t\t return newMap === set._map ? set : newMap.size === 0 ? set.__empty() : set.__make(newMap);\n\t\t}\n\t\tfunction makeSet(map, ownerID) {\n\t\t var set = Object.create(SetPrototype);\n\t\t set.size = map ? map.size : 0;\n\t\t set._map = map;\n\t\t set.__ownerID = ownerID;\n\t\t return set;\n\t\t}\n\t\tvar EMPTY_SET;\n\t\tfunction emptySet() {\n\t\t return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n\t\t}\n\t\tvar OrderedSet = function OrderedSet(value) {\n\t\t return value === null || value === undefined ? emptyOrderedSet() : isOrderedSet(value) ? value : emptyOrderedSet().withMutations((function(set) {\n\t\t var iter = SetIterable(value);\n\t\t assertNotInfinite(iter.size);\n\t\t iter.forEach((function(v) {\n\t\t return set.add(v);\n\t\t }));\n\t\t }));\n\t\t};\n\t\t($traceurRuntime.createClass)(OrderedSet, {toString: function() {\n\t\t return this.__toString('OrderedSet {', '}');\n\t\t }}, {\n\t\t of: function() {\n\t\t return this(arguments);\n\t\t },\n\t\t fromKeys: function(value) {\n\t\t return this(KeyedIterable(value).keySeq());\n\t\t }\n\t\t}, Set);\n\t\tfunction isOrderedSet(maybeOrderedSet) {\n\t\t return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n\t\t}\n\t\tOrderedSet.isOrderedSet = isOrderedSet;\n\t\tvar OrderedSetPrototype = OrderedSet.prototype;\n\t\tOrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n\t\tOrderedSetPrototype.__empty = emptyOrderedSet;\n\t\tOrderedSetPrototype.__make = makeOrderedSet;\n\t\tfunction makeOrderedSet(map, ownerID) {\n\t\t var set = Object.create(OrderedSetPrototype);\n\t\t set.size = map ? map.size : 0;\n\t\t set._map = map;\n\t\t set.__ownerID = ownerID;\n\t\t return set;\n\t\t}\n\t\tvar EMPTY_ORDERED_SET;\n\t\tfunction emptyOrderedSet() {\n\t\t return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n\t\t}\n\t\tvar Record = function Record(defaultValues, name) {\n\t\t var RecordType = function Record(values) {\n\t\t if (!(this instanceof RecordType)) {\n\t\t return new RecordType(values);\n\t\t }\n\t\t this._map = Map(values);\n\t\t };\n\t\t var keys = Object.keys(defaultValues);\n\t\t var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n\t\t RecordTypePrototype.constructor = RecordType;\n\t\t name && (RecordTypePrototype._name = name);\n\t\t RecordTypePrototype._defaultValues = defaultValues;\n\t\t RecordTypePrototype._keys = keys;\n\t\t RecordTypePrototype.size = keys.length;\n\t\t try {\n\t\t keys.forEach((function(key) {\n\t\t Object.defineProperty(RecordType.prototype, key, {\n\t\t get: function() {\n\t\t return this.get(key);\n\t\t },\n\t\t set: function(value) {\n\t\t invariant(this.__ownerID, 'Cannot set on an immutable record.');\n\t\t this.set(key, value);\n\t\t }\n\t\t });\n\t\t }));\n\t\t } catch (error) {}\n\t\t return RecordType;\n\t\t};\n\t\t($traceurRuntime.createClass)(Record, {\n\t\t toString: function() {\n\t\t return this.__toString(recordName(this) + ' {', '}');\n\t\t },\n\t\t has: function(k) {\n\t\t return this._defaultValues.hasOwnProperty(k);\n\t\t },\n\t\t get: function(k, notSetValue) {\n\t\t if (!this.has(k)) {\n\t\t return notSetValue;\n\t\t }\n\t\t var defaultVal = this._defaultValues[k];\n\t\t return this._map ? this._map.get(k, defaultVal) : defaultVal;\n\t\t },\n\t\t clear: function() {\n\t\t if (this.__ownerID) {\n\t\t this._map && this._map.clear();\n\t\t return this;\n\t\t }\n\t\t var SuperRecord = Object.getPrototypeOf(this).constructor;\n\t\t return SuperRecord._empty || (SuperRecord._empty = makeRecord(this, emptyMap()));\n\t\t },\n\t\t set: function(k, v) {\n\t\t if (!this.has(k)) {\n\t\t throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n\t\t }\n\t\t var newMap = this._map && this._map.set(k, v);\n\t\t if (this.__ownerID || newMap === this._map) {\n\t\t return this;\n\t\t }\n\t\t return makeRecord(this, newMap);\n\t\t },\n\t\t remove: function(k) {\n\t\t if (!this.has(k)) {\n\t\t return this;\n\t\t }\n\t\t var newMap = this._map && this._map.remove(k);\n\t\t if (this.__ownerID || newMap === this._map) {\n\t\t return this;\n\t\t }\n\t\t return makeRecord(this, newMap);\n\t\t },\n\t\t wasAltered: function() {\n\t\t return this._map.wasAltered();\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var $__0 = this;\n\t\t return KeyedIterable(this._defaultValues).map((function(_, k) {\n\t\t return $__0.get(k);\n\t\t })).__iterator(type, reverse);\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return KeyedIterable(this._defaultValues).map((function(_, k) {\n\t\t return $__0.get(k);\n\t\t })).__iterate(fn, reverse);\n\t\t },\n\t\t __ensureOwner: function(ownerID) {\n\t\t if (ownerID === this.__ownerID) {\n\t\t return this;\n\t\t }\n\t\t var newMap = this._map && this._map.__ensureOwner(ownerID);\n\t\t if (!ownerID) {\n\t\t this.__ownerID = ownerID;\n\t\t this._map = newMap;\n\t\t return this;\n\t\t }\n\t\t return makeRecord(this, newMap, ownerID);\n\t\t }\n\t\t}, {}, KeyedCollection);\n\t\tvar RecordPrototype = Record.prototype;\n\t\tRecordPrototype[DELETE] = RecordPrototype.remove;\n\t\tRecordPrototype.deleteIn = RecordPrototype.removeIn = MapPrototype.removeIn;\n\t\tRecordPrototype.merge = MapPrototype.merge;\n\t\tRecordPrototype.mergeWith = MapPrototype.mergeWith;\n\t\tRecordPrototype.mergeIn = MapPrototype.mergeIn;\n\t\tRecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n\t\tRecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n\t\tRecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n\t\tRecordPrototype.setIn = MapPrototype.setIn;\n\t\tRecordPrototype.update = MapPrototype.update;\n\t\tRecordPrototype.updateIn = MapPrototype.updateIn;\n\t\tRecordPrototype.withMutations = MapPrototype.withMutations;\n\t\tRecordPrototype.asMutable = MapPrototype.asMutable;\n\t\tRecordPrototype.asImmutable = MapPrototype.asImmutable;\n\t\tfunction makeRecord(likeRecord, map, ownerID) {\n\t\t var record = Object.create(Object.getPrototypeOf(likeRecord));\n\t\t record._map = map;\n\t\t record.__ownerID = ownerID;\n\t\t return record;\n\t\t}\n\t\tfunction recordName(record) {\n\t\t return record._name || record.constructor.name;\n\t\t}\n\t\tvar Range = function Range(start, end, step) {\n\t\t if (!(this instanceof $Range)) {\n\t\t return new $Range(start, end, step);\n\t\t }\n\t\t invariant(step !== 0, 'Cannot step a Range by 0');\n\t\t start = start || 0;\n\t\t if (end === undefined) {\n\t\t end = Infinity;\n\t\t }\n\t\t if (start === end && __EMPTY_RANGE) {\n\t\t return __EMPTY_RANGE;\n\t\t }\n\t\t step = step === undefined ? 1 : Math.abs(step);\n\t\t if (end < start) {\n\t\t step = -step;\n\t\t }\n\t\t this._start = start;\n\t\t this._end = end;\n\t\t this._step = step;\n\t\t this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n\t\t};\n\t\tvar $Range = Range;\n\t\t($traceurRuntime.createClass)(Range, {\n\t\t toString: function() {\n\t\t if (this.size === 0) {\n\t\t return 'Range []';\n\t\t }\n\t\t return 'Range [ ' + this._start + '...' + this._end + (this._step > 1 ? ' by ' + this._step : '') + ' ]';\n\t\t },\n\t\t get: function(index, notSetValue) {\n\t\t return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue;\n\t\t },\n\t\t contains: function(searchValue) {\n\t\t var possibleIndex = (searchValue - this._start) / this._step;\n\t\t return possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex);\n\t\t },\n\t\t slice: function(begin, end) {\n\t\t if (wholeSlice(begin, end, this.size)) {\n\t\t return this;\n\t\t }\n\t\t begin = resolveBegin(begin, this.size);\n\t\t end = resolveEnd(end, this.size);\n\t\t if (end <= begin) {\n\t\t return __EMPTY_RANGE;\n\t\t }\n\t\t return new $Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n\t\t },\n\t\t indexOf: function(searchValue) {\n\t\t var offsetValue = searchValue - this._start;\n\t\t if (offsetValue % this._step === 0) {\n\t\t var index = offsetValue / this._step;\n\t\t if (index >= 0 && index < this.size) {\n\t\t return index;\n\t\t }\n\t\t }\n\t\t return -1;\n\t\t },\n\t\t lastIndexOf: function(searchValue) {\n\t\t return this.indexOf(searchValue);\n\t\t },\n\t\t take: function(amount) {\n\t\t return this.slice(0, Math.max(0, amount));\n\t\t },\n\t\t skip: function(amount) {\n\t\t return this.slice(Math.max(0, amount));\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var maxIndex = this.size - 1;\n\t\t var step = this._step;\n\t\t var value = reverse ? this._start + maxIndex * step : this._start;\n\t\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t\t if (fn(value, ii, this) === false) {\n\t\t return ii + 1;\n\t\t }\n\t\t value += reverse ? -step : step;\n\t\t }\n\t\t return ii;\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var maxIndex = this.size - 1;\n\t\t var step = this._step;\n\t\t var value = reverse ? this._start + maxIndex * step : this._start;\n\t\t var ii = 0;\n\t\t return new Iterator((function() {\n\t\t var v = value;\n\t\t value += reverse ? -step : step;\n\t\t return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n\t\t }));\n\t\t },\n\t\t equals: function(other) {\n\t\t return other instanceof $Range ? this._start === other._start && this._end === other._end && this._step === other._step : deepEqual(this, other);\n\t\t }\n\t\t}, {}, IndexedSeq);\n\t\tvar RangePrototype = Range.prototype;\n\t\tRangePrototype.__toJS = RangePrototype.toArray;\n\t\tRangePrototype.first = ListPrototype.first;\n\t\tRangePrototype.last = ListPrototype.last;\n\t\tvar __EMPTY_RANGE = Range(0, 0);\n\t\tvar Repeat = function Repeat(value, times) {\n\t\t if (times <= 0 && EMPTY_REPEAT) {\n\t\t return EMPTY_REPEAT;\n\t\t }\n\t\t if (!(this instanceof $Repeat)) {\n\t\t return new $Repeat(value, times);\n\t\t }\n\t\t this._value = value;\n\t\t this.size = times === undefined ? Infinity : Math.max(0, times);\n\t\t if (this.size === 0) {\n\t\t EMPTY_REPEAT = this;\n\t\t }\n\t\t};\n\t\tvar $Repeat = Repeat;\n\t\t($traceurRuntime.createClass)(Repeat, {\n\t\t toString: function() {\n\t\t if (this.size === 0) {\n\t\t return 'Repeat []';\n\t\t }\n\t\t return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n\t\t },\n\t\t get: function(index, notSetValue) {\n\t\t return this.has(index) ? this._value : notSetValue;\n\t\t },\n\t\t contains: function(searchValue) {\n\t\t return is(this._value, searchValue);\n\t\t },\n\t\t slice: function(begin, end) {\n\t\t var size = this.size;\n\t\t return wholeSlice(begin, end, size) ? this : new $Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n\t\t },\n\t\t reverse: function() {\n\t\t return this;\n\t\t },\n\t\t indexOf: function(searchValue) {\n\t\t if (is(this._value, searchValue)) {\n\t\t return 0;\n\t\t }\n\t\t return -1;\n\t\t },\n\t\t lastIndexOf: function(searchValue) {\n\t\t if (is(this._value, searchValue)) {\n\t\t return this.size;\n\t\t }\n\t\t return -1;\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t for (var ii = 0; ii < this.size; ii++) {\n\t\t if (fn(this._value, ii, this) === false) {\n\t\t return ii + 1;\n\t\t }\n\t\t }\n\t\t return ii;\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var $__0 = this;\n\t\t var ii = 0;\n\t\t return new Iterator((function() {\n\t\t return ii < $__0.size ? iteratorValue(type, ii++, $__0._value) : iteratorDone();\n\t\t }));\n\t\t },\n\t\t equals: function(other) {\n\t\t return other instanceof $Repeat ? is(this._value, other._value) : deepEqual(other);\n\t\t }\n\t\t}, {}, IndexedSeq);\n\t\tvar RepeatPrototype = Repeat.prototype;\n\t\tRepeatPrototype.last = RepeatPrototype.first;\n\t\tRepeatPrototype.has = RangePrototype.has;\n\t\tRepeatPrototype.take = RangePrototype.take;\n\t\tRepeatPrototype.skip = RangePrototype.skip;\n\t\tRepeatPrototype.__toJS = RangePrototype.__toJS;\n\t\tvar EMPTY_REPEAT;\n\t\tvar Immutable = {\n\t\t Iterable: Iterable,\n\t\t Seq: Seq,\n\t\t Collection: Collection,\n\t\t Map: Map,\n\t\t OrderedMap: OrderedMap,\n\t\t List: List,\n\t\t Stack: Stack,\n\t\t Set: Set,\n\t\t OrderedSet: OrderedSet,\n\t\t Record: Record,\n\t\t Range: Range,\n\t\t Repeat: Repeat,\n\t\t is: is,\n\t\t fromJS: fromJS\n\t\t};\n\n\t\t return Immutable;\n\t\t}", "function Module(stdlib, imports, buffer) {\n \"use asm\";\n\n function f() {\n return 281474976710655 * 1048575 | 0;\n }\n\n return {\n f: f\n };\n}", "function v7(v8,v9) {\n const v10 = gc;\n // v10 = .function([] => .undefined)\n let v13 = 0;\n const v16 = [13.37,13.37,13.37,13.37];\n // v16 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v18 = [1337,1337,1337,1337];\n // v18 = .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 v19 = [3697200800,v16,v18];\n // v19 = .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 v20 = v6[0];\n // v20 = .unknown\n const v21 = Symbol;\n // v21 = .object(ofGroup: SymbolConstructor, withProperties: [\"match\", \"asyncIterator\", \"search\", \"iterator\", \"replace\", \"isConcatSpreadable\", \"toStringTag\", \"split\", \"toPrimitive\", \"matchAll\", \"hasInstance\", \"unscopable\", \"species\"], withMethods: [\"for\", \"keyFor\"]) + .function([.string] => .object(ofGroup: Symbol, withProperties: [\"__proto__\", \"description\"]))\n for (let v25 = 0; v25 < 4; v25 = v25 + 1) {\n }\n function v27(v28,v29) {\n }\n do {\n const v31 = [13.37,13.37,13.37,13.37];\n // v31 = .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 v34 = [1337,1337,Function,1337];\n // v34 = .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 v35 = {__proto__:v34,a:v31,c:1337,d:Function,e:v34,toString:Function};\n // v35 = .object(ofGroup: Object, withProperties: [\"a\", \"__proto__\", \"toString\", \"d\", \"c\", \"e\"])\n let v39 = 0;\n while (v39 < 1337) {\n const v40 = v39 + 1;\n // v40 = .primitive\n v39 = v40;\n }\n const v41 = [13.37,13.37,13.37,13.37];\n // v41 = .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 v43 = [1337,1337,1337,1337];\n // v43 = .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 v44 = [3697200800,v41,v43];\n // v44 = .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 v45 = v13 + 1;\n // v45 = .primitive\n function v48(v49,v50) {\n return v44;\n }\n const v51 = [1337,1337,1337,1337];\n // v51 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n for (let v54 = 0; v54 < 100; v54 = v54 + 100) {\n }\n const v55 = {__proto__:v51,a:1337,c:1337,d:Function,e:v51,toString:Function};\n // v55 = .object(ofGroup: Object, withProperties: [\"e\", \"c\", \"__proto__\", \"toString\", \"d\", \"a\"])\n const v56 = v48(1337,v41,...v55);\n // v56 = .unknown\n v13 = v45;\n } while (v13 < 7);\n return v3;\n}", "function e(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function universalModule() {\n\t var $Object = Object;\n\n\tfunction createClass(ctor, methods, staticMethods, superClass) {\n\t var proto;\n\t if (superClass) {\n\t var superProto = superClass.prototype;\n\t proto = $Object.create(superProto);\n\t } else {\n\t proto = ctor.prototype;\n\t }\n\t $Object.keys(methods).forEach(function (key) {\n\t proto[key] = methods[key];\n\t });\n\t $Object.keys(staticMethods).forEach(function (key) {\n\t ctor[key] = staticMethods[key];\n\t });\n\t proto.constructor = ctor;\n\t ctor.prototype = proto;\n\t return ctor;\n\t}\n\n\tfunction superCall(self, proto, name, args) {\n\t return $Object.getPrototypeOf(proto)[name].apply(self, args);\n\t}\n\n\tfunction defaultSuperCall(self, proto, args) {\n\t superCall(self, proto, 'constructor', args);\n\t}\n\n\tvar $traceurRuntime = {};\n\t$traceurRuntime.createClass = createClass;\n\t$traceurRuntime.superCall = superCall;\n\t$traceurRuntime.defaultSuperCall = defaultSuperCall;\n\t\"use strict\";\n\tfunction is(first, second) {\n\t if (first === second) {\n\t return first !== 0 || second !== 0 || 1 / first === 1 / second;\n\t }\n\t if (first !== first) {\n\t return second !== second;\n\t }\n\t if (first && typeof first.equals === 'function') {\n\t return first.equals(second);\n\t }\n\t return false;\n\t}\n\tfunction invariant(condition, error) {\n\t if (!condition)\n\t throw new Error(error);\n\t}\n\tvar DELETE = 'delete';\n\tvar SHIFT = 5;\n\tvar SIZE = 1 << SHIFT;\n\tvar MASK = SIZE - 1;\n\tvar NOT_SET = {};\n\tvar CHANGE_LENGTH = {value: false};\n\tvar DID_ALTER = {value: false};\n\tfunction MakeRef(ref) {\n\t ref.value = false;\n\t return ref;\n\t}\n\tfunction SetRef(ref) {\n\t ref && (ref.value = true);\n\t}\n\tfunction OwnerID() {}\n\tfunction arrCopy(arr, offset) {\n\t offset = offset || 0;\n\t var len = Math.max(0, arr.length - offset);\n\t var newArr = new Array(len);\n\t for (var ii = 0; ii < len; ii++) {\n\t newArr[ii] = arr[ii + offset];\n\t }\n\t return newArr;\n\t}\n\tfunction assertNotInfinite(size) {\n\t invariant(size !== Infinity, 'Cannot perform this action with an infinite size.');\n\t}\n\tfunction ensureSize(iter) {\n\t if (iter.size === undefined) {\n\t iter.size = iter.__iterate(returnTrue);\n\t }\n\t return iter.size;\n\t}\n\tfunction wrapIndex(iter, index) {\n\t return index >= 0 ? index : ensureSize(iter) + index;\n\t}\n\tfunction returnTrue() {\n\t return true;\n\t}\n\tfunction wholeSlice(begin, end, size) {\n\t return (begin === 0 || (size !== undefined && begin <= -size)) && (end === undefined || (size !== undefined && end >= size));\n\t}\n\tfunction resolveBegin(begin, size) {\n\t return resolveIndex(begin, size, 0);\n\t}\n\tfunction resolveEnd(end, size) {\n\t return resolveIndex(end, size, size);\n\t}\n\tfunction resolveIndex(index, size, defaultIndex) {\n\t return index === undefined ? defaultIndex : index < 0 ? Math.max(0, size + index) : size === undefined ? index : Math.min(size, index);\n\t}\n\tfunction hash(o) {\n\t if (!o) {\n\t return 0;\n\t }\n\t if (o === true) {\n\t return 1;\n\t }\n\t var type = typeof o;\n\t if (type === 'number') {\n\t if ((o | 0) === o) {\n\t return o & HASH_MAX_VAL;\n\t }\n\t o = '' + o;\n\t type = 'string';\n\t }\n\t if (type === 'string') {\n\t return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n\t }\n\t if (o.hashCode) {\n\t return hash(typeof o.hashCode === 'function' ? o.hashCode() : o.hashCode);\n\t }\n\t return hashJSObj(o);\n\t}\n\tfunction cachedHashString(string) {\n\t var hash = stringHashCache[string];\n\t if (hash === undefined) {\n\t hash = hashString(string);\n\t if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n\t STRING_HASH_CACHE_SIZE = 0;\n\t stringHashCache = {};\n\t }\n\t STRING_HASH_CACHE_SIZE++;\n\t stringHashCache[string] = hash;\n\t }\n\t return hash;\n\t}\n\tfunction hashString(string) {\n\t var hash = 0;\n\t for (var ii = 0; ii < string.length; ii++) {\n\t hash = (31 * hash + string.charCodeAt(ii)) & HASH_MAX_VAL;\n\t }\n\t return hash;\n\t}\n\tfunction hashJSObj(obj) {\n\t var hash = weakMap && weakMap.get(obj);\n\t if (hash)\n\t return hash;\n\t hash = obj[UID_HASH_KEY];\n\t if (hash)\n\t return hash;\n\t if (!canDefineProperty) {\n\t hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n\t if (hash)\n\t return hash;\n\t hash = getIENodeHash(obj);\n\t if (hash)\n\t return hash;\n\t }\n\t if (Object.isExtensible && !Object.isExtensible(obj)) {\n\t throw new Error('Non-extensible objects are not allowed as keys.');\n\t }\n\t hash = ++objHashUID & HASH_MAX_VAL;\n\t if (weakMap) {\n\t weakMap.set(obj, hash);\n\t } else if (canDefineProperty) {\n\t Object.defineProperty(obj, UID_HASH_KEY, {\n\t 'enumerable': false,\n\t 'configurable': false,\n\t 'writable': false,\n\t 'value': hash\n\t });\n\t } else if (obj.propertyIsEnumerable && obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n\t obj.propertyIsEnumerable = function() {\n\t return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n\t };\n\t obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n\t } else if (obj.nodeType) {\n\t obj[UID_HASH_KEY] = hash;\n\t } else {\n\t throw new Error('Unable to set a non-enumerable property on object.');\n\t }\n\t return hash;\n\t}\n\tvar canDefineProperty = (function() {\n\t try {\n\t Object.defineProperty({}, 'x', {});\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t}());\n\tfunction getIENodeHash(node) {\n\t if (node && node.nodeType > 0) {\n\t switch (node.nodeType) {\n\t case 1:\n\t return node.uniqueID;\n\t case 9:\n\t return node.documentElement && node.documentElement.uniqueID;\n\t }\n\t }\n\t}\n\tvar weakMap = typeof WeakMap === 'function' && new WeakMap();\n\tvar HASH_MAX_VAL = 0x7FFFFFFF;\n\tvar objHashUID = 0;\n\tvar UID_HASH_KEY = '__immutablehash__';\n\tif (typeof Symbol === 'function') {\n\t UID_HASH_KEY = Symbol(UID_HASH_KEY);\n\t}\n\tvar STRING_HASH_CACHE_MIN_STRLEN = 16;\n\tvar STRING_HASH_CACHE_MAX_SIZE = 255;\n\tvar STRING_HASH_CACHE_SIZE = 0;\n\tvar stringHashCache = {};\n\tvar ITERATE_KEYS = 0;\n\tvar ITERATE_VALUES = 1;\n\tvar ITERATE_ENTRIES = 2;\n\tvar FAUX_ITERATOR_SYMBOL = '@@iterator';\n\tvar REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n\tvar ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\tvar Iterator = function Iterator(next) {\n\t this.next = next;\n\t};\n\t($traceurRuntime.createClass)(Iterator, {toString: function() {\n\t return '[Iterator]';\n\t }}, {});\n\tIterator.KEYS = ITERATE_KEYS;\n\tIterator.VALUES = ITERATE_VALUES;\n\tIterator.ENTRIES = ITERATE_ENTRIES;\n\tvar IteratorPrototype = Iterator.prototype;\n\tIteratorPrototype.inspect = IteratorPrototype.toSource = function() {\n\t return this.toString();\n\t};\n\tIteratorPrototype[ITERATOR_SYMBOL] = function() {\n\t return this;\n\t};\n\tfunction iteratorValue(type, k, v, iteratorResult) {\n\t var value = type === 0 ? k : type === 1 ? v : [k, v];\n\t iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n\t value: value,\n\t done: false\n\t });\n\t return iteratorResult;\n\t}\n\tfunction iteratorDone() {\n\t return {\n\t value: undefined,\n\t done: true\n\t };\n\t}\n\tfunction hasIterator(maybeIterable) {\n\t return !!_iteratorFn(maybeIterable);\n\t}\n\tfunction isIterator(maybeIterator) {\n\t return maybeIterator && typeof maybeIterator.next === 'function';\n\t}\n\tfunction getIterator(iterable) {\n\t var iteratorFn = _iteratorFn(iterable);\n\t return iteratorFn && iteratorFn.call(iterable);\n\t}\n\tfunction _iteratorFn(iterable) {\n\t var iteratorFn = iterable && ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || iterable[FAUX_ITERATOR_SYMBOL]);\n\t if (typeof iteratorFn === 'function') {\n\t return iteratorFn;\n\t }\n\t}\n\tvar Iterable = function Iterable(value) {\n\t return isIterable(value) ? value : Seq(value);\n\t};\n\tvar $Iterable = Iterable;\n\t($traceurRuntime.createClass)(Iterable, {\n\t toArray: function() {\n\t assertNotInfinite(this.size);\n\t var array = new Array(this.size || 0);\n\t this.valueSeq().__iterate((function(v, i) {\n\t array[i] = v;\n\t }));\n\t return array;\n\t },\n\t toIndexedSeq: function() {\n\t return new ToIndexedSequence(this);\n\t },\n\t toJS: function() {\n\t return this.toSeq().map((function(value) {\n\t return value && typeof value.toJS === 'function' ? value.toJS() : value;\n\t })).__toJS();\n\t },\n\t toKeyedSeq: function() {\n\t return new ToKeyedSequence(this, true);\n\t },\n\t toMap: function() {\n\t assertNotInfinite(this.size);\n\t return Map(this.toKeyedSeq());\n\t },\n\t toObject: function() {\n\t assertNotInfinite(this.size);\n\t var object = {};\n\t this.__iterate((function(v, k) {\n\t object[k] = v;\n\t }));\n\t return object;\n\t },\n\t toOrderedMap: function() {\n\t assertNotInfinite(this.size);\n\t return OrderedMap(this.toKeyedSeq());\n\t },\n\t toSet: function() {\n\t assertNotInfinite(this.size);\n\t return Set(isKeyed(this) ? this.valueSeq() : this);\n\t },\n\t toSetSeq: function() {\n\t return new ToSetSequence(this);\n\t },\n\t toSeq: function() {\n\t return isIndexed(this) ? this.toIndexedSeq() : isKeyed(this) ? this.toKeyedSeq() : this.toSetSeq();\n\t },\n\t toStack: function() {\n\t assertNotInfinite(this.size);\n\t return Stack(isKeyed(this) ? this.valueSeq() : this);\n\t },\n\t toList: function() {\n\t assertNotInfinite(this.size);\n\t return List(isKeyed(this) ? this.valueSeq() : this);\n\t },\n\t toString: function() {\n\t return '[Iterable]';\n\t },\n\t __toString: function(head, tail) {\n\t if (this.size === 0) {\n\t return head + tail;\n\t }\n\t return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n\t },\n\t concat: function() {\n\t for (var values = [],\n\t $__2 = 0; $__2 < arguments.length; $__2++)\n\t values[$__2] = arguments[$__2];\n\t return reify(this, concatFactory(this, values));\n\t },\n\t contains: function(searchValue) {\n\t return this.some((function(value) {\n\t return is(value, searchValue);\n\t }));\n\t },\n\t entries: function() {\n\t return this.__iterator(ITERATE_ENTRIES);\n\t },\n\t every: function(predicate, context) {\n\t var returnValue = true;\n\t this.__iterate((function(v, k, c) {\n\t if (!predicate.call(context, v, k, c)) {\n\t returnValue = false;\n\t return false;\n\t }\n\t }));\n\t return returnValue;\n\t },\n\t filter: function(predicate, context) {\n\t return reify(this, filterFactory(this, predicate, context, true));\n\t },\n\t find: function(predicate, context, notSetValue) {\n\t var foundValue = notSetValue;\n\t this.__iterate((function(v, k, c) {\n\t if (predicate.call(context, v, k, c)) {\n\t foundValue = v;\n\t return false;\n\t }\n\t }));\n\t return foundValue;\n\t },\n\t forEach: function(sideEffect, context) {\n\t return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n\t },\n\t join: function(separator) {\n\t separator = separator !== undefined ? '' + separator : ',';\n\t var joined = '';\n\t var isFirst = true;\n\t this.__iterate((function(v) {\n\t isFirst ? (isFirst = false) : (joined += separator);\n\t joined += v !== null && v !== undefined ? v : '';\n\t }));\n\t return joined;\n\t },\n\t keys: function() {\n\t return this.__iterator(ITERATE_KEYS);\n\t },\n\t map: function(mapper, context) {\n\t return reify(this, mapFactory(this, mapper, context));\n\t },\n\t reduce: function(reducer, initialReduction, context) {\n\t var reduction;\n\t var useFirst;\n\t if (arguments.length < 2) {\n\t useFirst = true;\n\t } else {\n\t reduction = initialReduction;\n\t }\n\t this.__iterate((function(v, k, c) {\n\t if (useFirst) {\n\t useFirst = false;\n\t reduction = v;\n\t } else {\n\t reduction = reducer.call(context, reduction, v, k, c);\n\t }\n\t }));\n\t return reduction;\n\t },\n\t reduceRight: function(reducer, initialReduction, context) {\n\t var reversed = this.toKeyedSeq().reverse();\n\t return reversed.reduce.apply(reversed, arguments);\n\t },\n\t reverse: function() {\n\t return reify(this, reverseFactory(this, true));\n\t },\n\t slice: function(begin, end) {\n\t if (wholeSlice(begin, end, this.size)) {\n\t return this;\n\t }\n\t var resolvedBegin = resolveBegin(begin, this.size);\n\t var resolvedEnd = resolveEnd(end, this.size);\n\t if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n\t return this.toSeq().cacheResult().slice(begin, end);\n\t }\n\t var skipped = resolvedBegin === 0 ? this : this.skip(resolvedBegin);\n\t return reify(this, resolvedEnd === undefined || resolvedEnd === this.size ? skipped : skipped.take(resolvedEnd - resolvedBegin));\n\t },\n\t some: function(predicate, context) {\n\t return !this.every(not(predicate), context);\n\t },\n\t sort: function(comparator) {\n\t return this.sortBy(valueMapper, comparator);\n\t },\n\t values: function() {\n\t return this.__iterator(ITERATE_VALUES);\n\t },\n\t butLast: function() {\n\t return this.slice(0, -1);\n\t },\n\t count: function(predicate, context) {\n\t return ensureSize(predicate ? this.toSeq().filter(predicate, context) : this);\n\t },\n\t countBy: function(grouper, context) {\n\t return countByFactory(this, grouper, context);\n\t },\n\t equals: function(other) {\n\t if (this === other) {\n\t return true;\n\t }\n\t if (!other || typeof other.equals !== 'function') {\n\t return false;\n\t }\n\t if (this.size !== undefined && other.size !== undefined) {\n\t if (this.size !== other.size) {\n\t return false;\n\t }\n\t if (this.size === 0 && other.size === 0) {\n\t return true;\n\t }\n\t }\n\t if (this.__hash !== undefined && other.__hash !== undefined && this.__hash !== other.__hash) {\n\t return false;\n\t }\n\t return this.__deepEquals(other);\n\t },\n\t __deepEquals: function(other) {\n\t var entries = this.entries();\n\t return typeof other.every === 'function' && other.every((function(v, k) {\n\t var entry = entries.next().value;\n\t return entry && is(entry[0], k) && is(entry[1], v);\n\t })) && entries.next().done;\n\t },\n\t entrySeq: function() {\n\t var iterable = this;\n\t if (iterable._cache) {\n\t return new ArraySeq(iterable._cache);\n\t }\n\t var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n\t entriesSequence.fromEntrySeq = (function() {\n\t return iterable.toSeq();\n\t });\n\t return entriesSequence;\n\t },\n\t filterNot: function(predicate, context) {\n\t return this.filter(not(predicate), context);\n\t },\n\t findLast: function(predicate, context, notSetValue) {\n\t return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n\t },\n\t first: function() {\n\t return this.find(returnTrue);\n\t },\n\t flatMap: function(mapper, context) {\n\t return reify(this, flatMapFactory(this, mapper, context));\n\t },\n\t flatten: function(depth) {\n\t return reify(this, flattenFactory(this, depth, true));\n\t },\n\t fromEntrySeq: function() {\n\t return new FromEntriesSequence(this);\n\t },\n\t get: function(searchKey, notSetValue) {\n\t return this.find((function(_, key) {\n\t return is(key, searchKey);\n\t }), undefined, notSetValue);\n\t },\n\t getIn: function(searchKeyPath, notSetValue) {\n\t var nested = this;\n\t if (searchKeyPath) {\n\t for (var ii = 0; ii < searchKeyPath.length; ii++) {\n\t nested = nested && nested.get ? nested.get(searchKeyPath[ii], NOT_SET) : NOT_SET;\n\t if (nested === NOT_SET) {\n\t return notSetValue;\n\t }\n\t }\n\t }\n\t return nested;\n\t },\n\t groupBy: function(grouper, context) {\n\t return groupByFactory(this, grouper, context);\n\t },\n\t has: function(searchKey) {\n\t return this.get(searchKey, NOT_SET) !== NOT_SET;\n\t },\n\t isSubset: function(iter) {\n\t iter = typeof iter.contains === 'function' ? iter : $Iterable(iter);\n\t return this.every((function(value) {\n\t return iter.contains(value);\n\t }));\n\t },\n\t isSuperset: function(iter) {\n\t return iter.isSubset(this);\n\t },\n\t keySeq: function() {\n\t return this.toSeq().map(keyMapper).toIndexedSeq();\n\t },\n\t last: function() {\n\t return this.toSeq().reverse().first();\n\t },\n\t max: function(comparator) {\n\t return this.maxBy(valueMapper, comparator);\n\t },\n\t maxBy: function(mapper, comparator) {\n\t var $__0 = this;\n\t comparator = comparator || defaultComparator;\n\t var maxEntry = this.entrySeq().reduce((function(max, next) {\n\t return comparator(mapper(next[1], next[0], $__0), mapper(max[1], max[0], $__0)) > 0 ? next : max;\n\t }));\n\t return maxEntry && maxEntry[1];\n\t },\n\t min: function(comparator) {\n\t return this.minBy(valueMapper, comparator);\n\t },\n\t minBy: function(mapper, comparator) {\n\t var $__0 = this;\n\t comparator = comparator || defaultComparator;\n\t var minEntry = this.entrySeq().reduce((function(min, next) {\n\t return comparator(mapper(next[1], next[0], $__0), mapper(min[1], min[0], $__0)) < 0 ? next : min;\n\t }));\n\t return minEntry && minEntry[1];\n\t },\n\t rest: function() {\n\t return this.slice(1);\n\t },\n\t skip: function(amount) {\n\t return reify(this, skipFactory(this, amount, true));\n\t },\n\t skipLast: function(amount) {\n\t return reify(this, this.toSeq().reverse().skip(amount).reverse());\n\t },\n\t skipWhile: function(predicate, context) {\n\t return reify(this, skipWhileFactory(this, predicate, context, true));\n\t },\n\t skipUntil: function(predicate, context) {\n\t return this.skipWhile(not(predicate), context);\n\t },\n\t sortBy: function(mapper, comparator) {\n\t var $__0 = this;\n\t comparator = comparator || defaultComparator;\n\t return reify(this, new ArraySeq(this.entrySeq().entrySeq().toArray().sort((function(a, b) {\n\t return comparator(mapper(a[1][1], a[1][0], $__0), mapper(b[1][1], b[1][0], $__0)) || a[0] - b[0];\n\t }))).fromEntrySeq().valueSeq().fromEntrySeq());\n\t },\n\t take: function(amount) {\n\t return reify(this, takeFactory(this, amount));\n\t },\n\t takeLast: function(amount) {\n\t return reify(this, this.toSeq().reverse().take(amount).reverse());\n\t },\n\t takeWhile: function(predicate, context) {\n\t return reify(this, takeWhileFactory(this, predicate, context));\n\t },\n\t takeUntil: function(predicate, context) {\n\t return this.takeWhile(not(predicate), context);\n\t },\n\t valueSeq: function() {\n\t return this.toIndexedSeq();\n\t },\n\t hashCode: function() {\n\t return this.__hash || (this.__hash = this.size === Infinity ? 0 : this.reduce((function(h, v, k) {\n\t return (h + (hash(v) ^ (v === k ? 0 : hash(k)))) & HASH_MAX_VAL;\n\t }), 0));\n\t }\n\t}, {});\n\tvar IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n\tvar IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n\tvar IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n\tvar IterablePrototype = Iterable.prototype;\n\tIterablePrototype[IS_ITERABLE_SENTINEL] = true;\n\tIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n\tIterablePrototype.toJSON = IterablePrototype.toJS;\n\tIterablePrototype.__toJS = IterablePrototype.toArray;\n\tIterablePrototype.__toStringMapper = quoteString;\n\tIterablePrototype.inspect = IterablePrototype.toSource = function() {\n\t return this.toString();\n\t};\n\tIterablePrototype.chain = IterablePrototype.flatMap;\n\t(function() {\n\t try {\n\t Object.defineProperty(IterablePrototype, 'length', {get: function() {\n\t if (!Iterable.noLengthWarning) {\n\t var stack;\n\t try {\n\t throw new Error();\n\t } catch (error) {\n\t stack = error.stack;\n\t }\n\t if (stack.indexOf('_wrapObject') === -1) {\n\t console && console.warn && console.warn('iterable.length has been deprecated, ' + 'use iterable.size or iterable.count(). ' + 'This warning will become a silent error in a future version. ' + stack);\n\t return this.size;\n\t }\n\t }\n\t }});\n\t } catch (e) {}\n\t})();\n\tvar KeyedIterable = function KeyedIterable(value) {\n\t return isKeyed(value) ? value : KeyedSeq(value);\n\t};\n\t($traceurRuntime.createClass)(KeyedIterable, {\n\t flip: function() {\n\t return reify(this, flipFactory(this));\n\t },\n\t findKey: function(predicate, context) {\n\t var foundKey;\n\t this.__iterate((function(v, k, c) {\n\t if (predicate.call(context, v, k, c)) {\n\t foundKey = k;\n\t return false;\n\t }\n\t }));\n\t return foundKey;\n\t },\n\t findLastKey: function(predicate, context) {\n\t return this.toSeq().reverse().findKey(predicate, context);\n\t },\n\t keyOf: function(searchValue) {\n\t return this.findKey((function(value) {\n\t return is(value, searchValue);\n\t }));\n\t },\n\t lastKeyOf: function(searchValue) {\n\t return this.toSeq().reverse().keyOf(searchValue);\n\t },\n\t mapEntries: function(mapper, context) {\n\t var $__0 = this;\n\t var iterations = 0;\n\t return reify(this, this.toSeq().map((function(v, k) {\n\t return mapper.call(context, [k, v], iterations++, $__0);\n\t })).fromEntrySeq());\n\t },\n\t mapKeys: function(mapper, context) {\n\t var $__0 = this;\n\t return reify(this, this.toSeq().flip().map((function(k, v) {\n\t return mapper.call(context, k, v, $__0);\n\t })).flip());\n\t }\n\t}, {}, Iterable);\n\tvar KeyedIterablePrototype = KeyedIterable.prototype;\n\tKeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n\tKeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n\tKeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n\tKeyedIterablePrototype.__toStringMapper = (function(v, k) {\n\t return k + ': ' + quoteString(v);\n\t});\n\tvar IndexedIterable = function IndexedIterable(value) {\n\t return isIndexed(value) ? value : IndexedSeq(value);\n\t};\n\t($traceurRuntime.createClass)(IndexedIterable, {\n\t toKeyedSeq: function() {\n\t return new ToKeyedSequence(this, false);\n\t },\n\t filter: function(predicate, context) {\n\t return reify(this, filterFactory(this, predicate, context, false));\n\t },\n\t findIndex: function(predicate, context) {\n\t var key = this.toKeyedSeq().findKey(predicate, context);\n\t return key === undefined ? -1 : key;\n\t },\n\t indexOf: function(searchValue) {\n\t var key = this.toKeyedSeq().keyOf(searchValue);\n\t return key === undefined ? -1 : key;\n\t },\n\t lastIndexOf: function(searchValue) {\n\t var key = this.toKeyedSeq().lastKeyOf(searchValue);\n\t return key === undefined ? -1 : key;\n\t },\n\t reverse: function() {\n\t return reify(this, reverseFactory(this, false));\n\t },\n\t splice: function(index, removeNum) {\n\t var numArgs = arguments.length;\n\t removeNum = Math.max(removeNum | 0, 0);\n\t if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n\t return this;\n\t }\n\t index = resolveBegin(index, this.size);\n\t var spliced = this.slice(0, index);\n\t return reify(this, numArgs === 1 ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)));\n\t },\n\t findLastIndex: function(predicate, context) {\n\t var key = this.toKeyedSeq().findLastKey(predicate, context);\n\t return key === undefined ? -1 : key;\n\t },\n\t first: function() {\n\t return this.get(0);\n\t },\n\t flatten: function(depth) {\n\t return reify(this, flattenFactory(this, depth, false));\n\t },\n\t get: function(index, notSetValue) {\n\t index = wrapIndex(this, index);\n\t return (index < 0 || (this.size === Infinity || (this.size !== undefined && index > this.size))) ? notSetValue : this.find((function(_, key) {\n\t return key === index;\n\t }), undefined, notSetValue);\n\t },\n\t has: function(index) {\n\t index = wrapIndex(this, index);\n\t return index >= 0 && (this.size !== undefined ? this.size === Infinity || index < this.size : this.indexOf(index) !== -1);\n\t },\n\t interpose: function(separator) {\n\t return reify(this, interposeFactory(this, separator));\n\t },\n\t last: function() {\n\t return this.get(-1);\n\t },\n\t skip: function(amount) {\n\t var iter = this;\n\t var skipSeq = skipFactory(iter, amount, false);\n\t if (isSeq(iter) && skipSeq !== iter) {\n\t skipSeq.get = function(index, notSetValue) {\n\t index = wrapIndex(this, index);\n\t return index >= 0 ? iter.get(index + amount, notSetValue) : notSetValue;\n\t };\n\t }\n\t return reify(this, skipSeq);\n\t },\n\t skipWhile: function(predicate, context) {\n\t return reify(this, skipWhileFactory(this, predicate, context, false));\n\t },\n\t sortBy: function(mapper, comparator) {\n\t var $__0 = this;\n\t comparator = comparator || defaultComparator;\n\t return reify(this, new ArraySeq(this.entrySeq().toArray().sort((function(a, b) {\n\t return comparator(mapper(a[1], a[0], $__0), mapper(b[1], b[0], $__0)) || a[0] - b[0];\n\t }))).fromEntrySeq().valueSeq());\n\t },\n\t take: function(amount) {\n\t var iter = this;\n\t var takeSeq = takeFactory(iter, amount);\n\t if (isSeq(iter) && takeSeq !== iter) {\n\t takeSeq.get = function(index, notSetValue) {\n\t index = wrapIndex(this, index);\n\t return index >= 0 && index < amount ? iter.get(index, notSetValue) : notSetValue;\n\t };\n\t }\n\t return reify(this, takeSeq);\n\t }\n\t}, {}, Iterable);\n\tIndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n\tvar SetIterable = function SetIterable(value) {\n\t return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n\t};\n\t($traceurRuntime.createClass)(SetIterable, {\n\t get: function(value, notSetValue) {\n\t return this.has(value) ? value : notSetValue;\n\t },\n\t contains: function(value) {\n\t return this.has(value);\n\t },\n\t keySeq: function() {\n\t return this.valueSeq();\n\t }\n\t}, {}, Iterable);\n\tSetIterable.prototype.has = IterablePrototype.contains;\n\tfunction isIterable(maybeIterable) {\n\t return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n\t}\n\tfunction isKeyed(maybeKeyed) {\n\t return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n\t}\n\tfunction isIndexed(maybeIndexed) {\n\t return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n\t}\n\tfunction isAssociative(maybeAssociative) {\n\t return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n\t}\n\tIterable.isIterable = isIterable;\n\tIterable.isKeyed = isKeyed;\n\tIterable.isIndexed = isIndexed;\n\tIterable.isAssociative = isAssociative;\n\tIterable.Keyed = KeyedIterable;\n\tIterable.Indexed = IndexedIterable;\n\tIterable.Set = SetIterable;\n\tIterable.Iterator = Iterator;\n\tfunction valueMapper(v) {\n\t return v;\n\t}\n\tfunction keyMapper(v, k) {\n\t return k;\n\t}\n\tfunction entryMapper(v, k) {\n\t return [k, v];\n\t}\n\tfunction not(predicate) {\n\t return function() {\n\t return !predicate.apply(this, arguments);\n\t };\n\t}\n\tfunction quoteString(value) {\n\t return typeof value === 'string' ? JSON.stringify(value) : value;\n\t}\n\tfunction defaultComparator(a, b) {\n\t return a > b ? 1 : a < b ? -1 : 0;\n\t}\n\tfunction mixin(ctor, methods) {\n\t var proto = ctor.prototype;\n\t var keyCopier = (function(key) {\n\t proto[key] = methods[key];\n\t });\n\t Object.keys(methods).forEach(keyCopier);\n\t Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n\t return ctor;\n\t}\n\tvar Seq = function Seq(value) {\n\t return value === null || value === undefined ? emptySequence() : isIterable(value) ? value.toSeq() : seqFromValue(value);\n\t};\n\tvar $Seq = Seq;\n\t($traceurRuntime.createClass)(Seq, {\n\t toSeq: function() {\n\t return this;\n\t },\n\t toString: function() {\n\t return this.__toString('Seq {', '}');\n\t },\n\t cacheResult: function() {\n\t if (!this._cache && this.__iterateUncached) {\n\t this._cache = this.entrySeq().toArray();\n\t this.size = this._cache.length;\n\t }\n\t return this;\n\t },\n\t __iterate: function(fn, reverse) {\n\t return seqIterate(this, fn, reverse, true);\n\t },\n\t __iterator: function(type, reverse) {\n\t return seqIterator(this, type, reverse, true);\n\t }\n\t}, {of: function() {\n\t return $Seq(arguments);\n\t }}, Iterable);\n\tvar KeyedSeq = function KeyedSeq(value) {\n\t return value === null || value === undefined ? emptySequence().toKeyedSeq() : isIterable(value) ? (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) : keyedSeqFromValue(value);\n\t};\n\tvar $KeyedSeq = KeyedSeq;\n\t($traceurRuntime.createClass)(KeyedSeq, {\n\t toKeyedSeq: function() {\n\t return this;\n\t },\n\t toSeq: function() {\n\t return this;\n\t }\n\t}, {of: function() {\n\t return $KeyedSeq(arguments);\n\t }}, Seq);\n\tmixin(KeyedSeq, KeyedIterable.prototype);\n\tvar IndexedSeq = function IndexedSeq(value) {\n\t return value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n\t};\n\tvar $IndexedSeq = IndexedSeq;\n\t($traceurRuntime.createClass)(IndexedSeq, {\n\t toIndexedSeq: function() {\n\t return this;\n\t },\n\t toString: function() {\n\t return this.__toString('Seq [', ']');\n\t },\n\t __iterate: function(fn, reverse) {\n\t return seqIterate(this, fn, reverse, false);\n\t },\n\t __iterator: function(type, reverse) {\n\t return seqIterator(this, type, reverse, false);\n\t }\n\t}, {of: function() {\n\t return $IndexedSeq(arguments);\n\t }}, Seq);\n\tmixin(IndexedSeq, IndexedIterable.prototype);\n\tvar SetSeq = function SetSeq(value) {\n\t return (value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value).toSetSeq();\n\t};\n\tvar $SetSeq = SetSeq;\n\t($traceurRuntime.createClass)(SetSeq, {toSetSeq: function() {\n\t return this;\n\t }}, {of: function() {\n\t return $SetSeq(arguments);\n\t }}, Seq);\n\tmixin(SetSeq, SetIterable.prototype);\n\tSeq.isSeq = isSeq;\n\tSeq.Keyed = KeyedSeq;\n\tSeq.Set = SetSeq;\n\tSeq.Indexed = IndexedSeq;\n\tvar IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\tSeq.prototype[IS_SEQ_SENTINEL] = true;\n\tvar ArraySeq = function ArraySeq(array) {\n\t this._array = array;\n\t this.size = array.length;\n\t};\n\t($traceurRuntime.createClass)(ArraySeq, {\n\t get: function(index, notSetValue) {\n\t return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n\t },\n\t __iterate: function(fn, reverse) {\n\t var array = this._array;\n\t var maxIndex = array.length - 1;\n\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n\t return ii + 1;\n\t }\n\t }\n\t return ii;\n\t },\n\t __iterator: function(type, reverse) {\n\t var array = this._array;\n\t var maxIndex = array.length - 1;\n\t var ii = 0;\n\t return new Iterator((function() {\n\t return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++]);\n\t }));\n\t }\n\t}, {}, IndexedSeq);\n\tvar ObjectSeq = function ObjectSeq(object) {\n\t var keys = Object.keys(object);\n\t this._object = object;\n\t this._keys = keys;\n\t this.size = keys.length;\n\t};\n\t($traceurRuntime.createClass)(ObjectSeq, {\n\t get: function(key, notSetValue) {\n\t if (notSetValue !== undefined && !this.has(key)) {\n\t return notSetValue;\n\t }\n\t return this._object[key];\n\t },\n\t has: function(key) {\n\t return this._object.hasOwnProperty(key);\n\t },\n\t __iterate: function(fn, reverse) {\n\t var object = this._object;\n\t var keys = this._keys;\n\t var maxIndex = keys.length - 1;\n\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t var key = keys[reverse ? maxIndex - ii : ii];\n\t if (fn(object[key], key, this) === false) {\n\t return ii + 1;\n\t }\n\t }\n\t return ii;\n\t },\n\t __iterator: function(type, reverse) {\n\t var object = this._object;\n\t var keys = this._keys;\n\t var maxIndex = keys.length - 1;\n\t var ii = 0;\n\t return new Iterator((function() {\n\t var key = keys[reverse ? maxIndex - ii : ii];\n\t return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]);\n\t }));\n\t }\n\t}, {}, KeyedSeq);\n\tvar IterableSeq = function IterableSeq(iterable) {\n\t this._iterable = iterable;\n\t this.size = iterable.length || iterable.size;\n\t};\n\t($traceurRuntime.createClass)(IterableSeq, {\n\t __iterateUncached: function(fn, reverse) {\n\t if (reverse) {\n\t return this.cacheResult().__iterate(fn, reverse);\n\t }\n\t var iterable = this._iterable;\n\t var iterator = getIterator(iterable);\n\t var iterations = 0;\n\t if (isIterator(iterator)) {\n\t var step;\n\t while (!(step = iterator.next()).done) {\n\t if (fn(step.value, iterations++, this) === false) {\n\t break;\n\t }\n\t }\n\t }\n\t return iterations;\n\t },\n\t __iteratorUncached: function(type, reverse) {\n\t if (reverse) {\n\t return this.cacheResult().__iterator(type, reverse);\n\t }\n\t var iterable = this._iterable;\n\t var iterator = getIterator(iterable);\n\t if (!isIterator(iterator)) {\n\t return new Iterator(iteratorDone);\n\t }\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t var step = iterator.next();\n\t return step.done ? step : iteratorValue(type, iterations++, step.value);\n\t }));\n\t }\n\t}, {}, IndexedSeq);\n\tvar IteratorSeq = function IteratorSeq(iterator) {\n\t this._iterator = iterator;\n\t this._iteratorCache = [];\n\t};\n\t($traceurRuntime.createClass)(IteratorSeq, {\n\t __iterateUncached: function(fn, reverse) {\n\t if (reverse) {\n\t return this.cacheResult().__iterate(fn, reverse);\n\t }\n\t var iterator = this._iterator;\n\t var cache = this._iteratorCache;\n\t var iterations = 0;\n\t while (iterations < cache.length) {\n\t if (fn(cache[iterations], iterations++, this) === false) {\n\t return iterations;\n\t }\n\t }\n\t var step;\n\t while (!(step = iterator.next()).done) {\n\t var val = step.value;\n\t cache[iterations] = val;\n\t if (fn(val, iterations++, this) === false) {\n\t break;\n\t }\n\t }\n\t return iterations;\n\t },\n\t __iteratorUncached: function(type, reverse) {\n\t if (reverse) {\n\t return this.cacheResult().__iterator(type, reverse);\n\t }\n\t var iterator = this._iterator;\n\t var cache = this._iteratorCache;\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t if (iterations >= cache.length) {\n\t var step = iterator.next();\n\t if (step.done) {\n\t return step;\n\t }\n\t cache[iterations] = step.value;\n\t }\n\t return iteratorValue(type, iterations, cache[iterations++]);\n\t }));\n\t }\n\t}, {}, IndexedSeq);\n\tfunction isSeq(maybeSeq) {\n\t return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n\t}\n\tvar EMPTY_SEQ;\n\tfunction emptySequence() {\n\t return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n\t}\n\tfunction keyedSeqFromValue(value) {\n\t var seq = Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : typeof value === 'object' ? new ObjectSeq(value) : undefined;\n\t if (!seq) {\n\t throw new TypeError('Expected Array or iterable object of [k, v] entries, ' + 'or keyed object: ' + value);\n\t }\n\t return seq;\n\t}\n\tfunction indexedSeqFromValue(value) {\n\t var seq = maybeIndexedSeqFromValue(value);\n\t if (!seq) {\n\t throw new TypeError('Expected Array or iterable object of values: ' + value);\n\t }\n\t return seq;\n\t}\n\tfunction seqFromValue(value) {\n\t var seq = maybeIndexedSeqFromValue(value) || (typeof value === 'object' && new ObjectSeq(value));\n\t if (!seq) {\n\t throw new TypeError('Expected Array or iterable object of values, or keyed object: ' + value);\n\t }\n\t return seq;\n\t}\n\tfunction maybeIndexedSeqFromValue(value) {\n\t return (isArrayLike(value) ? new ArraySeq(value) : isIterator(value) ? new IteratorSeq(value) : hasIterator(value) ? new IterableSeq(value) : undefined);\n\t}\n\tfunction isArrayLike(value) {\n\t return value && typeof value.length === 'number';\n\t}\n\tfunction seqIterate(seq, fn, reverse, useKeys) {\n\t assertNotInfinite(seq.size);\n\t var cache = seq._cache;\n\t if (cache) {\n\t var maxIndex = cache.length - 1;\n\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t var entry = cache[reverse ? maxIndex - ii : ii];\n\t if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n\t return ii + 1;\n\t }\n\t }\n\t return ii;\n\t }\n\t return seq.__iterateUncached(fn, reverse);\n\t}\n\tfunction seqIterator(seq, type, reverse, useKeys) {\n\t var cache = seq._cache;\n\t if (cache) {\n\t var maxIndex = cache.length - 1;\n\t var ii = 0;\n\t return new Iterator((function() {\n\t var entry = cache[reverse ? maxIndex - ii : ii];\n\t return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n\t }));\n\t }\n\t return seq.__iteratorUncached(type, reverse);\n\t}\n\tfunction fromJS(json, converter) {\n\t return converter ? _fromJSWith(converter, json, '', {'': json}) : _fromJSDefault(json);\n\t}\n\tfunction _fromJSWith(converter, json, key, parentJSON) {\n\t if (Array.isArray(json)) {\n\t return converter.call(parentJSON, key, IndexedSeq(json).map((function(v, k) {\n\t return _fromJSWith(converter, v, k, json);\n\t })));\n\t }\n\t if (isPlainObj(json)) {\n\t return converter.call(parentJSON, key, KeyedSeq(json).map((function(v, k) {\n\t return _fromJSWith(converter, v, k, json);\n\t })));\n\t }\n\t return json;\n\t}\n\tfunction _fromJSDefault(json) {\n\t if (Array.isArray(json)) {\n\t return IndexedSeq(json).map(_fromJSDefault).toList();\n\t }\n\t if (isPlainObj(json)) {\n\t return KeyedSeq(json).map(_fromJSDefault).toMap();\n\t }\n\t return json;\n\t}\n\tfunction isPlainObj(value) {\n\t return value && value.constructor === Object;\n\t}\n\tvar Collection = function Collection() {\n\t throw TypeError('Abstract');\n\t};\n\t($traceurRuntime.createClass)(Collection, {}, {}, Iterable);\n\tvar KeyedCollection = function KeyedCollection() {\n\t $traceurRuntime.defaultSuperCall(this, $KeyedCollection.prototype, arguments);\n\t};\n\tvar $KeyedCollection = KeyedCollection;\n\t($traceurRuntime.createClass)(KeyedCollection, {}, {}, Collection);\n\tmixin(KeyedCollection, KeyedIterable.prototype);\n\tvar IndexedCollection = function IndexedCollection() {\n\t $traceurRuntime.defaultSuperCall(this, $IndexedCollection.prototype, arguments);\n\t};\n\tvar $IndexedCollection = IndexedCollection;\n\t($traceurRuntime.createClass)(IndexedCollection, {}, {}, Collection);\n\tmixin(IndexedCollection, IndexedIterable.prototype);\n\tvar SetCollection = function SetCollection() {\n\t $traceurRuntime.defaultSuperCall(this, $SetCollection.prototype, arguments);\n\t};\n\tvar $SetCollection = SetCollection;\n\t($traceurRuntime.createClass)(SetCollection, {}, {}, Collection);\n\tmixin(SetCollection, SetIterable.prototype);\n\tCollection.Keyed = KeyedCollection;\n\tCollection.Indexed = IndexedCollection;\n\tCollection.Set = SetCollection;\n\tvar Map = function Map(value) {\n\t return value === null || value === undefined ? emptyMap() : isMap(value) ? value : emptyMap().merge(KeyedIterable(value));\n\t};\n\t($traceurRuntime.createClass)(Map, {\n\t toString: function() {\n\t return this.__toString('Map {', '}');\n\t },\n\t get: function(k, notSetValue) {\n\t return this._root ? this._root.get(0, hash(k), k, notSetValue) : notSetValue;\n\t },\n\t set: function(k, v) {\n\t return updateMap(this, k, v);\n\t },\n\t setIn: function(keyPath, v) {\n\t invariant(keyPath.length > 0, 'Requires non-empty key path.');\n\t return this.updateIn(keyPath, (function() {\n\t return v;\n\t }));\n\t },\n\t remove: function(k) {\n\t return updateMap(this, k, NOT_SET);\n\t },\n\t removeIn: function(keyPath) {\n\t invariant(keyPath.length > 0, 'Requires non-empty key path.');\n\t return this.updateIn(keyPath, (function() {\n\t return NOT_SET;\n\t }));\n\t },\n\t update: function(k, notSetValue, updater) {\n\t return arguments.length === 1 ? k(this) : this.updateIn([k], notSetValue, updater);\n\t },\n\t updateIn: function(keyPath, notSetValue, updater) {\n\t if (!updater) {\n\t updater = notSetValue;\n\t notSetValue = undefined;\n\t }\n\t return keyPath.length === 0 ? updater(this) : updateInDeepMap(this, keyPath, notSetValue, updater, 0);\n\t },\n\t clear: function() {\n\t if (this.size === 0) {\n\t return this;\n\t }\n\t if (this.__ownerID) {\n\t this.size = 0;\n\t this._root = null;\n\t this.__hash = undefined;\n\t this.__altered = true;\n\t return this;\n\t }\n\t return emptyMap();\n\t },\n\t merge: function() {\n\t return mergeIntoMapWith(this, undefined, arguments);\n\t },\n\t mergeWith: function(merger) {\n\t for (var iters = [],\n\t $__3 = 1; $__3 < arguments.length; $__3++)\n\t iters[$__3 - 1] = arguments[$__3];\n\t return mergeIntoMapWith(this, merger, iters);\n\t },\n\t mergeDeep: function() {\n\t return mergeIntoMapWith(this, deepMerger(undefined), arguments);\n\t },\n\t mergeDeepWith: function(merger) {\n\t for (var iters = [],\n\t $__4 = 1; $__4 < arguments.length; $__4++)\n\t iters[$__4 - 1] = arguments[$__4];\n\t return mergeIntoMapWith(this, deepMerger(merger), iters);\n\t },\n\t withMutations: function(fn) {\n\t var mutable = this.asMutable();\n\t fn(mutable);\n\t return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n\t },\n\t asMutable: function() {\n\t return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n\t },\n\t asImmutable: function() {\n\t return this.__ensureOwner();\n\t },\n\t wasAltered: function() {\n\t return this.__altered;\n\t },\n\t __iterator: function(type, reverse) {\n\t return new MapIterator(this, type, reverse);\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t var iterations = 0;\n\t this._root && this._root.iterate((function(entry) {\n\t iterations++;\n\t return fn(entry[1], entry[0], $__0);\n\t }), reverse);\n\t return iterations;\n\t },\n\t __ensureOwner: function(ownerID) {\n\t if (ownerID === this.__ownerID) {\n\t return this;\n\t }\n\t if (!ownerID) {\n\t this.__ownerID = ownerID;\n\t this.__altered = false;\n\t return this;\n\t }\n\t return makeMap(this.size, this._root, ownerID, this.__hash);\n\t }\n\t}, {}, KeyedCollection);\n\tfunction isMap(maybeMap) {\n\t return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n\t}\n\tMap.isMap = isMap;\n\tvar IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\tvar MapPrototype = Map.prototype;\n\tMapPrototype[IS_MAP_SENTINEL] = true;\n\tMapPrototype[DELETE] = MapPrototype.remove;\n\tvar BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) {\n\t this.ownerID = ownerID;\n\t this.bitmap = bitmap;\n\t this.nodes = nodes;\n\t};\n\tvar $BitmapIndexedNode = BitmapIndexedNode;\n\t($traceurRuntime.createClass)(BitmapIndexedNode, {\n\t get: function(shift, hash, key, notSetValue) {\n\t var bit = (1 << ((shift === 0 ? hash : hash >>> shift) & MASK));\n\t var bitmap = this.bitmap;\n\t return (bitmap & bit) === 0 ? notSetValue : this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, hash, key, notSetValue);\n\t },\n\t update: function(ownerID, shift, hash, key, value, didChangeSize, didAlter) {\n\t var hashFrag = (shift === 0 ? hash : hash >>> shift) & MASK;\n\t var bit = 1 << hashFrag;\n\t var bitmap = this.bitmap;\n\t var exists = (bitmap & bit) !== 0;\n\t if (!exists && value === NOT_SET) {\n\t return this;\n\t }\n\t var idx = popCount(bitmap & (bit - 1));\n\t var nodes = this.nodes;\n\t var node = exists ? nodes[idx] : undefined;\n\t var newNode = updateNode(node, ownerID, shift + SHIFT, hash, key, value, didChangeSize, didAlter);\n\t if (newNode === node) {\n\t return this;\n\t }\n\t if (!exists && newNode && nodes.length >= MAX_BITMAP_SIZE) {\n\t return expandNodes(ownerID, nodes, bitmap, hashFrag, newNode);\n\t }\n\t if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n\t return nodes[idx ^ 1];\n\t }\n\t if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n\t return newNode;\n\t }\n\t var isEditable = ownerID && ownerID === this.ownerID;\n\t var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n\t var newNodes = exists ? newNode ? setIn(nodes, idx, newNode, isEditable) : spliceOut(nodes, idx, isEditable) : spliceIn(nodes, idx, newNode, isEditable);\n\t if (isEditable) {\n\t this.bitmap = newBitmap;\n\t this.nodes = newNodes;\n\t return this;\n\t }\n\t return new $BitmapIndexedNode(ownerID, newBitmap, newNodes);\n\t },\n\t iterate: function(fn, reverse) {\n\t var nodes = this.nodes;\n\t for (var ii = 0,\n\t maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n\t if (nodes[reverse ? maxIndex - ii : ii].iterate(fn, reverse) === false) {\n\t return false;\n\t }\n\t }\n\t }\n\t}, {});\n\tvar ArrayNode = function ArrayNode(ownerID, count, nodes) {\n\t this.ownerID = ownerID;\n\t this.count = count;\n\t this.nodes = nodes;\n\t};\n\tvar $ArrayNode = ArrayNode;\n\t($traceurRuntime.createClass)(ArrayNode, {\n\t get: function(shift, hash, key, notSetValue) {\n\t var idx = (shift === 0 ? hash : hash >>> shift) & MASK;\n\t var node = this.nodes[idx];\n\t return node ? node.get(shift + SHIFT, hash, key, notSetValue) : notSetValue;\n\t },\n\t update: function(ownerID, shift, hash, key, value, didChangeSize, didAlter) {\n\t var idx = (shift === 0 ? hash : hash >>> shift) & MASK;\n\t var removed = value === NOT_SET;\n\t var nodes = this.nodes;\n\t var node = nodes[idx];\n\t if (removed && !node) {\n\t return this;\n\t }\n\t var newNode = updateNode(node, ownerID, shift + SHIFT, hash, key, value, didChangeSize, didAlter);\n\t if (newNode === node) {\n\t return this;\n\t }\n\t var newCount = this.count;\n\t if (!node) {\n\t newCount++;\n\t } else if (!newNode) {\n\t newCount--;\n\t if (newCount < MIN_ARRAY_SIZE) {\n\t return packNodes(ownerID, nodes, newCount, idx);\n\t }\n\t }\n\t var isEditable = ownerID && ownerID === this.ownerID;\n\t var newNodes = setIn(nodes, idx, newNode, isEditable);\n\t if (isEditable) {\n\t this.count = newCount;\n\t this.nodes = newNodes;\n\t return this;\n\t }\n\t return new $ArrayNode(ownerID, newCount, newNodes);\n\t },\n\t iterate: function(fn, reverse) {\n\t var nodes = this.nodes;\n\t for (var ii = 0,\n\t maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n\t var node = nodes[reverse ? maxIndex - ii : ii];\n\t if (node && node.iterate(fn, reverse) === false) {\n\t return false;\n\t }\n\t }\n\t }\n\t}, {});\n\tvar HashCollisionNode = function HashCollisionNode(ownerID, hash, entries) {\n\t this.ownerID = ownerID;\n\t this.hash = hash;\n\t this.entries = entries;\n\t};\n\tvar $HashCollisionNode = HashCollisionNode;\n\t($traceurRuntime.createClass)(HashCollisionNode, {\n\t get: function(shift, hash, key, notSetValue) {\n\t var entries = this.entries;\n\t for (var ii = 0,\n\t len = entries.length; ii < len; ii++) {\n\t if (is(key, entries[ii][0])) {\n\t return entries[ii][1];\n\t }\n\t }\n\t return notSetValue;\n\t },\n\t update: function(ownerID, shift, hash, key, value, didChangeSize, didAlter) {\n\t var removed = value === NOT_SET;\n\t if (hash !== this.hash) {\n\t if (removed) {\n\t return this;\n\t }\n\t SetRef(didAlter);\n\t SetRef(didChangeSize);\n\t return mergeIntoNode(this, ownerID, shift, hash, [key, value]);\n\t }\n\t var entries = this.entries;\n\t var idx = 0;\n\t for (var len = entries.length; idx < len; idx++) {\n\t if (is(key, entries[idx][0])) {\n\t break;\n\t }\n\t }\n\t var exists = idx < len;\n\t if (removed && !exists) {\n\t return this;\n\t }\n\t SetRef(didAlter);\n\t (removed || !exists) && SetRef(didChangeSize);\n\t if (removed && len === 2) {\n\t return new ValueNode(ownerID, this.hash, entries[idx ^ 1]);\n\t }\n\t var isEditable = ownerID && ownerID === this.ownerID;\n\t var newEntries = isEditable ? entries : arrCopy(entries);\n\t if (exists) {\n\t if (removed) {\n\t idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n\t } else {\n\t newEntries[idx] = [key, value];\n\t }\n\t } else {\n\t newEntries.push([key, value]);\n\t }\n\t if (isEditable) {\n\t this.entries = newEntries;\n\t return this;\n\t }\n\t return new $HashCollisionNode(ownerID, this.hash, newEntries);\n\t },\n\t iterate: function(fn, reverse) {\n\t var entries = this.entries;\n\t for (var ii = 0,\n\t maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n\t if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n\t return false;\n\t }\n\t }\n\t }\n\t}, {});\n\tvar ValueNode = function ValueNode(ownerID, hash, entry) {\n\t this.ownerID = ownerID;\n\t this.hash = hash;\n\t this.entry = entry;\n\t};\n\tvar $ValueNode = ValueNode;\n\t($traceurRuntime.createClass)(ValueNode, {\n\t get: function(shift, hash, key, notSetValue) {\n\t return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n\t },\n\t update: function(ownerID, shift, hash, key, value, didChangeSize, didAlter) {\n\t var removed = value === NOT_SET;\n\t var keyMatch = is(key, this.entry[0]);\n\t if (keyMatch ? value === this.entry[1] : removed) {\n\t return this;\n\t }\n\t SetRef(didAlter);\n\t if (removed) {\n\t SetRef(didChangeSize);\n\t return;\n\t }\n\t if (keyMatch) {\n\t if (ownerID && ownerID === this.ownerID) {\n\t this.entry[1] = value;\n\t return this;\n\t }\n\t return new $ValueNode(ownerID, hash, [key, value]);\n\t }\n\t SetRef(didChangeSize);\n\t return mergeIntoNode(this, ownerID, shift, hash, [key, value]);\n\t },\n\t iterate: function(fn) {\n\t return fn(this.entry);\n\t }\n\t}, {});\n\tvar MapIterator = function MapIterator(map, type, reverse) {\n\t this._type = type;\n\t this._reverse = reverse;\n\t this._stack = map._root && mapIteratorFrame(map._root);\n\t};\n\t($traceurRuntime.createClass)(MapIterator, {next: function() {\n\t var type = this._type;\n\t var stack = this._stack;\n\t while (stack) {\n\t var node = stack.node;\n\t var index = stack.index++;\n\t var maxIndex;\n\t if (node.entry) {\n\t if (index === 0) {\n\t return mapIteratorValue(type, node.entry);\n\t }\n\t } else if (node.entries) {\n\t maxIndex = node.entries.length - 1;\n\t if (index <= maxIndex) {\n\t return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n\t }\n\t } else {\n\t maxIndex = node.nodes.length - 1;\n\t if (index <= maxIndex) {\n\t var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n\t if (subNode) {\n\t if (subNode.entry) {\n\t return mapIteratorValue(type, subNode.entry);\n\t }\n\t stack = this._stack = mapIteratorFrame(subNode, stack);\n\t }\n\t continue;\n\t }\n\t }\n\t stack = this._stack = this._stack.__prev;\n\t }\n\t return iteratorDone();\n\t }}, {}, Iterator);\n\tfunction mapIteratorValue(type, entry) {\n\t return iteratorValue(type, entry[0], entry[1]);\n\t}\n\tfunction mapIteratorFrame(node, prev) {\n\t return {\n\t node: node,\n\t index: 0,\n\t __prev: prev\n\t };\n\t}\n\tfunction makeMap(size, root, ownerID, hash) {\n\t var map = Object.create(MapPrototype);\n\t map.size = size;\n\t map._root = root;\n\t map.__ownerID = ownerID;\n\t map.__hash = hash;\n\t map.__altered = false;\n\t return map;\n\t}\n\tvar EMPTY_MAP;\n\tfunction emptyMap() {\n\t return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n\t}\n\tfunction updateMap(map, k, v) {\n\t var didChangeSize = MakeRef(CHANGE_LENGTH);\n\t var didAlter = MakeRef(DID_ALTER);\n\t var newRoot = updateNode(map._root, map.__ownerID, 0, hash(k), k, v, didChangeSize, didAlter);\n\t if (!didAlter.value) {\n\t return map;\n\t }\n\t var newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n\t if (map.__ownerID) {\n\t map.size = newSize;\n\t map._root = newRoot;\n\t map.__hash = undefined;\n\t map.__altered = true;\n\t return map;\n\t }\n\t return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n\t}\n\tfunction updateNode(node, ownerID, shift, hash, key, value, didChangeSize, didAlter) {\n\t if (!node) {\n\t if (value === NOT_SET) {\n\t return node;\n\t }\n\t SetRef(didAlter);\n\t SetRef(didChangeSize);\n\t return new ValueNode(ownerID, hash, [key, value]);\n\t }\n\t return node.update(ownerID, shift, hash, key, value, didChangeSize, didAlter);\n\t}\n\tfunction isLeafNode(node) {\n\t return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n\t}\n\tfunction mergeIntoNode(node, ownerID, shift, hash, entry) {\n\t if (node.hash === hash) {\n\t return new HashCollisionNode(ownerID, hash, [node.entry, entry]);\n\t }\n\t var idx1 = (shift === 0 ? node.hash : node.hash >>> shift) & MASK;\n\t var idx2 = (shift === 0 ? hash : hash >>> shift) & MASK;\n\t var newNode;\n\t var nodes = idx1 === idx2 ? [mergeIntoNode(node, ownerID, shift + SHIFT, hash, entry)] : ((newNode = new ValueNode(ownerID, hash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\t return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n\t}\n\tfunction packNodes(ownerID, nodes, count, excluding) {\n\t var bitmap = 0;\n\t var packedII = 0;\n\t var packedNodes = new Array(count);\n\t for (var ii = 0,\n\t bit = 1,\n\t len = nodes.length; ii < len; ii++, bit <<= 1) {\n\t var node = nodes[ii];\n\t if (node !== undefined && ii !== excluding) {\n\t bitmap |= bit;\n\t packedNodes[packedII++] = node;\n\t }\n\t }\n\t return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n\t}\n\tfunction expandNodes(ownerID, nodes, bitmap, including, node) {\n\t var count = 0;\n\t var expandedNodes = new Array(SIZE);\n\t for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n\t expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n\t }\n\t expandedNodes[including] = node;\n\t return new ArrayNode(ownerID, count + 1, expandedNodes);\n\t}\n\tfunction mergeIntoMapWith(map, merger, iterables) {\n\t var iters = [];\n\t for (var ii = 0; ii < iterables.length; ii++) {\n\t var value = iterables[ii];\n\t var iter = KeyedIterable(value);\n\t if (!isIterable(value)) {\n\t iter = iter.map((function(v) {\n\t return fromJS(v);\n\t }));\n\t }\n\t iters.push(iter);\n\t }\n\t return mergeIntoCollectionWith(map, merger, iters);\n\t}\n\tfunction deepMerger(merger) {\n\t return (function(existing, value) {\n\t return existing && existing.mergeDeepWith && isIterable(value) ? existing.mergeDeepWith(merger, value) : merger ? merger(existing, value) : value;\n\t });\n\t}\n\tfunction mergeIntoCollectionWith(collection, merger, iters) {\n\t if (iters.length === 0) {\n\t return collection;\n\t }\n\t return collection.withMutations((function(collection) {\n\t var mergeIntoMap = merger ? (function(value, key) {\n\t collection.update(key, NOT_SET, (function(existing) {\n\t return existing === NOT_SET ? value : merger(existing, value);\n\t }));\n\t }) : (function(value, key) {\n\t collection.set(key, value);\n\t });\n\t for (var ii = 0; ii < iters.length; ii++) {\n\t iters[ii].forEach(mergeIntoMap);\n\t }\n\t }));\n\t}\n\tfunction updateInDeepMap(collection, keyPath, notSetValue, updater, offset) {\n\t invariant(!collection || collection.set, 'updateIn with invalid keyPath');\n\t var key = keyPath[offset];\n\t var existing = collection ? collection.get(key, NOT_SET) : NOT_SET;\n\t var existingValue = existing === NOT_SET ? undefined : existing;\n\t var value = offset === keyPath.length - 1 ? updater(existing === NOT_SET ? notSetValue : existing) : updateInDeepMap(existingValue, keyPath, notSetValue, updater, offset + 1);\n\t return value === existingValue ? collection : value === NOT_SET ? collection && collection.remove(key) : (collection || emptyMap()).set(key, value);\n\t}\n\tfunction popCount(x) {\n\t x = x - ((x >> 1) & 0x55555555);\n\t x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n\t x = (x + (x >> 4)) & 0x0f0f0f0f;\n\t x = x + (x >> 8);\n\t x = x + (x >> 16);\n\t return x & 0x7f;\n\t}\n\tfunction setIn(array, idx, val, canEdit) {\n\t var newArray = canEdit ? array : arrCopy(array);\n\t newArray[idx] = val;\n\t return newArray;\n\t}\n\tfunction spliceIn(array, idx, val, canEdit) {\n\t var newLen = array.length + 1;\n\t if (canEdit && idx + 1 === newLen) {\n\t array[idx] = val;\n\t return array;\n\t }\n\t var newArray = new Array(newLen);\n\t var after = 0;\n\t for (var ii = 0; ii < newLen; ii++) {\n\t if (ii === idx) {\n\t newArray[ii] = val;\n\t after = -1;\n\t } else {\n\t newArray[ii] = array[ii + after];\n\t }\n\t }\n\t return newArray;\n\t}\n\tfunction spliceOut(array, idx, canEdit) {\n\t var newLen = array.length - 1;\n\t if (canEdit && idx === newLen) {\n\t array.pop();\n\t return array;\n\t }\n\t var newArray = new Array(newLen);\n\t var after = 0;\n\t for (var ii = 0; ii < newLen; ii++) {\n\t if (ii === idx) {\n\t after = 1;\n\t }\n\t newArray[ii] = array[ii + after];\n\t }\n\t return newArray;\n\t}\n\tvar MAX_BITMAP_SIZE = SIZE / 2;\n\tvar MIN_ARRAY_SIZE = SIZE / 4;\n\tvar ToKeyedSequence = function ToKeyedSequence(indexed, useKeys) {\n\t this._iter = indexed;\n\t this._useKeys = useKeys;\n\t this.size = indexed.size;\n\t};\n\t($traceurRuntime.createClass)(ToKeyedSequence, {\n\t get: function(key, notSetValue) {\n\t return this._iter.get(key, notSetValue);\n\t },\n\t has: function(key) {\n\t return this._iter.has(key);\n\t },\n\t valueSeq: function() {\n\t return this._iter.valueSeq();\n\t },\n\t reverse: function() {\n\t var $__0 = this;\n\t var reversedSequence = reverseFactory(this, true);\n\t if (!this._useKeys) {\n\t reversedSequence.valueSeq = (function() {\n\t return $__0._iter.toSeq().reverse();\n\t });\n\t }\n\t return reversedSequence;\n\t },\n\t map: function(mapper, context) {\n\t var $__0 = this;\n\t var mappedSequence = mapFactory(this, mapper, context);\n\t if (!this._useKeys) {\n\t mappedSequence.valueSeq = (function() {\n\t return $__0._iter.toSeq().map(mapper, context);\n\t });\n\t }\n\t return mappedSequence;\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t var ii;\n\t return this._iter.__iterate(this._useKeys ? (function(v, k) {\n\t return fn(v, k, $__0);\n\t }) : ((ii = reverse ? resolveSize(this) : 0), (function(v) {\n\t return fn(v, reverse ? --ii : ii++, $__0);\n\t })), reverse);\n\t },\n\t __iterator: function(type, reverse) {\n\t if (this._useKeys) {\n\t return this._iter.__iterator(type, reverse);\n\t }\n\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t var ii = reverse ? resolveSize(this) : 0;\n\t return new Iterator((function() {\n\t var step = iterator.next();\n\t return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n\t }));\n\t }\n\t}, {}, KeyedSeq);\n\tvar ToIndexedSequence = function ToIndexedSequence(iter) {\n\t this._iter = iter;\n\t this.size = iter.size;\n\t};\n\t($traceurRuntime.createClass)(ToIndexedSequence, {\n\t contains: function(value) {\n\t return this._iter.contains(value);\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t var iterations = 0;\n\t return this._iter.__iterate((function(v) {\n\t return fn(v, iterations++, $__0);\n\t }), reverse);\n\t },\n\t __iterator: function(type, reverse) {\n\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t var step = iterator.next();\n\t return step.done ? step : iteratorValue(type, iterations++, step.value, step);\n\t }));\n\t }\n\t}, {}, IndexedSeq);\n\tvar ToSetSequence = function ToSetSequence(iter) {\n\t this._iter = iter;\n\t this.size = iter.size;\n\t};\n\t($traceurRuntime.createClass)(ToSetSequence, {\n\t has: function(key) {\n\t return this._iter.contains(key);\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t return this._iter.__iterate((function(v) {\n\t return fn(v, v, $__0);\n\t }), reverse);\n\t },\n\t __iterator: function(type, reverse) {\n\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t return new Iterator((function() {\n\t var step = iterator.next();\n\t return step.done ? step : iteratorValue(type, step.value, step.value, step);\n\t }));\n\t }\n\t}, {}, SetSeq);\n\tvar FromEntriesSequence = function FromEntriesSequence(entries) {\n\t this._iter = entries;\n\t this.size = entries.size;\n\t};\n\t($traceurRuntime.createClass)(FromEntriesSequence, {\n\t entrySeq: function() {\n\t return this._iter.toSeq();\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t return this._iter.__iterate((function(entry) {\n\t if (entry) {\n\t validateEntry(entry);\n\t return fn(entry[1], entry[0], $__0);\n\t }\n\t }), reverse);\n\t },\n\t __iterator: function(type, reverse) {\n\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t return new Iterator((function() {\n\t while (true) {\n\t var step = iterator.next();\n\t if (step.done) {\n\t return step;\n\t }\n\t var entry = step.value;\n\t if (entry) {\n\t validateEntry(entry);\n\t return type === ITERATE_ENTRIES ? step : iteratorValue(type, entry[0], entry[1], step);\n\t }\n\t }\n\t }));\n\t }\n\t}, {}, KeyedSeq);\n\tToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough;\n\tfunction flipFactory(iterable) {\n\t var flipSequence = makeSequence(iterable);\n\t flipSequence._iter = iterable;\n\t flipSequence.size = iterable.size;\n\t flipSequence.flip = (function() {\n\t return iterable;\n\t });\n\t flipSequence.reverse = function() {\n\t var reversedSequence = iterable.reverse.apply(this);\n\t reversedSequence.flip = (function() {\n\t return iterable.reverse();\n\t });\n\t return reversedSequence;\n\t };\n\t flipSequence.has = (function(key) {\n\t return iterable.contains(key);\n\t });\n\t flipSequence.contains = (function(key) {\n\t return iterable.has(key);\n\t });\n\t flipSequence.cacheResult = cacheResultThrough;\n\t flipSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t return iterable.__iterate((function(v, k) {\n\t return fn(k, v, $__0) !== false;\n\t }), reverse);\n\t };\n\t flipSequence.__iteratorUncached = function(type, reverse) {\n\t if (type === ITERATE_ENTRIES) {\n\t var iterator = iterable.__iterator(type, reverse);\n\t return new Iterator((function() {\n\t var step = iterator.next();\n\t if (!step.done) {\n\t var k = step.value[0];\n\t step.value[0] = step.value[1];\n\t step.value[1] = k;\n\t }\n\t return step;\n\t }));\n\t }\n\t return iterable.__iterator(type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse);\n\t };\n\t return flipSequence;\n\t}\n\tfunction mapFactory(iterable, mapper, context) {\n\t var mappedSequence = makeSequence(iterable);\n\t mappedSequence.size = iterable.size;\n\t mappedSequence.has = (function(key) {\n\t return iterable.has(key);\n\t });\n\t mappedSequence.get = (function(key, notSetValue) {\n\t var v = iterable.get(key, NOT_SET);\n\t return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable);\n\t });\n\t mappedSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t return iterable.__iterate((function(v, k, c) {\n\t return fn(mapper.call(context, v, k, c), k, $__0) !== false;\n\t }), reverse);\n\t };\n\t mappedSequence.__iteratorUncached = function(type, reverse) {\n\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t return new Iterator((function() {\n\t var step = iterator.next();\n\t if (step.done) {\n\t return step;\n\t }\n\t var entry = step.value;\n\t var key = entry[0];\n\t return iteratorValue(type, key, mapper.call(context, entry[1], key, iterable), step);\n\t }));\n\t };\n\t return mappedSequence;\n\t}\n\tfunction reverseFactory(iterable, useKeys) {\n\t var reversedSequence = makeSequence(iterable);\n\t reversedSequence._iter = iterable;\n\t reversedSequence.size = iterable.size;\n\t reversedSequence.reverse = (function() {\n\t return iterable;\n\t });\n\t if (iterable.flip) {\n\t reversedSequence.flip = function() {\n\t var flipSequence = flipFactory(iterable);\n\t flipSequence.reverse = (function() {\n\t return iterable.flip();\n\t });\n\t return flipSequence;\n\t };\n\t }\n\t reversedSequence.get = (function(key, notSetValue) {\n\t return iterable.get(useKeys ? key : -1 - key, notSetValue);\n\t });\n\t reversedSequence.has = (function(key) {\n\t return iterable.has(useKeys ? key : -1 - key);\n\t });\n\t reversedSequence.contains = (function(value) {\n\t return iterable.contains(value);\n\t });\n\t reversedSequence.cacheResult = cacheResultThrough;\n\t reversedSequence.__iterate = function(fn, reverse) {\n\t var $__0 = this;\n\t return iterable.__iterate((function(v, k) {\n\t return fn(v, k, $__0);\n\t }), !reverse);\n\t };\n\t reversedSequence.__iterator = (function(type, reverse) {\n\t return iterable.__iterator(type, !reverse);\n\t });\n\t return reversedSequence;\n\t}\n\tfunction filterFactory(iterable, predicate, context, useKeys) {\n\t var filterSequence = makeSequence(iterable);\n\t if (useKeys) {\n\t filterSequence.has = (function(key) {\n\t var v = iterable.get(key, NOT_SET);\n\t return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n\t });\n\t filterSequence.get = (function(key, notSetValue) {\n\t var v = iterable.get(key, NOT_SET);\n\t return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue;\n\t });\n\t }\n\t filterSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t var iterations = 0;\n\t iterable.__iterate((function(v, k, c) {\n\t if (predicate.call(context, v, k, c)) {\n\t iterations++;\n\t return fn(v, useKeys ? k : iterations - 1, $__0);\n\t }\n\t }), reverse);\n\t return iterations;\n\t };\n\t filterSequence.__iteratorUncached = function(type, reverse) {\n\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t while (true) {\n\t var step = iterator.next();\n\t if (step.done) {\n\t return step;\n\t }\n\t var entry = step.value;\n\t var key = entry[0];\n\t var value = entry[1];\n\t if (predicate.call(context, value, key, iterable)) {\n\t return iteratorValue(type, useKeys ? key : iterations++, value, step);\n\t }\n\t }\n\t }));\n\t };\n\t return filterSequence;\n\t}\n\tfunction countByFactory(iterable, grouper, context) {\n\t var groups = Map().asMutable();\n\t iterable.__iterate((function(v, k) {\n\t groups.update(grouper.call(context, v, k, iterable), 0, (function(a) {\n\t return a + 1;\n\t }));\n\t }));\n\t return groups.asImmutable();\n\t}\n\tfunction groupByFactory(iterable, grouper, context) {\n\t var isKeyedIter = isKeyed(iterable);\n\t var groups = Map().asMutable();\n\t iterable.__iterate((function(v, k) {\n\t groups.update(grouper.call(context, v, k, iterable), [], (function(a) {\n\t return (a.push(isKeyedIter ? [k, v] : v), a);\n\t }));\n\t }));\n\t var coerce = iterableClass(iterable);\n\t return groups.map((function(arr) {\n\t return reify(iterable, coerce(arr));\n\t }));\n\t}\n\tfunction takeFactory(iterable, amount) {\n\t if (amount > iterable.size) {\n\t return iterable;\n\t }\n\t if (amount < 0) {\n\t amount = 0;\n\t }\n\t var takeSequence = makeSequence(iterable);\n\t takeSequence.size = iterable.size && Math.min(iterable.size, amount);\n\t takeSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t if (amount === 0) {\n\t return 0;\n\t }\n\t if (reverse) {\n\t return this.cacheResult().__iterate(fn, reverse);\n\t }\n\t var iterations = 0;\n\t iterable.__iterate((function(v, k) {\n\t return ++iterations && fn(v, k, $__0) !== false && iterations < amount;\n\t }));\n\t return iterations;\n\t };\n\t takeSequence.__iteratorUncached = function(type, reverse) {\n\t if (reverse) {\n\t return this.cacheResult().__iterator(type, reverse);\n\t }\n\t var iterator = amount && iterable.__iterator(type, reverse);\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t if (iterations++ > amount) {\n\t return iteratorDone();\n\t }\n\t return iterator.next();\n\t }));\n\t };\n\t return takeSequence;\n\t}\n\tfunction takeWhileFactory(iterable, predicate, context) {\n\t var takeSequence = makeSequence(iterable);\n\t takeSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t if (reverse) {\n\t return this.cacheResult().__iterate(fn, reverse);\n\t }\n\t var iterations = 0;\n\t iterable.__iterate((function(v, k, c) {\n\t return predicate.call(context, v, k, c) && ++iterations && fn(v, k, $__0);\n\t }));\n\t return iterations;\n\t };\n\t takeSequence.__iteratorUncached = function(type, reverse) {\n\t var $__0 = this;\n\t if (reverse) {\n\t return this.cacheResult().__iterator(type, reverse);\n\t }\n\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t var iterating = true;\n\t return new Iterator((function() {\n\t if (!iterating) {\n\t return iteratorDone();\n\t }\n\t var step = iterator.next();\n\t if (step.done) {\n\t return step;\n\t }\n\t var entry = step.value;\n\t var k = entry[0];\n\t var v = entry[1];\n\t if (!predicate.call(context, v, k, $__0)) {\n\t iterating = false;\n\t return iteratorDone();\n\t }\n\t return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n\t }));\n\t };\n\t return takeSequence;\n\t}\n\tfunction skipFactory(iterable, amount, useKeys) {\n\t if (amount <= 0) {\n\t return iterable;\n\t }\n\t var skipSequence = makeSequence(iterable);\n\t skipSequence.size = iterable.size && Math.max(0, iterable.size - amount);\n\t skipSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t if (reverse) {\n\t return this.cacheResult().__iterate(fn, reverse);\n\t }\n\t var skipped = 0;\n\t var isSkipping = true;\n\t var iterations = 0;\n\t iterable.__iterate((function(v, k) {\n\t if (!(isSkipping && (isSkipping = skipped++ < amount))) {\n\t iterations++;\n\t return fn(v, useKeys ? k : iterations - 1, $__0);\n\t }\n\t }));\n\t return iterations;\n\t };\n\t skipSequence.__iteratorUncached = function(type, reverse) {\n\t if (reverse) {\n\t return this.cacheResult().__iterator(type, reverse);\n\t }\n\t var iterator = amount && iterable.__iterator(type, reverse);\n\t var skipped = 0;\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t while (skipped < amount) {\n\t skipped++;\n\t iterator.next();\n\t }\n\t var step = iterator.next();\n\t if (useKeys || type === ITERATE_VALUES) {\n\t return step;\n\t } else if (type === ITERATE_KEYS) {\n\t return iteratorValue(type, iterations++, undefined, step);\n\t } else {\n\t return iteratorValue(type, iterations++, step.value[1], step);\n\t }\n\t }));\n\t };\n\t return skipSequence;\n\t}\n\tfunction skipWhileFactory(iterable, predicate, context, useKeys) {\n\t var skipSequence = makeSequence(iterable);\n\t skipSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t if (reverse) {\n\t return this.cacheResult().__iterate(fn, reverse);\n\t }\n\t var isSkipping = true;\n\t var iterations = 0;\n\t iterable.__iterate((function(v, k, c) {\n\t if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n\t iterations++;\n\t return fn(v, useKeys ? k : iterations - 1, $__0);\n\t }\n\t }));\n\t return iterations;\n\t };\n\t skipSequence.__iteratorUncached = function(type, reverse) {\n\t var $__0 = this;\n\t if (reverse) {\n\t return this.cacheResult().__iterator(type, reverse);\n\t }\n\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t var skipping = true;\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t var step,\n\t k,\n\t v;\n\t do {\n\t step = iterator.next();\n\t if (step.done) {\n\t if (useKeys || type === ITERATE_VALUES) {\n\t return step;\n\t } else if (type === ITERATE_KEYS) {\n\t return iteratorValue(type, iterations++, undefined, step);\n\t } else {\n\t return iteratorValue(type, iterations++, step.value[1], step);\n\t }\n\t }\n\t var entry = step.value;\n\t k = entry[0];\n\t v = entry[1];\n\t skipping && (skipping = predicate.call(context, v, k, $__0));\n\t } while (skipping);\n\t return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n\t }));\n\t };\n\t return skipSequence;\n\t}\n\tfunction concatFactory(iterable, values) {\n\t var isKeyedIterable = isKeyed(iterable);\n\t var iters = new ArraySeq([iterable].concat(values)).map((function(v) {\n\t if (!isIterable(v)) {\n\t v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n\t } else if (isKeyedIterable) {\n\t v = KeyedIterable(v);\n\t }\n\t return v;\n\t }));\n\t if (isKeyedIterable) {\n\t iters = iters.toKeyedSeq();\n\t } else if (!isIndexed(iterable)) {\n\t iters = iters.toSetSeq();\n\t }\n\t var flat = iters.flatten(true);\n\t flat.size = iters.reduce((function(sum, seq) {\n\t if (sum !== undefined) {\n\t var size = seq.size;\n\t if (size !== undefined) {\n\t return sum + size;\n\t }\n\t }\n\t }), 0);\n\t return flat;\n\t}\n\tfunction flattenFactory(iterable, depth, useKeys) {\n\t var flatSequence = makeSequence(iterable);\n\t flatSequence.__iterateUncached = function(fn, reverse) {\n\t var iterations = 0;\n\t var stopped = false;\n\t function flatDeep(iter, currentDepth) {\n\t var $__0 = this;\n\t iter.__iterate((function(v, k) {\n\t if ((!depth || currentDepth < depth) && isIterable(v)) {\n\t flatDeep(v, currentDepth + 1);\n\t } else if (fn(v, useKeys ? k : iterations++, $__0) === false) {\n\t stopped = true;\n\t }\n\t return !stopped;\n\t }), reverse);\n\t }\n\t flatDeep(iterable, 0);\n\t return iterations;\n\t };\n\t flatSequence.__iteratorUncached = function(type, reverse) {\n\t var iterator = iterable.__iterator(type, reverse);\n\t var stack = [];\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t while (iterator) {\n\t var step = iterator.next();\n\t if (step.done !== false) {\n\t iterator = stack.pop();\n\t continue;\n\t }\n\t var v = step.value;\n\t if (type === ITERATE_ENTRIES) {\n\t v = v[1];\n\t }\n\t if ((!depth || stack.length < depth) && isIterable(v)) {\n\t stack.push(iterator);\n\t iterator = v.__iterator(type, reverse);\n\t } else {\n\t return useKeys ? step : iteratorValue(type, iterations++, v, step);\n\t }\n\t }\n\t return iteratorDone();\n\t }));\n\t };\n\t return flatSequence;\n\t}\n\tfunction flatMapFactory(iterable, mapper, context) {\n\t var coerce = iterableClass(iterable);\n\t return iterable.toSeq().map((function(v, k) {\n\t return coerce(mapper.call(context, v, k, iterable));\n\t })).flatten(true);\n\t}\n\tfunction interposeFactory(iterable, separator) {\n\t var interposedSequence = makeSequence(iterable);\n\t interposedSequence.size = iterable.size && iterable.size * 2 - 1;\n\t interposedSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t var iterations = 0;\n\t iterable.__iterate((function(v, k) {\n\t return (!iterations || fn(separator, iterations++, $__0) !== false) && fn(v, iterations++, $__0) !== false;\n\t }), reverse);\n\t return iterations;\n\t };\n\t interposedSequence.__iteratorUncached = function(type, reverse) {\n\t var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n\t var iterations = 0;\n\t var step;\n\t return new Iterator((function() {\n\t if (!step || iterations % 2) {\n\t step = iterator.next();\n\t if (step.done) {\n\t return step;\n\t }\n\t }\n\t return iterations % 2 ? iteratorValue(type, iterations++, separator) : iteratorValue(type, iterations++, step.value, step);\n\t }));\n\t };\n\t return interposedSequence;\n\t}\n\tfunction reify(iter, seq) {\n\t return isSeq(iter) ? seq : iter.constructor(seq);\n\t}\n\tfunction validateEntry(entry) {\n\t if (entry !== Object(entry)) {\n\t throw new TypeError('Expected [K, V] tuple: ' + entry);\n\t }\n\t}\n\tfunction resolveSize(iter) {\n\t assertNotInfinite(iter.size);\n\t return ensureSize(iter);\n\t}\n\tfunction iterableClass(iterable) {\n\t return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable;\n\t}\n\tfunction makeSequence(iterable) {\n\t return Object.create((isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq).prototype);\n\t}\n\tfunction cacheResultThrough() {\n\t if (this._iter.cacheResult) {\n\t this._iter.cacheResult();\n\t this.size = this._iter.size;\n\t return this;\n\t } else {\n\t return Seq.prototype.cacheResult.call(this);\n\t }\n\t}\n\tvar List = function List(value) {\n\t var empty = emptyList();\n\t if (value === null || value === undefined) {\n\t return empty;\n\t }\n\t if (isList(value)) {\n\t return value;\n\t }\n\t value = IndexedIterable(value);\n\t var size = value.size;\n\t if (size === 0) {\n\t return empty;\n\t }\n\t if (size > 0 && size < SIZE) {\n\t return makeList(0, size, SHIFT, null, new VNode(value.toArray()));\n\t }\n\t return empty.merge(value);\n\t};\n\t($traceurRuntime.createClass)(List, {\n\t toString: function() {\n\t return this.__toString('List [', ']');\n\t },\n\t get: function(index, notSetValue) {\n\t index = wrapIndex(this, index);\n\t if (index < 0 || index >= this.size) {\n\t return notSetValue;\n\t }\n\t index += this._origin;\n\t var node = listNodeFor(this, index);\n\t return node && node.array[index & MASK];\n\t },\n\t set: function(index, value) {\n\t return updateList(this, index, value);\n\t },\n\t remove: function(index) {\n\t return !this.has(index) ? this : index === 0 ? this.shift() : index === this.size - 1 ? this.pop() : this.splice(index, 1);\n\t },\n\t clear: function() {\n\t if (this.size === 0) {\n\t return this;\n\t }\n\t if (this.__ownerID) {\n\t this.size = this._origin = this._capacity = 0;\n\t this._level = SHIFT;\n\t this._root = this._tail = null;\n\t this.__hash = undefined;\n\t this.__altered = true;\n\t return this;\n\t }\n\t return emptyList();\n\t },\n\t push: function() {\n\t var values = arguments;\n\t var oldSize = this.size;\n\t return this.withMutations((function(list) {\n\t setListBounds(list, 0, oldSize + values.length);\n\t for (var ii = 0; ii < values.length; ii++) {\n\t list.set(oldSize + ii, values[ii]);\n\t }\n\t }));\n\t },\n\t pop: function() {\n\t return setListBounds(this, 0, -1);\n\t },\n\t unshift: function() {\n\t var values = arguments;\n\t return this.withMutations((function(list) {\n\t setListBounds(list, -values.length);\n\t for (var ii = 0; ii < values.length; ii++) {\n\t list.set(ii, values[ii]);\n\t }\n\t }));\n\t },\n\t shift: function() {\n\t return setListBounds(this, 1);\n\t },\n\t merge: function() {\n\t return mergeIntoListWith(this, undefined, arguments);\n\t },\n\t mergeWith: function(merger) {\n\t for (var iters = [],\n\t $__5 = 1; $__5 < arguments.length; $__5++)\n\t iters[$__5 - 1] = arguments[$__5];\n\t return mergeIntoListWith(this, merger, iters);\n\t },\n\t mergeDeep: function() {\n\t return mergeIntoListWith(this, deepMerger(undefined), arguments);\n\t },\n\t mergeDeepWith: function(merger) {\n\t for (var iters = [],\n\t $__6 = 1; $__6 < arguments.length; $__6++)\n\t iters[$__6 - 1] = arguments[$__6];\n\t return mergeIntoListWith(this, deepMerger(merger), iters);\n\t },\n\t setSize: function(size) {\n\t return setListBounds(this, 0, size);\n\t },\n\t slice: function(begin, end) {\n\t var size = this.size;\n\t if (wholeSlice(begin, end, size)) {\n\t return this;\n\t }\n\t return setListBounds(this, resolveBegin(begin, size), resolveEnd(end, size));\n\t },\n\t __iterator: function(type, reverse) {\n\t return new ListIterator(this, type, reverse);\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t var iterations = 0;\n\t var eachFn = (function(v) {\n\t return fn(v, iterations++, $__0);\n\t });\n\t var tailOffset = getTailOffset(this._capacity);\n\t if (reverse) {\n\t iterateVNode(this._tail, 0, tailOffset - this._origin, this._capacity - this._origin, eachFn, reverse) && iterateVNode(this._root, this._level, -this._origin, tailOffset - this._origin, eachFn, reverse);\n\t } else {\n\t iterateVNode(this._root, this._level, -this._origin, tailOffset - this._origin, eachFn, reverse) && iterateVNode(this._tail, 0, tailOffset - this._origin, this._capacity - this._origin, eachFn, reverse);\n\t }\n\t return iterations;\n\t },\n\t __ensureOwner: function(ownerID) {\n\t if (ownerID === this.__ownerID) {\n\t return this;\n\t }\n\t if (!ownerID) {\n\t this.__ownerID = ownerID;\n\t return this;\n\t }\n\t return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n\t }\n\t}, {of: function() {\n\t return this(arguments);\n\t }}, IndexedCollection);\n\tfunction isList(maybeList) {\n\t return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n\t}\n\tList.isList = isList;\n\tvar IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\tvar ListPrototype = List.prototype;\n\tListPrototype[IS_LIST_SENTINEL] = true;\n\tListPrototype[DELETE] = ListPrototype.remove;\n\tListPrototype.setIn = MapPrototype.setIn;\n\tListPrototype.removeIn = MapPrototype.removeIn;\n\tListPrototype.update = MapPrototype.update;\n\tListPrototype.updateIn = MapPrototype.updateIn;\n\tListPrototype.withMutations = MapPrototype.withMutations;\n\tListPrototype.asMutable = MapPrototype.asMutable;\n\tListPrototype.asImmutable = MapPrototype.asImmutable;\n\tListPrototype.wasAltered = MapPrototype.wasAltered;\n\tvar VNode = function VNode(array, ownerID) {\n\t this.array = array;\n\t this.ownerID = ownerID;\n\t};\n\tvar $VNode = VNode;\n\t($traceurRuntime.createClass)(VNode, {\n\t removeBefore: function(ownerID, level, index) {\n\t if (index === level ? 1 << level : 0 || this.array.length === 0) {\n\t return this;\n\t }\n\t var originIndex = (index >>> level) & MASK;\n\t if (originIndex >= this.array.length) {\n\t return new $VNode([], ownerID);\n\t }\n\t var removingFirst = originIndex === 0;\n\t var newChild;\n\t if (level > 0) {\n\t var oldChild = this.array[originIndex];\n\t newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n\t if (newChild === oldChild && removingFirst) {\n\t return this;\n\t }\n\t }\n\t if (removingFirst && !newChild) {\n\t return this;\n\t }\n\t var editable = editableVNode(this, ownerID);\n\t if (!removingFirst) {\n\t for (var ii = 0; ii < originIndex; ii++) {\n\t editable.array[ii] = undefined;\n\t }\n\t }\n\t if (newChild) {\n\t editable.array[originIndex] = newChild;\n\t }\n\t return editable;\n\t },\n\t removeAfter: function(ownerID, level, index) {\n\t if (index === level ? 1 << level : 0 || this.array.length === 0) {\n\t return this;\n\t }\n\t var sizeIndex = ((index - 1) >>> level) & MASK;\n\t if (sizeIndex >= this.array.length) {\n\t return this;\n\t }\n\t var removingLast = sizeIndex === this.array.length - 1;\n\t var newChild;\n\t if (level > 0) {\n\t var oldChild = this.array[sizeIndex];\n\t newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n\t if (newChild === oldChild && removingLast) {\n\t return this;\n\t }\n\t }\n\t if (removingLast && !newChild) {\n\t return this;\n\t }\n\t var editable = editableVNode(this, ownerID);\n\t if (!removingLast) {\n\t editable.array.pop();\n\t }\n\t if (newChild) {\n\t editable.array[sizeIndex] = newChild;\n\t }\n\t return editable;\n\t }\n\t}, {});\n\tfunction iterateVNode(node, level, offset, max, fn, reverse) {\n\t var ii;\n\t var array = node && node.array;\n\t if (level === 0) {\n\t var from = offset < 0 ? -offset : 0;\n\t var to = max - offset;\n\t if (to > SIZE) {\n\t to = SIZE;\n\t }\n\t for (ii = from; ii < to; ii++) {\n\t if (fn(array && array[reverse ? from + to - 1 - ii : ii]) === false) {\n\t return false;\n\t }\n\t }\n\t } else {\n\t var step = 1 << level;\n\t var newLevel = level - SHIFT;\n\t for (ii = 0; ii <= MASK; ii++) {\n\t var levelIndex = reverse ? MASK - ii : ii;\n\t var newOffset = offset + (levelIndex << level);\n\t if (newOffset < max && newOffset + step > 0) {\n\t var nextNode = array && array[levelIndex];\n\t if (!iterateVNode(nextNode, newLevel, newOffset, max, fn, reverse)) {\n\t return false;\n\t }\n\t }\n\t }\n\t }\n\t return true;\n\t}\n\tvar ListIterator = function ListIterator(list, type, reverse) {\n\t this._type = type;\n\t this._reverse = !!reverse;\n\t this._maxIndex = list.size - 1;\n\t var tailOffset = getTailOffset(list._capacity);\n\t var rootStack = listIteratorFrame(list._root && list._root.array, list._level, -list._origin, tailOffset - list._origin - 1);\n\t var tailStack = listIteratorFrame(list._tail && list._tail.array, 0, tailOffset - list._origin, list._capacity - list._origin - 1);\n\t this._stack = reverse ? tailStack : rootStack;\n\t this._stack.__prev = reverse ? rootStack : tailStack;\n\t};\n\t($traceurRuntime.createClass)(ListIterator, {next: function() {\n\t var stack = this._stack;\n\t while (stack) {\n\t var array = stack.array;\n\t var rawIndex = stack.index++;\n\t if (this._reverse) {\n\t rawIndex = MASK - rawIndex;\n\t if (rawIndex > stack.rawMax) {\n\t rawIndex = stack.rawMax;\n\t stack.index = SIZE - rawIndex;\n\t }\n\t }\n\t if (rawIndex >= 0 && rawIndex < SIZE && rawIndex <= stack.rawMax) {\n\t var value = array && array[rawIndex];\n\t if (stack.level === 0) {\n\t var type = this._type;\n\t var index;\n\t if (type !== 1) {\n\t index = stack.offset + (rawIndex << stack.level);\n\t if (this._reverse) {\n\t index = this._maxIndex - index;\n\t }\n\t }\n\t return iteratorValue(type, index, value);\n\t } else {\n\t this._stack = stack = listIteratorFrame(value && value.array, stack.level - SHIFT, stack.offset + (rawIndex << stack.level), stack.max, stack);\n\t }\n\t continue;\n\t }\n\t stack = this._stack = this._stack.__prev;\n\t }\n\t return iteratorDone();\n\t }}, {}, Iterator);\n\tfunction listIteratorFrame(array, level, offset, max, prevFrame) {\n\t return {\n\t array: array,\n\t level: level,\n\t offset: offset,\n\t max: max,\n\t rawMax: ((max - offset) >> level),\n\t index: 0,\n\t __prev: prevFrame\n\t };\n\t}\n\tfunction makeList(origin, capacity, level, root, tail, ownerID, hash) {\n\t var list = Object.create(ListPrototype);\n\t list.size = capacity - origin;\n\t list._origin = origin;\n\t list._capacity = capacity;\n\t list._level = level;\n\t list._root = root;\n\t list._tail = tail;\n\t list.__ownerID = ownerID;\n\t list.__hash = hash;\n\t list.__altered = false;\n\t return list;\n\t}\n\tvar EMPTY_LIST;\n\tfunction emptyList() {\n\t return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n\t}\n\tfunction updateList(list, index, value) {\n\t index = wrapIndex(list, index);\n\t if (index >= list.size || index < 0) {\n\t return list.withMutations((function(list) {\n\t index < 0 ? setListBounds(list, index).set(0, value) : setListBounds(list, 0, index + 1).set(index, value);\n\t }));\n\t }\n\t index += list._origin;\n\t var newTail = list._tail;\n\t var newRoot = list._root;\n\t var didAlter = MakeRef(DID_ALTER);\n\t if (index >= getTailOffset(list._capacity)) {\n\t newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n\t } else {\n\t newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n\t }\n\t if (!didAlter.value) {\n\t return list;\n\t }\n\t if (list.__ownerID) {\n\t list._root = newRoot;\n\t list._tail = newTail;\n\t list.__hash = undefined;\n\t list.__altered = true;\n\t return list;\n\t }\n\t return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n\t}\n\tfunction updateVNode(node, ownerID, level, index, value, didAlter) {\n\t var idx = (index >>> level) & MASK;\n\t var nodeHas = node && idx < node.array.length;\n\t if (!nodeHas && value === undefined) {\n\t return node;\n\t }\n\t var newNode;\n\t if (level > 0) {\n\t var lowerNode = node && node.array[idx];\n\t var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n\t if (newLowerNode === lowerNode) {\n\t return node;\n\t }\n\t newNode = editableVNode(node, ownerID);\n\t newNode.array[idx] = newLowerNode;\n\t return newNode;\n\t }\n\t if (nodeHas && node.array[idx] === value) {\n\t return node;\n\t }\n\t SetRef(didAlter);\n\t newNode = editableVNode(node, ownerID);\n\t if (value === undefined && idx === newNode.array.length - 1) {\n\t newNode.array.pop();\n\t } else {\n\t newNode.array[idx] = value;\n\t }\n\t return newNode;\n\t}\n\tfunction editableVNode(node, ownerID) {\n\t if (ownerID && node && ownerID === node.ownerID) {\n\t return node;\n\t }\n\t return new VNode(node ? node.array.slice() : [], ownerID);\n\t}\n\tfunction listNodeFor(list, rawIndex) {\n\t if (rawIndex >= getTailOffset(list._capacity)) {\n\t return list._tail;\n\t }\n\t if (rawIndex < 1 << (list._level + SHIFT)) {\n\t var node = list._root;\n\t var level = list._level;\n\t while (node && level > 0) {\n\t node = node.array[(rawIndex >>> level) & MASK];\n\t level -= SHIFT;\n\t }\n\t return node;\n\t }\n\t}\n\tfunction setListBounds(list, begin, end) {\n\t var owner = list.__ownerID || new OwnerID();\n\t var oldOrigin = list._origin;\n\t var oldCapacity = list._capacity;\n\t var newOrigin = oldOrigin + begin;\n\t var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n\t if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n\t return list;\n\t }\n\t if (newOrigin >= newCapacity) {\n\t return list.clear();\n\t }\n\t var newLevel = list._level;\n\t var newRoot = list._root;\n\t var offsetShift = 0;\n\t while (newOrigin + offsetShift < 0) {\n\t newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n\t newLevel += SHIFT;\n\t offsetShift += 1 << newLevel;\n\t }\n\t if (offsetShift) {\n\t newOrigin += offsetShift;\n\t oldOrigin += offsetShift;\n\t newCapacity += offsetShift;\n\t oldCapacity += offsetShift;\n\t }\n\t var oldTailOffset = getTailOffset(oldCapacity);\n\t var newTailOffset = getTailOffset(newCapacity);\n\t while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n\t newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n\t newLevel += SHIFT;\n\t }\n\t var oldTail = list._tail;\n\t var newTail = newTailOffset < oldTailOffset ? listNodeFor(list, newCapacity - 1) : newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\t if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n\t newRoot = editableVNode(newRoot, owner);\n\t var node = newRoot;\n\t for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n\t var idx = (oldTailOffset >>> level) & MASK;\n\t node = node.array[idx] = editableVNode(node.array[idx], owner);\n\t }\n\t node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n\t }\n\t if (newCapacity < oldCapacity) {\n\t newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n\t }\n\t if (newOrigin >= newTailOffset) {\n\t newOrigin -= newTailOffset;\n\t newCapacity -= newTailOffset;\n\t newLevel = SHIFT;\n\t newRoot = null;\n\t newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\t } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n\t offsetShift = 0;\n\t while (newRoot) {\n\t var beginIndex = (newOrigin >>> newLevel) & MASK;\n\t if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n\t break;\n\t }\n\t if (beginIndex) {\n\t offsetShift += (1 << newLevel) * beginIndex;\n\t }\n\t newLevel -= SHIFT;\n\t newRoot = newRoot.array[beginIndex];\n\t }\n\t if (newRoot && newOrigin > oldOrigin) {\n\t newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n\t }\n\t if (newRoot && newTailOffset < oldTailOffset) {\n\t newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n\t }\n\t if (offsetShift) {\n\t newOrigin -= offsetShift;\n\t newCapacity -= offsetShift;\n\t }\n\t }\n\t if (list.__ownerID) {\n\t list.size = newCapacity - newOrigin;\n\t list._origin = newOrigin;\n\t list._capacity = newCapacity;\n\t list._level = newLevel;\n\t list._root = newRoot;\n\t list._tail = newTail;\n\t list.__hash = undefined;\n\t list.__altered = true;\n\t return list;\n\t }\n\t return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n\t}\n\tfunction mergeIntoListWith(list, merger, iterables) {\n\t var iters = [];\n\t var maxSize = 0;\n\t for (var ii = 0; ii < iterables.length; ii++) {\n\t var value = iterables[ii];\n\t var iter = IndexedIterable(value);\n\t if (iter.size > maxSize) {\n\t maxSize = iter.size;\n\t }\n\t if (!isIterable(value)) {\n\t iter = iter.map((function(v) {\n\t return fromJS(v);\n\t }));\n\t }\n\t iters.push(iter);\n\t }\n\t if (maxSize > list.size) {\n\t list = list.setSize(maxSize);\n\t }\n\t return mergeIntoCollectionWith(list, merger, iters);\n\t}\n\tfunction getTailOffset(size) {\n\t return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n\t}\n\tvar Stack = function Stack(value) {\n\t return value === null || value === undefined ? emptyStack() : isStack(value) ? value : emptyStack().unshiftAll(value);\n\t};\n\tvar $Stack = Stack;\n\t($traceurRuntime.createClass)(Stack, {\n\t toString: function() {\n\t return this.__toString('Stack [', ']');\n\t },\n\t get: function(index, notSetValue) {\n\t var head = this._head;\n\t while (head && index--) {\n\t head = head.next;\n\t }\n\t return head ? head.value : notSetValue;\n\t },\n\t peek: function() {\n\t return this._head && this._head.value;\n\t },\n\t push: function() {\n\t if (arguments.length === 0) {\n\t return this;\n\t }\n\t var newSize = this.size + arguments.length;\n\t var head = this._head;\n\t for (var ii = arguments.length - 1; ii >= 0; ii--) {\n\t head = {\n\t value: arguments[ii],\n\t next: head\n\t };\n\t }\n\t if (this.__ownerID) {\n\t this.size = newSize;\n\t this._head = head;\n\t this.__hash = undefined;\n\t this.__altered = true;\n\t return this;\n\t }\n\t return makeStack(newSize, head);\n\t },\n\t pushAll: function(iter) {\n\t iter = IndexedIterable(iter);\n\t if (iter.size === 0) {\n\t return this;\n\t }\n\t var newSize = this.size;\n\t var head = this._head;\n\t iter.reverse().forEach((function(value) {\n\t newSize++;\n\t head = {\n\t value: value,\n\t next: head\n\t };\n\t }));\n\t if (this.__ownerID) {\n\t this.size = newSize;\n\t this._head = head;\n\t this.__hash = undefined;\n\t this.__altered = true;\n\t return this;\n\t }\n\t return makeStack(newSize, head);\n\t },\n\t pop: function() {\n\t return this.slice(1);\n\t },\n\t unshift: function() {\n\t return this.push.apply(this, arguments);\n\t },\n\t unshiftAll: function(iter) {\n\t return this.pushAll(iter);\n\t },\n\t shift: function() {\n\t return this.pop.apply(this, arguments);\n\t },\n\t clear: function() {\n\t if (this.size === 0) {\n\t return this;\n\t }\n\t if (this.__ownerID) {\n\t this.size = 0;\n\t this._head = undefined;\n\t this.__hash = undefined;\n\t this.__altered = true;\n\t return this;\n\t }\n\t return emptyStack();\n\t },\n\t slice: function(begin, end) {\n\t if (wholeSlice(begin, end, this.size)) {\n\t return this;\n\t }\n\t var resolvedBegin = resolveBegin(begin, this.size);\n\t var resolvedEnd = resolveEnd(end, this.size);\n\t if (resolvedEnd !== this.size) {\n\t return $traceurRuntime.superCall(this, $Stack.prototype, \"slice\", [begin, end]);\n\t }\n\t var newSize = this.size - resolvedBegin;\n\t var head = this._head;\n\t while (resolvedBegin--) {\n\t head = head.next;\n\t }\n\t if (this.__ownerID) {\n\t this.size = newSize;\n\t this._head = head;\n\t this.__hash = undefined;\n\t this.__altered = true;\n\t return this;\n\t }\n\t return makeStack(newSize, head);\n\t },\n\t __ensureOwner: function(ownerID) {\n\t if (ownerID === this.__ownerID) {\n\t return this;\n\t }\n\t if (!ownerID) {\n\t this.__ownerID = ownerID;\n\t this.__altered = false;\n\t return this;\n\t }\n\t return makeStack(this.size, this._head, ownerID, this.__hash);\n\t },\n\t __iterate: function(fn, reverse) {\n\t if (reverse) {\n\t return this.toSeq().cacheResult.__iterate(fn, reverse);\n\t }\n\t var iterations = 0;\n\t var node = this._head;\n\t while (node) {\n\t if (fn(node.value, iterations++, this) === false) {\n\t break;\n\t }\n\t node = node.next;\n\t }\n\t return iterations;\n\t },\n\t __iterator: function(type, reverse) {\n\t if (reverse) {\n\t return this.toSeq().cacheResult().__iterator(type, reverse);\n\t }\n\t var iterations = 0;\n\t var node = this._head;\n\t return new Iterator((function() {\n\t if (node) {\n\t var value = node.value;\n\t node = node.next;\n\t return iteratorValue(type, iterations++, value);\n\t }\n\t return iteratorDone();\n\t }));\n\t }\n\t}, {of: function() {\n\t return this(arguments);\n\t }}, IndexedCollection);\n\tfunction isStack(maybeStack) {\n\t return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n\t}\n\tStack.isStack = isStack;\n\tvar IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\tvar StackPrototype = Stack.prototype;\n\tStackPrototype[IS_STACK_SENTINEL] = true;\n\tStackPrototype.withMutations = MapPrototype.withMutations;\n\tStackPrototype.asMutable = MapPrototype.asMutable;\n\tStackPrototype.asImmutable = MapPrototype.asImmutable;\n\tStackPrototype.wasAltered = MapPrototype.wasAltered;\n\tfunction makeStack(size, head, ownerID, hash) {\n\t var map = Object.create(StackPrototype);\n\t map.size = size;\n\t map._head = head;\n\t map.__ownerID = ownerID;\n\t map.__hash = hash;\n\t map.__altered = false;\n\t return map;\n\t}\n\tvar EMPTY_STACK;\n\tfunction emptyStack() {\n\t return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n\t}\n\tvar Set = function Set(value) {\n\t return value === null || value === undefined ? emptySet() : isSet(value) ? value : emptySet().union(value);\n\t};\n\t($traceurRuntime.createClass)(Set, {\n\t toString: function() {\n\t return this.__toString('Set {', '}');\n\t },\n\t has: function(value) {\n\t return this._map.has(value);\n\t },\n\t add: function(value) {\n\t var newMap = this._map.set(value, true);\n\t if (this.__ownerID) {\n\t this.size = newMap.size;\n\t this._map = newMap;\n\t return this;\n\t }\n\t return newMap === this._map ? this : makeSet(newMap);\n\t },\n\t remove: function(value) {\n\t var newMap = this._map.remove(value);\n\t if (this.__ownerID) {\n\t this.size = newMap.size;\n\t this._map = newMap;\n\t return this;\n\t }\n\t return newMap === this._map ? this : newMap.size === 0 ? emptySet() : makeSet(newMap);\n\t },\n\t clear: function() {\n\t if (this.size === 0) {\n\t return this;\n\t }\n\t if (this.__ownerID) {\n\t this.size = 0;\n\t this._map.clear();\n\t return this;\n\t }\n\t return emptySet();\n\t },\n\t union: function() {\n\t var iters = arguments;\n\t if (iters.length === 0) {\n\t return this;\n\t }\n\t return this.withMutations((function(set) {\n\t for (var ii = 0; ii < iters.length; ii++) {\n\t SetIterable(iters[ii]).forEach((function(value) {\n\t return set.add(value);\n\t }));\n\t }\n\t }));\n\t },\n\t intersect: function() {\n\t for (var iters = [],\n\t $__7 = 0; $__7 < arguments.length; $__7++)\n\t iters[$__7] = arguments[$__7];\n\t if (iters.length === 0) {\n\t return this;\n\t }\n\t iters = iters.map((function(iter) {\n\t return SetIterable(iter);\n\t }));\n\t var originalSet = this;\n\t return this.withMutations((function(set) {\n\t originalSet.forEach((function(value) {\n\t if (!iters.every((function(iter) {\n\t return iter.contains(value);\n\t }))) {\n\t set.remove(value);\n\t }\n\t }));\n\t }));\n\t },\n\t subtract: function() {\n\t for (var iters = [],\n\t $__8 = 0; $__8 < arguments.length; $__8++)\n\t iters[$__8] = arguments[$__8];\n\t if (iters.length === 0) {\n\t return this;\n\t }\n\t iters = iters.map((function(iter) {\n\t return SetIterable(iter);\n\t }));\n\t var originalSet = this;\n\t return this.withMutations((function(set) {\n\t originalSet.forEach((function(value) {\n\t if (iters.some((function(iter) {\n\t return iter.contains(value);\n\t }))) {\n\t set.remove(value);\n\t }\n\t }));\n\t }));\n\t },\n\t merge: function() {\n\t return this.union.apply(this, arguments);\n\t },\n\t mergeWith: function(merger) {\n\t for (var iters = [],\n\t $__9 = 1; $__9 < arguments.length; $__9++)\n\t iters[$__9 - 1] = arguments[$__9];\n\t return this.union.apply(this, iters);\n\t },\n\t wasAltered: function() {\n\t return this._map.wasAltered();\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t return this._map.__iterate((function(_, k) {\n\t return fn(k, k, $__0);\n\t }), reverse);\n\t },\n\t __iterator: function(type, reverse) {\n\t return this._map.map((function(_, k) {\n\t return k;\n\t })).__iterator(type, reverse);\n\t },\n\t __ensureOwner: function(ownerID) {\n\t if (ownerID === this.__ownerID) {\n\t return this;\n\t }\n\t var newMap = this._map.__ensureOwner(ownerID);\n\t if (!ownerID) {\n\t this.__ownerID = ownerID;\n\t this._map = newMap;\n\t return this;\n\t }\n\t return makeSet(newMap, ownerID);\n\t }\n\t}, {\n\t of: function() {\n\t return this(arguments);\n\t },\n\t fromKeys: function(value) {\n\t return this(KeyedSeq(value).flip().valueSeq());\n\t }\n\t}, SetCollection);\n\tfunction isSet(maybeSet) {\n\t return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n\t}\n\tSet.isSet = isSet;\n\tvar IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\tvar SetPrototype = Set.prototype;\n\tSetPrototype[IS_SET_SENTINEL] = true;\n\tSetPrototype[DELETE] = SetPrototype.remove;\n\tSetPrototype.mergeDeep = SetPrototype.merge;\n\tSetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n\tSetPrototype.withMutations = MapPrototype.withMutations;\n\tSetPrototype.asMutable = MapPrototype.asMutable;\n\tSetPrototype.asImmutable = MapPrototype.asImmutable;\n\tfunction makeSet(map, ownerID) {\n\t var set = Object.create(SetPrototype);\n\t set.size = map ? map.size : 0;\n\t set._map = map;\n\t set.__ownerID = ownerID;\n\t return set;\n\t}\n\tvar EMPTY_SET;\n\tfunction emptySet() {\n\t return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n\t}\n\tvar OrderedMap = function OrderedMap(value) {\n\t return value === null || value === undefined ? emptyOrderedMap() : isOrderedMap(value) ? value : emptyOrderedMap().merge(KeyedIterable(value));\n\t};\n\t($traceurRuntime.createClass)(OrderedMap, {\n\t toString: function() {\n\t return this.__toString('OrderedMap {', '}');\n\t },\n\t get: function(k, notSetValue) {\n\t var index = this._map.get(k);\n\t return index !== undefined ? this._list.get(index)[1] : notSetValue;\n\t },\n\t clear: function() {\n\t if (this.size === 0) {\n\t return this;\n\t }\n\t if (this.__ownerID) {\n\t this.size = 0;\n\t this._map.clear();\n\t this._list.clear();\n\t return this;\n\t }\n\t return emptyOrderedMap();\n\t },\n\t set: function(k, v) {\n\t return updateOrderedMap(this, k, v);\n\t },\n\t remove: function(k) {\n\t return updateOrderedMap(this, k, NOT_SET);\n\t },\n\t wasAltered: function() {\n\t return this._map.wasAltered() || this._list.wasAltered();\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t return this._list.__iterate((function(entry) {\n\t return entry && fn(entry[1], entry[0], $__0);\n\t }), reverse);\n\t },\n\t __iterator: function(type, reverse) {\n\t return this._list.fromEntrySeq().__iterator(type, reverse);\n\t },\n\t __ensureOwner: function(ownerID) {\n\t if (ownerID === this.__ownerID) {\n\t return this;\n\t }\n\t var newMap = this._map.__ensureOwner(ownerID);\n\t var newList = this._list.__ensureOwner(ownerID);\n\t if (!ownerID) {\n\t this.__ownerID = ownerID;\n\t this._map = newMap;\n\t this._list = newList;\n\t return this;\n\t }\n\t return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n\t }\n\t}, {of: function() {\n\t return this(arguments);\n\t }}, Map);\n\tfunction isOrderedMap(maybeOrderedMap) {\n\t return !!(maybeOrderedMap && maybeOrderedMap[IS_ORDERED_MAP_SENTINEL]);\n\t}\n\tOrderedMap.isOrderedMap = isOrderedMap;\n\tvar IS_ORDERED_MAP_SENTINEL = '@@__IMMUTABLE_ORDERED_MAP__@@';\n\tOrderedMap.prototype[IS_ORDERED_MAP_SENTINEL] = true;\n\tOrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\tfunction makeOrderedMap(map, list, ownerID, hash) {\n\t var omap = Object.create(OrderedMap.prototype);\n\t omap.size = map ? map.size : 0;\n\t omap._map = map;\n\t omap._list = list;\n\t omap.__ownerID = ownerID;\n\t omap.__hash = hash;\n\t return omap;\n\t}\n\tvar EMPTY_ORDERED_MAP;\n\tfunction emptyOrderedMap() {\n\t return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n\t}\n\tfunction updateOrderedMap(omap, k, v) {\n\t var map = omap._map;\n\t var list = omap._list;\n\t var i = map.get(k);\n\t var has = i !== undefined;\n\t var removed = v === NOT_SET;\n\t if ((!has && removed) || (has && v === list.get(i)[1])) {\n\t return omap;\n\t }\n\t if (!has) {\n\t i = list.size;\n\t }\n\t var newMap = removed ? map.remove(k) : has ? map : map.set(k, i);\n\t var newList = removed ? list.set(i, undefined) : list.set(i, [k, v]);\n\t if (omap.__ownerID) {\n\t omap.size = newMap.size;\n\t omap._map = newMap;\n\t omap._list = newList;\n\t omap.__hash = undefined;\n\t return omap;\n\t }\n\t return makeOrderedMap(newMap, newList);\n\t}\n\tvar Record = function Record(defaultValues, name) {\n\t var RecordType = function Record(values) {\n\t if (!(this instanceof RecordType)) {\n\t return new RecordType(values);\n\t }\n\t this._map = Map(values);\n\t };\n\t var keys = Object.keys(defaultValues);\n\t var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n\t RecordTypePrototype.constructor = RecordType;\n\t name && (RecordTypePrototype._name = name);\n\t RecordTypePrototype._defaultValues = defaultValues;\n\t RecordTypePrototype._keys = keys;\n\t RecordTypePrototype.size = keys.length;\n\t try {\n\t keys.forEach((function(key) {\n\t Object.defineProperty(RecordType.prototype, key, {\n\t get: function() {\n\t return this.get(key);\n\t },\n\t set: function(value) {\n\t invariant(this.__ownerID, 'Cannot set on an immutable record.');\n\t this.set(key, value);\n\t }\n\t });\n\t }));\n\t } catch (error) {}\n\t return RecordType;\n\t};\n\t($traceurRuntime.createClass)(Record, {\n\t toString: function() {\n\t return this.__toString(recordName(this) + ' {', '}');\n\t },\n\t has: function(k) {\n\t return this._defaultValues.hasOwnProperty(k);\n\t },\n\t get: function(k, notSetValue) {\n\t if (notSetValue !== undefined && !this.has(k)) {\n\t return notSetValue;\n\t }\n\t var defaultVal = this._defaultValues[k];\n\t return this._map ? this._map.get(k, defaultVal) : defaultVal;\n\t },\n\t clear: function() {\n\t if (this.__ownerID) {\n\t this._map && this._map.clear();\n\t return this;\n\t }\n\t var SuperRecord = Object.getPrototypeOf(this).constructor;\n\t return SuperRecord._empty || (SuperRecord._empty = makeRecord(this, emptyMap()));\n\t },\n\t set: function(k, v) {\n\t if (!this.has(k)) {\n\t throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n\t }\n\t var newMap = this._map && this._map.set(k, v);\n\t if (this.__ownerID || newMap === this._map) {\n\t return this;\n\t }\n\t return makeRecord(this, newMap);\n\t },\n\t remove: function(k) {\n\t if (!this.has(k)) {\n\t return this;\n\t }\n\t var newMap = this._map && this._map.remove(k);\n\t if (this.__ownerID || newMap === this._map) {\n\t return this;\n\t }\n\t return makeRecord(this, newMap);\n\t },\n\t wasAltered: function() {\n\t return this._map.wasAltered();\n\t },\n\t __iterator: function(type, reverse) {\n\t var $__0 = this;\n\t return KeyedIterable(this._defaultValues).map((function(_, k) {\n\t return $__0.get(k);\n\t })).__iterator(type, reverse);\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t return KeyedIterable(this._defaultValues).map((function(_, k) {\n\t return $__0.get(k);\n\t })).__iterate(fn, reverse);\n\t },\n\t __ensureOwner: function(ownerID) {\n\t if (ownerID === this.__ownerID) {\n\t return this;\n\t }\n\t var newMap = this._map && this._map.__ensureOwner(ownerID);\n\t if (!ownerID) {\n\t this.__ownerID = ownerID;\n\t this._map = newMap;\n\t return this;\n\t }\n\t return makeRecord(this, newMap, ownerID);\n\t }\n\t}, {}, KeyedCollection);\n\tvar RecordPrototype = Record.prototype;\n\tRecordPrototype[DELETE] = RecordPrototype.remove;\n\tRecordPrototype.merge = MapPrototype.merge;\n\tRecordPrototype.mergeWith = MapPrototype.mergeWith;\n\tRecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n\tRecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n\tRecordPrototype.update = MapPrototype.update;\n\tRecordPrototype.updateIn = MapPrototype.updateIn;\n\tRecordPrototype.withMutations = MapPrototype.withMutations;\n\tRecordPrototype.asMutable = MapPrototype.asMutable;\n\tRecordPrototype.asImmutable = MapPrototype.asImmutable;\n\tfunction makeRecord(likeRecord, map, ownerID) {\n\t var record = Object.create(Object.getPrototypeOf(likeRecord));\n\t record._map = map;\n\t record.__ownerID = ownerID;\n\t return record;\n\t}\n\tfunction recordName(record) {\n\t return record._name || record.constructor.name;\n\t}\n\tvar Range = function Range(start, end, step) {\n\t if (!(this instanceof $Range)) {\n\t return new $Range(start, end, step);\n\t }\n\t invariant(step !== 0, 'Cannot step a Range by 0');\n\t start = start || 0;\n\t if (end === undefined) {\n\t end = Infinity;\n\t }\n\t if (start === end && __EMPTY_RANGE) {\n\t return __EMPTY_RANGE;\n\t }\n\t step = step === undefined ? 1 : Math.abs(step);\n\t if (end < start) {\n\t step = -step;\n\t }\n\t this._start = start;\n\t this._end = end;\n\t this._step = step;\n\t this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n\t};\n\tvar $Range = Range;\n\t($traceurRuntime.createClass)(Range, {\n\t toString: function() {\n\t if (this.size === 0) {\n\t return 'Range []';\n\t }\n\t return 'Range [ ' + this._start + '...' + this._end + (this._step > 1 ? ' by ' + this._step : '') + ' ]';\n\t },\n\t get: function(index, notSetValue) {\n\t return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue;\n\t },\n\t contains: function(searchValue) {\n\t var possibleIndex = (searchValue - this._start) / this._step;\n\t return possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex);\n\t },\n\t slice: function(begin, end) {\n\t if (wholeSlice(begin, end, this.size)) {\n\t return this;\n\t }\n\t begin = resolveBegin(begin, this.size);\n\t end = resolveEnd(end, this.size);\n\t if (end <= begin) {\n\t return __EMPTY_RANGE;\n\t }\n\t return new $Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n\t },\n\t indexOf: function(searchValue) {\n\t var offsetValue = searchValue - this._start;\n\t if (offsetValue % this._step === 0) {\n\t var index = offsetValue / this._step;\n\t if (index >= 0 && index < this.size) {\n\t return index;\n\t }\n\t }\n\t return -1;\n\t },\n\t lastIndexOf: function(searchValue) {\n\t return this.indexOf(searchValue);\n\t },\n\t take: function(amount) {\n\t return this.slice(0, Math.max(0, amount));\n\t },\n\t skip: function(amount) {\n\t return this.slice(Math.max(0, amount));\n\t },\n\t __iterate: function(fn, reverse) {\n\t var maxIndex = this.size - 1;\n\t var step = this._step;\n\t var value = reverse ? this._start + maxIndex * step : this._start;\n\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t if (fn(value, ii, this) === false) {\n\t return ii + 1;\n\t }\n\t value += reverse ? -step : step;\n\t }\n\t return ii;\n\t },\n\t __iterator: function(type, reverse) {\n\t var maxIndex = this.size - 1;\n\t var step = this._step;\n\t var value = reverse ? this._start + maxIndex * step : this._start;\n\t var ii = 0;\n\t return new Iterator((function() {\n\t var v = value;\n\t value += reverse ? -step : step;\n\t return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n\t }));\n\t },\n\t __deepEquals: function(other) {\n\t return other instanceof $Range ? this._start === other._start && this._end === other._end && this._step === other._step : $traceurRuntime.superCall(this, $Range.prototype, \"__deepEquals\", [other]);\n\t }\n\t}, {}, IndexedSeq);\n\tvar RangePrototype = Range.prototype;\n\tRangePrototype.__toJS = RangePrototype.toArray;\n\tRangePrototype.first = ListPrototype.first;\n\tRangePrototype.last = ListPrototype.last;\n\tvar __EMPTY_RANGE = Range(0, 0);\n\tvar Repeat = function Repeat(value, times) {\n\t if (times <= 0 && EMPTY_REPEAT) {\n\t return EMPTY_REPEAT;\n\t }\n\t if (!(this instanceof $Repeat)) {\n\t return new $Repeat(value, times);\n\t }\n\t this._value = value;\n\t this.size = times === undefined ? Infinity : Math.max(0, times);\n\t if (this.size === 0) {\n\t EMPTY_REPEAT = this;\n\t }\n\t};\n\tvar $Repeat = Repeat;\n\t($traceurRuntime.createClass)(Repeat, {\n\t toString: function() {\n\t if (this.size === 0) {\n\t return 'Repeat []';\n\t }\n\t return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n\t },\n\t get: function(index, notSetValue) {\n\t return this.has(index) ? this._value : notSetValue;\n\t },\n\t contains: function(searchValue) {\n\t return is(this._value, searchValue);\n\t },\n\t slice: function(begin, end) {\n\t var size = this.size;\n\t return wholeSlice(begin, end, size) ? this : new $Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n\t },\n\t reverse: function() {\n\t return this;\n\t },\n\t indexOf: function(searchValue) {\n\t if (is(this._value, searchValue)) {\n\t return 0;\n\t }\n\t return -1;\n\t },\n\t lastIndexOf: function(searchValue) {\n\t if (is(this._value, searchValue)) {\n\t return this.size;\n\t }\n\t return -1;\n\t },\n\t __iterate: function(fn, reverse) {\n\t for (var ii = 0; ii < this.size; ii++) {\n\t if (fn(this._value, ii, this) === false) {\n\t return ii + 1;\n\t }\n\t }\n\t return ii;\n\t },\n\t __iterator: function(type, reverse) {\n\t var $__0 = this;\n\t var ii = 0;\n\t return new Iterator((function() {\n\t return ii < $__0.size ? iteratorValue(type, ii++, $__0._value) : iteratorDone();\n\t }));\n\t },\n\t __deepEquals: function(other) {\n\t return other instanceof $Repeat ? is(this._value, other._value) : $traceurRuntime.superCall(this, $Repeat.prototype, \"__deepEquals\", [other]);\n\t }\n\t}, {}, IndexedSeq);\n\tvar RepeatPrototype = Repeat.prototype;\n\tRepeatPrototype.last = RepeatPrototype.first;\n\tRepeatPrototype.has = RangePrototype.has;\n\tRepeatPrototype.take = RangePrototype.take;\n\tRepeatPrototype.skip = RangePrototype.skip;\n\tRepeatPrototype.__toJS = RangePrototype.__toJS;\n\tvar EMPTY_REPEAT;\n\tvar Immutable = {\n\t Iterable: Iterable,\n\t Seq: Seq,\n\t Collection: Collection,\n\t Map: Map,\n\t List: List,\n\t Stack: Stack,\n\t Set: Set,\n\t OrderedMap: OrderedMap,\n\t Record: Record,\n\t Range: Range,\n\t Repeat: Repeat,\n\t is: is,\n\t fromJS: fromJS\n\t};\n\n\t return Immutable;\n\t}", "function r(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function r(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function r(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function FooBar() {\n // TODO: implement this module\n}", "function n(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function n(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "patch() {\n }", "function v8(v9,v10) {\n const v16 = [1337,1337];\n // v16 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v17 = [\"536870912\",-3848843708,v16,-3848843708,1337,13.37,13.37,WeakMap,-3848843708];\n // v17 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v18 = {constructor:13.37,e:v16};\n // v18 = .object(ofGroup: Object, withProperties: [\"constructor\", \"e\", \"__proto__\"])\n const v19 = {__proto__:-3848843708,a:v18,b:-3848843708,constructor:1337,d:v18,e:v17,length:WeakMap};\n // v19 = .object(ofGroup: Object, withProperties: [\"d\", \"b\", \"a\", \"__proto__\", \"e\", \"constructor\", \"length\"])\n const v21 = new Float64Array(v19);\n // v21 = .object(ofGroup: Float64Array, withProperties: [\"byteOffset\", \"constructor\", \"buffer\", \"__proto__\", \"byteLength\", \"length\"], withMethods: [\"map\", \"values\", \"subarray\", \"find\", \"fill\", \"set\", \"findIndex\", \"some\", \"reduceRight\", \"reverse\", \"join\", \"includes\", \"entries\", \"reduce\", \"every\", \"copyWithin\", \"sort\", \"forEach\", \"lastIndexOf\", \"indexOf\", \"filter\", \"slice\", \"keys\"])\n v6[6] = v7;\n v7.toString = v9;\n }", "function Utils() {}", "function Utils() {}", "function o(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function c() {}", "constructor( ) {}", "function main() {\n}", "use(fn) {}", "function FooRule() {\n}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "function test() {\n var o35 = Object.getOwnPropertyDescriptor(Object.prototype, \"__proto__\").function(o1, o2)\n{\n var o3 = 0;\n var o4 = 0;\n try {\nfor (var o5 = 1; o5 < 10000; o5++)\n {\n try {\no3 = (o1.o3 + o1.o3 + o1.o3 + o1.o3 + o1.o3) & 0x3FFFF;\n}catch(e){}\n try {\no2.o3 = o3 + o4;\n}catch(e){}\n try {\no4 = (o1.o3 + o1.o3 + o1.o3 + o1.o3 + o1.o3) & 0xFFFF;\n}catch(e){}\n }\n}catch(e){}\n try {\nreturn o3 + o4;\n}catch(e){}\n};\n function o1() {\n }\n var o2 = ((o863 & 0x4000) >> Object.o157) | ((o863 & 0x40) >> 6);\n var o38 = o839.o906.o917(o308);\n var o6 = Array('Math.ceil((' + target + ')/');\n var o867 = this.o543[0x200 | (o768 >> 4)];\n var o8 = o1(\"willValidate\");\n try {\no21 = function () {\n try {\no337++;\n}catch(e){}\n };\n}catch(e){}\n try {\ntry { o1(\"MSGestureEvent\"); } catch(e) {}try { try {\no1(\"setImmediate\");\n}catch(e){} } catch(e) {}\n}catch(e){}\n try {\n({ o9: !o3.call(o2, o1, '!') });\n}catch(e){}\n try {\nif (o0 != 2)\n try {\nprint(\"FAIL\");\n}catch(e){}\n else\n try {\nprint(\"PASS\");\n}catch(e){}\n}catch(e){}\n}", "function Bevy() {}", "function hc(){return hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hc.apply(this,arguments)}", "function u(t,e){return t(e={exports:{}},e.exports),e.exports}", "function main() {\n\n}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}" ]
[ "0.6149275", "0.54203457", "0.53920096", "0.53668714", "0.53668714", "0.53668714", "0.53408384", "0.5318133", "0.5318133", "0.5318133", "0.5308971", "0.52618045", "0.5255616", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52386945", "0.52386945", "0.52386945", "0.52386945", "0.52386945", "0.52386945", "0.52386945", "0.52386945", "0.52386945", "0.5236023", "0.52302927", "0.5209219", "0.518569", "0.51775223", "0.5161208", "0.5151423", "0.51483786", "0.51154035", "0.5104374", "0.5089039", "0.5086965", "0.5086965", "0.5086965", "0.50813836", "0.50768495", "0.50768495", "0.5072789", "0.5072789", "0.5072789", "0.5072789", "0.5072789", "0.5072789", "0.507222", "0.5066842", "0.50424546", "0.50424546", "0.5039841", "0.5036415", "0.50292754", "0.5027302", "0.5018287", "0.5016567", "0.5004397", "0.5004397", "0.5004397", "0.5004397", "0.5004397", "0.5004397", "0.50028014", "0.5001212", "0.49986866", "0.4986019", "0.4979444", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006" ]
0.0
-1
For Node v0.10 support. Remove this eventually.
function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _node_p(){\n\tvar ret = false;\n\tif( anchor.environment() == 'Node.js' ){ ret = true; }\n\treturn ret;\n }", "function node_error(err) {\r\n node.error(err, err);\r\n }", "private public function m246() {}", "function NodeFsHandler() {}", "function NodeFsHandler() {}", "static reset(){\n _NODE_UID = 0;\n }", "static final private internal function m106() {}", "private internal function m248() {}", "function NodeHandler() { }", "function _isNodeInternal (line) {\n return ~line.indexOf('(timers.js:') ||\n ~line.indexOf('(node.js:') ||\n ~line.indexOf('(module.js:') ||\n ~line.indexOf('_stream_readable.js') ||\n ~line.indexOf('process._tickDomainCallback') ||\n ~line.indexOf('GeneratorFunctionPrototype.next (native)') ||\n ~line.indexOf('GeneratorFunctionPrototype.throw (native)') ||\n // co\n ~line.indexOf('/co/index.js') ||\n // koa-router\n ~line.indexOf('Object.dispatch') ||\n // bluebird\n ~line.indexOf('Promise._settlePromise') ||\n ~line.indexOf('Async._drainQueues') ||\n ~line.indexOf('Immediate.Async.drainQueues') ||\n false;\n}", "function Node() {}", "transient private protected internal function m182() {}", "function runIfNewNode( task ) {\n\t\treturn nodeV16OrNewer ? task : \"print_old_node_message:\" + task;\n\t}", "function isNode(){\r\n\treturn typeof module !== 'undefined' && module.exports;\r\n}", "function node_enable() {\n if(typeof process === 'object' && process + '' === '[object process]'){\n return true;\n }\n else{\n return false;\n }\n}", "function RNode() {}", "function RNode() {}", "function RNode() {}", "function noOp(err) { if (err) { throw err; } }", "function isNode() {\n return (typeof module !== 'undefined' && this.module !== module);\n}", "protected internal function m252() {}", "function version(){ return \"0.13.0\" }", "function NodeLogger() {}", "function NodeLogger() {}", "function NodeLogger() {}", "getHostNode() {}", "function NodeLogger() { }", "function NodeLogger() { }", "getNode() {\n throw new Error(\"Must be implemented\");\n }", "transient private internal function m185() {}", "function NodeLogger(){}", "function getBasicNodeMethods(){return['get','post','put','head','delete','options','trace','copy','lock','mkcol','move','purge','propfind','proppatch','unlock','report','mkactivity','checkout','merge','m-search','notify','subscribe','unsubscribe','patch','search','connect'];}", "static final protected internal function m110() {}", "getAllNodes () {\n client.getAllNodes(this.host, 4369, function (err, nodes) {\n if (err) {\n console.error(err)\n return\n }\n console.log(nodes)\n })\n }", "extend(config, ctx) {\n config.node = {\n console: true,\n fs: 'empty',\n net: 'empty',\n tls: 'empty',\n }\n }", "function is_node() {\r\n if (is_node_ === null)\r\n is_node_ = typeof global === \"object\"\r\n && typeof global.process === \"object\"\r\n && typeof global.process.versions === \"object\"\r\n && typeof global.process.versions.node !== \"undefined\";\r\n return is_node_;\r\n}", "function assertNodeEnv() {\r\n return assert(isNode, 'This feature is only available in NodeJS environments');\r\n }", "transient protected internal function m189() {}", "function RNode(){}", "upgrade() {}", "function _detectNodeCrypto(fn) {\n\t return forge.util.isNodejs && typeof _crypto[fn] === 'function';\n\t}", "function TNode() {}", "function TNode() {}", "function TNode() {}", "_handleNodeError(newValue,oldValue){if(typeof oldValue!==typeof void 0&&null!=newValue&&0!=newValue.length){// @todo, need support for a failed to load state; could be useful\n// if we go into an offline capability in the future\nthis._responseList[this.active]=newValue;this.activeNodeResponse=this._responseList[this.active];// set available because we don't have a failed state\nthis.items[this.active].metadata.status=\"available\";this.set(\"items.\"+this.active+\".metadata.status\",\"available\");this.notifyPath(\"items.\"+this.active+\".metadata.status\");// fire an event that this isn't really available so we know an issue occured\nthis.dispatchEvent(new CustomEvent(\"node-load-failed\",{bubbles:!0,cancelable:!0,composed:!0,detail:this.items[this.active]}))}}", "_read () {}", "_read () {}", "_read () {}", "function DWRUtil() { }", "_isValidContext() {\n const isNode = (typeof process !== 'undefined')\n && (typeof process.release !== 'undefined')\n && (process.release.name === 'node');\n return isNode;\n }", "function NWTNode() {\n\t\n}", "function getBasicNodeMethods() {\n return ['get', 'post', 'put', 'head', 'delete', 'options', 'trace', 'copy', 'lock', 'mkcol', 'move', 'purge', 'propfind', 'proppatch', 'unlock', 'report', 'mkactivity', 'checkout', 'merge', 'm-search', 'notify', 'subscribe', 'unsubscribe', 'patch', 'search', 'connect'];\n}", "_read() {}", "_read() {}", "static transient final private protected internal function m40() {}", "function getSystemNodeVers(cb) {\n exec('node -v', function(err, stdout) {\n if (err) {\n return cb(err, null);\n }\n cb(null, stdout.slice(1).replace('\\n',''));\n });\n}", "function r() {}", "function r() {}", "function r() {}", "function Node(){}", "transient private protected public internal function m181() {}", "static isNode(n) {\n return n && typeof n === \"object\" && typeof n.type === \"string\";\n }", "async initialize()\n\t{ \n\t\tthrow new Error(\"initialize() method not implemented\");\n\t}", "static transient final protected public internal function m46() {}", "extend (config, ctx) {\n config.node = {\n fs: 'empty'\n }\n }", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function isNode() {\n return typeof module !== 'undefined' &&\n module.exports &&\n typeof window === 'undefined';\n}", "initiator() {\n throw new Error('Not implemented');\n }", "static runningOnNode ()\n\t\t{ let ud = \"undefined\";\n\n\t\t\tif (typeof process === ud)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! process )\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! process.versions )\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! process.versions.node )\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (typeof __dirname === ud)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (typeof __filename === ud)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (typeof require === ud)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (require === null)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! require.resolve)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (typeof module === ud)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "function node(){}", "async init( callback ) {\n throw \"implement me!\";\n }", "constructor() {\n this.startTime = Date.now();\n this.attributes = {\n \"version\": 0.5, \n \"lang\": \"node.js\",\n \"startTime\": this.startTime\n };\n\n this.inspectedCPU = false;\n this.inspectedMemory = false;\n this.inspectedContainer = false;\n this.inspectedPlatform = false;\n this.inspectedLinux = false;\n }", "function Node() {\n}", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function noop(){}// No operation performed.", "function getLocalNodeVers(cb) {\n var nave_path = process.env.HOME + \"/.nave/installed/\";\n\n fs.readdir(nave_path, cb);\n}", "static get ERROR () { return 0 }", "static transient final private internal function m43() {}", "extend(config, {isDev, isClient}) {\n config.node = {\n fs: 'empty'\n }\n }", "static init() {\n\t\tprocess.on('unhandledRejection', (reason, p) => { throw reason });\n\t}", "static transient final protected internal function m47() {}", "_read() {\n }", "function getBasicNodeMethods() {\n return [\n 'get',\n 'post',\n 'put',\n 'head',\n 'delete',\n 'options',\n 'trace',\n 'copy',\n 'lock',\n 'mkcol',\n 'move',\n 'purge',\n 'propfind',\n 'proppatch',\n 'unlock',\n 'report',\n 'mkactivity',\n 'checkout',\n 'merge',\n 'm-search',\n 'notify',\n 'subscribe',\n 'unsubscribe',\n 'patch',\n 'search',\n 'connect'\n ];\n}", "function getBasicNodeMethods() {\n return [\n 'get',\n 'post',\n 'put',\n 'head',\n 'delete',\n 'options',\n 'trace',\n 'copy',\n 'lock',\n 'mkcol',\n 'move',\n 'purge',\n 'propfind',\n 'proppatch',\n 'unlock',\n 'report',\n 'mkactivity',\n 'checkout',\n 'merge',\n 'm-search',\n 'notify',\n 'subscribe',\n 'unsubscribe',\n 'patch',\n 'search',\n 'connect'\n ];\n}" ]
[ "0.5863474", "0.5705808", "0.568645", "0.55544066", "0.55544066", "0.5446477", "0.5434516", "0.5381192", "0.5356294", "0.53282356", "0.53189546", "0.52043676", "0.51996946", "0.5156968", "0.51501393", "0.51281303", "0.51281303", "0.51281303", "0.5112595", "0.5100047", "0.50906795", "0.5088863", "0.5087259", "0.5087259", "0.5087259", "0.5080389", "0.5072706", "0.5072706", "0.5068706", "0.50571835", "0.50298", "0.50214815", "0.501945", "0.50129956", "0.5000925", "0.4991448", "0.49863955", "0.49858886", "0.49840045", "0.4981576", "0.4970059", "0.4949551", "0.4949551", "0.4949551", "0.4927342", "0.49235627", "0.49235627", "0.49235627", "0.49222878", "0.49209145", "0.4916484", "0.48980445", "0.48758933", "0.48758933", "0.48750284", "0.4857348", "0.48530325", "0.48530325", "0.48530325", "0.4848229", "0.4847861", "0.48425364", "0.48396116", "0.48373815", "0.48351088", "0.48342466", "0.48342466", "0.48342466", "0.48342466", "0.48342466", "0.48342466", "0.48342466", "0.48342466", "0.48342466", "0.48342466", "0.48342466", "0.48342466", "0.48342466", "0.48302492", "0.48184085", "0.48170963", "0.4817076", "0.48170155", "0.48130047", "0.48075417", "0.48001215", "0.48001215", "0.48001215", "0.48001215", "0.48001215", "0.48001215", "0.48001215", "0.47976673", "0.4785643", "0.477728", "0.47741026", "0.47708902", "0.47680405", "0.47660002", "0.47642508", "0.47642508" ]
0.0
-1
v8 likes predictible objects
function Item(fun, array) { this.fun = fun; this.array = array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareLike(a,b){\n var al = a.idLikesProp.length;\n var bl = b.idLikesProp.length;\n if(al > bl) return -1;\n if(bl > al) return 1;\n return 0;\n}", "function lookAround() {\n var objectDescription = \"\"\n tj.see().then(function(objects) {\n objects.forEach(function(each) {\n if (each.score >= 0.4) {\n objectDescription = objectDescription + \", \" + each.class\n }\n })\n tj.speak(\"The objects I see are: \" + objectDescription)\n });\n}", "function recommendNewPosts() {\n model.loadModel();\n getNewPosts(function (err, posts) {\n var label\n ;\n posts.forEach(function (post) {\n label = model.classifyPost(post);\n if (label == 'like') {\n console.log(post);\n }\n });\n });\n }", "function BOT_onLike() {\r\n\tBOT_traceString += \"GOTO command judge\" + \"\\n\"; // change performative\r\n\tBOT_theReqJudgement = \"likeable\";\r\n\tBOT_onJudge(); \t\r\n\tif(BOT_reqSuccess) {\r\n\t\tvar ta = [BOT_theReqTopic,BOT_theReqAttribute]; \r\n\t\tBOT_del(BOT_theUserTopicId,\"distaste\",\"VAL\",ta);\r\n\t\tBOT_add(BOT_theUserTopicId,\"preference\",\"VAL\",ta);\r\n\t}\r\n}", "function like (data, archetype) {\n var name;\n\n for (name in archetype) {\n if (archetype.hasOwnProperty(name)) {\n if (data.hasOwnProperty(name) === false || typeof data[name] !== typeof archetype[name]) {\n return false;\n }\n\n if (object(data[name]) && like(data[name], archetype[name]) === false) {\n return false;\n }\n }\n }\n\n return true;\n }", "function LanguageUnderstandingModel() {\n }", "function guess() {\n classifier.predict(video.elt, 5, gotResult);\n}", "function theBigBang() {\n\t\tinitLibs();\n\t\tinitFuncs();\n\t\tObject.setPrototypeOf(Universe.prototype, universe.kjsclasses._primitive_prototype);\n\t\tObject.setPrototypeOf(Object.prototype, universe); // [0]\n\t}", "function readOwn(obj, name, pumpkin) {\n if (typeof obj !== 'object' || !obj) {\n if (typeOf(obj) !== 'object') {\n return pumpkin;\n }\n }\n if (typeof name === 'number' && name >= 0) {\n if (myOriginalHOP.call(obj, name)) { return obj[name]; }\n return pumpkin;\n }\n name = String(name);\n if (obj[name + '_canRead___'] === obj) { return obj[name]; }\n if (!myOriginalHOP.call(obj, name)) { return pumpkin; }\n // inline remaining relevant cases from canReadPub\n if (endsWith__.test(name)) { return pumpkin; }\n if (name === 'toString') { return pumpkin; }\n if (!isJSONContainer(obj)) { return pumpkin; }\n fastpathRead(obj, name);\n return obj[name];\n }", "function a(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach(function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)})}", "function NXObject() {}", "function isPrimative(val) { return (typeof val !== 'object') }", "function like (data, duck) {\n var name;\n\n assert.object(data);\n assert.object(duck);\n\n for (name in duck) {\n if (duck.hasOwnProperty(name)) {\n if (data.hasOwnProperty(name) === false || typeof data[name] !== typeof duck[name]) {\n return false;\n }\n\n if (object(data[name]) && like(data[name], duck[name]) === false) {\n return false;\n }\n }\n }\n\n return true;\n }", "static get observedAttributes() {\n return ['rainbow', 'lang'];\n }", "function a(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach((function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)}))}", "function testSimpleHole_prototype() {\n var theHole = Object.create({ x: \"in proto\" });\n var theReplacement = \"yay\";\n var serialized = bidar.serialize(theHole, holeFilter);\n var parsed = bidar.parse(serialized, holeFiller);\n\n assert.equal(parsed, theReplacement);\n\n function holeFilter(x) {\n assert.equal(x, theHole);\n return { data: \"blort\" };\n }\n\n function holeFiller(x) {\n assert.equal(x, \"blort\");\n return theReplacement;\n }\n}", "function test() {\n\t// \"ex nihilo\" object creation using the literal\n\t// object notation {}.\n\tvar foo = {\n\t\tname : \"foo\",\n\t\tone : 1,\n\t\ttwo : 2\n\t};\n\n\t// Another \"ex nihilo\" object.\n\tvar bar = {\n\t\ttwo : \"two\",\n\t\tthree : 3\n\t};\n\n\t// Gecko and Webkit JavaScript engines can directly\n\t// manipulate the internal prototype link.\n\t// For the sake of simplicity, let us pretend\n\t// that the following line works regardless of the\n\t// engine used:\n\tbar.__proto__ = foo; // foo is now the prototype of bar.\n\n\t// If we try to access foo's properties from bar\n\t// from now on, we'll succeed.\n\tlog(bar.one) // Resolves to 1.\n\n\t// The child object's properties are also accessible.\n\tlog(bar.three) // Resolves to 3.\n\n\t// Own properties shadow prototype properties\n\tlog(bar.two); // Resolves to \"two\"\n\tlog(foo.name); // unaffected, resolves to \"foo\"\n\tlog(bar.name); // Resolves to \"foo\"\n log(foo.__proto__);\n}", "function wrappedPrimitivePreviewer(className, classObj, objectActor, grip) {\r\n let {_obj} = objectActor;\r\n\r\n if (!_obj.proto || _obj.proto.class != className) {\r\n return false;\r\n }\r\n\r\n let raw = _obj.unsafeDereference();\r\n let v = null;\r\n try {\r\n v = classObj.prototype.valueOf.call(raw);\r\n } catch (ex) {\r\n // valueOf() can throw if the raw JS object is \"misbehaved\".\r\n return false;\r\n }\r\n\r\n if (v === null) {\r\n return false;\r\n }\r\n\r\n let canHandle = GenericObject(objectActor, grip, className === \"String\");\r\n if (!canHandle) {\r\n return false;\r\n }\r\n\r\n grip.preview.wrappedValue = objectActor.getGrip(makeDebuggeeValueIfNeeded(_obj, v));\r\n return true;\r\n}", "function DartObject(o) {\n this.o = o;\n}", "function i(t,e,n){(n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e)).forEach(function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)})}", "function i(t,e,n){(n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e)).forEach(function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)})}", "function likeVsLikes(toyLikeCount){\n\t\tif (toyLikeCount == 1){\n\t\t\treturn 'Like';\n\t\t} else {\n\t\t\treturn 'Likes';\n\t\t}\n\t}", "constructor(spec) {\n this.cached = /* @__PURE__ */ Object.create(null);\n let instanceSpec = this.spec = {};\n for (let prop in spec)\n instanceSpec[prop] = spec[prop];\n instanceSpec.nodes = OrderedMap.from(spec.nodes), instanceSpec.marks = OrderedMap.from(spec.marks || {}), this.nodes = NodeType$1.compile(this.spec.nodes, this);\n this.marks = MarkType.compile(this.spec.marks, this);\n let contentExprCache = /* @__PURE__ */ Object.create(null);\n for (let prop in this.nodes) {\n if (prop in this.marks)\n throw new RangeError(prop + \" can not be both a node and a mark\");\n let type = this.nodes[prop], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] || (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n type.markSet = markExpr == \"_\" ? null : markExpr ? gatherMarks(this, markExpr.split(\" \")) : markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n for (let prop in this.marks) {\n let type = this.marks[prop], excl = type.spec.excludes;\n type.excluded = excl == null ? [type] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n this.nodeFromJSON = this.nodeFromJSON.bind(this);\n this.markFromJSON = this.markFromJSON.bind(this);\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n this.cached.wrappings = /* @__PURE__ */ Object.create(null);\n }", "wordClass(word) {\r\n return {\r\n der: word.artikel == \"der\",\r\n die: word.artikel == \"die\",\r\n das: word.artikel == \"das\",\r\n marked: word.marker\r\n }\r\n }", "function dummyObjects(name, age){\n this.name = name\n this.age = age\n}", "function handleLikes() {\n // Get a random number\n let randomNumber = Math.random();\n // To make it unpredictable, only change the likes if =>\n if (randomNumber < REVEAL_PROBABILITY) {\n defineLikes();\n }\n}", "constructor() { \n \n Like.initialize(this);\n }", "like() {\r\n return this.clone(Comment, \"Like\").postCore();\r\n }", "like() {\r\n return this.getItem().then(i => {\r\n return i.like();\r\n });\r\n }", "added(vrobject){}", "classify(phrase) { return this.clf.classify(phrase) }", "function badIdea(){\n this.idea = \"bad\";\n}", "shouldSerialize(prop, dataKey) {\n const contains = (str, re) => (str.match(re) || []).length > 0;\n const a = contains(dataKey, /\\./g);\n const b = contains(dataKey, /\\[/g);\n return !!prop.object && !(a || b);\n }", "static get observedAttributes(){this.finalize();const e=[];// Use forEach so this works even if for/of loops are compiled to for loops\n// expecting arrays\nreturn this._classProperties.forEach((t,n)=>{const r=this._attributeNameForProperty(n,t);void 0!==r&&(this._attributeToPropertyMap.set(r,n),e.push(r))}),e}", "function oldAndLoud(object){\n\tobject.age++;\n\tobject.name = object.name.toUpperCase();\n}", "like() {\r\n return this.clone(Item, \"like\").postCore();\r\n }", "function classifyPose() {\n if (pose && working) {\n inputs = [];\n for (let i = 0; i < pose.landmarks.length; i++) {\n inputs.push(pose.landmarks[i][0]);\n inputs.push(pose.landmarks[i][1]);\n inputs.push(pose.landmarks[i][2]);\n }\n brain.classify(inputs, gotResult)\n }\n }", "function PropertyDetection() {}", "constructor()\n {\n this.likes = [];\n }", "async TestLikeDoctorPost(){\n var response = await entity.Likes(6,28,true,true);\n //console.log(response)\n if(response != null){\n console.log(\"\\x1b[32m%s\\x1b[0m\",\"TestDOctorRating Passed\");\n }else{\n console.log(\"\\x1b[31m%s\\x1b[0m\",\"TestDOctorRating Failed\");\n }\n\n }", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function showLikes(likes) {\n\tconsole.log(`THINGS I LIKE:\\n`);\n\tfor(let like of likes) {\n\t\tconsole.log(like);\n\t}\n}", "function protoAugment(target,src,keys){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function protoAugment(target,src,keys){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function Nevis() {}", "function Nevis() {}", "function Nevis() {}", "test_primitivesExtended() {\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.primitivesExtended);\n let object = translator.decode(text).getRoot();\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.PrimitivesExtended\", object.constructor.__getClass());\n Assert.equals(\"alpha16\", object.string);\n }", "function buildObjectsObj(gCloudV, azureCV, minScore = 0.0){\n let objects = [];\n\n if(gCloudV) {// gcloud vision results are available\n let gCloudObjects = gCloudV['localizedObjectAnnotations'];\n\n //apply standard bounding box to all the detected objects\n if(azureCV)// azure computer vision results are available\n gCloudVObjsToCogniBoundingBox(gCloudObjects, azureCV['metadata']['width'], azureCV['metadata']['height']);\n\n else//need to retrieve image sizes from gcloud (already done and put in the metadata tag of gcloudv with appropriate calls)\n gCloudVObjsToCogniBoundingBox(gCloudObjects, gCloudV['metadata']['width'], gCloudV['metadata']['height']);\n\n for (let gCloudObj of gCloudObjects) {\n if (gCloudObj['score'] > minScore) { //filter out unwanted tags\n objects.push({\n name: gCloudObj['name'],\n mid: (gCloudObj['mid'] && gCloudObj['mid']!= '')? gCloudObj['mid']: undefined,\n confidence: gCloudObj['score'],\n boundingBox: gCloudObj['boundingBox']\n });\n }\n }\n }\n\n if(azureCV){// azure computer vision results are available\n let azureObjects = azureCV['objects'];\n //apply standard bounding box to all the detected objects\n azureCVObjsToCogniBoundingBox(azureObjects, azureCV['metadata']['width'], azureCV['metadata']['height']);\n for(let aObj of azureObjects){\n if(aObj['confidence'] > minScore) { //filter out unwanted tags\n objects.push({\n name: aObj['object'],\n confidence: aObj['confidence'],\n boundingBox: aObj['boundingBox']\n });\n }\n }\n }\n\n objects = combineObjectsArray(objects);// build an array where labels regarding the same exact object are combined with averaged confidence\n\n objects.sort((a, b) => {\n if(a['confidence']>b['confidence'])\n return -1;\n else if(a['confidence']==b['confidence'])\n return 0;\n else\n return 1;\n });\n\n return objects;\n}", "function V(e){if(null===e||\"[object Object]\"!==function(e){return Object.prototype.toString.call(e)}(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}", "function classifyVideo() {\r\n classifier.classify(vid, gotResult);\r\n\r\n}", "function test_nountag_does_not_think_it_has_watch_tag_when_it_does_not() {\n Assert.equal(TagNoun.fromJSON(\"watch\"), undefined);\n}", "function v11(v12,v13) {\n const v15 = v11(Object,Function);\n // v15 = .unknown\n const v16 = Object(v13,v8,0,v6);\n // v16 = .object()\n const v17 = 0;\n // v17 = .integer\n const v18 = 1;\n // v18 = .integer\n const v19 = 512;\n // v19 = .integer\n const v20 = \"-1024\";\n // v20 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v21 = isFinite;\n // v21 = .function([.anything] => .boolean)\n const v23 = [1337];\n // v23 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v24 = {};\n // v24 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v25 = v23;\n const v26 = -29897853;\n // v26 = .integer\n const v27 = \"replace\";\n // v27 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v28 = Boolean;\n // v28 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v30 = [13.37,13.37];\n // v30 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v31 = 1337;\n // v31 = .integer\n let v32 = 13.37;\n const v36 = [13.37,13.37,13.37];\n // v36 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v38 = [1337,1337];\n // v38 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v39 = [13.37,1337,v38,1337,\"-128\",13.37,\"-128\",\"-128\",2147483647,1337];\n // v39 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v40 = {__proto__:v36,length:v39};\n // v40 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"length\"])\n const v41 = \"0\";\n // v41 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v42 = -4130093409;\n // v42 = .integer\n const v44 = {b:2147483647,e:v38,valueOf:v36};\n // v44 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"b\", \"valueOf\", \"e\"])\n const v45 = \"k**baeaDif\";\n // v45 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v46 = 65536;\n // v46 = .integer\n const v47 = \"k**baeaDif\";\n // v47 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v48 = 13.37;\n // v48 = .float\n const v50 = [13.37,13.37];\n // v50 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v51 = ~v50;\n // v51 = .boolean\n const v53 = [13.37];\n // v53 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n let v54 = v53;\n const v55 = gc;\n // v55 = .function([] => .undefined)\n const v58 = [13.37,13.37,13.37,13.37];\n // v58 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v60 = [1337,1337,1337,1337];\n // v60 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v61 = [3697200800,v58,v60];\n // v61 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v62 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v61};\n // v62 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"length\", \"constructor\", \"toString\", \"valueOf\"])\n const v65 = [13.37,13.37,13.37,13.37];\n // v65 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v67 = [1337,1337,1337,1337];\n // v67 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v68 = [3697200800,v65,v67];\n // v68 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v69 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v68};\n // v69 = .object(ofGroup: Object, withProperties: [\"e\", \"constructor\", \"__proto__\", \"length\", \"toString\", \"valueOf\"])\n const v70 = Object;\n // v70 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n function v71(v72) {\n }\n const v74 = [13.37];\n // v74 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v75 = 1337;\n // v75 = .integer\n const v76 = v44 ** 13.37;\n // v76 = .integer | .float | .bigint\n function v77(v78,v79,v80,v81,v82) {\n }\n let v83 = v74;\n const v84 = \"2\";\n // v84 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v85 = \"2\";\n // v85 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v88 = [13.37,13.37,1337,13.37];\n // v88 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v89(v90,v91,v92) {\n }\n const v94 = [1337,1337,1337,1337];\n // v94 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v95 = [3697200800,v88,v94];\n // v95 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v96(v97,v98) {\n }\n const v99 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,d:v95};\n // v99 = .object(ofGroup: Object, withProperties: [\"toString\", \"length\", \"constructor\", \"__proto__\", \"e\", \"d\"])\n let v100 = 13.37;\n const v101 = typeof v74;\n // v101 = .string\n const v102 = \"symbol\";\n // v102 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v103 = 3697200800;\n // v103 = .integer\n const v104 = \"2\";\n // v104 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v105 = Boolean;\n // v105 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v106 = Function;\n // v106 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v107 = 13.37;\n // v107 = .float\n const v108 = 1337;\n // v108 = .integer\n const v109 = \"2\";\n // v109 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v110 = Function;\n // v110 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v112 = [13.37,13.37,13.37,13.37];\n // v112 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v113 = 1337;\n // v113 = .integer\n let v114 = 13.37;\n const v116 = {...3697200800,...3697200800};\n // v116 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n const v117 = Object;\n // v117 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v118 = Function;\n // v118 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v119 = {};\n // v119 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v120 = v119;\n const v121 = (3697200800).constructor;\n // v121 = .unknown\n function v122(v123,v124) {\n }\n const v125 = Promise;\n // v125 = .object(ofGroup: PromiseConstructor, withProperties: [\"prototype\"], withMethods: [\"race\", \"allSettled\", \"reject\", \"all\", \"resolve\"]) + .constructor([.function()] => .object(ofGroup: Promise, withProperties: [\"__proto__\"], withMethods: [\"finally\", \"then\", \"catch\"]))\n const v128 = 4;\n // v128 = .integer\n let v129 = 0;\n const v131 = [13.37,13.37,13.37,13.37];\n // v131 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v133 = [1337,1337,1337,1337];\n // v133 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v134 = [3697200800,v131,v133];\n // v134 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v135 = Object;\n // v135 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v136 = -944747134;\n // v136 = .integer\n const v139 = [13.37,13.37,13.37,13.37];\n // v139 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v141 = [1337,1337,1337,1337];\n // v141 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v142 = [3697200800,v139,v141];\n // v142 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v143 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v142};\n // v143 = .object(ofGroup: Object, withProperties: [\"toString\", \"constructor\", \"e\", \"__proto__\", \"valueOf\", \"length\"])\n let v144 = v143;\n const v145 = gc;\n // v145 = .function([] => .undefined)\n let v146 = 13.37;\n const v150 = [13.37,13.37,13.37,Function];\n // v150 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v152 = [1337,1337,1337,1337];\n // v152 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v153 = [3697200800,v150,v152];\n // v153 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v154 = v153 + 1;\n // v154 = .primitive\n let v155 = 0;\n const v156 = v155 + 1;\n // v156 = .primitive\n const v158 = \"2\";\n // v158 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v160 = [13.37,13.37,13.37,13.37];\n // v160 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v162 = 0;\n // v162 = .integer\n const v163 = [1337,1337,1337,1337];\n // v163 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v164 = [3697200800,1337,v163];\n // v164 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v166 = 1337;\n // v166 = .integer\n let v167 = 2594067260;\n const v169 = 4;\n // v169 = .integer\n let v170 = 0;\n const v171 = v167 + 1;\n // v171 = .primitive\n const v172 = {__proto__:3697200800,constructor:v163,e:3697200800,length:13.37,toString:3697200800,valueOf:v164};\n // v172 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"constructor\", \"valueOf\", \"length\", \"toString\"])\n const v173 = 0;\n // v173 = .integer\n const v174 = 5;\n // v174 = .integer\n const v175 = 2937513072;\n // v175 = .integer\n const v176 = Object;\n // v176 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v177 = v172.constructor;\n // v177 = .unknown\n const v178 = 0;\n // v178 = .integer\n const v179 = 1;\n // v179 = .integer\n try {\n } catch(v180) {\n const v182 = [13.37,13.37,13.37,13.37];\n // v182 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v183 = v182.__proto__;\n // v183 = .object()\n function v185(v186) {\n }\n const v187 = Object >>> v183;\n // v187 = .integer | .bigint\n }\n function v188(v189,v190,v191,v192,...v193) {\n }\n}", "function markRaw(obj) {\r\n if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) {\r\n return obj;\r\n }\r\n // set the vue observable flag at obj\r\n var ob = createObserver();\r\n ob.__raw__ = true;\r\n def(obj, '__ob__', ob);\r\n // mark as Raw\r\n rawSet.set(obj, true);\r\n return obj;\r\n}", "function markRaw(obj) {\r\n if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) {\r\n return obj;\r\n }\r\n // set the vue observable flag at obj\r\n var ob = createObserver();\r\n ob.__raw__ = true;\r\n def(obj, '__ob__', ob);\r\n // mark as Raw\r\n rawSet.set(obj, true);\r\n return obj;\r\n}", "transient private internal function m185() {}", "function rekognizeLabels(bucket, key) {\n let params = {\n Image: {\n S3Object: {\n Bucket: bucket,\n Name: key\n }\n },\n MaxLabels: 3,\n MinConfidence: 80\n };\n\n return rekognition.detectLabels(params).promise()\n}", "test_doNotRetainAnno(){\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.doNotRetainAnno);\n let object1 = translator.decode(text).getRoot();\n let object2 = translator.decode(text).getRoot();\n\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.DoNotRetainAnno\", object1.constructor.__getClass());\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.DoNotRetainAnno\", object2.constructor.__getClass());\n Assert.notEquals(object1, object2);\n }", "function LK_likeIt(elem) {\n var likeGroup = elem.getAttribute(LK_LIKEGROUP);\n var likeValue = elem.getAttribute(LK_LIKEVALUE);\n localStorage[likeGroup] = likeValue;\n\n // Change the style of the liker nodes\n var siblings = elem.parentNode.childNodes;\n for (var i = 0; i < siblings.length; i++) {\n if (siblings[i].style) { \n LK_applyNormalStyle(siblings[i]);\n }\n }\n LK_applySelectedStyle(elem, likeValue);\n\n // Change the value of any mini likers\n var allSpans = document.getElementsByTagName('span');\n for (var i = 0; i < allSpans.length; i++) {\n var span = allSpans[i];\n if (span.getAttribute(LK_LIKEGROUP) == likeGroup) {\n if (span.getAttribute(LK_LIKETYPE) == 'mini') {\n span.innerHTML = LK_MAPPINGS[likeValue].label;\n LK_applySelectedStyle(allSpans[i], likeValue);\n }\n }\n }\n}", "function OOPExample(who) {\n this.me = who;\n}", "getLikes(state, data) {\n state.likes = data\n }", "function _isAlternativeRecognitionResult(obj) {\r\n return obj && typeof obj === 'object';\r\n}", "function addLikes() {\n if (propLike?.includes(user.username)) {\n let index = propLike.indexOf(user.username);\n let removeLike = [\n ...propLike.slice(0, index),\n ...propLike.slice(index + 1),\n ];\n setLikeGet(removeLike);\n setPropLike(removeLike);\n setRedLike(\"\");\n\n addToLike(eventid, removeLike);\n } else {\n let likesArr = [...propLike, `${user.username}`];\n\n setLikeGet(likesArr);\n setPropLike(likesArr);\n setRedLike(\"red\");\n addToLike(eventid, likesArr);\n }\n }", "function LiteralObject() {\r\n}", "function Komunalne() {}", "function Bevy() {}", "function Prediction() {\n this.score = {};\n}", "function Object() {}", "function Object() {}", "function canEnumPub(obj, name) {\n if (obj === null) { return false; }\n if (obj === void 0) { return false; }\n name = String(name);\n if (obj[name + '_canEnum___']) { return true; }\n if (endsWith__.test(name)) { return false; }\n if (!isJSONContainer(obj)) { return false; }\n if (!myOriginalHOP.call(obj, name)) { return false; }\n fastpathEnum(obj, name);\n if (name === 'toString') { return true; }\n fastpathRead(obj, name);\n return true;\n }", "function Obj(){ return Literal.apply(this,arguments) }", "test_primitives() {\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.primitives);\n let object = translator.decode(text).getRoot();\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.Primitives\", object.constructor.__getClass());\n Assert.equals(\"alpha9\", object.string);\n }", "function hello()\n{\n /* ATTRIBUTES */\n this.coolbeans = 'class';\n this.something = 'hello-class';\n\n}", "function test_cluster_tagged_crosshair_op_vsphere65() {}", "function classifyVideo() {\n classifier.classify(gotResult);\n}", "function classifyVideo() {\n classifier.classify(gotResult);\n}", "constructor(papa,mummy,sivlings,belongs,loving_bro,favs_bro){\n super(papa,mummy,sivlings,belongs)\n this.loving_bro=loving_bro\n this.favs_bro=favs_bro\n }", "function v8(v9,v10) {\n const v16 = [1337,1337];\n // v16 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v17 = [\"536870912\",-3848843708,v16,-3848843708,1337,13.37,13.37,WeakMap,-3848843708];\n // v17 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v18 = {constructor:13.37,e:v16};\n // v18 = .object(ofGroup: Object, withProperties: [\"constructor\", \"e\", \"__proto__\"])\n const v19 = {__proto__:-3848843708,a:v18,b:-3848843708,constructor:1337,d:v18,e:v17,length:WeakMap};\n // v19 = .object(ofGroup: Object, withProperties: [\"d\", \"b\", \"a\", \"__proto__\", \"e\", \"constructor\", \"length\"])\n const v21 = new Float64Array(v19);\n // v21 = .object(ofGroup: Float64Array, withProperties: [\"byteOffset\", \"constructor\", \"buffer\", \"__proto__\", \"byteLength\", \"length\"], withMethods: [\"map\", \"values\", \"subarray\", \"find\", \"fill\", \"set\", \"findIndex\", \"some\", \"reduceRight\", \"reverse\", \"join\", \"includes\", \"entries\", \"reduce\", \"every\", \"copyWithin\", \"sort\", \"forEach\", \"lastIndexOf\", \"indexOf\", \"filter\", \"slice\", \"keys\"])\n v6[6] = v7;\n v7.toString = v9;\n }", "function defineInspect(classObject) {\n var fn = classObject.prototype.toJSON;\n typeof fn === 'function' || invariant(0);\n classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n if (nodejsCustomInspectSymbol[\"a\" /* default */]) {\n classObject.prototype[nodejsCustomInspectSymbol[\"a\" /* default */]] = fn;\n }\n}", "annotate(message: string, data: Object) {\n this.message = message;\n this.data = assign(this.data, data);\n }", "function encodeObject(o) {\n if (_.isNumber(o)) {\n if (_.isNaN(o)) {\n return ['SPECIAL_FLOAT', 'NaN'];\n } else if (o === Infinity) {\n return ['SPECIAL_FLOAT', 'Infinity'];\n } else if (o === -Infinity) {\n return ['SPECIAL_FLOAT', '-Infinity'];\n } else {\n return o;\n }\n } else if (_.isString(o)) {\n return o;\n } else if (_.isBoolean(o) || _.isNull(o) || _.isUndefined(o)) {\n return ['JS_SPECIAL_VAL', String(o)];\n } else if (typeof o === 'symbol') {\n // ES6 symbol\n return ['JS_SPECIAL_VAL', String(o)];\n } else {\n // render these as heap objects\n\n // very important to use _.has since we don't want to\n // grab the property in your prototype, only in YOURSELF ... SUBTLE!\n if (!_.has(o, 'smallObjId_hidden_')) {\n // make this non-enumerable so that it doesn't show up in\n // console.log() or other inspector functions\n Object.defineProperty(o, 'smallObjId_hidden_', { value: smallObjId,\n enumerable: false });\n smallObjId++;\n }\n assert(o.smallObjId_hidden_ > 0);\n\n var ret = ['REF', o.smallObjId_hidden_];\n\n if (encodedHeapObjects[String(o.smallObjId_hidden_)] !== undefined) {\n return ret;\n }\n else {\n assert(_.isObject(o));\n\n var newEncodedObj = [];\n encodedHeapObjects[String(o.smallObjId_hidden_)] = newEncodedObj;\n\n var i;\n\n if (_.isFunction(o)) {\n var funcProperties = []; // each element is a pair of [name, encoded value]\n\n var encodedProto = null;\n if (_.isObject(o.prototype)) {\n // TRICKY TRICKY! for inheritance to be displayed properly, we\n // want to find the prototype of o.prototype and see if it's\n // non-empty. if that's true, then even if o.prototype is\n // empty (i.e., has no properties of its own), then we should\n // still encode it since its 'prototype' \"uber-hidden\n // property\" is non-empty\n var prototypeOfPrototype = Object.getPrototypeOf(o.prototype);\n if (!_.isEmpty(o.prototype) ||\n (_.isObject(prototypeOfPrototype) && !_.isEmpty(prototypeOfPrototype))) {\n encodedProto = encodeObject(o.prototype);\n }\n }\n\n if (encodedProto) {\n funcProperties.push(['prototype', encodedProto]);\n }\n\n // now get all of the normal properties out of this function\n // object (it's unusual to put properties in a function object,\n // but it's still legal!)\n var funcPropPairs = _.pairs(o);\n for (i = 0; i < funcPropPairs.length; i++) {\n funcProperties.push([funcPropPairs[i][0], encodeObject(funcPropPairs[i][1])]);\n }\n\n var funcCodeString = o.toString();\n\n /*\n\n #craftsmanship -- make nested functions look better by indenting\n the first line of a nested function definition by however much\n the LAST line is indented, ONLY if the last line is simply a\n single ending '}'. otherwise it will look ugly since the\n function definition doesn't start out indented, like so:\n\nfunction bar(x) {\n globalZ += 100;\n return x + y + globalZ;\n }\n\n */\n var codeLines = funcCodeString.split('\\n');\n if (codeLines.length > 1) {\n var lastLine = _.last(codeLines);\n if (lastLine.trim() === '}') {\n var lastLinePrefix = lastLine.slice(0, lastLine.indexOf('}'));\n funcCodeString = lastLinePrefix + funcCodeString; // prepend!\n }\n }\n\n newEncodedObj.push('JS_FUNCTION',\n o.name,\n funcCodeString, /* code string*/\n funcProperties.length ? funcProperties : null, /* OPTIONAL */\n null /* parent frame */);\n } else if (_.isArray(o)) {\n newEncodedObj.push('LIST');\n for (i = 0; i < o.length; i++) {\n newEncodedObj.push(encodeObject(o[i]));\n }\n } else if (o.__proto__.toString() === canonicalSet.__proto__.toString()) { // dunno why 'instanceof' doesn't work :(\n newEncodedObj.push('SET');\n // ES6 Set (TODO: add WeakSet)\n for (let item of o) {\n newEncodedObj.push(encodeObject(item));\n }\n } else if (o.__proto__.toString() === canonicalMap.__proto__.toString()) { // dunno why 'instanceof' doesn't work :(\n // ES6 Map (TODO: add WeakMap)\n newEncodedObj.push('DICT'); // use the Python 'DICT' type since it's close enough; adjust display in frontend\n for (let [key, value] of o) {\n newEncodedObj.push([encodeObject(key), encodeObject(value)]);\n }\n } else {\n // a true object\n\n // if there's a custom toString() function (note that a truly\n // prototypeless object won't have toString method, so check first to\n // see if toString is *anywhere* up the prototype chain)\n var s = (o.toString !== undefined) ? o.toString() : '';\n if (s !== '' && s !== '[object Object]') {\n newEncodedObj.push('INSTANCE_PPRINT', 'object', s);\n } else {\n newEncodedObj.push('INSTANCE', '');\n var pairs = _.pairs(o);\n for (i = 0; i < pairs.length; i++) {\n var e = pairs[i];\n newEncodedObj.push([encodeObject(e[0]), encodeObject(e[1])]);\n }\n\n var proto = Object.getPrototypeOf(o);\n if (_.isObject(proto) && !_.isEmpty(proto)) {\n //log('obj.prototype', proto, proto.smallObjId_hidden_);\n // I think __proto__ is the official term for this field,\n // *not* 'prototype'\n newEncodedObj.push(['__proto__', encodeObject(proto)]);\n }\n }\n }\n\n return ret;\n }\n\n }\n assert(false);\n}", "function dist_index_esm_contains(obj,key){return Object.prototype.hasOwnProperty.call(obj,key);}", "function isRawPostcodeObject(o, additionalAttr, blackListedAttr) {\n\tif (!additionalAttr) additionalAttr = [];\n\tif (!blackListedAttr) blackListedAttr = [];\n\tisSomeObject(o, rawPostcodeAttributes, additionalAttr, blackListedAttr);\n}", "function _meta_(v,m){var ms=v['__meta__']||{};for(var k in m){ms[k]=m[k]};v['__meta__']=ms;return v}", "function Animal() {\n this.kind = \"Dog\"\n}", "function Kitten(name, photo, interests, isGoodWithKids, isGoodWithDogs, isGoodWithCats) {\n this.name = name;\n this.photo = photo;\n this.interests = interests;\n this.isGoodWithKids = isGoodWithKids;\n this.isGoodWithCats = isGoodWithCats;\n this.isGoodWithDogs = isGoodWithDogs;\n}", "getMeta () {\n }", "function np(e){return\"[object Object]\"===Object.prototype.toString.call(e)}", "function Obj() {}", "function isFriend(name, object) {\n//use hasWord function to check object names array\n// console.log(object);\n// console.log(name);\n//conditional to check for property\nif (object['friends'] !== undefined) {\nreturn hasWord(object.friends.join(' '), name);\n}\nelse {return false};\n \n}", "function test_fail_hole_prototype() {\n var obj = Object.create({ stuff: \"in prototype\" });\n obj.foo = \"bar\";\n\n function f1() {\n bidar.serialize(obj);\n }\n assert.throws(f1, /Hole-ful graph, but no hole filter/);\n}", "function Person(saying) {\n this.saying = saying;\n /*\n return {\n dumbObject: true\n }\n */\n}", "transient private protected internal function m182() {}", "function kotlin(hljs) {\n const KEYWORDS = {\n keyword:\n 'abstract as val var vararg get set class object open private protected public noinline ' +\n 'crossinline dynamic final enum if else do while for when throw try catch finally ' +\n 'import package is in fun override companion reified inline lateinit init ' +\n 'interface annotation data sealed internal infix operator out by constructor super ' +\n 'tailrec where const inner suspend typealias external expect actual',\n built_in:\n 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',\n literal:\n 'true false null'\n };\n const KEYWORDS_WITH_LABEL = {\n className: 'keyword',\n begin: /\\b(break|continue|return|this)\\b/,\n starts: {\n contains: [\n {\n className: 'symbol',\n begin: /@\\w+/\n }\n ]\n }\n };\n const LABEL = {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '@'\n };\n\n // for string templates\n const SUBST = {\n className: 'subst',\n begin: /\\$\\{/,\n end: /\\}/,\n contains: [ hljs.C_NUMBER_MODE ]\n };\n const VARIABLE = {\n className: 'variable',\n begin: '\\\\$' + hljs.UNDERSCORE_IDENT_RE\n };\n const STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"\"\"',\n end: '\"\"\"(?=[^\"])',\n contains: [\n VARIABLE,\n SUBST\n ]\n },\n // Can't use built-in modes easily, as we want to use STRING in the meta\n // context as 'meta-string' and there's no syntax to remove explicitly set\n // classNames in built-in modes.\n {\n begin: '\\'',\n end: '\\'',\n illegal: /\\n/,\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '\"',\n end: '\"',\n illegal: /\\n/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VARIABLE,\n SUBST\n ]\n }\n ]\n };\n SUBST.contains.push(STRING);\n\n const ANNOTATION_USE_SITE = {\n className: 'meta',\n begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\\\s*:(?:\\\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'\n };\n const ANNOTATION = {\n className: 'meta',\n begin: '@' + hljs.UNDERSCORE_IDENT_RE,\n contains: [\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [\n hljs.inherit(STRING, {\n className: 'meta-string'\n })\n ]\n }\n ]\n };\n\n // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals\n // According to the doc above, the number mode of kotlin is the same as java 8,\n // so the code below is copied from java.js\n const KOTLIN_NUMBER_MODE = NUMERIC;\n const KOTLIN_NESTED_COMMENT = hljs.COMMENT(\n '/\\\\*', '\\\\*/',\n {\n contains: [ hljs.C_BLOCK_COMMENT_MODE ]\n }\n );\n const KOTLIN_PAREN_TYPE = {\n variants: [\n {\n className: 'type',\n begin: hljs.UNDERSCORE_IDENT_RE\n },\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [] // defined later\n }\n ]\n };\n const KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE;\n KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ];\n KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ];\n\n return {\n name: 'Kotlin',\n aliases: [ 'kt' ],\n keywords: KEYWORDS,\n contains: [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance: 0,\n contains: [\n {\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n KEYWORDS_WITH_LABEL,\n LABEL,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n {\n className: 'function',\n beginKeywords: 'fun',\n end: '[(]|$',\n returnBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n relevance: 5,\n contains: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n returnBegin: true,\n relevance: 0,\n contains: [ hljs.UNDERSCORE_TITLE_MODE ]\n },\n {\n className: 'type',\n begin: /</,\n end: />/,\n keywords: 'reified',\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n endsParent: true,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n {\n begin: /:/,\n end: /[=,\\/]/,\n endsWithParent: true,\n contains: [\n KOTLIN_PAREN_TYPE,\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT\n ],\n relevance: 0\n },\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n STRING,\n hljs.C_NUMBER_MODE\n ]\n },\n KOTLIN_NESTED_COMMENT\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface trait', // remove 'trait' when removed from KEYWORDS\n end: /[:\\{(]|$/,\n excludeEnd: true,\n illegal: 'extends implements',\n contains: [\n {\n beginKeywords: 'public protected internal private constructor'\n },\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'type',\n begin: /</,\n end: />/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0\n },\n {\n className: 'type',\n begin: /[,:]\\s*/,\n end: /[<\\(,]|$/,\n excludeBegin: true,\n returnEnd: true\n },\n ANNOTATION_USE_SITE,\n ANNOTATION\n ]\n },\n STRING,\n {\n className: 'meta',\n begin: \"^#!/usr/bin/env\",\n end: '$',\n illegal: '\\n'\n },\n KOTLIN_NUMBER_MODE\n ]\n };\n}", "function kotlin(hljs) {\n const KEYWORDS = {\n keyword:\n 'abstract as val var vararg get set class object open private protected public noinline ' +\n 'crossinline dynamic final enum if else do while for when throw try catch finally ' +\n 'import package is in fun override companion reified inline lateinit init ' +\n 'interface annotation data sealed internal infix operator out by constructor super ' +\n 'tailrec where const inner suspend typealias external expect actual',\n built_in:\n 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',\n literal:\n 'true false null'\n };\n const KEYWORDS_WITH_LABEL = {\n className: 'keyword',\n begin: /\\b(break|continue|return|this)\\b/,\n starts: {\n contains: [\n {\n className: 'symbol',\n begin: /@\\w+/\n }\n ]\n }\n };\n const LABEL = {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '@'\n };\n\n // for string templates\n const SUBST = {\n className: 'subst',\n begin: /\\$\\{/,\n end: /\\}/,\n contains: [ hljs.C_NUMBER_MODE ]\n };\n const VARIABLE = {\n className: 'variable',\n begin: '\\\\$' + hljs.UNDERSCORE_IDENT_RE\n };\n const STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"\"\"',\n end: '\"\"\"(?=[^\"])',\n contains: [\n VARIABLE,\n SUBST\n ]\n },\n // Can't use built-in modes easily, as we want to use STRING in the meta\n // context as 'meta-string' and there's no syntax to remove explicitly set\n // classNames in built-in modes.\n {\n begin: '\\'',\n end: '\\'',\n illegal: /\\n/,\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '\"',\n end: '\"',\n illegal: /\\n/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VARIABLE,\n SUBST\n ]\n }\n ]\n };\n SUBST.contains.push(STRING);\n\n const ANNOTATION_USE_SITE = {\n className: 'meta',\n begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\\\s*:(?:\\\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'\n };\n const ANNOTATION = {\n className: 'meta',\n begin: '@' + hljs.UNDERSCORE_IDENT_RE,\n contains: [\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [\n hljs.inherit(STRING, {\n className: 'meta-string'\n })\n ]\n }\n ]\n };\n\n // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals\n // According to the doc above, the number mode of kotlin is the same as java 8,\n // so the code below is copied from java.js\n const KOTLIN_NUMBER_MODE = NUMERIC;\n const KOTLIN_NESTED_COMMENT = hljs.COMMENT(\n '/\\\\*', '\\\\*/',\n {\n contains: [ hljs.C_BLOCK_COMMENT_MODE ]\n }\n );\n const KOTLIN_PAREN_TYPE = {\n variants: [\n {\n className: 'type',\n begin: hljs.UNDERSCORE_IDENT_RE\n },\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [] // defined later\n }\n ]\n };\n const KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE;\n KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ];\n KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ];\n\n return {\n name: 'Kotlin',\n aliases: [ 'kt' ],\n keywords: KEYWORDS,\n contains: [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance: 0,\n contains: [\n {\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n KEYWORDS_WITH_LABEL,\n LABEL,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n {\n className: 'function',\n beginKeywords: 'fun',\n end: '[(]|$',\n returnBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n relevance: 5,\n contains: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n returnBegin: true,\n relevance: 0,\n contains: [ hljs.UNDERSCORE_TITLE_MODE ]\n },\n {\n className: 'type',\n begin: /</,\n end: />/,\n keywords: 'reified',\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n endsParent: true,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n {\n begin: /:/,\n end: /[=,\\/]/,\n endsWithParent: true,\n contains: [\n KOTLIN_PAREN_TYPE,\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT\n ],\n relevance: 0\n },\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n STRING,\n hljs.C_NUMBER_MODE\n ]\n },\n KOTLIN_NESTED_COMMENT\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface trait', // remove 'trait' when removed from KEYWORDS\n end: /[:\\{(]|$/,\n excludeEnd: true,\n illegal: 'extends implements',\n contains: [\n {\n beginKeywords: 'public protected internal private constructor'\n },\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'type',\n begin: /</,\n end: />/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0\n },\n {\n className: 'type',\n begin: /[,:]\\s*/,\n end: /[<\\(,]|$/,\n excludeBegin: true,\n returnEnd: true\n },\n ANNOTATION_USE_SITE,\n ANNOTATION\n ]\n },\n STRING,\n {\n className: 'meta',\n begin: \"^#!/usr/bin/env\",\n end: '$',\n illegal: '\\n'\n },\n KOTLIN_NUMBER_MODE\n ]\n };\n}", "function Surrogate(){}", "function Surrogate(){}", "function Surrogate(){}", "static serialize(obj, allowPrimitives, fallbackToJson, requireJsonType = false) {\n if (allowPrimitives) {\n if (typeof obj === \"string\") {\n return this.serializePrimitive(obj, \"string\");\n } else if (typeof obj === \"number\") {\n return this.serializePrimitive(obj, \"double\");\n } else if (Buffer.isBuffer(obj)) {\n return this.serializePrimitive(obj, \"bytes\");\n } else if (typeof obj === \"boolean\") {\n return this.serializePrimitive(obj, \"bool\");\n } else if (Long.isLong(obj)) {\n return this.serializePrimitive(obj, \"int64\");\n }\n }\n if (obj.constructor && typeof obj.constructor.encode === \"function\" && obj.constructor.$type) {\n return Any.create({\n // I have *no* idea why it's type_url and not typeUrl, but it is.\n type_url: \"type.googleapis.com/\" + AnySupport.fullNameOf(obj.constructor.$type),\n value: obj.constructor.encode(obj).finish()\n });\n } else if (fallbackToJson && typeof obj === \"object\") {\n let type = obj.type;\n if (type === undefined) {\n if (requireJsonType) {\n throw new Error(util.format(\"Fallback to JSON serialization supported, but object does not define a type property: %o\", obj));\n } else {\n type = \"object\";\n }\n }\n return Any.create({\n type_url: CloudStateJson + type,\n value: this.serializePrimitiveValue(stableJsonStringify(obj), \"string\")\n });\n } else {\n throw new Error(util.format(\"Object %o is not a protobuf object, and hence can't be dynamically \" +\n \"serialized. Try passing the object to the protobuf classes create function.\", obj));\n }\n }" ]
[ "0.527866", "0.52612406", "0.51951283", "0.518796", "0.51302594", "0.5044646", "0.48934332", "0.4857401", "0.484017", "0.48302925", "0.482028", "0.4812441", "0.4808473", "0.47852293", "0.47828078", "0.47574478", "0.47493434", "0.4739314", "0.47239366", "0.4703992", "0.4703992", "0.46990207", "0.4690639", "0.46904448", "0.46862254", "0.46716532", "0.46667543", "0.46522382", "0.46354175", "0.46053663", "0.46017453", "0.45926702", "0.45891586", "0.45877746", "0.458541", "0.45851982", "0.45847243", "0.4584686", "0.458378", "0.45767823", "0.45753202", "0.45753202", "0.45753202", "0.45713404", "0.45637134", "0.45637134", "0.4557141", "0.4557141", "0.4557141", "0.45494914", "0.45366898", "0.45342454", "0.4533338", "0.45322663", "0.45229813", "0.452288", "0.452288", "0.45159692", "0.45102093", "0.45099118", "0.45062032", "0.4506134", "0.45033473", "0.4502599", "0.44998378", "0.4497197", "0.44843012", "0.44764578", "0.44738895", "0.44715428", "0.44715428", "0.4471341", "0.44594073", "0.44552016", "0.44538808", "0.44522536", "0.44464657", "0.44464657", "0.4443469", "0.4443427", "0.44433454", "0.4437557", "0.4436382", "0.4430658", "0.4429719", "0.4428169", "0.44260293", "0.4420813", "0.44155774", "0.44130567", "0.4406073", "0.4401904", "0.44010627", "0.43994573", "0.43948644", "0.43847254", "0.43847254", "0.43830302", "0.43830302", "0.43830302", "0.4381413" ]
0.0
-1
if it's past the high water mark, we can push in some more. Also, if we have no data yet, we can stand some more bytes. This is to work around cases where hwm=0, such as the repl. Also, if the push() triggered a readable event, and the user called read(largeNumber) such that needReadable was set, then we ought to push more, so that another 'readable' event will be triggered.
function needMoreData(state) { return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function push(){if(pushes>PUSHCOUNT)return;if(pushes++===PUSHCOUNT){console.error(\" push(EOF)\");return r.push(null)}console.error(\" push #%d\",pushes);r.push(new Buffer(PUSHSIZE))&&setTimeout(push)}", "tryPush() {\n\t\t// Get the total length of what would be pushed.\n\t\tconst amountToPush = Math.min(this.buffer.length, this.requestedSize);\n\n\t\t// Check if it's possible to push right now.\n\t\tif (this.canPush &&\n\t\t\tamountToPush > 0 &&\n\t\t\t(this.initialPass || this.finished || this.buffer.length >= this.initial)) {\n\t\t\tthis.initialPass = true;\n\n\t\t\t// Push the data.\n\t\t\tthis.requestedSize = -1;\n\t\t\tthis.canPush = this.push(Buffer.from(this.buffer.shift(amountToPush)));\n\t\t}\n\n\t\t// Append part of the waiting chunk if possible.\n\t\tif (this.waiting) {\n\t\t\tconst chunk = this.waiting.chunk;\n\t\t\tconst callback = this.waiting.callback;\n\n\t\t\t// Append the data to the buffer.\n\t\t\tconst toPush = Math.min(this.buffer.remaining, chunk.length);\n\t\t\tthis.buffer.push(chunk.slice(0, toPush));\n\n\t\t\t// Adjust the waiting chunk.\n\t\t\tthis.waiting.chunk = chunk.slice(toPush);\n\n\t\t\t// If the waiting chunk is gone, callback and reset.\n\t\t\tif (this.waiting.chunk.length == 0) {\n\t\t\t\tthis.waiting = null;\n\t\t\t\tcallback();\n\t\t\t}\n\n\t\t\t// Try pushing.\n\t\t\tif (toPush > 0) this.tryPush();\n\t\t}\n\t}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}// backwards compatibility.", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n return (\n !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0)\n );\n }", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n }", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n }", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData$2(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData$1(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\r\n return !state.ended &&\r\n (state.needReadable ||\r\n state.length < state.highWaterMark ||\r\n state.length === 0);\r\n}", "unshiftUnreadOverflow() {\n\t\t\tconst {reader, writer} = this.state;\n\t\t\tconst leftover = reader.getReadableSize();\n\n\t\t\tif (leftover > 0 && reader.readOffset < writer.writeOffset) {\n\t\t\t\tconst bytes = writer.bytes.slice(reader.readOffset, writer.writeOffset);\n\t\t\t\tthis.overflow.unshift(bytes);\n\t\t\t}\n\t\t}" ]
[ "0.65658844", "0.64052856", "0.6392542", "0.6380758", "0.6350603", "0.6350603", "0.6241856", "0.6212878", "0.6170371", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.6164681", "0.61635274", "0.6123655", "0.6123655", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61124796", "0.61010766", "0.60951054", "0.60607934", "0.60361964" ]
0.0
-1
This function is designed to be inlinable, so please take care when making changes to the function body.
function howMuchToRead(n, state) { if (n <= 0 || state.length === 0 && state.ended) return 0; if (state.objectMode) return 1; if (n !== n) { // Only flow one buffer at a time if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; } // If we're asking for more than the current hwm, then raise the hwm. if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); if (n <= state.length) return n; // Don't have enough if (!state.ended) { state.needReadable = true; return 0; } return state.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient protected internal function m189() {}", "transient private protected internal function m182() {}", "transient private internal function m185() {}", "transient final protected internal function m174() {}", "static private internal function m121() {}", "static private protected internal function m118() {}", "transient final private protected internal function m167() {}", "static final private internal function m106() {}", "transient private protected public internal function m181() {}", "function StupidBug() {}", "static transient final protected internal function m47() {}", "static private protected public internal function m117() {}", "static transient final private internal function m43() {}", "static transient private protected internal function m55() {}", "transient private public function m183() {}", "function miFuncion (){}", "static transient final protected public internal function m46() {}", "static final private protected internal function m103() {}", "transient final private internal function m170() {}", "function fn() {\n\t\t }", "function _____SHARED_functions_____(){}", "transient final private protected public internal function m166() {}", "static transient private protected public internal function m54() {}", "static protected internal function m125() {}", "static transient final private protected internal function m40() {}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "static final private protected public internal function m102() {}", "static transient final protected function m44() {}", "function fuction() {\n\n}", "function Scdr() {\r\n}", "static transient private internal function m58() {}", "static final private public function m104() {}", "function TMP(){return;}", "function TMP(){return;}", "static transient private public function m56() {}", "static transient final private public function m41() {}", "static final protected internal function m110() {}", "function normal() {}", "function accessesingData2() {\n\n}", "function accessesingData2() {\n\n}", "static transient final private protected public internal function m39() {}", "static private public function m119() {}", "function dummy(){}", "function dummy(){}", "function dummy(){}", "function oi(){}", "function Expt() {\r\n}", "function TMP() {\n return;\n }", "function ea(){}", "hacky(){\n return\n }", "function fm(){}", "function makeBigger() {\n\n}", "transient final private public function m168() {}", "static transient final private protected public function m38() {}", "preorder() {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "function main(){\n\n\n}", "apply () {}", "function reserved(){}", "function lalalala() {\n\n}", "function updateroster() {\n\n}", "function fuctionPanier(){\n\n}", "function Intialize() {\n return;\n}", "function tempConvert(){\n \n}", "function Efw() {\n}", "function __func(){}", "function StackFunctionSupport() {\r\n}", "function dummyReturn(){\n}", "function customHandling() { }", "static transient protected internal function m62() {}", "function redactInfo (obj) {\n \n}// CODE HERE", "sinceFunction() {}", "function Ha(){}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "function wa(){}", "function ba(){}", "function ba(){}", "function ba(){}", "function ba(){}", "function es1(params) {\n \n}", "function Main()\n {\n \n }", "function s(){}", "function Yielder() {}", "prepare() {}", "function Macex() {\r\n}", "function comportement (){\n\t }", "function yst_overrideElemFunction() {\n\treturn;\n}", "function startPoint()\n{\n\n}", "function miFuncion(){\n\n}", "function beetle_lvl4() {}", "function sprinkles() {\n\n\t}", "function FunctionUtils() {}", "function Sread() {\r\n}", "function Rebelizer() {\n\n}", "function noop(){}// No operation performed." ]
[ "0.6834781", "0.67074317", "0.6685873", "0.6599575", "0.6528078", "0.6306303", "0.63039434", "0.62592036", "0.6209561", "0.612205", "0.6071775", "0.59868515", "0.59800345", "0.590985", "0.5897201", "0.58810145", "0.5879038", "0.57503766", "0.572729", "0.5717947", "0.57138914", "0.57042855", "0.5703867", "0.5694151", "0.5686834", "0.568582", "0.5641935", "0.56288594", "0.5587808", "0.5587808", "0.5587808", "0.55543095", "0.5466298", "0.5453683", "0.5448801", "0.54374784", "0.5404681", "0.53649175", "0.53649175", "0.5363937", "0.53297824", "0.5317933", "0.52905476", "0.52807754", "0.52807754", "0.52757865", "0.5268943", "0.5263605", "0.5263605", "0.5263605", "0.52603436", "0.52543753", "0.5235096", "0.52277523", "0.52156323", "0.5188561", "0.5188098", "0.5184612", "0.51811624", "0.5173923", "0.5160381", "0.516014", "0.515129", "0.5148374", "0.5144869", "0.5131615", "0.5130324", "0.51302814", "0.51176786", "0.5112052", "0.51012963", "0.5093534", "0.5092389", "0.5090806", "0.5087576", "0.5058577", "0.50491154", "0.5038768", "0.5038768", "0.5038768", "0.5036851", "0.50352824", "0.50352824", "0.50352824", "0.50352824", "0.50332475", "0.5030561", "0.5027701", "0.50201863", "0.5013752", "0.50090057", "0.50024545", "0.5000754", "0.49940035", "0.49922147", "0.49850562", "0.4967037", "0.49650136", "0.49564183", "0.49471217", "0.4940361" ]
0.0
-1